From 72e936e89c09bcf1a76479258881d91b0a27003f Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 13 Dec 2018 12:00:22 +0100 Subject: [PATCH] localtime-buffer: Avoid endless recursion in localtime and gmtime. * lib/localtime-buffer.c: Undefine localtime and gmtime before use. --- ChangeLog | 5 +++++ lib/localtime-buffer.c | 2 ++ 2 files changed, 7 insertions(+) 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); -- 2.39.5