Re: [PATCH]: update tls and lock tests, gl_cond_t WIN32 implementation

2008-10-11 Thread Bruno Haible
Hi Yoann, You wrote on 2008-09-18 and 2008-10-02 : > provide a working implementation of gl_cond_t for WIN32 platform > (based on http://www.cs.wustl.edu/~sch

sleep() on older mingw

2008-10-11 Thread Bruno Haible
On older mingw installations, libcoldnames.a contains a sleep() function that is incompatible with POSIX: - it takes milliseconds, not seconds, as argument, - it returns 'void', not 'int'. Unfortunately, the gnulib module 'sleep' did not recognize this function as being unusable. This fixes it

Re: Downloading gnulib

2008-10-11 Thread Dorothy A Phoenix
Success! Thanks Eric for helping me to fix this last bit. And thanks again to you as well, Bruno. I changed the mode for git to binary. If anyone is interested/has the same problem, I used the step in outlined in this page: http://tylerclendenin.com/2008/09/git-for-windows-users/ "*CRLF Issues

Re: Downloading gnulib

2008-10-11 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Dorothy A Phoenix on 10/11/2008 10:44 AM: > My mistake! I didn't realize that I hadn't emailed the list. Thanks > for replying. > > Okay, so progress has been made. I ran the tool with the ./ prefix, as > $ ./gnulib-tool --help. I ge

Re: Downloading gnulib

2008-10-11 Thread Dorothy A Phoenix
My mistake! I didn't realize that I hadn't emailed the list. Thanks for replying. Okay, so progress has been made. I ran the tool with the ./ prefix, as $ ./gnulib-tool --help. I get the following error: ./gnulib-tool: line 18: $'\r' : command not found This error repeats several times with d

new module 'shutdown'

2008-10-11 Thread Bruno Haible
Another function part of the usual socket API is shutdown() [1][2]. This implements it for mingw, using the same idioms as for the other socket functions. [1] http://www.opengroup.org/susv3/functions/shutdown.html [2] http://msdn.microsoft.com/en-us/library/ms740481(VS.85).aspx 2008-10-11 Brun

Re: [PATCH] use gnulib modules close (new) and open to hook into open/close

2008-10-11 Thread Paolo Bonzini
Bruno Haible wrote: >> AC_DEFUN([gl_FUNC_CLOSE], >> [ >> ! m4_ifdef([gl_PREREQ_SYS_H_WINSOCK2], [ >> ! gl_PREREQ_SYS_H_WINSOCK2 >> ! if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then >> ! gl_REPLACE_CLOSE >> ! fi >> ! ]) >> ]) > > I'm not so happy with this code. If we create

new module 'fclose'

2008-10-11 Thread Bruno Haible
We're overriding close(). But the system's fclose(), when called on a FILE stream that was created with fdopen() from a socket descriptor, will not invoke our overridden close(). So we have to override fclose() as well. I'm committing this. It has a circular dependency between the modules 'close'

rpl_close of socket: set errno

2008-10-11 Thread Bruno Haible
When closing of a socket fails, winsock.c currently does not set errno and closes the handle despite returning -1. This fixes it. Also, I'm adding a comment about why _free_osfhnd is not enough. For every fd, the MSVCRT has two bits of information: the HANDLE called 'osfhnd', and a field of flags,

Re: [PATCH] use gnulib modules close (new) and open to hook into open/close

2008-10-11 Thread Bruno Haible
> AC_DEFUN([gl_FUNC_CLOSE], > [ > ! m4_ifdef([gl_PREREQ_SYS_H_WINSOCK2], [ > ! gl_PREREQ_SYS_H_WINSOCK2 > ! if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then > ! gl_REPLACE_CLOSE > ! fi > ! ]) > ]) I'm not so happy with this code. If we create a tests directory where the 'clo

Re: Downloading gnulib

2008-10-11 Thread Bruno Haible
Hi, Dorothy A Phoenix wrote: > However, I am still not sure where to use gnulib-tool. Am I to run it from > a command prompt, or as a flag in the compiler, or what? We have set up a manual for it, at http://www.gnu.org/software/gnulib/manual/ The chapters "Introduction" and "Invoking gnulib-to