From 77340129486f06498bca2d536ec0406e02ca6d76 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 2 Jan 2022 08:35:54 -0800 Subject: rlimit: var init problem due to large file offset. Now that we fixed the regression in detecting whether to use -D_FILE_OFFSET_BITS=64, this has unmasked an issue in newer code. In sysif.c, the RLIM_INFINITY, and related constants, are being passed to num_fast: but they are 64 bit unsigned constants under the large file offset, which don't fit into a cnum or unum on a 32 bit system. * configure: When we detect large file offset, we deposit the tell-tale configuration constant CONFIG_LARGE_FILE_OFFSET into config.h. * sysif.c (sysif_init): Under CONFIG_LARGE_FILE_OFFSET, treat the RLIM_ constants using bignum_dbl_uipt. --- configure | 1 + 1 file changed, 1 insertion(+) (limited to 'configure') diff --git a/configure b/configure index e894aa0f..353dd844 100755 --- a/configure +++ b/configure @@ -3463,6 +3463,7 @@ done if [ "$file_offset_define" = none ] ; then printf " (no 64 bit off_t)" elif [ -n "$file_offset_define" ] ; then + printf "#define CONFIG_LARGE_FILE_OFFSET 1\n" >> config.h lang_flags="$lang_flags -D$file_offset_define" fi -- cgit v1.2.3