Bruno Haible wrote: > Similarly, on mingw with warn-on-use.h modified to work like if g++ >= 4.3 > were present, I'm seeing this error: > > ../gllib/time.h:359: error: `nanosleep' was not declared in this scope > > It would also be an error on the other platforms lacking nanosleep, > with g++ 4.3. > > Again, to fix this, one needs to distinguish the case where the function > is missing and the case where the function is being replaced (overridden). > > Jim, here is a proposed patch. It fixes the error. The big change to > m4/nanosleep.m4 is mostly an indentation change. OK to commit? > > > 2010-04-03 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, set HAVE_NANOSLEEP to 0, instead of setting > REPLACE_NANOSLEEP to 1. > * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize HAVE_NANOSLEEP. > * modules/time (Makefile.am): Substitute HAVE_NANOSLEEP.
This looks right, and passed a basic sanity test (coreutils on F12). Though note that the patches to modules/time and m4/time_h.m4 did not apply and I did them manually. Please apply. Thanks for all the fixes.