* [PATCH] year2038: work even if time_t is narrower than int
@ 2021-08-02 16:46 Paul Eggert
0 siblings, 0 replies; only message in thread
From: Paul Eggert @ 2021-08-02 16:46 UTC (permalink / raw)
To: bug-gnulib; +Cc: Paul Eggert
---
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-02 16:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-02 16:46 [PATCH] year2038: work even if time_t is narrower than int Paul Eggert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).