From owner-cvs-include Tue Apr 1 02:36:06 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id CAA23469 for cvs-include-outgoing; Tue, 1 Apr 1997 02:36:06 -0800 (PST) Received: from werple.net.au (melb.werple.net.au [203.9.190.18]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id CAA23438 for ; Tue, 1 Apr 1997 02:35:38 -0800 (PST) Received: (qmail 22673 invoked by uid 5); 1 Apr 1997 10:34:59 -0000 Received: (from jb@localhost) by freebsd1.cimlogic.com.au (8.7.5/8.7.3) id RAA10278; Tue, 1 Apr 1997 17:59:38 +1000 (EST) From: John Birrell Message-Id: <199704010759.RAA10278@freebsd1.cimlogic.com.au> Subject: Re: cvs commit: src/include unistd.h To: bde@zeta.org.au (Bruce Evans) Date: Tue, 1 Apr 1997 17:59:37 +1000 (EST) 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 In-Reply-To: <199704010359.NAA03631@godzilla.zeta.org.au> from Bruce Evans at "Apr 1, 97 01:59:22 pm" X-Mailer: ELM [version 2.4ME+ PL22 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-cvs-include@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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