public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/397] New: getopt should not reorder argv
@ 2004-09-21 18:58 nick at usenix dot org
2004-09-21 21:56 ` [Bug libc/397] " drepper at redhat dot com
0 siblings, 1 reply; 2+ messages in thread
From: nick at usenix dot org @ 2004-09-21 18:58 UTC (permalink / raw)
To: glibc-bugs
The function prototype for getopt is
int getopt(int argc, char * const argv[], const char *optstring);
which says that argv is an array of const pointer to char. However, if PERMUTE
ordering is in effect, argv is altered (and is therefore abusing the "const"
requirement). The manual suggests that this function has a different prototype
than that in <getopt.h>, without the const. POSIX defines getopt with the const
(but forbids permute behavior).
I think the only viable solution here is to remove the const ... as much as I
hate the idea.
--
Summary: getopt should not reorder argv
Product: glibc
Version: 2.3.3
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: gotom at debian dot or dot jp
ReportedBy: nick at usenix dot org
CC: glibc-bugs at sources dot redhat dot com
GCC build triplet: i386-redhat-linux
GCC host triplet: i386-redhat-linux
GCC target triplet: i386-redhat-linux
http://sources.redhat.com/bugzilla/show_bug.cgi?id=397
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug libc/397] getopt should not reorder argv
2004-09-21 18:58 [Bug libc/397] New: getopt should not reorder argv nick at usenix dot org
@ 2004-09-21 21:56 ` drepper at redhat dot com
0 siblings, 0 replies; 2+ messages in thread
From: drepper at redhat dot com @ 2004-09-21 21:56 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From drepper at redhat dot com 2004-09-21 21:56 -------
Live with it, this is how it will stay. There will never be any discussion
about changing this since a) it makes sense, and b) code depends on it.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WONTFIX
http://sources.redhat.com/bugzilla/show_bug.cgi?id=397
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-09-21 21:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-21 18:58 [Bug libc/397] New: getopt should not reorder argv nick at usenix dot org
2004-09-21 21:56 ` [Bug libc/397] " drepper at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).