[Mingw-w64-public] [PATCH] headers: Add macros for all inline functions in intsafe.h

2024-07-05 Thread Biswapriyo Nath
From 104c2390dd794eb3f273fa2a3ad790c7cc7edcbf Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Fri, 5 Jul 2024 18:02:05 + Subject: [PATCH] headers: Add macros for all inline functions in intsafe.h Required for https://github.com/microsoft/DirectXShaderCompiler Signed-off-by: Biswapriyo

Re: [Mingw-w64-public] [PATCH] headers: Add new symbols in bcrypt.h

2024-07-05 Thread LIU Hao
在 2024-07-05 01:44, Biswapriyo Nath 写道: From 29a0cfa47bae221906199b6e77a63f232541f199 Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Thu, 4 Jul 2024 17:36:19 + Subject: [PATCH] headers: Add new symbols in bcrypt.h Required forhttps://github.com/googleapis/google-cloud-cpp Signed-off-

[Mingw-w64-public] [PATCH] crt: msvcrt.def.in: Do not overwrite math frexp symbol on ARM

2024-07-05 Thread Pali Rohár
Same as for other math symbols, do not overwrite them in msvcrt.def.in on ARM. --- mingw-w64-crt/lib-common/msvcrt.def.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mingw-w64-crt/lib-common/msvcrt.def.in b/mingw-w64-crt/lib-common/msvcrt.def.in index 27c792d60a85..64e9780

[Mingw-w64-public] [PATCH 2/3] crt: msvcr120_app: Fix list of ARM32 symbols

2024-07-05 Thread Pali Rohár
msvcr120_app.def.in file contains incorrect list of ARM32 symbols. Seems that the list of symbols was generated from the ARM32 msvcrt.dll library and not from the ARM32 msvcr120_app.dll library. List of ARM32 symbols is imported from the vclibs_redist_packages.zip package (Visual C++ 2013 Runtime

[Mingw-w64-public] [PATCH 3/3] crt: msvcr120_app: Do not include aliases for symbols which are not present

2024-07-05 Thread Pali Rohár
msvcr120_app.dll compared to msvcr120.dll is missing not only _getpid symbol but it is missing also other symbols for which are specified underscore aliases in crt-aliases.def.in file. Change NO_GETPID_ALIAS macro to CRTAPP and conditionally disable all symbols for CRTAPP in crt-aliases.def.in fil

[Mingw-w64-public] [PATCH 1/3] crt: msvcr120_app: Provide emulation of __p__environ and __p__wenviron symbols

2024-07-05 Thread Pali Rohár
msvcr120_app.dll library does not provide __p__environ() and __p__wenviron() functions, but provides _environ[] and _wenviron[] arrays. So include mingw-w64 emulation of __p__environ() and __p__wenviron() functions via _environ[] and _wenviron[] arrays into msvcr120_app import library. --- mingw-

[Mingw-w64-public] [PATCH 2/3] crt: Split __initenv and __winitenv symbols into separate files

2024-07-05 Thread Pali Rohár
Every executable references only one of those symbols. So if symbols are split into separate files, linker includes only the one which is used. crtdll.dll and msvcrt10.dll do not have entry point for wide wmain() and therefore they do not need __winitenv init symbol. So do not provide __winitenv s

[Mingw-w64-public] [PATCH 1/3] crt: Remove duplicate file mingw-w64-crt/misc/initenv.c

2024-07-05 Thread Pali Rohár
File mingw-w64-crt/misc/initenv.c provides same implementation of __initenv and __winitenv symbols as file mingw-w64-crt/misc/__initenv.c. So remove duplicate file. --- mingw-w64-crt/Makefile.am| 4 ++-- mingw-w64-crt/misc/initenv.c | 12 2 files changed, 2 insertions(+), 14 del

[Mingw-w64-public] [PATCH 3/3] crt: Access __initenv and __winitenv global variables via __p___initenv() and __p___winitenv() functions

2024-07-05 Thread Pali Rohár
MS Visual C++ also access these variables via __p_*() functions which return pointer to those variables. Do same in mingw-w64 startup code. msvcr120_app.dll and non-i386 versions of msvcrt.dll do not export __p_*() functions. So provide them via mingw-w64 import libraries. --- mingw-w64-crt/Makef

[Mingw-w64-public] [PATCH 2/2] crt: Provide __badioinfo variable import symbol for all CRT libraries

2024-07-05 Thread Pali Rohár
Global variable __badioinfo is exported from VC42+ CRT import libraries. It is not exported from UCRT. So it is not available in UCRT, msvcrt40.dll and older CRT versions. Symbol is just a global ioinfo structure with bad (-1) file descriptor. Provide this structure also in import libraries for

[Mingw-w64-public] [PATCH 1/2] crt: Fix declaration of __badioinfo import symbol

2024-07-05 Thread Pali Rohár
Symbol __badioinfo represents a variable of structure type. Not a pointer to structure and neither not a pointer to array of structures. --- mingw-w64-crt/include/internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mingw-w64-crt/include/internal.h b/mingw-w64-crt/include

[Mingw-w64-public] [PATCH 2/3] crt: crt-aliases.def.in: Provide _wtoll and _wtoll_l symbols aliases

2024-07-05 Thread Pali Rohár
Use same conditions for providing _wtoll and _wtoll_l symbols aliases as are already used for atoll and _atoll_l symbol aliases. --- mingw-w64-crt/def-include/crt-aliases.def.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mingw-w64-crt/def-include/crt-aliases.def.in b/mingw-w64-crt/def-

[Mingw-w64-public] [PATCH 1/3] crt: Define C99 wcsto[u]ll/wcsto[iu]max functions for all CRT import libraries

2024-07-05 Thread Pali Rohár
Functions _wcstoi64() and _wcstoui64() are available since msvcr70.dll and are equivalent to C99 wcstoll() and wcstoull() functions. As mingw-w64 defines intmax_t and uintmax_t types 64-bit, same as (unsigned) long long, these functions are equivalent also to C99 wcstoimax() and wcstoumax() functio

[Mingw-w64-public] [PATCH 3/3] headers: tchar.h: Use ll/max functions for _t*ll/_t*max macros

2024-07-05 Thread Pali Rohár
Expand _t*ll* and _t*[ui]max* macros to *ll* and *[ui]max** functions (instead of *i64* functions). This is just for consistency and should not change any behavior. mingw-w64 for all CRT import libraries (which provide *i64* functions) already provides also *ll* and *[ui]max* functions. --- mingw