bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] year2038: work even if time_t is narrower than int


From: Paul Eggert
Subject: [PATCH] year2038: work even if time_t is narrower than int
Date: Mon, 2 Aug 2021 09:46:29 -0700

---
 m4/year2038.m4 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/m4/year2038.m4 b/m4/year2038.m4
index 7ae004e81..f53b03f94 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];
-- 
2.30.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]