[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: nanosleep on mingw
From: |
Jim Meyering |
Subject: |
Re: nanosleep on mingw |
Date: |
Sat, 03 Apr 2010 21:55:13 +0200 |
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 <address@hidden>
>
> 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.
- stpncpy on mingw, Bruno Haible, 2010/04/03
- mkstemp on mingw, Bruno Haible, 2010/04/03
- fseeko on mingw, Bruno Haible, 2010/04/03
- ftello on mingw, Bruno Haible, 2010/04/03
- getline on mingw, Bruno Haible, 2010/04/03
- getpagesize on mingw, Bruno Haible, 2010/04/03
- fchdir on mingw, Bruno Haible, 2010/04/03
- nanosleep on mingw, Bruno Haible, 2010/04/03
- Re: nanosleep on mingw, Bruno Haible, 2010/04/04
- Re: nanosleep on mingw, Jim Meyering, 2010/04/04
- Re: nanosleep on mingw, Bruno Haible, 2010/04/04
localtime_r on mingw, Bruno Haible, 2010/04/03
timegm on mingw, Bruno Haible, 2010/04/03
strptime on mingw, Bruno Haible, 2010/04/03
wcwidth on mingw, Bruno Haible, 2010/04/03
ioctl on mingw, Bruno Haible, 2010/04/04