(getopt): Allow full prototype when builind under FreeBSD.
This commit is contained in:
parent
4d5f9b2a9c
commit
80cf9aa474
2 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue