]> Savannah Git Hosting - gnulib.git/commitdiff
localtime-buffer: Avoid endless recursion in localtime and gmtime.
authorBruno Haible <bruno@clisp.org>
Thu, 13 Dec 2018 11:00:22 +0000 (12:00 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 13 Dec 2018 11:00:22 +0000 (12:00 +0100)
* lib/localtime-buffer.c: Undefine localtime and gmtime before use.

ChangeLog
lib/localtime-buffer.c

index b9d8597b1d492cec80fc932ad88161577f501129..db004ee935aad909d2bee355549b8ce16d3c15fb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-12-13  Bruno Haible  <bruno@clisp.org>
+
+       localtime-buffer: Avoid endless recursion in localtime and gmtime.
+       * lib/localtime-buffer.c: Undefine localtime and gmtime before use.
+
 2018-12-13  Bruno Haible  <bruno@clisp.org>
 
        localeconv tests: Avoid test failure on Cygwin.
index 7f12ce6b84b1e6ce4b7988a89e62987ea0ab921c..a245e56610d8249790b94899e621ba2fa94775e2 100644 (file)
@@ -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);