[syslinux] [PATCH 5/5] installers: fix a MinGW redefinition warning

Pete Batard pete at akeo.ie
Sun Mar 6 07:58:26 PST 2016


On 2016.03.06 15:39, Gene Cumm wrote:
> Could you provide details on this re-definition?  I see lots of use of
> it in libinstaller/

------------------------------------------------------------------------
Making all in syslinux/libinstaller
make[2]: Entering directory '/c/rufus/src/syslinux/libinstaller'
   CC       libinstaller_a-fs.o
   CC       libinstaller_a-setadv.o
setadv.c:23:0: warning: "_GNU_SOURCE" redefined
  #define  _GNU_SOURCE
  ^
<command-line>:0:0: note: this is the location of the previous definition
   CC       libinstaller_a-syslxmod.o
   AR       libinstaller.a
make[2]: Leaving directory '/c/rufus/src/syslinux/libinstaller'
------------------------------------------------------------------------

The reason is I use
  AC_DEFINE([_GNU_SOURCE], [], [Use GNU extensions])
in my configure.ac.

But as I also mentioned, it does look to me like the use of _GNU_SOURCE 
is inconsistent within the Syslinux project in the first place, as I'm 
pretty sure I've seen it defined as a -D compiler option in quite a few 
instances, which I think is the better way of requesting the use of GNU 
extensions.

Also, it doesn't look to me like there's anything in that file right now 
that justifies the use of _GNU_SOURCE. Looking at the git history, it 
appears that _GNU_SOURCE was introduced to use extensions on some 
function calls that have since been moved into another file.

So really, it doesn't make much sense to me to still have _GNU_SOURCE in 
setadv.c...

Regards,

/Pete


More information about the Syslinux mailing list