This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Problems with evolving feature test macros?
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Rich Felker <dalias at aerifal dot cx>
- Cc: "Michael Kerrisk (man-pages)" <mtk dot manpages at gmail dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, Roland McGrath <roland at hack dot frob dot com>, Andreas Jaeger <aj at novell dot com>
- Date: Tue, 11 Mar 2014 21:16:49 +0000
- Subject: Re: Problems with evolving feature test macros?
- Authentication-results: sourceware.org; auth=none
- References: <CAKgNAki3SzAN8rZjvMQxbqDkpRGBzsmNGBKMJ0DDcMAG0nG8gQ at mail dot gmail dot com> <Pine dot LNX dot 4 dot 64 dot 1403111804230 dot 480 at digraph dot polyomino dot org dot uk> <CAKgNAkiBvX1tu1uj3a41iwmeWbOTH_de0edTSAeRMZaSwQNCkw at mail dot gmail dot com> <20140311194742 dot GP184 at brightrain dot aerifal dot cx>
On Tue, 11 Mar 2014, Rich Felker wrote:
> Random thought: would it hurt to do something like this in feastures.h
> and leave it in place for at least the next few release cycles?
>
> #if (defined(_SVID_SOURCE) || defined(_BSD_SOURCE)) && !defined(_DEFAULT_SOURCE)
> #define _DEFAULT_SOURCE 1
> #endif
_BSD_SOURCE and _SVID_SOURCE already do define _DEFAULT_SOURCE like that
(with a deprecation working, unless _DEFAULT_SOURCE was explicitly defined
by the user).
--
Joseph S. Myers
joseph@codesourcery.com