diff options
author | Matthias Huetsch [mhu] <matthias.huetsch@oracle.com> | 2011-01-27 18:16:28 +0100 |
---|---|---|
committer | Matthias Huetsch [mhu] <matthias.huetsch@oracle.com> | 2011-01-27 18:16:28 +0100 |
commit | eaaae34cbc16d9052a806caf0ad5a18339df1ada (patch) | |
tree | 53b4da0bcaaf879ebea1c716395ecc8cce5cf297 /soltools/cpp | |
parent | e1739410c0a7667759f24c38e859649a18b06eb0 (diff) | |
parent | 69218d276c35f130cd91c94cec1199a0a4b01215 (diff) |
Update from master repository (DEV300_m98).
Diffstat (limited to 'soltools/cpp')
-rw-r--r-- | soltools/cpp/_nlist.c | 3 | ||||
-rw-r--r-- | soltools/cpp/_unix.c | 12 | ||||
-rw-r--r-- | soltools/cpp/makefile.mk | 10 |
3 files changed, 20 insertions, 5 deletions
diff --git a/soltools/cpp/_nlist.c b/soltools/cpp/_nlist.c index 9144f2b7e15e..a71085bfbbf9 100644 --- a/soltools/cpp/_nlist.c +++ b/soltools/cpp/_nlist.c @@ -3,9 +3,6 @@ #include <string.h> #include "cpp.h" -extern int stgetopt(int, char *const *, const char *); -extern char *optarg; -extern int optind; extern int Cplusplus; Nlist *kwdefined; char wd[128]; diff --git a/soltools/cpp/_unix.c b/soltools/cpp/_unix.c index 5574bb3ecef7..5352f6f1f5f9 100644 --- a/soltools/cpp/_unix.c +++ b/soltools/cpp/_unix.c @@ -12,9 +12,15 @@ #include "cpp.h" +#if defined MACOSX || !defined HAVE_GETOPT extern int stgetopt(int, char *const *, const char *); -extern char *optarg, rcsid[]; +extern char *optarg; extern int optind; +#else +#include <getopt.h> +#endif + +extern char rcsid[]; int Pflag = 0; /* print no line information */ int Iflag = 0; /* print includes */ @@ -36,7 +42,11 @@ void Tokenrow tr; setup_kwtab(); +#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) +#endif switch (c) { case 'N': diff --git a/soltools/cpp/makefile.mk b/soltools/cpp/makefile.mk index 818c27028345..533cf9a91ab7 100644 --- a/soltools/cpp/makefile.mk +++ b/soltools/cpp/makefile.mk @@ -45,7 +45,6 @@ LIBSALCPPRT=$(0) OBJFILES= \ $(OBJ)$/_cpp.obj \ $(OBJ)$/_eval.obj \ - $(OBJ)$/_getopt.obj \ $(OBJ)$/_include.obj \ $(OBJ)$/_lex.obj \ $(OBJ)$/_macro.obj \ @@ -54,6 +53,15 @@ OBJFILES= \ $(OBJ)$/_tokens.obj \ $(OBJ)$/_unix.obj +# nonstandard cpp options needed for Mac (-isysroot), +# needs the custom stgetopt defined here :/ +.IF "$(OS)" == "MACOSX" || "$(HAVE_GETOPT)" != "YES" +OBJFILES += $(OBJ)$/_getopt.obj +.ENDIF +.IF "$(HAVE_GETOPT)" == "YES" +CDEFS += -DHAVE_GETOPT +.ENDIF + APP1TARGET = $(TARGET) .IF "$(GUI)" != "OS2" APP1STACK = 1000000 |