__STDC__ and POSIX

Guy Harris guy at auspex.UUCP
Sat Jan 21 08:46:13 AEST 1989


 >>	The new default compilation environment predefines
 >>	_POSIX_SOURCE "on behalf of the application", i.e. it is
 >>	NOT considered as being provided by the official
 >>	"implementation" but by the "program" being compiled.
 >
 >I would rather have the implementation provide it.

The implementation *is* providing it, if you're thinking about it
reasonably; the intent is to *say* that it's being done "on behalf of
the application", if you're thinking about it legalistically, instead,
so as to keep excessively legalistic types from playing "dog in the
manger."

Basically, if you say "cc -Q posix", or whatever, it'll predefine it. 
"cc" by itself may end up giving you the "complete" environment,
whatever that be (probably ANSI C + POSIX +, on a modern UNIX system,
additional error numbers in <errno.h> and the like), and "cc -Q ansi"
may end up giving you ANSI C, no more, no less, no "fdopen", no
"fileno", etc.. 



More information about the Comp.std.c mailing list