8dd0cfbe7b
up getop_long_only implementation. Patch sent to the author. Ok'd by seb@.
31 lines
1.1 KiB
Text
31 lines
1.1 KiB
Text
$NetBSD: patch-aj,v 1.1 2003/09/30 09:44:00 cube Exp $
|
|
|
|
--- getopt/getopt.h.orig 2003-09-29 14:28:05.000000000 +0200
|
|
+++ getopt/getopt.h
|
|
@@ -97,6 +97,7 @@ struct option
|
|
#define optional_argument 2
|
|
|
|
#if defined (__STDC__) && __STDC__
|
|
+#if 0
|
|
#ifdef __GNU_LIBRARY__
|
|
/* Many other libraries have conflicting prototypes for getopt, with
|
|
differences in the consts, in stdlib.h. To avoid compilation
|
|
@@ -107,6 +108,7 @@ extern int getopt ();
|
|
#endif /* __GNU_LIBRARY__ */
|
|
extern int getopt_long (int argc, char *const *argv, const char *shortopts,
|
|
const struct option *longopts, int *longind);
|
|
+#endif
|
|
extern int getopt_long_only (int argc, char *const *argv,
|
|
const char *shortopts,
|
|
const struct option *longopts, int *longind);
|
|
@@ -117,8 +119,10 @@ extern int _getopt_internal (int argc, c
|
|
const struct option *longopts, int *longind,
|
|
int long_only);
|
|
#else /* not __STDC__ */
|
|
+#if 0
|
|
extern int getopt ();
|
|
extern int getopt_long ();
|
|
+#endif
|
|
extern int getopt_long_only ();
|
|
|
|
extern int _getopt_internal ();
|