Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Apr 1997 01:10:13 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        peter@freefall.freebsd.org, peter@spinner.dialix.com
Cc:        cvs-all@freefall.freebsd.org, CVS-committers@freefall.freebsd.org, cvs-include@freefall.freebsd.org
Subject:   Re: cvs commit: src/include unistd.h
Message-ID:  <199703311510.BAA12303@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>>   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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703311510.BAA12303>