From: Paul Eggert Date: Fri, 31 Jul 2020 02:12:44 +0000 (-0700) Subject: largefile: sync with Autoconf master X-Git-Tag: v1.0~3838 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=b572cff7b36b4c78a78dbd9d642bb0c735a8f9ab;p=gnulib.git 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 --- diff --git a/ChangeLog b/ChangeLog index fa5e1dab10..9e70bd36f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2020-07-30 Paul Eggert + 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 8017ca70eb..f7140dd0a3 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