diff options
Diffstat (limited to 'soltools/cpp/_unix.c')
-rw-r--r-- | soltools/cpp/_unix.c | 12 |
1 files changed, 11 insertions, 1 deletions
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': |