On Thursday 04 December 2025 14:43:29 LIU Hao wrote:
> 在 2025-11-25 01:48, Pali Rohár 写道:
> > 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) {
> 
> `ENOSPC` requires `#include <errno.h>`; otherwise this will not compile.

You are right.

But interesting is that it compiles fine without any warning (otherwise I would 
spot it).


_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to