summaryrefslogtreecommitdiff
path: root/m4/year2038.m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2021-08-02 09:44:59 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2021-08-02 09:45:29 -0700
commit7c6538cf0584a5ad3e2e46f64b1936eea4cddecc (patch)
tree1a8d437c2f89eee6ef88d33c82c3ca2389e7327e /m4/year2038.m4
parent784f55e5c59abde4eabf4e08169d1c50363280b4 (diff)
downloadgnulib-7c6538cf0584a5ad3e2e46f64b1936eea4cddecc.tar.gz
year2038: work even if time_t is narrower than int
Diffstat (limited to 'm4/year2038.m4')
-rw-r--r--m4/year2038.m43
1 files changed, 2 insertions, 1 deletions
diff --git a/m4/year2038.m4 b/m4/year2038.m4
index 7ae004e81b..f53b03f94f 100644
--- a/m4/year2038.m4
+++ b/m4/year2038.m4
@@ -24,7 +24,8 @@ AC_DEFUN([gl_YEAR2038_TEST_INCLUDES],
[[
#include <time.h>
/* Check that time_t can represent 2**32 - 1 correctly. */
- #define LARGE_TIME_T (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30))
+ #define LARGE_TIME_T \\
+ ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
&& LARGE_TIME_T % 65537 == 0)
? 1 : -1];