aboutsummaryrefslogtreecommitdiff
path: root/posix/getopt1.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-02-26 01:22:06 +0000
committerUlrich Drepper <drepper@redhat.com>2009-02-26 01:22:06 +0000
commit2e6d6bacc2f0a30f7dbebc977d52904d4a823c45 (patch)
tree064e0c5286c1a9b95a4891a6ba4f2a2f9c5eceb5 /posix/getopt1.c
parent67108e401faade00a6aaf4e59b5b986345f1123f (diff)
downloadglibc-2e6d6bacc2f0a30f7dbebc977d52904d4a823c45.tar
glibc-2e6d6bacc2f0a30f7dbebc977d52904d4a823c45.tar.gz
glibc-2e6d6bacc2f0a30f7dbebc977d52904d4a823c45.tar.bz2
glibc-2e6d6bacc2f0a30f7dbebc977d52904d4a823c45.zip
* include/features.h: If no feature selection given and we select
by default a POSIX mode, also define __USE_POSIX_IMPLICITLY. * posix/Versions: Export __posix_getopt. * posix/getopt.c (_getopt_initialize): Take additional parameter. Use it to alternatively initialize __posixly_correct. (_getopt_internal_r): Take addition parameter. Pass on to _getopt_initialize. (_getopt_internal): Take addition parameter. Pass on to _getopt_internal_r. (getopt): Pass additional zero to _getopt_internal. (__posix_getopt): New function. * posix/getopt.h: Add redirection for getopt. * posix/getopt1.c (getopt_long): Pass additional zero to _getopt_internal. (getopt_long_only): Likewise. (_getopt_long_r): Pass additional zero to _getopt_internal_r. (_getopt_long_only_r): Likewise. * posix/getopt_int.h: Adjust declarations of _getopt_internal and _getopt_internal_r.
Diffstat (limited to 'posix/getopt1.c')
-rw-r--r--posix/getopt1.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/posix/getopt1.c b/posix/getopt1.c
index 2f75d4c2ee..4818ea122a 100644
--- a/posix/getopt1.c
+++ b/posix/getopt1.c
@@ -1,6 +1,5 @@
/* 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
- Free Software Foundation, Inc.
+ Copyright (C) 1987-1994,1996-1998,2004,2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -64,7 +63,7 @@ int
getopt_long (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, 0);
}
int
@@ -73,7 +72,7 @@ _getopt_long_r (int argc, char *const *argv, const char *options,
struct _getopt_data *d)
{
return _getopt_internal_r (argc, argv, options, long_options, opt_index,
- 0, d);
+ 0, d, 0);
}
/* Like getopt_long, but '-' as well as '--' can indicate a long option.
@@ -85,7 +84,7 @@ int
getopt_long_only (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, 0);
}
int
@@ -94,7 +93,7 @@ _getopt_long_only_r (int argc, char *const *argv, const char *options,
struct _getopt_data *d)
{
return _getopt_internal_r (argc, argv, options, long_options, opt_index,
- 1, d);
+ 1, d, 0);
}
#endif /* Not ELIDE_CODE. */