[Xcb] Win32 port - pls review

Peter Harris pharris at opentext.com
Wed Mar 31 06:53:34 PDT 2010


On 2010-03-31 00:36, Jeetu Golani wrote:
>>> You appear to have accidentally dropped a number of headers in
>>> xcb_util.c, including <fcntl.h> and <netinet/tcp.h>, so libxcb doesn't
>>> compile any more on *ix.
> 
> Ouch...sorry have included them back in the code.

Thanks.

>>> The do-while around select in xcb_in.c might not be required on Win32,
>>> but does it hurt?
> 
> Win32 doesn't have the EINTR error code flag and uses WSAEINTR instead 
> so we will have to #ifdef this region or change it somehow. 

Win32 does have EINTR defined in <errno.h>

You are correct that Winsock uses WSAEINTR instead, but Winsock also
uses WSAGetLastError() instead of errno. So if we reset errno to 0
before calling select, errno won't ever be EINTR, and the loop degrades
gracefully into your no-loop case.

Peter Harris
-- 
               Open Text Connectivity Solutions Group
Peter Harris                    http://connectivity.opentext.com/
Research and Development        Phone: +1 905 762 6001
pharris at opentext.com            Toll Free: 1 877 359 4866


More information about the Xcb mailing list