bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH 2/2] largefile: sync with Autoconf master


From: Paul Eggert
Subject: [PATCH 2/2] largefile: sync with Autoconf master
Date: Thu, 30 Jul 2020 19:16:36 -0700

* m4/largefile.m4 (_AC_SYS_LARGEFILE_TEST_INCLUDES):
Avoid undefined behavior on platforms where off_t is 32 bits.
See: https://bugs.debian.org/742780
---
 ChangeLog       | 5 +++++
 m4/largefile.m4 | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index fa5e1dab1..9e70bd36f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2020-07-30  Paul Eggert  <eggert@cs.ucla.edu>
 
+       largefile: sync with Autoconf master
+       * m4/largefile.m4 (_AC_SYS_LARGEFILE_TEST_INCLUDES):
+       Avoid undefined behavior on platforms where off_t is 32 bits.
+       See: https://bugs.debian.org/742780
+
        alloca: sync with Autoconf master
        * m4/alloca.m4 (_AC_LIBOBJ_ALLOCA):
        Do not define if Autoconf 2.70 or later, since Autoconf master
diff --git a/m4/largefile.m4 b/m4/largefile.m4
index 8017ca70e..f7140dd0a 100644
--- a/m4/largefile.m4
+++ b/m4/largefile.m4
@@ -35,7 +35,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
-- 
2.25.4




reply via email to

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