From eb525520b51dfd5a8c62ae2826d410e8e3da7e46 Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Tue, 15 Jun 2010 17:30:54 +0200 Subject: systemlibc: move from || defined WNT to || !defined HAVE_GETOPT --- soltools/cpp/_unix.c | 4 ++-- soltools/cpp/makefile.mk | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'soltools') diff --git a/soltools/cpp/_unix.c b/soltools/cpp/_unix.c index 02ecaa9e9610..ca7004c56070 100644 --- a/soltools/cpp/_unix.c +++ b/soltools/cpp/_unix.c @@ -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) diff --git a/soltools/cpp/makefile.mk b/soltools/cpp/makefile.mk index 774bf9672b8c..32eb0b189ef2 100644 --- a/soltools/cpp/makefile.mk +++ b/soltools/cpp/makefile.mk @@ -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" -- cgit