[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Compiling in mingw-ucrt runtime
From: |
Eli Zaretskii |
Subject: |
Re: Compiling in mingw-ucrt runtime |
Date: |
Sun, 25 Feb 2024 16:29:10 +0200 |
> From: Bruno Haible <bruno@clisp.org>
> Cc: emacs-devel@gnu.org
> Date: Sun, 25 Feb 2024 15:11:22 +0100
>
> Eli Zaretskii wrote:
> > > > OK, but I asked also about the value of errno _after_ fclose is called
> > > > and fails. It's important for understanding why it fails.
>
> On native Windows, the value of errno, after fclose() fails, is undefined.
> See here in the Gnulib documentation:
> https://www.gnu.org/software/gnulib/manual/html_node/fclose.html
>
> and here in the Microsoft documentation:
> https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/fclose-fcloseall
> (it sets errno only if the argument was a NULL pointer).
Strange that they claim that, because their sources tell a different
story, both for MSVCRT and for UCRT. Or maybe your interpretation of
what they say there is inaccurate?
> > Why does fclose fail, leaving errno at -1?
>
> I cannot tell why fclose() failed in the first place.
Right, that was part of my question ;-)
- Re: Compiling in mingw-ucrt runtime, (continued)
- Re: Compiling in mingw-ucrt runtime, Arthur Miller, 2024/02/24
- Re: Compiling in mingw-ucrt runtime, Eli Zaretskii, 2024/02/24
- Re: Compiling in mingw-ucrt runtime, Arthur Miller, 2024/02/25
- Re: Compiling in mingw-ucrt runtime, Po Lu, 2024/02/25
- Re: Compiling in mingw-ucrt runtime, Eli Zaretskii, 2024/02/25
- Re: Compiling in mingw-ucrt runtime, Arthur Miller, 2024/02/25
- Re: Compiling in mingw-ucrt runtime, Eli Zaretskii, 2024/02/25
- Re: Compiling in mingw-ucrt runtime, Arthur Miller, 2024/02/25
- Re: Compiling in mingw-ucrt runtime, Eli Zaretskii, 2024/02/25
- Re: Compiling in mingw-ucrt runtime, Bruno Haible, 2024/02/25
- Re: Compiling in mingw-ucrt runtime,
Eli Zaretskii <=
- Re: Compiling in mingw-ucrt runtime, Bruno Haible, 2024/02/25
- Re: Compiling in mingw-ucrt runtime, Eli Zaretskii, 2024/02/25
- Re: Compiling in mingw-ucrt runtime, Bruno Haible, 2024/02/25
- Re: Compiling in mingw-ucrt runtime, Eli Zaretskii, 2024/02/25
Re: Compiling in mingw-ucrt runtime, Benjamin Riefenstahl, 2024/02/23