diff options
author | Christopher Faylor <me@cgf.cx> | 2001-11-07 18:33:19 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-11-07 18:33:19 +0000 |
commit | 4962b1939570e13a9dafca640834f5002b89a1a8 (patch) | |
tree | 2238039a942a7289b36e8f9cece665323f2e045c | |
parent | a4618e1c9712252af9d02bdb8db304362a29513a (diff) | |
download | newlib-unlabeled-1.8.2.zip newlib-unlabeled-1.8.2.tar.gz newlib-unlabeled-1.8.2.tar.bz2 |
* lib/getopt.c (getopt_internal): Reset optind to 1 only if optreset is notgithub/unlabeled-1.8.2unlabeled-1.8.2
set.
-rw-r--r-- | winsup/cygwin/lib/getopt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/lib/getopt.c b/winsup/cygwin/lib/getopt.c index c6f967d..effa5d7 100644 --- a/winsup/cygwin/lib/getopt.c +++ b/winsup/cygwin/lib/getopt.c @@ -214,7 +214,7 @@ getopt_internal(int nargc, char *const * nargv, const char *options) * XXX re-initialize optind to 0 and have getopt_long(3) * XXX properly function again. Work around this braindamage. */ - if (optind == 0) + if (optind == 0 && optreset == 0) optind = 1; if (optreset) |