[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Should I define _GNU_SOURCE?

From: Mathieu Lirzin
Subject: Re: Should I define _GNU_SOURCE?
Date: Mon, 22 Jan 2018 18:19:28 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Eric Blake <address@hidden> writes:

> On 01/22/2018 09:55 AM, Victor Porton wrote:
>> I am writing a software for Linux/Unix which could benefit from
>> execvpe() C function.
>> But this function is defined only when -D_GNU_SOURCE.
>> Question 1: Should I ALWAYS use -D_GNU_SOURCE for compiler options no
>> matter what are user options?
> If you want to enable the use of a platform's extensions, the easiest
> way is to use the AC_USE_SYSTEM_EXTENSIONS macro (rather than
> -D_GNU_SOURCE, as only works for a subset of systems), prior to the
> rest of your that probes which extensions are now available.

Do you have an example of something failing to compile with
-D_GNU_SOURCE? I trust your claim but I am just curious. :-)

Maybe the Autoconf manual should describe such possible issue in the
"Posix Variants" part?

Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37

reply via email to

[Prev in Thread] Current Thread [Next in Thread]