Gregory Stark <[EMAIL PROTECTED]> writes: > However wget includes an internal copy of GNU getopt. In that case > it would be reasonable for wget to rip out this feature so that the > behaviour always matches the documentation.
You have a point, but it is not entirely true that Wget includes an internal copy of GNU getopt. Specifically, Wget uses the system getopt_long where its configure script detects it. Therefore on all Linux systems, but also on FreeBSD, NetBSD, Cygwin, and possibly elsewhere, it *will* end up using the system-provided getopt. Ripping out the support for POSIXLY_CORRECT would therefore introduce even more inconsistency because then the variably would keep working on some platforms, but not on others. It's a shame that the getopt_long interface doesn't allow the application to specify that it *wants* permuting. What Wget could do to ensure consistency is unset the variable POSIXLY_CORRECT during option processing. All other effects of POSIXLY_CORRECT on getopt (such as use of "illegal" rather than "invalid" in the error message) are negligible. To me that seems a better (or less bad) solution than just documenting the inconsistency. What do you think?
