"Hrvoje Niksic" <[EMAIL PROTECTED]> said: > Note that David's Wget seems to have printed "unknown error", not > "Host not found". Is that an artifact of his version of system > libraries, or is Wget doing something wrong?
That's because wget incorrectly uses strerror() for Winsock errors or uses 'errno' when that's not set. The correct thing would be to set 'errno' to last Winsock error and make a compatible function that returns correct string for both sys-errors and WS errors. E.g. we put this in mswindows.h: #define strerror(err) win_strerror (err) extern const char *win_strerror (int err); But the problem is that sys_errlist[] always returns English texts, but Windows's FormatMessage() returns in native language. So to be consistent, I suggest we return English also for Winsock errors (easier when we receive a bug-report from a user without the proper wget.gmo file. Who ever uses NLS anyway?). I could commit a patch if we agree on this. --gv