From: Paul Eggert Date: Mon, 2 Aug 2021 16:44:59 +0000 (-0700) Subject: year2038: work even if time_t is narrower than int X-Git-Tag: v1.0~2730 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=7c6538cf0584a5ad3e2e46f64b1936eea4cddecc;p=gnulib.git year2038: work even if time_t is narrower than int --- 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 /* 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];