On Mon, 24 Nov 2025, Pali Rohár wrote:
If WriteFile() fails with ERROR_DISK_FULL or fflush() with ENOSPC then skip
the whole test. It can happen on older WinNT system without sparse file
support and with small disk.
---
mingw-w64-crt/testcases/t_fseeki64.c | 5 +++++
mingw-w64-crt/testcases/t_fseeko64.c | 6 ++++++
2 files changed, 11 insertions(+)
diff --git a/mingw-w64-crt/testcases/t_fseeki64.c
b/mingw-w64-crt/testcases/t_fseeki64.c
index 63d30ca14c4d..2ad581849f23 100644
--- a/mingw-w64-crt/testcases/t_fseeki64.c
+++ b/mingw-w64-crt/testcases/t_fseeki64.c
@@ -71,6 +71,11 @@ int main() {
assert(fputs("_", file) >= 0);
/* flush all data, so they can be accessed via WinAPI */
+ if (fflush(file) == EOF && errno == ENOSPC) {
This fails in builds with Clang:
../../testcases/t_fseeki64.c:74:41: error: use of undeclared identifier
'ENOSPC'
74 | if (fflush(file) == EOF && errno == ENOSPC) {
| ^~~~~~
You need to include errno.h explicitly - apparently that gets included
implicitly somewhere with GCC. ("errno" itself also seems to be defined by
stdlib.h.)
// Martin
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public