[syslinux:master] dos, win32: use our own getopt_long() for both
syslinux-bot for H. Peter Anvin
hpa at linux.intel.com
Mon Jul 19 21:24:14 PDT 2010
Commit-ID: 61bfcb1fdf6f118e9347e668b9f9c4956b0b9999
Gitweb: http://syslinux.zytor.com/commit/61bfcb1fdf6f118e9347e668b9f9c4956b0b9999
Author: H. Peter Anvin <hpa at linux.intel.com>
AuthorDate: Mon, 19 Jul 2010 17:23:16 -0700
Committer: H. Peter Anvin <hpa at linux.intel.com>
CommitDate: Mon, 19 Jul 2010 17:23:16 -0700
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 at linux.intel.com>
---
dos/Makefile | 5 +++--
{dos => libinstaller/getopt}/getopt.h | 0
{dos => libinstaller/getopt}/getopt_long.c | 2 +-
win32/Makefile | 5 +++--
4 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/dos/Makefile b/dos/Makefile
index 9f48962..54bfb59 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
similarity index 100%
rename from dos/getopt.h
rename to libinstaller/getopt/getopt.h
diff --git a/dos/getopt_long.c b/libinstaller/getopt/getopt_long.c
similarity index 99%
rename from dos/getopt_long.c
rename to libinstaller/getopt/getopt_long.c
index 1458779..cd7fef5 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 81a6e9e..922913d 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
More information about the Syslinux-commits
mailing list