retiring gets(3)

Usenet Administration meissner at xyzzy.UUCP
Tue Nov 22 11:24:11 AEST 1988


In article <4509 at aldebaran.UUCP> jimp at cognos.UUCP (Jim Patterson) writes:
	/* stuff deleted */
| I know of at least one system where the system convention is not 0;
| Data General MV systems have instructions which take -1 as the null
| pointer value, and this has persisted through many system call
| conventions as well. However, the C implementation still considers a
| null pointer to be 0 even though this requires quite a bit of "glue"
| around some system calls to interface between the two formats.
| Requiring that the "null pointer constant" be 0, as ANSI C does, just
| makes any other implementation painfully difficult (and is begging for
| problems when porting software as well).

Sigh....  Yes the MV does have some queue instructions that take -1
for a null pointer.  However, the general NULL pointer as defined by
the C library is all 0's, as it is for other DG languages.  Whatever
other faults we have (three pointer types, etc.), a non-zero NULL is
not one of them.

And yes there are some system calls that want -1 in pointer fields as
a special value, there are also system calls that want you to do a
logical OR with the high bit set.  Such is life.....

-- 
Michael Meissner, Data General.

Uucp:	...!mcnc!rti!xyzzy!meissner
Arpa:	meissner at dg-rtp.DG.COM   (or) meissner%dg-rtp.DG.COM at relay.cs.net



More information about the Comp.lang.c mailing list