NeXTcommunity

Everything => Software => Topic started by: ptek on Oct 21, 2026, 04:46 AM

Title: comp.sys.next.programmer notes
Post by: ptek on Oct 21, 2026, 04:46 AM
Here are two posts I've taken from that group, if any one finds anything else please add to this thread.

How do I get a (struct proc *) for the current user process (in NS3.3)?

This seems to work (NS3.3, from inside the ioctl system call):
(struct proc *) pr = active_u[0].utask->uu_procp; /* see sys/user.h */
comp.sys.next.programmer Sep 29, 1997 20:00 UTC
https://usenetarchives.com/view.php?id=comp.sys.next.programmer&mid=PDYwaGV2cCQ3dmEkMUBubnJwLmNzLnViYy5jYT4 (https://usenetarchives.com/view.php?id=comp.sys.next.programmer&mid=PDYwaGV2cCQ3dmEkMUBubnJwLmNzLnViYy5jYT4)

Have problem compiling code with strdup() (NS3.3)

NeXT's libc-equivalent doesn't have strdup(), but it does have a function with identical semantics named NXCopyStringBuffer(). (Don't ask me why.) You should be able to get pgp to compile either by defining

-Dstrdup=NXCopyStringBuffer
on the command line, or by putting
#define strdup(x) NXCopyStringBuffer(x)in a convenient header file (say, pgp.h). Or you could just find the offending strdup in the source code and replace it with NXCopyStringBuffer.

comp.sys.next.programmer Dec 04, 1996 19:00 UTC
https://usenetarchives.com/view.php?id=comp.sys.next.programmer&mid=PDU4MDc4NyQ5bmhAY29yYW50by51Y3MubXVuLmNhPg (https://usenetarchives.com/view.php?id=comp.sys.next.programmer&mid=PDU4MDc4NyQ5bmhAY29yYW50by51Y3MubXVuLmNhPg)