]> Savannah Git Hosting - gnulib.git/commitdiff
largefile: sync with Autoconf master
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 31 Jul 2020 02:12:44 +0000 (19:12 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 31 Jul 2020 02:16:11 +0000 (19:16 -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
m4/largefile.m4

index fa5e1dab10afcf378a087d12fa2ba1074b108dcf..9e70bd36f0dec5c9d7bd51f38bf18ce4e4da702c 100644 (file)
--- 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
index 8017ca70eb440e239458dc14b17bbfc9a8362128..f7140dd0a3a5fa38b1428512b0b47ef21eda7485 100644 (file)
@@ -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