In mingw-w64-headers/configure.ac is missing case for the crtdll. Usage of
crtdll as CRT library is treated with zero value in __MSVCRT_VERSION__ and
setting additional __CRTDLL__ macro. Setting of __CRTDLL__ is needed also
to mimic compatibility with gcc, which can be configure to target
crtdll.dll by default in which case it predefines __CRTDLL__ macro.
---
 mingw-w64-headers/configure.ac    | 3 +++
 mingw-w64-headers/crt/_mingw.h.in | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/mingw-w64-headers/configure.ac b/mingw-w64-headers/configure.ac
index 11b4f76dae62..34d570fb4168 100644
--- a/mingw-w64-headers/configure.ac
+++ b/mingw-w64-headers/configure.ac
@@ -148,6 +148,9 @@ AC_ARG_WITH([default-msvcrt],
   [],
   [with_default_msvcrt=ucrt])
 case $with_default_msvcrt in
+crtdll*)
+  default_msvcrt_version=0x00
+  ;;
 msvcrt10*)
   default_msvcrt_version=0x100
   ;;
diff --git a/mingw-w64-headers/crt/_mingw.h.in 
b/mingw-w64-headers/crt/_mingw.h.in
index bc6a3afd3d46..b62dc5218166 100644
--- a/mingw-w64-headers/crt/_mingw.h.in
+++ b/mingw-w64-headers/crt/_mingw.h.in
@@ -237,6 +237,10 @@ limitations in handling dllimport attribute.  */
 # endif
 #endif
 
+#if !defined(__CRTDLL__) && __MSVCRT_VERSION__ == 0x00
+#define __CRTDLL__
+#endif
+
 #if !defined(_UCRT) && ((__MSVCRT_VERSION__ >= 0x1400) || (__MSVCRT_VERSION__ 
>= 0xE00 && __MSVCRT_VERSION__ < 0x1000))
 /* Allow both 0x1400 and 0xE00 to identify UCRT */
 #define _UCRT
-- 
2.20.1



_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to