https://github.com/libsdl-org/autoconf/commit/f12a33cbd400ba55d0bca7dc62b15e31d2e6ebd5
From f12a33cbd400ba55d0bca7dc62b15e31d2e6ebd5 Mon Sep 17 00:00:00 2001
From: Paul Eggert <[EMAIL REDACTED]>
Date: Mon, 29 Jun 2020 16:51:08 -0700
Subject: [PATCH] Fix undefined behavior in AC_SYS_LARGEFILE
* lib/autoconf/specific.m4 (_AC_SYS_LARGEFILE_TEST_INCLUDES):
Avoid undefined behavior on platforms where off_t is 32 bits. See:
https://bugs.debian.org/742780
(cherry picked from commit a1d8293f3bfa2516f9a0424e3a6e63c2f8e93c6e)
---
lib/autoconf/specific.m4 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4
index 340646f3..0b77ce34 100644
--- a/lib/autoconf/specific.m4
+++ b/lib/autoconf/specific.m4
@@ -92,7 +92,7 @@ m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES],
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+@%:@define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
int off_t_is_large[[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1]];[]dnl