Re: [PATCH]: poll module issue on Win32

2008-09-12 Thread Yoann Vandoorselaere
Le vendredi 12 septembre 2008 à 06:34 +0200, Paolo Bonzini a écrit : Bruno Haible wrote: Yoann Vandoorselaere wrote: r = recv (pfd[i].fd, data, sizeof (data), MSG_PEEK); + +# ifdef WIN32 + if (r 0 GetLastError() == 10057) /* server socket */ +

Re: [PATCH]: poll module issue on Win32

2008-09-12 Thread Paolo Bonzini
I tried updating the poll module with your patch, but it's not compiling: Thanks. diff --git a/modules/poll b/modules/poll index 3ac7c8c..dab66d4 100644 --- a/modules/poll +++ b/modules/poll @@ -7,6 +7,7 @@ lib/poll.in.h m4/poll.m4 Depends-on: +alloca sys_select sys_time EOVERFLOW diff

Re: [PATCH]: poll module issue on Win32

2008-09-12 Thread Yoann Vandoorselaere
Le vendredi 12 septembre 2008 à 10:45 +0200, Paolo Bonzini a écrit : I tried updating the poll module with your patch, but it's not compiling: Thanks. Thanks for the update, tried it, it compile, but poll() will immediatly fail with Invalid argument on non connected socket. I didn't

Re: [PATCH]: poll module issue on Win32

2008-09-12 Thread Paolo Bonzini
I tried updating the poll module with your patch, but it's not compiling: Thanks. Thanks for the update, tried it, it compile, but poll() will immediatly fail with Invalid argument on non connected socket. Have you included the other patch too? The updated poll expects file descriptors,

Re: [PATCH]: poll module issue on Win32

2008-09-12 Thread Yoann Vandoorselaere
Le vendredi 12 septembre 2008 à 11:43 +0200, Paolo Bonzini a écrit : I think a few simple case would not be particularly hard to write: - non connected socket - socket data detection I will try to do something like that. Thanks! That would help a lot in testing and reporting problem

Re: [PATCH]: poll module issue on Win32

2008-09-12 Thread Paolo Bonzini
I included the module, although the code need to be updated to include fcntl.h in order to compile. Thanks. I think a few simple case would not be particularly hard to write: - non connected socket - socket data detection I will try to do something like that. That would help a lot in

Re: [PATCH]: poll module issue on Win32

2008-09-12 Thread Yoann Vandoorselaere
Le vendredi 12 septembre 2008 à 11:06 +0200, Paolo Bonzini a écrit : I tried updating the poll module with your patch, but it's not compiling: Thanks. Thanks for the update, tried it, it compile, but poll() will immediatly fail with Invalid argument on non connected socket. Have

Re: [PATCH]: poll module issue on Win32

2008-09-11 Thread Paolo Bonzini
Yoann Vandoorselaere wrote: Hi Paolo, Attached is a patch that fixes the poll() module to work on WIN32 systems with unconnected socket (example: server socket). Committed. In the meanwhile I have forward-ported it to my reimplementation of poll() for WIN32, which I attach (not even

Re: [PATCH]: poll module issue on Win32

2008-09-11 Thread Bruno Haible
Yoann Vandoorselaere wrote: r = recv (pfd[i].fd, data, sizeof (data), MSG_PEEK); + +# ifdef WIN32 + if (r 0 GetLastError() == 10057) /* server socket */ + socket_errno = ENOTCONN; + else +# endif I thought that after using a

Re: [PATCH]: poll module issue on Win32

2008-09-11 Thread Paolo Bonzini
Bruno Haible wrote: Yoann Vandoorselaere wrote: r = recv (pfd[i].fd, data, sizeof (data), MSG_PEEK); + +# ifdef WIN32 + if (r 0 GetLastError() == 10057) /* server socket */ + socket_errno = ENOTCONN; + else +# endif I thought