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

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 > 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 test

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

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

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

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 à 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 so

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 >> +# endi

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

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 comp

[PATCH]: poll module issue on Win32

2008-09-11 Thread Yoann Vandoorselaere
Hi Paolo, Attached is a patch that fixes the poll() module to work on WIN32 systems with unconnected socket (example: server socket). Regards, -- Yoann Vandoorselaere | Responsable R&D / CTO | PreludeIDS Technologies Tel: +33 (0)8 70 70 21 58 Fax: +33(0)4 78 42 21 58 http://www