O_NOFOLLOW is not a gnu extension, it's posix-2008.

Mike Frysinger vapier at gentoo.org
Tue Apr 9 17:23:55 UTC 2013


On Thursday 14 March 2013 01:07:43 Rich Felker wrote:
> On Fri, Mar 08, 2013 at 09:57:37PM -0600, Rob Landley wrote:
> > Files like libc/sysdeps/linux/powerpc/bits/fcntl.h have blobs like:
> > 
> > #ifdef __USE_GNU
> > # define O_DIRECT       0400000 /* Direct disk access.  */
> > # define O_DIRECTORY     040000 /* Must be a directory.  */
> > # define O_NOFOLLOW     0100000 /* Do not follow links.  */
> > # define O_NOATIME      01000000 /* Do not set atime.  */
> > # define O_CLOEXEC      02000000 /* Set close_on_exec.  */
> > #endif
> > 
> > Meaning that if you don't #define GNU_DAMMIT you don't get symbols
> > Posix-2008 has been requiring for several years now:
> > 
> > file:///home/landley/reading/SUSv4/basedefs/fcntl.h.html
> > 
> > Which is why you don't need the #define to use O_NOFOLLOW in glibc.
> > 
> > This is hard to work around because the value of the symbol varies
> > per-target.
> 
> I think the cleanest fix would be for uClibc to just define them
> unconditionally. O_* is in the reserved namespace for fcntl.h so
> there's no requirement in POSIX that extended O_* flags be hidden by
> default.

there's really no need to do either.  uClibc copies these headers from glibc 
and we simply need to refresh things.  they've even unified the duplicated bits 
ala bits/fcntl-linux.h.

"innovation" in this space gains us nothing.  copying the headers verbatim 
from glibc saves a lot of time.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/uclibc/attachments/20130409/c9b5ea26/attachment.asc>


More information about the uClibc mailing list