Reported by Markus Mützel <markus.muetzel@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 only
whether it had to override 'off_t'.
+2024-11-14 Bruno Haible <bruno@clisp.org>
+
+ ftello: Fix override on mingw.
+ Reported by Markus Mützel <markus.muetzel@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 only
+ whether it had to override 'off_t'.
+
2024-11-14 Bruno Haible <bruno@clisp.org>
fseeko: Fix potentially wrong override.
# undef ftell
# define ftello ftell
#endif
-#if _GL_WINDOWS_64_BIT_OFF_T
+#if (defined _WIN32 && !defined __CYGWIN__) \
+ /* We need to test _FILE_OFFSET_BITS for mingw-w64 */ \
+ /* and _GL_WINDOWS_64_BIT_OFF_T for MSVC. */ \
+ && (_FILE_OFFSET_BITS == 64 || _GL_WINDOWS_64_BIT_OFF_T)
# undef ftello
# if HAVE__FTELLI64 /* msvc, mingw64 */
# define ftello _ftelli64