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: "Carlos O'Donell" <carlos at redhat dot com>
- To: mtk dot manpages at gmail dot com, "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: Paul Eggert <eggert at cs dot ucla dot edu>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Date: Fri, 14 Mar 2014 01:05:28 -0400
- Subject: Re: Problems with evolving feature test macros?
- Authentication-results: sourceware.org; auth=none
- References: <CAKgNAki3SzAN8rZjvMQxbqDkpRGBzsmNGBKMJ0DDcMAG0nG8gQ at mail dot gmail dot com> <531F34C8 dot 9000500 at cs dot ucla dot edu> <CAKgNAkj5Bn8oSEPcpoiw6HnoE6hoNkHP6VAZBt2h5z4UPDAeDA at mail dot gmail dot com> <Pine dot LNX dot 4 dot 64 dot 1403111704460 dot 480 at digraph dot polyomino dot org dot uk> <CAKgNAkhqsnchESpkc+7OsvC8o5ZEN4R1EUd5GQz6-zN9f2YQOg at mail dot gmail dot com>
On 03/11/2014 03:07 PM, Michael Kerrisk (man-pages) wrote:
> Another question. Suppose we have some code that uses two interfaces
> that (on older glibc) require, respectively, _SVID_SOURCE (or
> _BSD_SOURCE) and _XOPEN_SOURCE. With the glibc 2.20 changes,
> _SVID_SOURCE will generate a warning. On the other hand, specifying
> just _DEFAULT_SOURCE won't work on older glibc versions. So, is the
> the correct approach then that in all cases where _SVID_SOURCE or
> _BSD_SOURCE was required, then _DEFAULT_SOURCE should be *added* (and
> _BSD_SOURCE/_SVID_SOURCE retained), in order to produce source code
> that compiles warning free across glibc versions?
Yes.
See: https://sourceware.org/glibc/wiki/Release/2.20#Packaging_Changes
Cheers,
Carlos.