From abc449af641254a08b96efa1189293f5048b65f6 Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Tue, 15 Jun 2010 00:13:42 +0200 Subject: systemlibc: also reintroduce _getopt.c/stgetopt() for Windows. --- soltools/cpp/_unix.c | 4 ++-- soltools/cpp/makefile.mk | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'soltools/cpp') diff --git a/soltools/cpp/_unix.c b/soltools/cpp/_unix.c index 024ce6eb3cbd..792607443ad1 100644 --- a/soltools/cpp/_unix.c +++ b/soltools/cpp/_unix.c @@ -12,7 +12,7 @@ #include "cpp.h" -#if defined MACOSX +#if defined MACOSX || defined WINNT 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 +#if defined MACOSX || defined WINNT 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 bb3c1b5547f7..774bf9672b8c 100644 --- a/soltools/cpp/makefile.mk +++ b/soltools/cpp/makefile.mk @@ -54,7 +54,8 @@ OBJFILES= \ $(OBJ)$/_unix.obj # nonstandard cpp options, needs the custom stgetopt defined here :/ -.IF "$(OS)" == "MACOSX" +# And Windows, well, Windows... no comment. +.IF "$(OS)" == "MACOSX" || "$(OS)" == "WNT" OBJFILES += $(OBJ)$/_getopt.obj .ENDIF -- cgit v1.2.3