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?


Paul,

On Tue, Mar 11, 2014 at 5:07 PM, Paul Eggert <eggert@cs.ucla.edu> wrote:
> On 03/11/2014 07:44 AM, Michael Kerrisk (man-pages) wrote:
>>
>> I'm guessing programmers will reach for
>> the only hammer that does not cause a compiler warning on any glibc
>> version:
>>
>> #define _GNU_SOURCE
>
>
> That's what most application developers should do, who run into this
> problem.  There's even an Autoconf macro for it: AC_USE_SYSTEM_EXTENSIONS.
>
>
>> That seems to be a very unfortunate situation.

Really? I could imagine it to be a source of quite some pain for
programmers trying to write portable code, although I have no specific
examples to cite. The point here is that programmer's are trying to
write applications that are not Linux-specific, but are forced to
define a macro that says give me everything, including all of the
Linux and GNU specific stuff. That weakens the whole idea of having a
range FTMs (as opposed to just _GNU_SOURCE, say), it seems to me.

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]