On Sat, 22 Jan 2022, LIU Hao wrote:
在 2022-01-21 22:53, Martin Storsjö 写道:
The _set_errno function is defined in arm versions of msvcrt.dll,
and in all the newer numbered versions of msvcr*.dll, and UCRT.
This avoids issues with the recently added _vscprintf in libmsvcrt.a
which depends on _set_errno, which was present in libmingwex.a.
When linking with ld.bfd, a later library can't pull in symbols from
earlier libraries (unless specifying --start-group --end-group around
the list of those libraries).
Signed-off-by: Martin Storsjö <[email protected]>
---
mingw-w64-crt/Makefile.am | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
This patch looks good itself.
Ok, pushed it now.
BTW I am not sure why this function is ever necessary; the error number could
have been assigned to `errno` directly. More over, our `_get_errno()` is
incorrect because it returns the current error number, while according to
MSDN [1] it should return zero upon success and `EINVAL` otherwise. I think
it worth another patch.
Yes, that's probably true - do you feel like you can pick up fixing that?
// Martin
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public