From: Bruno Haible Date: Thu, 13 Dec 2018 11:00:22 +0000 (+0100) Subject: localtime-buffer: Avoid endless recursion in localtime and gmtime. X-Git-Tag: v1.0~5248 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=72e936e89c09bcf1a76479258881d91b0a27003f;p=gnulib.git localtime-buffer: Avoid endless recursion in localtime and gmtime. * lib/localtime-buffer.c: Undefine localtime and gmtime before use. --- diff --git a/ChangeLog b/ChangeLog index b9d8597b1d..db004ee935 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2018-12-13 Bruno Haible + + localtime-buffer: Avoid endless recursion in localtime and gmtime. + * lib/localtime-buffer.c: Undefine localtime and gmtime before use. + 2018-12-13 Bruno Haible localeconv tests: Avoid test failure on Cygwin. diff --git a/lib/localtime-buffer.c b/lib/localtime-buffer.c index 7f12ce6b84..a245e56610 100644 --- a/lib/localtime-buffer.c +++ b/lib/localtime-buffer.c @@ -34,6 +34,7 @@ struct tm *localtime_buffer_addr = &tm_zero_buffer; struct tm * rpl_localtime (time_t const *timep) +#undef localtime { struct tm *tm = localtime (timep); @@ -46,6 +47,7 @@ rpl_localtime (time_t const *timep) /* Same as above, since gmtime and localtime use the same buffer. */ struct tm * rpl_gmtime (time_t const *timep) +#undef gmtime { struct tm *tm = gmtime (timep);