On 11/26/2009 05:52 PM, Richard W.M. Jones wrote:
Currently any socket functions that are replaced by Gnulib on Win32 call set_winsock_errno. This function reads the error from winsock (WSAGetLastError) and sets errno to some corresponding Unix-ish approximation. The vast majority of functions (non-socket ones) still require you to deal with GetLastError and Windows error codes. Unfortunately set_winsock_errno also does this: static inline void set_winsock_errno (void) { int err = WSAGetLastError (); WSASetLastError (0);<----- which means that no one else ever gets to read the underlying Windows error code. It also complicates error handling unnecessarily (even more so than it is already on Windows). Is there a reason to have that line or can it just be removed?
No, it's fine by me. Do you have commit access? Paolo