summaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-11-09 17:21:26 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-11-09 17:21:26 +0000
commit84641942e5366b2e09367ba4f4376c99f15ecc8e (patch)
treeeff2511dcc6cb647e0bf898903f86c94b85466ad /util-linux
parentbacaff6e5474d6c5f080ce4cd2a55e8ff1ba5c94 (diff)
downloadbusybox-w32-1_12_2.tar.gz
busybox-w32-1_12_2.tar.bz2
busybox-w32-1_12_2.zip
apply post-1.12.1 patches, bump version to 1.12.21_12_2
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/getopt.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/util-linux/getopt.c b/util-linux/getopt.c
index 402630385..8b5e46c7b 100644
--- a/util-linux/getopt.c
+++ b/util-linux/getopt.c
@@ -142,7 +142,8 @@ static const char *normalize(const char *arg)
142 * Other settings are found in global variables. 142 * Other settings are found in global variables.
143 */ 143 */
144#if !ENABLE_GETOPT_LONG 144#if !ENABLE_GETOPT_LONG
145#define generate_output(argv,argc,optstr,longopts) generate_output(argv,argc,optstr) 145#define generate_output(argv,argc,optstr,longopts) \
146 generate_output(argv,argc,optstr)
146#endif 147#endif
147static int generate_output(char **argv, int argc, const char *optstr, const struct option *longopts) 148static int generate_output(char **argv, int argc, const char *optstr, const struct option *longopts)
148{ 149{
@@ -156,14 +157,6 @@ static int generate_output(char **argv, int argc, const char *optstr, const stru
156 if (quiet_errors) /* No error reporting from getopt(3) */ 157 if (quiet_errors) /* No error reporting from getopt(3) */
157 opterr = 0; 158 opterr = 0;
158 159
159 /* Reset getopt(3) (see libbb/getopt32.c for long rant) */
160#ifdef __GLIBC__
161 optind = 0;
162#else /* BSD style */
163 optind = 1;
164 /* optreset = 1; */
165#endif
166
167 while (1) { 160 while (1) {
168 opt = 161 opt =
169#if ENABLE_GETOPT_LONG 162#if ENABLE_GETOPT_LONG