forked from Mirrors/wine-wine
configure: Check for getopt_long_only instead of getopt_long.
Some platforms have the latter but not the former.oldstable
parent
3050f11f47
commit
551077ab73
|
@ -13017,7 +13017,7 @@ for ac_func in \
|
||||||
futimesat \
|
futimesat \
|
||||||
getattrlist \
|
getattrlist \
|
||||||
getdirentries \
|
getdirentries \
|
||||||
getopt_long \
|
getopt_long_only \
|
||||||
getpagesize \
|
getpagesize \
|
||||||
getpwuid \
|
getpwuid \
|
||||||
gettimeofday \
|
gettimeofday \
|
||||||
|
|
|
@ -2019,7 +2019,7 @@ AC_CHECK_FUNCS(\
|
||||||
futimesat \
|
futimesat \
|
||||||
getattrlist \
|
getattrlist \
|
||||||
getdirentries \
|
getdirentries \
|
||||||
getopt_long \
|
getopt_long_only \
|
||||||
getpagesize \
|
getpagesize \
|
||||||
getpwuid \
|
getpwuid \
|
||||||
gettimeofday \
|
gettimeofday \
|
||||||
|
|
|
@ -206,8 +206,8 @@
|
||||||
/* Define to 1 if you have the <getopt.h> header file. */
|
/* Define to 1 if you have the <getopt.h> header file. */
|
||||||
#undef HAVE_GETOPT_H
|
#undef HAVE_GETOPT_H
|
||||||
|
|
||||||
/* Define to 1 if you have the `getopt_long' function. */
|
/* Define to 1 if you have the `getopt_long_only' function. */
|
||||||
#undef HAVE_GETOPT_LONG
|
#undef HAVE_GETOPT_LONG_ONLY
|
||||||
|
|
||||||
/* Define to 1 if you have the `getpagesize' function. */
|
/* Define to 1 if you have the `getpagesize' function. */
|
||||||
#undef HAVE_GETPAGESIZE
|
#undef HAVE_GETPAGESIZE
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_GETOPT_LONG
|
#ifdef HAVE_GETOPT_LONG_ONLY
|
||||||
#define ELIDE_CODE
|
#define ELIDE_CODE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -218,26 +218,7 @@ static char *posixly_correct;
|
||||||
# include <strings.h>
|
# include <strings.h>
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
/* Avoid depending on library functions or files
|
# define my_index strchr
|
||||||
whose names are inconsistent. */
|
|
||||||
|
|
||||||
#ifndef getenv
|
|
||||||
extern char *getenv ();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static char *
|
|
||||||
my_index (str, chr)
|
|
||||||
const char *str;
|
|
||||||
int chr;
|
|
||||||
{
|
|
||||||
while (*str)
|
|
||||||
{
|
|
||||||
if (*str == chr)
|
|
||||||
return (char *) str;
|
|
||||||
str++;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If using GCC, we can safely declare strlen this way.
|
/* If using GCC, we can safely declare strlen this way.
|
||||||
If not using GCC, it is ok not to declare it. */
|
If not using GCC, it is ok not to declare it. */
|
||||||
|
@ -1196,10 +1177,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
getopt (argc, argv, optstring)
|
getopt (int argc, char * const *argv, const char *optstring)
|
||||||
int argc;
|
|
||||||
char *const *argv;
|
|
||||||
const char *optstring;
|
|
||||||
{
|
{
|
||||||
return _getopt_internal (argc, argv, optstring,
|
return _getopt_internal (argc, argv, optstring,
|
||||||
NULL,
|
NULL,
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_GETOPT_LONG
|
#ifdef HAVE_GETOPT_LONG_ONLY
|
||||||
#define ELIDE_CODE
|
#define ELIDE_CODE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -74,12 +74,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
getopt_long (argc, argv, options, long_options, opt_index)
|
getopt_long (int argc, char * const *argv, const char *options, const struct option *long_options, int *opt_index)
|
||||||
int argc;
|
|
||||||
char *const *argv;
|
|
||||||
const char *options;
|
|
||||||
const struct option *long_options;
|
|
||||||
int *opt_index;
|
|
||||||
{
|
{
|
||||||
return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
|
return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
|
||||||
}
|
}
|
||||||
|
@ -90,12 +85,7 @@ getopt_long (argc, argv, options, long_options, opt_index)
|
||||||
instead. */
|
instead. */
|
||||||
|
|
||||||
int
|
int
|
||||||
getopt_long_only (argc, argv, options, long_options, opt_index)
|
getopt_long_only (int argc, char * const *argv, const char *options, const struct option *long_options, int *opt_index)
|
||||||
int argc;
|
|
||||||
char *const *argv;
|
|
||||||
const char *options;
|
|
||||||
const struct option *long_options;
|
|
||||||
int *opt_index;
|
|
||||||
{
|
{
|
||||||
return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
|
return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue