summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-01-02 08:35:54 -0800
committerKaz Kylheku <kaz@kylheku.com>2022-01-02 08:35:54 -0800
commit77340129486f06498bca2d536ec0406e02ca6d76 (patch)
treec0b0331ecaa3240143eea9769814187cbf8a8694 /configure
parent338d76a0b8910d7d1082b16c688f53173316bc1a (diff)
downloadtxr-77340129486f06498bca2d536ec0406e02ca6d76.tar.gz
txr-77340129486f06498bca2d536ec0406e02ca6d76.tar.bz2
txr-77340129486f06498bca2d536ec0406e02ca6d76.zip
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.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure1
1 files changed, 1 insertions, 0 deletions
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