X-Git-Url: https://git.librecmc.org/?p=oweals%2Ftinc.git;a=blobdiff_plain;f=src%2Fgetopt.h;h=ab1d40b3c7525699fbb99cde4ef1381e577ea16b;hp=cd77d6758b5ee8db234885d29dc828bb1917ffce;hb=0466160;hpb=0a95c77f23352aafb08edd85da1c044c02bcb0b7 diff --git a/src/getopt.h b/src/getopt.h index cd77d67..ab1d40b 100644 --- a/src/getopt.h +++ b/src/getopt.h @@ -79,7 +79,7 @@ extern "C" { returns the contents of the `val' field. */ struct option { -#if defined (STDC) && STDC +#if defined (__STDC__) && __STDC__ const char *name; #else char *name; @@ -97,15 +97,15 @@ extern "C" { #define required_argument 1 #define optional_argument 2 -#if defined (STDC) && STDC -#ifdef GNU_LIBRARY +#if defined (__STDC__) && __STDC__ +#ifdef __GNU_LIBRARY__ /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ extern int getopt(int argc, char *const *argv, const char *shortopts); -#else /* not GNU_LIBRARY */ +#else /* not __GNU_LIBRARY__ */ extern int getopt(); -#endif /* GNU_LIBRARY */ +#endif /* __GNU_LIBRARY__ */ extern int getopt_long(int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind); extern int getopt_long_only(int argc, char *const *argv, @@ -117,13 +117,13 @@ extern "C" { const char *shortopts, const struct option *longopts, int *longind, int long_only); -#else /* not STDC */ +#else /* not __STDC__ */ extern int getopt(); extern int getopt_long(); extern int getopt_long_only(); extern int _getopt_internal(); -#endif /* STDC */ +#endif /* __STDC__ */ #ifdef cplusplus }