From 681af536dd0e5fd732d156d03927e41982431243 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 4 Apr 2023 01:04:52 -0700 Subject: [PATCH 1/3] Add enforcement for CMake. --- stl/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stl/CMakeLists.txt b/stl/CMakeLists.txt index 3cd7e18dc6a..45e284554d8 100644 --- a/stl/CMakeLists.txt +++ b/stl/CMakeLists.txt @@ -584,7 +584,7 @@ function(add_stl_dlls D_SUFFIX REL_OR_DBG) # import library 'statics' add_library(msvcp${D_SUFFIX}_implib_objects OBJECT ${IMPLIB_SOURCES}) - target_compile_definitions(msvcp${D_SUFFIX}_implib_objects PRIVATE _DLL) + target_compile_definitions(msvcp${D_SUFFIX}_implib_objects PRIVATE _DLL _ENFORCE_ONLY_CORE_HEADERS) target_compile_options(msvcp${D_SUFFIX}_implib_objects PRIVATE /EHsc) # No /GL! target_stl_compile_options(msvcp${D_SUFFIX}_implib_objects ${REL_OR_DBG}) From 055776ed39ce7c16f62ccc13c803f109ae10dd26 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 4 Apr 2023 01:05:14 -0700 Subject: [PATCH 2/3] Include `` for `nothrow_t`. --- stl/src/nothrow.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/stl/src/nothrow.cpp b/stl/src/nothrow.cpp index d12dcdcf336..9124a1585a7 100644 --- a/stl/src/nothrow.cpp +++ b/stl/src/nothrow.cpp @@ -11,8 +11,10 @@ #undef MRTDLL #endif -#include -_STD_BEGIN +#include + +#include -const nothrow_t nothrow = nothrow_t(); // define nothrow +_STD_BEGIN +const nothrow_t nothrow = nothrow_t(); _STD_END From b6a82e4d103f6ec1b11d8af22051ea923a895edd Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 4 Apr 2023 01:05:43 -0700 Subject: [PATCH 3/3] Skip enforcement for `` needed by locale0_implib.cpp via locale0.cpp. --- stl/src/locale0.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stl/src/locale0.cpp b/stl/src/locale0.cpp index cc3e7be9bf9..f36381a853e 100644 --- a/stl/src/locale0.cpp +++ b/stl/src/locale0.cpp @@ -3,6 +3,8 @@ // class locale basic member functions +#undef _ENFORCE_ONLY_CORE_HEADERS // TRANSITION, should be a core header + #include #include #include