* lib/ftruncate.c: Test _GL_WINDOWS_64_BIT_OFF_T again.
* lib/ftello.c: Likewise.
+2024-11-14 Bruno Haible <bruno@clisp.org>
+
+ ftruncate, ftello: Make them work again for large files on MSVC.
+ * lib/ftruncate.c: Test _GL_WINDOWS_64_BIT_OFF_T again.
+ * lib/ftello.c: Likewise.
+
2024-11-14 Bruno Haible <bruno@clisp.org>
pthread-rwlock tests: Fix compilation error on AIX with xlc.
# undef ftell
# define ftello ftell
#endif
-#if (defined _WIN32 && !defined __CYGWIN__) && _FILE_OFFSET_BITS == 64
+#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
# include <errno.h>
-# if _FILE_OFFSET_BITS == 64 /* set by module 'largefile' on all platforms */
+/* We need to test _FILE_OFFSET_BITS for mingw-w64
+ and _GL_WINDOWS_64_BIT_OFF_T for MSVC. */
+# if (_FILE_OFFSET_BITS == 64 || _GL_WINDOWS_64_BIT_OFF_T)
/* Large File Support: off_t is 64-bit, but _chsize() takes only a 32-bit
argument. Some newer versions of the Windows CRT have a _chsize_s function