From owner-cvs-include Mon Mar 31 04:52:55 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id EAA15965 for cvs-include-outgoing; Mon, 31 Mar 1997 04:52:55 -0800 (PST) Received: (from peter@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id EAA15958; Mon, 31 Mar 1997 04:52:53 -0800 (PST) Date: Mon, 31 Mar 1997 04:52:53 -0800 (PST) From: Peter Wemm Message-Id: <199703311252.EAA15958@freefall.freebsd.org> To: CVS-committers, cvs-all, cvs-include Subject: cvs commit: src/include unistd.h Sender: owner-cvs-include@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk peter 97/03/31 04:52:52 Modified: include unistd.h Log: Declare lchown().. Revision Changes Path 1.11 +1 -0 src/include/unistd.h From owner-cvs-include Mon Mar 31 04:58:56 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id EAA16273 for cvs-include-outgoing; Mon, 31 Mar 1997 04:58:56 -0800 (PST) Received: from spinner.DIALix.COM (root@spinner.dialix.com [192.203.228.67]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id EAA16264; Mon, 31 Mar 1997 04:58:16 -0800 (PST) Received: from spinner.DIALix.COM (peter@localhost.DIALix.oz.au [127.0.0.1]) by spinner.DIALix.COM (8.8.5/8.8.5) with ESMTP id UAA12853; Mon, 31 Mar 1997 20:58:08 +0800 (WST) Message-Id: <199703311258.UAA12853@spinner.DIALix.COM> X-Mailer: exmh version 2.0gamma 1/27/96 To: Peter Wemm cc: CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-include@freefall.freebsd.org Subject: Re: cvs commit: src/include unistd.h In-reply-to: Your message of "Mon, 31 Mar 1997 04:52:53 PST." <199703311252.EAA15958@freefall.freebsd.org> Date: Mon, 31 Mar 1997 20:58:07 +0800 From: Peter Wemm Sender: owner-cvs-include@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Peter Wemm wrote: > peter 97/03/31 04:52:52 > > Modified: include unistd.h > Log: > Declare lchown().. BTW, can anybody tell me the difference between the first list of prototypes and the second? It almost looks like the first are syscalls and the second are library functions, but it's far from that now. Or are the first set "standards based" functions, while the second set are "other"? Cheers, -Peter From owner-cvs-include Mon Mar 31 07:12:11 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id HAA22029 for cvs-include-outgoing; Mon, 31 Mar 1997 07:12:11 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id HAA21996; Mon, 31 Mar 1997 07:11:15 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id BAA12303; Tue, 1 Apr 1997 01:10:13 +1000 Date: Tue, 1 Apr 1997 01:10:13 +1000 From: Bruce Evans Message-Id: <199703311510.BAA12303@godzilla.zeta.org.au> To: peter@freefall.freebsd.org, peter@spinner.dialix.com Subject: Re: cvs commit: src/include unistd.h Cc: cvs-all@freefall.freebsd.org, CVS-committers@freefall.freebsd.org, cvs-include@freefall.freebsd.org Sender: owner-cvs-include@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >> Modified: include unistd.h >> Log: >> Declare lchown().. > >BTW, can anybody tell me the difference between the first list of >prototypes and the second? It almost looks like the first are syscalls >and the second are library functions, but it's far from that now. Or are >the first set "standards based" functions, while the second set are >"other"? The first list is supposed to be for POSIX.1. It was broken recently by adding getopt stuff. glibc is more careful about this. It declares getopt stuff if __USE_POSIX2 is defined. __USE_POSIX2 is defined if defined _POSIX_C_SOURCE >= 2 || defined _XOPEN_SOURCE Here _POSIX_C_SOURCE and _XOPEN_SOURCE are user defines. They are also defined by default under certain complicated but usually true conditions, essentially if something like _POSIX_SOURCE is defined, brokenly also if __STRICT_ANSI__ is defined (so that you can't compile much with `gcc -ansi' without having to know to much about these macros). Is this clear? :-) Bruce From owner-cvs-include Mon Mar 31 13:15:35 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id NAA10965 for cvs-include-outgoing; Mon, 31 Mar 1997 13:15:35 -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 NAA10936 for ; Mon, 31 Mar 1997 13:15:15 -0800 (PST) Received: (qmail 10954 invoked by uid 5); 31 Mar 1997 21:15:09 -0000 Received: (from jb@localhost) by freebsd1.cimlogic.com.au (8.7.5/8.7.3) id HAA09273; Tue, 1 Apr 1997 07:10:15 +1000 (EST) From: John Birrell Message-Id: <199703312110.HAA09273@freebsd1.cimlogic.com.au> Subject: Re: cvs commit: src/include unistd.h To: bde@zeta.org.au (Bruce Evans) Date: Tue, 1 Apr 1997 07:10:14 +1000 (EST) Cc: peter@freefall.freebsd.org, peter@spinner.dialix.com, cvs-all@freefall.freebsd.org, CVS-committers@freefall.freebsd.org, cvs-include@freefall.freebsd.org In-Reply-To: <199703311510.BAA12303@godzilla.zeta.org.au> from Bruce Evans at "Apr 1, 97 01:10:13 am" 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: > glibc is more careful about this. It declares getopt stuff if > __USE_POSIX2 is defined. __USE_POSIX2 is defined if > > defined _POSIX_C_SOURCE >= 2 || defined _XOPEN_SOURCE > 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. And _POSIX_SOURCE still has to be tested for POSIX 1003.1[a]. -- 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 From owner-cvs-include Mon Mar 31 20:02:56 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id UAA06374 for cvs-include-outgoing; Mon, 31 Mar 1997 20:02:56 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id UAA06347; Mon, 31 Mar 1997 20:02:19 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id NAA03631; Tue, 1 Apr 1997 13:59:22 +1000 Date: Tue, 1 Apr 1997 13:59:22 +1000 From: Bruce Evans Message-Id: <199704010359.NAA03631@godzilla.zeta.org.au> To: bde@zeta.org.au, jb@cimlogic.com.au Subject: Re: cvs commit: src/include unistd.h Cc: cvs-all@freefall.freebsd.org, CVS-committers@freefall.freebsd.org, cvs-include@freefall.freebsd.org, peter@freefall.freebsd.org, peter@spinner.dialix.com Sender: owner-cvs-include@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >> glibc is more careful about this. It declares getopt stuff if >> __USE_POSIX2 is defined. __USE_POSIX2 is defined if >> >> defined _POSIX_C_SOURCE >= 2 || defined _XOPEN_SOURCE ^^^^^^^ editing error (was superfluous `defined _POSIX_C_SOURCE &&' >> >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? 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". Bruce 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 From owner-cvs-include Tue Apr 1 05:46:53 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id FAA01973 for cvs-include-outgoing; Tue, 1 Apr 1997 05:46:53 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id FAA01961; Tue, 1 Apr 1997 05:46:07 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id XAA23051; Tue, 1 Apr 1997 23:38:12 +1000 Date: Tue, 1 Apr 1997 23:38:12 +1000 From: Bruce Evans Message-Id: <199704011338.XAA23051@godzilla.zeta.org.au> To: bde@zeta.org.au, jb@cimlogic.com.au Subject: Re: cvs commit: src/include unistd.h Cc: cvs-all@freefall.freebsd.org, CVS-committers@freefall.freebsd.org, cvs-include@freefall.freebsd.org, peter@freefall.freebsd.org, peter@spinner.dialix.com Sender: owner-cvs-include@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >>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 This seems like a good reason to not support POSIX.1b :-). >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-) It's in the POSIX.2 draft that I have. BTW, I looked for POSIX books at some web book suppliers the other day. They didn't have much. IIRC, DA in Victoria has POSIX.2 for a measly A$296 and Amazon has it for US$98. Bruce From owner-cvs-include Sat Apr 5 05:03:22 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id FAA06393 for cvs-include-outgoing; Sat, 5 Apr 1997 05:03:22 -0800 (PST) Received: (from peter@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id FAA06382; Sat, 5 Apr 1997 05:03:18 -0800 (PST) Date: Sat, 5 Apr 1997 05:03:18 -0800 (PST) From: Peter Wemm Message-Id: <199704051303.FAA06382@freefall.freebsd.org> To: CVS-committers, cvs-all, cvs-include Subject: cvs commit: src/include unistd.h Sender: owner-cvs-include@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk peter 97/04/05 05:03:16 Modified: include unistd.h Log: Declare issetugid() Submitted by: Dmitrij Tejblum , PR#3200 Revision Changes Path 1.12 +1 -0 src/include/unistd.h