This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
New getopt.c has different behavior -- should it?
- To: cygwin-developers at cygwin dot com
- Subject: New getopt.c has different behavior -- should it?
- From: Christopher Faylor <cgf at redhat dot com>
- Date: Sat, 22 Sep 2001 20:19:28 -0400
- Reply-To: cygwin-developers at cygwin dot com
The new getopt.c that I just added to winsup/cygwin/lib exhibts different,
more GNU-like behavior when it parses arguments.
I noticed the difference when I did this:
strace -om:/tmp/strace.out ls -l
and strace complained that it didn't have an option '-l'.
So, I tried this:
strace -om:/tmp/strace.out -- ls -l
and got the expected behavior.
You can work around this behavior by setting the POSIXLY_CORRECT
environment variable.
So, the question is, which way *should* it be? I'm inclined to leave
it the way it is, since it seems to be more gnu-like but I don't
want to cause people problems or generate unnecessary cygwin email
traffic.
cgf