diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2001-11-07 11:47:23 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2001-11-07 11:47:23 +0000 |
commit | e2c07930f73d279e5c104e90a9a71ffb38c627cf (patch) | |
tree | b10942129c872501b0d8b743655745b0fa7606b1 /winsup/cygwin/lib | |
parent | d0e406c6539d8c78515d85a253ea4b5365e57f3b (diff) | |
download | newlib-e2c07930f73d279e5c104e90a9a71ffb38c627cf.zip newlib-e2c07930f73d279e5c104e90a9a71ffb38c627cf.tar.gz newlib-e2c07930f73d279e5c104e90a9a71ffb38c627cf.tar.bz2 |
* lib/getopt.c (getopt_internal): Reset optind to 1 only if optreset
is not set.
Diffstat (limited to 'winsup/cygwin/lib')
-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) |