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: "Michael Kerrisk (man-pages)" <mtk dot manpages at gmail dot com>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, 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 10:39:55 +0100
- 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> <53228E18 dot 50900 at redhat dot com>
- Reply-to: mtk dot manpages at gmail dot com
Hi Carlos,
On Fri, Mar 14, 2014 at 6:05 AM, Carlos O'Donell <carlos@redhat.com> wrote:
> 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
Thanks. I'll add some words to feature_test_macros(7).
Cheers,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/