New getopt.c has different behavior -- should it?

Christopher Faylor cgf@redhat.com
Sat Sep 22 17:18:00 GMT 2001


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



More information about the Cygwin-developers mailing list