Re: Gnulib fails to detect nanosleep in MinGW runtime

2018-05-12 Thread Bruno Haible
Eli Zaretskii wrote: > While building the latest pretest of wget2, I saw that the Gnulib's > detection of nanosleep fails to detect its presence in mingw.org's > MinGW runtime. The test program used for that fails for unrelated > reason: it uses SIGALRM, which is unavailable on MS-Windows. > >

Gnulib fails to detect nanosleep in MinGW runtime

2018-05-12 Thread Eli Zaretskii
While building the latest pretest of wget2, I saw that the Gnulib's detection of nanosleep fails to detect its presence in mingw.org's MinGW runtime. The test program used for that fails for unrelated reason: it uses SIGALRM, which is unavailable on MS-Windows. I'm guessing that SIGALRM is used

Re: nanosleep on mingw

2010-04-04 Thread Bruno Haible
The current implementation of nanosleep is broken on mingw for several reasons: 1) It requires linking with -lws2_32, as evidenced by these error messages: gcc-3 -mno-cygwin -g -O2 -L/usr/local/mingw/lib -o test-nanosleep.exe test-nanosleep.o ../gllib/libgnu.a

Re: nanosleep on mingw

2010-04-04 Thread Jim Meyering
Bruno Haible wrote: ... So here is a proposed patch for implementing a Woe32 nanosleep with a resolution of ca. 10 microseconds or higher. 2010-04-04 Bruno Haible br...@clisp.org Implement nanosleep for native Windows. * lib/nanosleep.c (nanosleep): New implementation for

Re: nanosleep on mingw

2010-04-04 Thread Bruno Haible
Jim Meyering wrote: You're welcome to commit that. Committed. The only thing I'm worried about is that it's a compromise between precision of the time interval and ues of CPU time: Someone who invokes nanosleep with an argument of 0.3 seconds may complain that 9.4 ms of busy-looping is not

nanosleep on mingw

2010-04-03 Thread Bruno Haible
nanosleep: Fix C++ test error on mingw. * lib/nanosleep.c (nanosleep): Renamed from rpl_nanosleep. * lib/time.in.h (nanosleep): Use modern idiom. * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): When the system does not have a nanosleep function, set HAVE_NANOSLEEP to 0

Re: nanosleep on mingw

2010-04-03 Thread Jim Meyering
Bruno Haible br...@clisp.org nanosleep: Fix C++ test error on mingw. * lib/nanosleep.c (nanosleep): Renamed from rpl_nanosleep. * lib/time.in.h (nanosleep): Use modern idiom. * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): When the system does not have a nanosleep function

Re: nanosleep on mingw

2010-04-03 Thread Bruno Haible
Hi Jim, Though note that the patches to modules/time and m4/time_h.m4 did not apply and I did them manually. Yes, I was constantly changing the same parts of these two files. Please apply. Applied. Bruno