aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-02-10 22:52:36 -0800
committerH. Peter Anvin <hpa@zytor.com>2008-02-10 22:52:36 -0800
commitd3f3133b05c3b60c9bcd4463c7d42ea3cd981a57 (patch)
treed2127608ea5b70174ddd7a35b3193c41bfb42395
parent830cd01e2135a4e6e9ef06d1680fe9cd5a066e74 (diff)
downloadsyslinux-d3f3133b05c3b60c9bcd4463c7d42ea3cd981a57.tar.gz
syslinux-d3f3133b05c3b60c9bcd4463c7d42ea3cd981a57.tar.xz
syslinux-d3f3133b05c3b60c9bcd4463c7d42ea3cd981a57.zip
com32/*: move _GNU_SOURCE definitions into Makefiles
We need _GNU_SOURCE when compiling for Linux in enough places. Just move it to the LNXCFLAGS definition in the Makefiles.
-rw-r--r--com32/libutil/Makefile2
-rw-r--r--com32/menu/Makefile2
-rw-r--r--com32/menu/menumain.c1
-rw-r--r--com32/menu/printmsg.c1
-rw-r--r--com32/menu/readconfig.c1
5 files changed, 2 insertions, 5 deletions
diff --git a/com32/libutil/Makefile b/com32/libutil/Makefile
index 643ad764..426c3335 100644
--- a/com32/libutil/Makefile
+++ b/com32/libutil/Makefile
@@ -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
diff --git a/com32/menu/Makefile b/com32/menu/Makefile
index 409b032e..8fdfb26c 100644
--- a/com32/menu/Makefile
+++ b/com32/menu/Makefile
@@ -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
diff --git a/com32/menu/menumain.c b/com32/menu/menumain.c
index 3a5d712d..ff013286 100644
--- a/com32/menu/menumain.c
+++ b/com32/menu/menumain.c
@@ -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>
diff --git a/com32/menu/printmsg.c b/com32/menu/printmsg.c
index e07e395a..5455b700 100644
--- a/com32/menu/printmsg.c
+++ b/com32/menu/printmsg.c
@@ -10,7 +10,6 @@
*
* ----------------------------------------------------------------------- */
-#define _GNU_SOURCE /* Needed for asprintf() on Linux */
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
diff --git a/com32/menu/readconfig.c b/com32/menu/readconfig.c
index 3995be26..c5f10183 100644
--- a/com32/menu/readconfig.c
+++ b/com32/menu/readconfig.c
@@ -10,7 +10,6 @@
*
* ----------------------------------------------------------------------- */
-#define _GNU_SOURCE /* Needed for asprintf() on Linux */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>