On Sun, 31 Aug 2025, Pali Rohár wrote:

UCRT has _setjmp and _setjmpex function symbols in DLL libs prefixed by the
__intrinsic keyword. Add symbol aliases without this prefix which allows to
call _setjmp and _setjmpex without the prefix also for UCRT builds and so
allows to unify header files for msvcrt vs UCRT builds.

Aliases in crt-aliases.def.in are used for libucrtbase.a and libucrtbased.a
import libraries. Aliases in api-ms-win-crt-private-l1-1-0.def.in are used
for libucrt.a import library. And aliases in setjmp.S are used for
libucrtapp.a import library.
---
mingw-w64-crt/def-include/crt-aliases.def.in           |  5 +++++
.../lib-common/api-ms-win-crt-private-l1-1-0.def.in    |  2 ++
mingw-w64-crt/misc/setjmp.S                            | 10 ++++++++++
3 files changed, 17 insertions(+)

In general, I prefer to align the general use with what UCRT does, and add this kind of aliases in the msvcr* libraries instead. But in this case, as the whole field of setjmp functions is a huge mess, I agree that it might be easiest to align the headers towards a more common base, and redirect _setjmp to __intrinsic_setjmp in the import library instead.

So patch ok, but noting that this isn't our usual approach.

// Martin

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

Reply via email to