Date: Tue, 1 Apr 1997 17:59:37 +1000 (EST) From: John Birrell <jb@cimlogic.com.au> To: bde@zeta.org.au (Bruce Evans) Cc: bde@zeta.org.au, jb@cimlogic.com.au, cvs-all@freefall.freebsd.org, CVS-committers@freefall.freebsd.org, cvs-include@freefall.freebsd.org, peter@freefall.freebsd.org, peter@spinner.dialix.com Subject: Re: cvs commit: src/include unistd.h Message-ID: <199704010759.RAA10278@freebsd1.cimlogic.com.au> In-Reply-To: <199704010359.NAA03631@godzilla.zeta.org.au> from Bruce Evans at "Apr 1, 97 01:59:22 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans wrote: > >This doesn't comply with POSIX 1003.1b (and I assume .c). For POSIX 1003.1b, > >the _POSIX_C_SOURCE feature test is supposed to be compared against 199309L. > >And for 1003.1c, I guess that it is supposed to be 1996XXL where XX is the > >month that the update was (finally) published. > > glibc attempts to support POSIX.1b 1993 stuff, but it (glibc-2.0 at > least) seems to assume that POSIX.1b contains POSIX.2. Is this wrong? As far as POSIX.1b is concerned, yes I think it is wrong. 8-) >From my reading of POSIX 1003.1b, I'd expect to see things like: #if (!defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)) || (_POSIX_C_SOURCE >= 199309L) int nanosleep __P((const struct timespec *, struct timespec *)); #endif and for functions like ttyname_r that first appeared in 1003.1c, the header needs: #if (!defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)) || (_POSIX_C_SOURCE >= 1996xxL) int ttyname_r __P((int, char *, size_t)); #endif > A POSIX.2 draft rationale says that "each new value [of _POSIX_C_SOURCE > is expected to reserve] the name space for that new standard or revision, > plus all earlier POSIX standards". The rationale in POSIX 1003.1b says: "Since _POSIX_SOURCE as specified by IEEE Std 1003.1-1990 did not have a value associated with it, the _POSIX_C_SOURCE macro replaces it, allowing an application to inform the system of the version of the standard to which it conforms." I thought all the C API stuff was in 1003.1, so where does the glibc-2.0 get the _POSIX_C_SOURCE >= 2 from? Maybe I'm confused 'cause I've never seen POSIX.2. 8-) > > Bruce > Regards, -- John Birrell - jb@cimlogic.com.au; jb@netbsd.org; jb@freebsd.org CIMlogic Pty Ltd, 119 Cecil Street, South Melbourne Vic 3205, Australia Tel +61 3 9690 6900 Fax +61 3 9690 6650 Mob +61 418 353 137
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704010759.RAA10278>