From 27dae84ed92f1ef0300263091972338d12e78348 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sat, 18 Oct 2025 19:06:52 +0200 Subject: New upstream version 1.4.1 --- tests/ftruncate.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'tests/ftruncate.c') diff --git a/tests/ftruncate.c b/tests/ftruncate.c index 63947257..ca19f21e 100644 --- a/tests/ftruncate.c +++ b/tests/ftruncate.c @@ -1,5 +1,5 @@ /* ftruncate emulations for native Windows. - Copyright (C) 1992-2024 Free Software Foundation, Inc. + Copyright (C) 1992-2025 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -24,10 +24,14 @@ # include -# if _GL_WINDOWS_64_BIT_OFF_T +/* 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. So, define a 64-bit safe SetFileSize function ourselves. */ + argument. Some newer versions of the Windows CRT have a _chsize_s function + that takes a 64-bit argument, but we cannot rely on that. + So, define a 64-bit safe SetFileSize function ourselves. */ /* Ensure that declares GetFileSizeEx. */ # if !defined _WIN32_WINNT || (_WIN32_WINNT < _WIN32_WINNT_WIN2K) -- cgit v1.2.3