This is the mail archive of the
mailing list for the glibc project.
Re: Add _DEFAULT_SOURCE feature test macro.
- From: Rich Felker <dalias at aerifal dot cx>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: Roland McGrath <roland at hack dot frob dot com>, libc-alpha at sourceware dot org
- Date: Thu, 19 Dec 2013 01:04:56 -0500
- Subject: Re: Add _DEFAULT_SOURCE feature test macro.
- Authentication-results: sourceware.org; auth=none
- References: <Pine dot LNX dot 4 dot 64 dot 1312052315530 dot 16480 at digraph dot polyomino dot org dot uk> <20131216225338 dot 6FA7E7442E at topped-with-meat dot com> <Pine dot LNX dot 4 dot 64 dot 1312172155340 dot 3620 at digraph dot polyomino dot org dot uk> <20131218210441 dot GM24286 at brightrain dot aerifal dot cx> <Pine dot LNX dot 4 dot 64 dot 1312182145560 dot 31737 at digraph dot polyomino dot org dot uk>
On Wed, Dec 18, 2013 at 09:50:20PM +0000, Joseph S. Myers wrote:
> On Wed, 18 Dec 2013, Rich Felker wrote:
> > To me this sounds like just about the ideal behavior. BTW I think it
> > also brings glibc's defaults closer to the defaults we're providing in
> > musl. We don't have a SVID switch at all, but the defaults include
> I think there's some confusion here - this patch isn't meant to change the
> defaults at all. The defaults are (BSD + SVID + POSIX.1-2008, but with
> with __USE_POSIX_IMPLICITLY defined) both before and after this patch.
> The point of this patch is to provide a way to get the default interfaces
> enabled with other options such as -std=c99 are used, (a) that doesn't
> depend on _BSD_SOURCE and _SVID_SOURCE being supported feature test macros
> and (b) that remains the same even when the default interface changes in
> future (e.g. for a newer version of POSIX).
I was going on the text "this patch deliberately bundles..." under the
impression that enabling all POSIX 2008 functionality (and not just
older POSIX functionality) as part of the default feature profile was
a change. Re-reading the existing features.h, it seems I was wrong,
and things are already closer to my ideal for how they should be than
I was aware of. In any case I'm still in favor of this patch even if
all it does is add an explicit way to get back the same defaults glibc
already has while also using -std=c99, etc.