summaryrefslogtreecommitdiffstats
path: root/libc/tzcode/private.h
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-08-22 21:27:55 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2013-08-22 21:27:55 +0000
commit41f08abf3d020ad8b48ff4151f8c623a119790e0 (patch)
tree76decfb3114af9fbcf85ca6f1c99c94177642023 /libc/tzcode/private.h
parentc44205cf717fc8ab8ccaf3631032fa236ba61a86 (diff)
parent713fe6463e6ff8cb9689aa8ead88c885d25d03aa (diff)
downloadbionic-41f08abf3d020ad8b48ff4151f8c623a119790e0.zip
bionic-41f08abf3d020ad8b48ff4151f8c623a119790e0.tar.gz
bionic-41f08abf3d020ad8b48ff4151f8c623a119790e0.tar.bz2
Merge "Apply upstream commit 943a6621866e9d6e654f5cfe1494378c1fb8957a."
Diffstat (limited to 'libc/tzcode/private.h')
-rw-r--r--libc/tzcode/private.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/libc/tzcode/private.h b/libc/tzcode/private.h
index a31a26e..1a938a2 100644
--- a/libc/tzcode/private.h
+++ b/libc/tzcode/private.h
@@ -304,6 +304,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);
+
/*
** Since the definition of TYPE_INTEGRAL contains floating point numbers,
** it cannot be used in preprocessor directives.