]> Savannah Git Hosting - gnulib.git/commitdiff
year2038: work even if time_t is narrower than int
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 2 Aug 2021 16:44:59 +0000 (09:44 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 2 Aug 2021 16:45:29 +0000 (09:45 -0700)
m4/year2038.m4

index 7ae004e81b42e2165c437252d51ad3c8b39d2576..f53b03f94f4edc131b75af4c4e2e33339cc9dd1d 100644 (file)
@@ -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];