This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/12922] getopt dumps core
- From: "eblake at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Wed, 22 Jun 2011 17:13:23 +0000
- Subject: [Bug libc/12922] getopt dumps core
- Auto-submitted: auto-generated
- References: <bug-12922-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=12922
--- Comment #1 from Eric Blake <eblake at redhat dot com> 2011-06-22 17:13:20 UTC ---
Potential patch:
diff --git i/posix/getopt.c w/posix/getopt.c
index db89abf..da6ce66 100644
--- i/posix/getopt.c
+++ w/posix/getopt.c
@@ -869,7 +869,7 @@ _getopt_internal_r (int argc, char *const *argv, const char
*optstring,
return '?';
}
/* Convenience. Treat POSIX -W foo same as long option --foo */
- if (temp[0] == 'W' && temp[1] == ';')
+ if (temp[0] == 'W' && temp[1] == ';' && longopts)
{
char *nameend;
const struct option *p;
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.