about summary refs log tree commit diff
path: root/timezone/private.h
diff options
context:
space:
mode:
authorWilco Dijkstra <wdijkstr@arm.com>2015-09-18 21:40:12 +0100
committerWilco Dijkstra <wdijkstr@arm.com>2015-09-18 21:43:43 +0100
commit1344384b52829a4dcde51ec3a307c4b3d6a713fa (patch)
treeb37f977aaf87d64bfce4a16f00426d9f306dd351 /timezone/private.h
parent94ced920a951bcab51f2ef955ccd2cc51668e6f3 (diff)
downloadglibc-1344384b52829a4dcde51ec3a307c4b3d6a713fa.tar.gz
glibc-1344384b52829a4dcde51ec3a307c4b3d6a713fa.tar.xz
glibc-1344384b52829a4dcde51ec3a307c4b3d6a713fa.zip
Undo build error fixes to timezone/private.h, change makefile instead to
ignore the errors.

2015-09-18  Wilco Dijkstra  <wdijkstr@arm.com>

        * timezone/Makefile: Ignore unused variable errors due to private.h
        (time_t_min) and (time_t_max).
        * timezone/private.h (time_t_min): Revert removal.  (time_t_max):
        Likewise.
Diffstat (limited to 'timezone/private.h')
-rw-r--r--timezone/private.h10
1 files changed, 10 insertions, 0 deletions
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.