So we can restrict some C runtime APIs based on the target family.

Based on this documentation some APIs are not allowed in UWP builds
https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps?view=vs-2019

The documentation is old and may not apply to Win10 but it's still the one
listed for UCRT compatibility :
https://docs.microsoft.com/en-us/cpp/c-runtime-library/compatibility?view=vs-2019
---
 mingw-w64-headers/crt/corecrt.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mingw-w64-headers/crt/corecrt.h b/mingw-w64-headers/crt/corecrt.h
index 8f9f6b42..5d422db6 100644
--- a/mingw-w64-headers/crt/corecrt.h
+++ b/mingw-w64-headers/crt/corecrt.h
@@ -491,6 +491,8 @@ typedef struct threadlocaleinfostruct {
 #define __crt_typefix(ctype)
 #endif
 
+#include <winapifamily.h>
+
 #ifndef __WIDL__
 #pragma pack(pop)
 #endif
-- 
2.17.1



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

Reply via email to