# HG changeset patch # User Bruno Haible # Date 1275575101 -7200 # Node ID cc6f2130863b29d13f26e9df578c8ce12186e24c # Parent 27aa5a0e75a5883e6165e87e7c4ac16f11f64086 time: Undefine more broken macros. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-06-03 Bruno Haible + + time: Undefine more broken macros. + * lib/time.in.h: Undefine broken localtime_r and gmtime_r macros only + for pthread-win32. Undefine also asctime_r, ctime_r, rand_r, strtok_r. + Reported by Eric Blake. + 2010-06-03 Bruno Haible Choose among AC_DEFUN_ONCE, AC_DEFUN in a way that aclocal understands. diff --git a/lib/time.in.h b/lib/time.in.h --- a/lib/time.in.h +++ b/lib/time.in.h @@ -55,6 +55,13 @@ # include # elif @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ # include +/* The pthreads-win32 also defines a couple of broken macros. */ +# undef asctime_r +# undef ctime_r +# undef gmtime_r +# undef localtime_r +# undef rand_r +# undef strtok_r # else # ifdef __cplusplus @@ -131,7 +138,6 @@ struct tm *restrict __result)); # else # if ! @HAVE_LOCALTIME_R@ -# undef localtime_r _GL_FUNCDECL_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((1, 2))); @@ -152,7 +158,6 @@ struct tm *restrict __result)); # else # if ! @HAVE_LOCALTIME_R@ -# undef gmtime_r _GL_FUNCDECL_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((1, 2)));