diff options
author | Nick Clifton <nickc@redhat.com> | 2005-03-23 14:46:13 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2005-03-23 14:46:13 +0000 |
commit | 7e71a4c1a01a23ef10d7fd31f5573446adf64c25 (patch) | |
tree | 9590c328e3bfda1a8cbf50ff199851155c60c047 /include | |
parent | bade737e4503f2723d5a8b3f091f47aceff73124 (diff) | |
download | newlib-7e71a4c1a01a23ef10d7fd31f5573446adf64c25.zip newlib-7e71a4c1a01a23ef10d7fd31f5573446adf64c25.tar.gz newlib-7e71a4c1a01a23ef10d7fd31f5573446adf64c25.tar.bz2 |
(getopt): Allow full prototype when builind under FreeBSD.
Diffstat (limited to 'include')
-rw-r--r-- | include/ChangeLog | 5 | ||||
-rw-r--r-- | include/getopt.h | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index 4c8d105..9eabc52 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,8 @@ +2005-03-23 Vladimir Merzliakov <wanderer@rsu.ru> + + * getopt.h (getopt): Allow full prototype when builind under + FreeBSD. + 2005-03-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * libiberty.h (make_relative_prefix): Add ATTRIBUTE_MALLOC. diff --git a/include/getopt.h b/include/getopt.h index a99a229..e5470e6 100644 --- a/include/getopt.h +++ b/include/getopt.h @@ -106,10 +106,12 @@ struct option to find the declaration so provide a fully prototyped one. If it is 1, we found it so don't provide any declaration at all. */ #if !HAVE_DECL_GETOPT +#if defined (__GNU_LIBRARY__) || defined (HAVE_DECL_GETOPT) || defined (__FreeBSD__) #if defined (__GNU_LIBRARY__) || defined (HAVE_DECL_GETOPT) /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in unistd.h. To avoid compilation - errors, only prototype getopt for the GNU C library. */ + errors, only prototype getopt for environments where we know that + there will ben o conflicts. */ extern int getopt (int argc, char *const *argv, const char *shortopts); #else #ifndef __cplusplus |