about summary refs log tree commit diff
path: root/timezone
diff options
context:
space:
mode:
Diffstat (limited to 'timezone')
-rw-r--r--timezone/Makefile10
-rw-r--r--timezone/private.h10
2 files changed, 16 insertions, 4 deletions
diff --git a/timezone/Makefile b/timezone/Makefile
index bfb3463373..afd9e880b7 100644
--- a/timezone/Makefile
+++ b/timezone/Makefile
@@ -61,10 +61,12 @@ tz-cflags = -DTZDIR='"$(zonedir)"' \
 	    -DTZDEFRULES='"$(posixrules-file)"' \
 	    -DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone
 
-CFLAGS-zdump.c = -fwrapv -DNOID $(tz-cflags) -DHAVE_GETTEXT
-CFLAGS-zic.c = -DNOID $(tz-cflags) -DHAVE_GETTEXT
-CFLAGS-ialloc.c = -DNOID -DHAVE_GETTEXT
-CFLAGS-scheck.c = -DNOID -DHAVE_GETTEXT
+CFLAGS-zdump.c = -fwrapv -DNOID $(tz-cflags) -DHAVE_GETTEXT \
+		 -Wno-error=unused-const-variable
+CFLAGS-zic.c = -DNOID $(tz-cflags) -DHAVE_GETTEXT \
+	       -Wno-error=unused-const-variable
+CFLAGS-ialloc.c = -DNOID -DHAVE_GETTEXT -Wno-error=unused-const-variable
+CFLAGS-scheck.c = -DNOID -DHAVE_GETTEXT -Wno-error=unused-const-variable
 
 # We have to make sure the data for testing the tz functions is available.
 # Don't add leapseconds here since test-tz made checks that work only without
diff --git a/timezone/private.h b/timezone/private.h
index ed19e066d9..4e8f4ae7bc 100644
--- a/timezone/private.h
+++ b/timezone/private.h
@@ -326,6 +326,16 @@ const char *	scheck(const char * string, const char * format);
 #define TYPE_SIGNED(type) (((type) -1) < 0)
 #endif /* !defined TYPE_SIGNED */
 
+/* The minimum and maximum finite time values.  */
+static time_t const time_t_min =
+  (TYPE_SIGNED(time_t)
+   ? (time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1)
+   : 0);
+static time_t const time_t_max =
+  (TYPE_SIGNED(time_t)
+   ? - (~ 0 < 0) - ((time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1))
+   : -1);
+
 #ifndef INT_STRLEN_MAXIMUM
 /*
 ** 302 / 1000 is log10(2.0) rounded up.