[Spread-users] [BUG][PATCH] fd to session troubles
Marc.Zyngier at evidian.com
Mon Feb 4 10:40:28 EST 2002
>>>>> "JS" == Jonathan Stanton <jonathan at cnds.jhu.edu> writes:
JS> On Mon, Feb 04, 2002 at 02:39:53PM +0100, Marc Zyngier wrote:
JS> I know using the WSA error stuff is "better" on windows, but isn't
JS> there at least a backwands compatible Posix errno error reporting
JS> that I can enable as default until everything is converted? It
JS> seems odd that windows has most of the posix/unix stuff (at least
JS> as a compatibility layer) but doesn't do error reporting the same
Nope... Given that sockets are *not* included in Posix.1 (which is the
only posix-ism windows ever tried to support), it is not really
surprising. Sockets are completly isolated from the rest of the
libc. Error codes do not match with libc and I've just been taught by
our great WindowsGuru (hi Pascal ! :-) that there is in fact at least
3 levels of errors (errno for libc, GetLastError for win32 and
WSAGetLastError for winsock) which are completly independant...
Fun, isn't it ?
JS> About the sp.c problem, I would think there has to be a way to set
JS> the returned error on Windows, libraries often have to change set
JS> what error applications who see them will get. Maybe a
JS> WSASetError() ? :-)
WSASetError() seems to exist indeed... But this is ugly at
best. Changing the sp.c::recv_nointr_timeout API (which is private to
sp.c anyway) should be *a lot* better...
And don't forget you'll never get a dog to walk upright
Just 'cause you've got the power, that don't mean you've got the right.
More information about the Spread-users