bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] set_winsock_errno


From: Richard W.M. Jones
Subject: Re: [PATCH] set_winsock_errno
Date: Thu, 26 Nov 2009 19:24:35 +0000
User-agent: Mutt/1.5.18 (2008-05-17)

On Thu, Nov 26, 2009 at 08:22:47PM +0100, Paolo Bonzini wrote:
> 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?

No I don't - can you apply it for me?

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]