This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problems with evolving feature test macros?


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]