Re: [PATCH] testsuite for poll(2)

2008-09-12 Thread Paolo Bonzini
Eric Blake wrote: > Paolo Bonzini gnu.org> writes: > >> Here is the final patch I pushed for Windows compatibility of tests. It >> does not test much because the socket syscalls are not compatible >> enough, but it compiles at least (using the Debian mingw32 and wine >> packages). > > But it br

Re: [PATCH] testsuite for poll(2)

2008-09-12 Thread Eric Blake
Paolo Bonzini gnu.org> writes: > > Here is the final patch I pushed for Windows compatibility of tests. It > does not test much because the socket syscalls are not compatible > enough, but it compiles at least (using the Debian mingw32 and wine > packages). But it breaks on cygwin. > > #ifd

Re: [PATCH] testsuite for poll(2)

2008-09-12 Thread Paolo Bonzini
Here is the final patch I pushed for Windows compatibility of tests. It does not test much because the socket syscalls are not compatible enough, but it compiles at least (using the Debian mingw32 and wine packages). Paolo commit b03b6bfb8daa20dceff4593229f0df2c68c37e6e Author: Paolo Bonzini <[EM

Re: [PATCH] Use `AC_C_RESTRICT' in `time'

2008-09-12 Thread Ludovic Courtès
Hi, Eric Blake <[EMAIL PROTECTED]> writes: > Could it also be a case of not including before system headers? You're probably right. I'm waiting for a confirmation... Thanks, Ludo'.

Re: [PATCH] testsuite for poll(2)

2008-09-12 Thread Paolo Bonzini
> test-poll.o: In function `open_server_socket': > /home/yoann/dev/prelude/git/gnulib/poll/gltests/test-poll.c:91: > undefined reference to `_inet_aton' > test-poll.o: In function `connect_to_socket': > /home/yoann/dev/prelude/git/gnulib/poll/gltests/test-poll.c:121: > undefined reference to `_ine

Re: [PATCH] testsuite for poll(2)

2008-09-12 Thread Yoann Vandoorselaere
Le vendredi 12 septembre 2008 à 15:49 +0200, Paolo Bonzini a écrit : > > - enum { TRUE, FALSE } will fail to compile on WIN32, better use > > stdbool, or : > > See patch at end of message. > > > - The code need to be linked to -lws2_32 to avoid undefined symbols, yet > > the dependency is not pul

Re: [PATCH] testsuite for poll(2)

2008-09-12 Thread Paolo Bonzini
Thanks Yoann! > - enum { TRUE, FALSE } will fail to compile on WIN32, better use > stdbool, or : See patch at end of message. > - The code need to be linked to -lws2_32 to avoid undefined symbols, yet > the dependency is not pulled automatically. Also fixed in the patch by using the sockets mod

Re: [RFT] Wrap winsock functions for improved compatibility

2008-09-12 Thread Paolo Bonzini
> First round of cygwin 1.5.x results (I ran out of time to investigate any > further at the moment, and I also haven't had time to do cygwin 1.7.0 tests): > > Pipe test... failed (expecting POLLHUP after shutdown) > FAIL: test-poll.exe Good, this also gives a baseline for the native poll implemen

Re: [RFT] Wrap winsock functions for improved compatibility

2008-09-12 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Paolo Bonzini on 9/12/2008 7:16 AM: >> $ git push [EMAIL PROTECTED]:/srv/git/gnulib/ericb.git +HEAD:mob > > Indeed, you can find it there as f50320c. You can also run test-poll on > the native poll emulation, but I guess I'll have to fin

Re: [PATCH] testsuite for poll(2)

2008-09-12 Thread Yoann Vandoorselaere
Le vendredi 12 septembre 2008 à 15:11 +0200, Paolo Bonzini a écrit : > It is minimal in that it only tests one descriptor at a time. But it > has several tests for both sockets and pipes (and if compiled with > -DINTERACTIVE, TTYs too), so while it does not cover a lot of code in > the poll emulat

Re: [PATCH] testsuite for poll(2)

2008-09-12 Thread Paolo Bonzini
Eric Blake wrote: > According to Paolo Bonzini on 9/12/2008 7:11 AM: >> It is minimal in that it only tests one descriptor at a time. But it >> has several tests for both sockets and pipes (and if compiled with >> -DINTERACTIVE, TTYs too), so while it does not cover a lot of code in >> the poll em

Re: [PATCH] testsuite for poll(2)

2008-09-12 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Paolo Bonzini on 9/12/2008 7:11 AM: > It is minimal in that it only tests one descriptor at a time. But it > has several tests for both sockets and pipes (and if compiled with > -DINTERACTIVE, TTYs too), so while it does not cover a lot o

Re: [RFT] Wrap winsock functions for improved compatibility

2008-09-12 Thread Paolo Bonzini
> Yes, cygwin has a working . Do you have a repository > somewhere that I can pull from to test on cygwin, before this hits the > master gnulib.git on savannah? I'm not going to commit it soon, because it sort-of-breaks the poll emulation. The two should reach savannah together. > For that mat

[PATCH] testsuite for poll(2)

2008-09-12 Thread Paolo Bonzini
It is minimal in that it only tests one descriptor at a time. But it has several tests for both sockets and pipes (and if compiled with -DINTERACTIVE, TTYs too), so while it does not cover a lot of code in the poll emulation it does cover all the subtleties. In particular it highlighted a differe

Re: [RFT] Wrap winsock functions for improved compatibility

2008-09-12 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Paolo Bonzini on 9/12/2008 6:53 AM: >> - > It needs to be tested on Windows (mingw and cygwin) >> >> The patch is supposed to change nothing on Cygwin, right? Cygwin has >> perfectly fine POSIX socket support already. > > I added a #e

Re: [RFT] Wrap winsock functions for improved compatibility

2008-09-12 Thread Paolo Bonzini
> - > It needs to be tested on Windows (mingw and cygwin) > > The patch is supposed to change nothing on Cygwin, right? Cygwin has > perfectly fine POSIX socket support already. I added a #error to verify that. That's why I needed testing on Cygwin. > - The transformation of WSAGetLastErro

Re: snapshot in preparation for m4 1.4.12

2008-09-12 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Thomas Klausner on 8/23/2008 10:11 AM: >>> When stepping through test-frexp with gdb, it fails like this: >>> (gdb) s >>> 113 ASSERT (signbit (mantissa)); >> Thanks for the trace. That occurs after the damage is already done; how

Re: lib/regex_internal.h on 1.4.11

2008-09-12 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 8/1/2008 3:30 AM: > Jonathan C. Patschke wrote: >> That fixes the problem in test-frexp and test-strtod, but not test-frexpl >> (which still fails the (mantissa == x) assertion). > > Thanks. I'm applying the patch below, a

Re: [RFT] Wrap winsock functions for improved compatibility

2008-09-12 Thread Bruno Haible
Hi Paolo, This is exciting! By using _open_osfhandle you are ensuring that there are no collisions between native file handles and socket-related file handles. Great! A few comments, though: - > It needs to be tested on Windows (mingw and cygwin) The patch is supposed to change nothing on Cyg

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: [RFT] Wrap winsock functions for improved compatibility

2008-09-12 Thread Paolo Bonzini
Paolo Bonzini wrote: > Hi all, > > this proposed patch wraps winsock functions that take or return socket > descriptors, so that C run-time library descriptors are used instead. > This should be fully transparent to the user, except that you can close > these sockets with close, read them with rea

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

[RFT] Wrap winsock functions for improved compatibility

2008-09-12 Thread Paolo Bonzini
Hi all, this proposed patch wraps winsock functions that take or return socket descriptors, so that C run-time library descriptors are used instead. This should be fully transparent to the user, except that you can close these sockets with close, read them with read/write, and so on. The only rem

Re: [PATCH]: glthread cond win32 compilation problem

2008-09-12 Thread Yoann Vandoorselaere
Le vendredi 12 septembre 2008 à 02:50 +0200, Bruno Haible a écrit : > Yoann Vandoorselaere wrote: > > Attached are a few patch that fixes ... glthread/cond modules > > compilation problem under MinGW. > > I'm applying the first hunk: [...] > About the second hunk, the problem is more general: no

Re: [PATCH]: glob win32 compatibility fixes

2008-09-12 Thread Yoann Vandoorselaere
Hi Bruno, Le vendredi 12 septembre 2008 à 02:17 +0200, Bruno Haible a écrit : > > Attached are a few patch that fixes glob ... > > compilation problem under MinGW. > > A couple of details in this patch can be improved: > > - The predefine 'WIN32' is sometimes also defined for Cygwin, and is >

Re: [PATCH]: glthread cond win32 compilation problem

2008-09-12 Thread Paolo Bonzini
> 2008-09-11 Yoann Vandoorselaere <[EMAIL PROTECTED]> > Bruno Haible <[EMAIL PROTECTED]> > > * lib/glthread/cond.h (ETIMEDOUT): Define to a fallback value if not > defined by . > > + /* Possible return value of glthread_cond_timedwait. > +Use a random value as fall