diff options
author | paul <paul> | 2005-06-24 01:20:25 +0000 |
---|---|---|
committer | paul <paul> | 2005-06-24 01:20:25 +0000 |
commit | 821b50ee72ea6f1ec846479b804648709ed5a32c (patch) | |
tree | d2fa4a37e8be24fbcffd1d704235358a1e4277a3 | |
parent | 8773d011e407c7121909eaa436890207ddf15ba5 (diff) | |
download | quagga-821b50ee72ea6f1ec846479b804648709ed5a32c.tar.bz2 quagga-821b50ee72ea6f1ec846479b804648709ed5a32c.tar.xz |
2005-06-24 Pawel Worach <pawel.worach@gmail.com>
* getopt.h: add further tests for full getopt declaration on
various systems.
-rw-r--r-- | lib/ChangeLog | 5 | ||||
-rw-r--r-- | lib/getopt.h | 13 |
2 files changed, 16 insertions, 2 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog index a96e917c..aed28744 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,8 @@ +2005-06-24 Pawel Worach <pawel.worach@gmail.com> + + * getopt.h: add further tests for full getopt declaration on + various systems. + 2005-06-18 Paul Jakma <paul.jakma@sun.com> * memtypes.h: update autobuilt file to match memtypes.c changes diff --git a/lib/getopt.h b/lib/getopt.h index 68a9acfb..dceb0301 100644 --- a/lib/getopt.h +++ b/lib/getopt.h @@ -99,10 +99,19 @@ struct option #define optional_argument 2 #if defined (__STDC__) && __STDC__ -#if defined (__GNU_LIBRARY__) || defined (__EXTENSIONS__) +#if defined (__GNU_LIBRARY__) \ + || defined (__EXTENSIONS__) \ + || defined (_GETOPT_DEFINED_) \ + || defined (_GETOPT_DECLARED) /* 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. */ + errors, only prototype getopt for systems we know have compatible + getopt. + glibc: __GNU_LIBRARY__ + solaris: __EXTENSIONS__ + OpenBSD: _GETOPT_DEFINED_ + FreeBSD: _GETOPT_DECLARED + */ extern int getopt (int argc, char *const *argv, const char *shortopts); #else /* not __GNU_LIBRARY__ or __EXTENSIONS__ */ extern int getopt (void); |