Hi all,

On 03/03/2014 03:14 PM, Daniel Stone wrote:
Hi,

On 3 March 2014 07:56, Hans de Goede <hdego...@redhat.com> wrote:
The latest glibc considers _BSD_SOURCE deprecated, leading to the following
warning being issued for pretty much every C-file in the xserver:

In file included from /usr/include/stdint.h:25:0,
                  from 
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/include/stdint.h:9,
                  from ../include/misc.h:81,
                  from miexpose.c:82:
/usr/include/features.h:145:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are 
deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
    ^

This silences up these warnings by switching to _GNU_SOURCE, which also
includes all the necessary functions from BSD.

AC_USE_SYSTEM_EXTENSIONS is better than hardcoded _*_SOURCE. The
latter is often reductive (e.g. can mean 'only expose me the
functionality from this platform', rather than 'add extensions from
this platform'), so the autoconf macro will do the right thing.

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.

Regards,

Hans
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to