diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2020-06-29 16:51:08 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2020-06-29 17:08:26 -0700 |
commit | a1d8293f3bfa2516f9a0424e3a6e63c2f8e93c6e (patch) | |
tree | e7aa2335b9960000f72647fdfe6f42fe14beee53 | |
parent | 9019c72d8fec5e29366f6065bb9d6429aa3d397d (diff) | |
download | autoconf-a1d8293f3bfa2516f9a0424e3a6e63c2f8e93c6e.tar.gz |
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
-rw-r--r-- | lib/autoconf/specific.m4 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4 index 2809c009..f750722a 100644 --- a/lib/autoconf/specific.m4 +++ b/lib/autoconf/specific.m4 @@ -93,7 +93,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 |