Patrick Eisenacher wrote:
Talking to Tim Waugh, the author of xmlto, revealed that the order of
arguments doesn't matter on his system (that's Red Hat, I guess),
whereas it matters indeed on Cygwin.
Investigating it a bit further revealed that Cygwin's getopt differs
from what he expected:
getopt -- o: xmlto -o foo bar
should output this:
-o 'foo' -- 'xmlto' 'bar'
Cygwin's getopt outputs like this:
$ getopt -- o: xmlto -o foo bar
-- 'xmlto' '-o' 'foo' 'bar'
Checking the archive I found a thread from back in January talking about
the inability of Cygwin's getopt to do reordering of arguments. I guess
we're facing here the same issue: the option arguments are not output
before the non-option arguments.
Was any work done wrt this issue? Is anything planned?
IIRC, the end result of the discussion was that no consensus could be
reached on whether it was better to reorder or not to reorder, so CGF had to
make a ruling, and he ruled not to reorder.
Reordering can be enabled by setting POSIXLY_INCORRECT_GETOPT in the
environment, but because getopt is statically linked, this only works for
programs rebuilt since this change was made, and many haven't been yet.
Max.