My email provider started to mess with outgoing only-text messages. So, apologies if some characters are replaced incorrectly.
Am 13. November 2024 um 00:54 schrieb "Bruno Haible": > In order to make sure that Octave does not have bugs with files > 2 GiB > (without restrictions like "as far as I can tell"), you need four things: > 1) Make sure to request the modules 'fseeko', 'ftello' from gnulib, not > 'fseek' and 'ftell'. > 2) Use "nm octave" (or "nm octave.exe" on mingw), as well as > "nm liboctave.so", "nm liboctgui.so", "nm liboctinterp.so", > to verify that the binaries don't use the functions 'fseek', 'ftell'. > 3) In the code around the fseeko and ftello calls, drop the use of the > 'long' type and use 'off_t' instead. > 4) Use gnulib module 'largefile' as well. Thank you for the tips. I made some local changes to eliminate remaining uses of "fseek" in Octave. (None of them were relevant for the reported issue.) With those, liboctave.dll still used "ftell". It took me a while to assure it isn't coming from anywhere else. But the only place that made use of that symbol is from "gnulib/lib/ftello.c". I found the following in the generated "config.in.h": /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ #undef HAVE_FSEEKO That was replaced with the following in the generated "config.h" after running the configure script: /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ #define HAVE_FSEEKO 1 But no match for HAVE_FTELLO in "config.in.h" nor in "config.h". With the following change in gnulib, liboctave.dll no longer uses "ftell": diff --git a/lib/ftello.c b/lib/ftello.c index 88247bca8e..29158b354d 100644 --- a/lib/ftello.c +++ b/lib/ftello.c @@ -30,7 +30,7 @@ off_t ftello (FILE *fp) #undef ftello -#if !HAVE_FTELLO +#if !HAVE_FSEEKO # undef ftell # define ftello ftell #endif Does that look more reasonable? Markus