[PATCH libxtrans] configure: under glibc define _GNU_SOURCE rather then _BSD_SOURCE

Hans de Goede hdegoede at redhat.com
Sat Mar 8 08:11:42 PST 2014


Hi,

On 03/08/2014 05:07 PM, Gaetan Nadon wrote:
> On 14-03-08 09:03 AM, Hans de Goede wrote:
>> So I've just been looking into using AC_USE_SYSTEM_EXTENSIONS but that seem pretty
>> useless, it only adds the relevant defines to confdefs.h, not into cflags,
>> and in libxtrans we want to add them to the .pc file, so we need them in a variable.
>>
>> I'm open to different suggestions, but I think my initial patch might be the best
>> way to fix this.
>>
> Check the pattern in other modules such as libX11. The source code includes the content of the generated config.h (see config.h.in).

That won't work for libxtrans, as that provides .c files to be included by other
projects (a shared copylib if you want). So there is no config.h, since
that would conflict with the config.h from the code including the xtrans
.c files.

Hence traditionally xtrans.pc had a -D_BSD_SOURCE in its CFLAGS, but that is
causing a ton of warnings when building with the latest glibc.

Regards,

Hans


More information about the xorg-devel mailing list