diff options
author | kris <kris@FreeBSD.org> | 2000-03-25 07:45:29 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2000-03-25 07:45:29 +0000 |
commit | 533744c77137b94ed05e2ca445ba97d71c79ee5f (patch) | |
tree | fa102ad70fa8d5585900bf7e1872826b467f5d2e /contrib/gperf/lib/getopt.h.patch | |
parent | 6cfe3ae61b383acc12d75bc595be2ab185d5586c (diff) | |
download | FreeBSD-src-533744c77137b94ed05e2ca445ba97d71c79ee5f.zip FreeBSD-src-533744c77137b94ed05e2ca445ba97d71c79ee5f.tar.gz |
Virgin import of gperf v2.7
Diffstat (limited to 'contrib/gperf/lib/getopt.h.patch')
-rw-r--r-- | contrib/gperf/lib/getopt.h.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/contrib/gperf/lib/getopt.h.patch b/contrib/gperf/lib/getopt.h.patch new file mode 100644 index 0000000..7a7c2f1 --- /dev/null +++ b/contrib/gperf/lib/getopt.h.patch @@ -0,0 +1,40 @@ +getopt.h is a modified version of the getopt.h found in the glibc snapshot +on 1998-04-14. Below the patch that has been applied to this file. The glibc +maintainer has been informed of these patches. + +diff -c3 getopt.h.orig getopt.h +*** getopt.h.orig Sat Jun 21 03:01:53 1997 +--- getopt.h Thu Apr 16 00:17:42 1998 +*************** +*** 96,102 **** + #define required_argument 1 + #define optional_argument 2 + +! #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 +--- 96,108 ---- + #define required_argument 1 + #define optional_argument 2 + +! #if (defined (__STDC__) && __STDC__) || defined (__cplusplus) +! #ifdef __cplusplus +! /* SunOS4 declares getopt with the following prototype: +! extern int getopt (int argc, const char *const *argv, const char *shortopts); +! We cannot redeclare it when compiling C++ code. */ +! #define getopt(x,y,z) getopt_long(x, y, z, (const struct option *) 0, (int *) 0) +! #else /* not __cplusplus */ + #ifdef __GNU_LIBRARY__ + /* Many other libraries have conflicting prototypes for getopt, with + differences in the consts, in stdlib.h. To avoid compilation +*************** +*** 105,110 **** +--- 111,117 ---- + #else /* not __GNU_LIBRARY__ */ + extern int getopt (); + #endif /* __GNU_LIBRARY__ */ ++ #endif /* __cplusplus */ + 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, |