about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--time/mktime.c4
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0f8b5382d9..33ce8eded7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2014-06-28  Paul Eggert  <eggert@cs.ucla.edu>
+
+	mktime: merge #if/#ifdef usage from glibc
+	* lib/mktime.c: Use "#if defined DEBUG && DEBUG", not "#if DEBUG",
+	as that works with both Glibc's and Gnulib's style.
+	See thread starting at Siddhesh Poyarekar's bug report at:
+	http://lists.gnu.org/archive/html/bug-gnulib/2014-06/msg00102.html
+
 2014-06-28  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
 	* sysdeps/generic/memcopy.h: Define MEMCPY_OK_FOR_FWD_MEMMOVE.
diff --git a/time/mktime.c b/time/mktime.c
index f10e5301de..a52933e0e9 100644
--- a/time/mktime.c
+++ b/time/mktime.c
@@ -38,7 +38,7 @@
 
 #include <string.h>		/* For the real memcpy prototype.  */
 
-#if DEBUG
+#if defined DEBUG && DEBUG
 # include <stdio.h>
 # include <stdlib.h>
 /* Make it work even if the system's libc has its own mktime routine.  */
@@ -600,7 +600,7 @@ libc_hidden_def (mktime)
 libc_hidden_weak (timelocal)
 #endif
 
-#if DEBUG
+#if defined DEBUG && DEBUG
 
 static int
 not_equal_tm (const struct tm *a, const struct tm *b)