aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2010-07-19 17:23:16 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2010-07-19 17:23:16 -0700
commit61bfcb1fdf6f118e9347e668b9f9c4956b0b9999 (patch)
tree0af4b122dfa3736fb005ef2f16396ce9280ac5cb
parentb5252103dfcf7eb843c888b9b66a90b2fbbe6e14 (diff)
downloadhdt-pierre-61bfcb1fdf6f118e9347e668b9f9c4956b0b9999.tar.gz
hdt-pierre-61bfcb1fdf6f118e9347e668b9f9c4956b0b9999.tar.xz
hdt-pierre-61bfcb1fdf6f118e9347e668b9f9c4956b0b9999.zip
dos, win32: use our own getopt_long() for both
Use our own version of getopt_long() for both the DOS and Win32 installers. Currently, on MinGW, getopt_long() is a static library, but that could change in some installations. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r--dos/Makefile5
-rw-r--r--libinstaller/getopt/getopt.h (renamed from dos/getopt.h)0
-rw-r--r--libinstaller/getopt/getopt_long.c (renamed from dos/getopt_long.c)2
-rwxr-xr-xwin32/Makefile5
4 files changed, 7 insertions, 5 deletions
diff --git a/dos/Makefile b/dos/Makefile
index 9f48962b..54bfb591 100644
--- a/dos/Makefile
+++ b/dos/Makefile
@@ -23,13 +23,14 @@ CFLAGS += -D__MSDOS__
LDFLAGS = -T dosexe.ld
OPTFLAGS = -g
INCLUDES = -include code16.h -nostdinc -iwithprefix include \
- -I. -I.. -I../libfat -I ../libinstaller
+ -I. -I.. -I../libfat -I ../libinstaller -I ../libinstaller/getopt
SRCS = syslinux.c \
../libinstaller/fat.c \
../libinstaller/syslxmod.c \
../libinstaller/syslxopt.c \
../libinstaller/setadv.c \
+ ../libinstaller/getopt/getopt_long.c \
../libinstaller/bootsect_bin.c \
../libinstaller/mbr_bin.c \
$(wildcard ../libfat/*.c)
@@ -39,7 +40,7 @@ LIBOBJS = int2526.o conio.o memcpy.o memset.o memmove.o skipatou.o atou.o \
malloc.o free.o getopt_long.o getsetsl.o strchr.o strtoul.o \
strntoumax.o argv.o printf.o __divdi3.o __udivmoddi4.o
-VPATH = .:../libfat:../libinstaller
+VPATH = .:../libfat:../libinstaller:../libinstaller/getopt
TARGETS = syslinux.com
diff --git a/dos/getopt.h b/libinstaller/getopt/getopt.h
index a1b74b10..a1b74b10 100644
--- a/dos/getopt.h
+++ b/libinstaller/getopt/getopt.h
diff --git a/dos/getopt_long.c b/libinstaller/getopt/getopt_long.c
index 14587797..cd7fef5a 100644
--- a/dos/getopt_long.c
+++ b/libinstaller/getopt/getopt_long.c
@@ -10,8 +10,8 @@
#include <stdint.h>
#include <string.h>
+#include <stddef.h>
#include <getopt.h>
-#include "mystuff.h"
char *optarg;
int optind, opterr, optopt;
diff --git a/win32/Makefile b/win32/Makefile
index 81a6e9ec..922913d3 100755
--- a/win32/Makefile
+++ b/win32/Makefile
@@ -35,7 +35,7 @@ WINCFLAGS := $(GCCWARN) -Wno-sign-compare -Os -fomit-frame-pointer \
-D_FILE_OFFSET_BITS=64
WINLDFLAGS := -Os -s
endif
-WINCFLAGS += -I. -I.. -I../libfat -I../libinstaller
+WINCFLAGS += -I. -I.. -I../libfat -I../libinstaller -I../libinstaller/getopt
WINCC := $(WINPREFIX)gcc
WINAR := $(WINPREFIX)ar
@@ -51,6 +51,7 @@ LIBSRC = ../libinstaller/fat.c \
../libinstaller/syslxmod.c \
../libinstaller/syslxopt.c \
../libinstaller/setadv.c \
+ ../libinstaller/getopt/getopt_long.c \
../libinstaller/bootsect_bin.c \
../libinstaller/ldlinux_bin.c \
../libinstaller/mbr_bin.c \
@@ -59,7 +60,7 @@ LIBOBJS = $(patsubst %.c,%.obj,$(notdir $(LIBSRC)))
LIB = syslinux.lib
-VPATH = .:../libfat:../libinstaller
+VPATH = .:../libfat:../libinstaller:../libinstaller/getopt
TARGETS = syslinux.exe