On Fri, 12 Dec 2025, Martin Storsjö wrote:
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.)
Ok nevermind, I see that Liu Hao already replied with both this issue and
the other issue in place.
Therefore - I'm awaiting a resend of this patchset before looking further
at it. While re-sending, consider rebasing it on top of latest master;
there's a conflict with 479ea97838f28c72b6aaee806a27c4e0aad0c87c that has
to be resolved manually. (But thanks for mentioning the base commit for
the patchset; it did avoid some headache when trying to apply your
patchset.)
// Martin
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public