systemlibc: move from || defined WNT to || !defined HAVE_GETOPT

This commit is contained in:
Rene Engelhard
2010-06-15 17:30:54 +02:00
parent 0dd9871512
commit eb525520b5
2 changed files with 6 additions and 3 deletions

View File

@@ -12,7 +12,7 @@
#include "cpp.h"
#if defined MACOSX || defined WNT
#if defined MACOSX || !defined HAVE_GETOPT
extern int stgetopt(int, char *const *, const char *);
extern char *optarg;
extern int optind;
@@ -40,7 +40,7 @@ void
Tokenrow tr;
setup_kwtab();
#if defined MACOSX || defined WNT
#if defined MACOSX || !defined HAVE_GETOPT
while ((c = stgetopt(argc, argv, "NOPV:I:D:U:F:A:X:u:l:+")) != -1)
#else
while ((c = getopt(argc, argv, "NOPV:I:D:U:F:A:X:u:l:+")) != -1)

View File

@@ -55,9 +55,12 @@ OBJFILES= \
# nonstandard cpp options, needs the custom stgetopt defined here :/
# And Windows, well, Windows... no comment.
.IF "$(OS)" == "MACOSX" || "$(OS)" == "WNT"
.IF "$(OS)" == "MACOSX" || "$(HAVE_GETOPT)" == "NO"
OBJFILES += $(OBJ)$/_getopt.obj
.ENDIF
.IF "$(HAVE_GETOPT)" == "YES"
CDEFS += -DHAVE_GETOPT
.ENDIF
APP1TARGET = $(TARGET)
.IF "$(GUI)" != "OS2"