And with this additional patch, ftello() works on large files on mingw.
2024-11-14 Bruno Haible <br...@clisp.org> ftello: Fix override on mingw. Reported by Markus Mützel <markus.muet...@gmx.de> in <https://lists.gnu.org/archive/html/bug-gnulib/2024-11/msg00108.html>. * lib/ftello.c: Test whether module 'largefile' is in use, not whether it had to override 'off_t'. diff --git a/lib/ftello.c b/lib/ftello.c index 88247bca8e..37fe93a34e 100644 --- a/lib/ftello.c +++ b/lib/ftello.c @@ -34,7 +34,7 @@ ftello (FILE *fp) # undef ftell # define ftello ftell #endif -#if _GL_WINDOWS_64_BIT_OFF_T +#if (defined _WIN32 && !defined __CYGWIN__) && _FILE_OFFSET_BITS == 64 # undef ftello # if HAVE__FTELLI64 /* msvc, mingw64 */ # define ftello _ftelli64