projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replaced with <unistd.h>.
[gnulib.git]
/
lib
/
getopt1.c
diff --git
a/lib/getopt1.c
b/lib/getopt1.c
index
706f59c
..
cc0746e
100644
(file)
--- a/
lib/getopt1.c
+++ b/
lib/getopt1.c
@@
-1,5
+1,5
@@
/* getopt_long and getopt_long_only entry points for GNU getopt.
/* getopt_long and getopt_long_only entry points for GNU getopt.
- Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2004
+ Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2004
,2006
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@
-15,15
+15,12
@@
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
- Inc., 5
9 Temple Place - Suite 330, Boston, MA 02111-1307
, USA. */
+ Inc., 5
1 Franklin Street, Fifth Floor, Boston, MA 02110-1301
, USA. */
\f
\f
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#ifdef _LIBC
# include <getopt.h>
#else
#ifdef _LIBC
# include <getopt.h>
#else
+# include <config.h>
# include "getopt.h"
#endif
#include "getopt_int.h"
# include "getopt.h"
#endif
#include "getopt_int.h"
@@
-41,19
+38,20
@@
#endif
int
#endif
int
-getopt_long (int argc, char *const *argv, const char *options,
+getopt_long (int argc, char *
__getopt_argv_
const *argv, const char *options,
const struct option *long_options, int *opt_index)
{
const struct option *long_options, int *opt_index)
{
- return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
+ return _getopt_internal (argc, (char **) argv, options, long_options,
+ opt_index, 0, 0);
}
int
}
int
-_getopt_long_r (int argc, char *
const
*argv, const char *options,
+_getopt_long_r (int argc, char **argv, const char *options,
const struct option *long_options, int *opt_index,
struct _getopt_data *d)
{
return _getopt_internal_r (argc, argv, options, long_options, opt_index,
const struct option *long_options, int *opt_index,
struct _getopt_data *d)
{
return _getopt_internal_r (argc, argv, options, long_options, opt_index,
- 0, d);
+ 0,
0,
d);
}
/* Like getopt_long, but '-' as well as '--' can indicate a long option.
}
/* Like getopt_long, but '-' as well as '--' can indicate a long option.
@@
-62,19
+60,21
@@
_getopt_long_r (int argc, char *const *argv, const char *options,
instead. */
int
instead. */
int
-getopt_long_only (int argc, char *const *argv, const char *options,
+getopt_long_only (int argc, char *__getopt_argv_const *argv,
+ const char *options,
const struct option *long_options, int *opt_index)
{
const struct option *long_options, int *opt_index)
{
- return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
+ return _getopt_internal (argc, (char **) argv, options, long_options,
+ opt_index, 1, 0);
}
int
}
int
-_getopt_long_only_r (int argc, char *
const
*argv, const char *options,
+_getopt_long_only_r (int argc, char **argv, const char *options,
const struct option *long_options, int *opt_index,
struct _getopt_data *d)
{
return _getopt_internal_r (argc, argv, options, long_options, opt_index,
const struct option *long_options, int *opt_index,
struct _getopt_data *d)
{
return _getopt_internal_r (argc, argv, options, long_options, opt_index,
- 1, d);
+ 1,
0,
d);
}
\f
}
\f