com32/*: move _GNU_SOURCE definitions into Makefiles
authorH. Peter Anvin <hpa@zytor.com>
Mon, 11 Feb 2008 06:52:36 +0000 (22:52 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Mon, 11 Feb 2008 06:52:36 +0000 (22:52 -0800)
We need _GNU_SOURCE when compiling for Linux in enough places.  Just
move it to the LNXCFLAGS definition in the Makefiles.

com32/libutil/Makefile
com32/menu/Makefile
com32/menu/menumain.c
com32/menu/printmsg.c
com32/menu/readconfig.c

index 643ad76..426c333 100644 (file)
@@ -45,7 +45,7 @@ RANLIB           = ranlib
 CFLAGS     = $(M32) -mregparm=3 -DREGPARM=3 -D__COM32__ -W -Wall -march=i386 -Os -fomit-frame-pointer -I./include -I../include
 SFLAGS     = $(M32) -D__COM32__ -march=i386
 LDFLAGS    = -T ../lib/com32.ld
-LNXCFLAGS  = -I./include -W -Wall -O -g
+LNXCFLAGS  = -I./include -W -Wall -O -g -D_GNU_SOURCE
 LNXSFLAGS  = -g
 LNXLDFLAGS = -g
 OBJCOPY    = objcopy
index 409b032..8fdfb26 100644 (file)
@@ -28,7 +28,7 @@ NASM     = nasm
 NASMOPT           = -O9999
 RANLIB    = ranlib
 CFLAGS     = $(M32) -mregparm=3 -DREGPARM=3 -W -Wall -march=i386 -Os -fomit-frame-pointer -I../libutil/include -I../include  -D__COM32__
-LNXCFLAGS  = -W -Wall -O -g -I../libutil/include
+LNXCFLAGS  = -W -Wall -O -g -I../libutil/include -D_GNU_SOURCE
 LNXSFLAGS  = -g
 LNXLDFLAGS = -g
 SFLAGS     = -D__COM32__ -march=i386
index 3a5d712..ff01328 100644 (file)
@@ -17,7 +17,6 @@
  * a command line and/or edit it.
  */
 
-#define _GNU_SOURCE            /* Needed for asprintf() on Linux */
 #include <ctype.h>
 #include <string.h>
 #include <stdlib.h>
index e07e395..5455b70 100644 (file)
@@ -10,7 +10,6 @@
  *
  * ----------------------------------------------------------------------- */
 
-#define _GNU_SOURCE            /* Needed for asprintf() on Linux */
 #include <ctype.h>
 #include <string.h>
 #include <stdlib.h>
index 3995be2..c5f1018 100644 (file)
@@ -10,7 +10,6 @@
  *
  * ----------------------------------------------------------------------- */
 
-#define _GNU_SOURCE            /* Needed for asprintf() on Linux */
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>