https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a3bab12b509fde6968e4c…
commit a3bab12b509fde6968e4c16fc264435c4d29787f
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Tue May 21 19:27:38 2024 +0300
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Sun Oct 20 14:12:25 2024 +0300
[OLDNAMES] Add _CRT_NONSTDC_NO_DEPRECATE interface definitions
---
sdk/include/crt/_mingw.h | 3 ---
sdk/lib/crt/oldnames.cmake | 5 +++++
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/sdk/include/crt/_mingw.h b/sdk/include/crt/_mingw.h
index 6cdec9a88e7..06e0c62176b 100644
--- a/sdk/include/crt/_mingw.h
+++ b/sdk/include/crt/_mingw.h
@@ -216,9 +216,6 @@ allow GCC to optimize away some EH unwind code, at least in DW2 case.
*/
/* Disable deprecation for now! */
#define _CRT_SECURE_NO_DEPRECATE
#define _CRT_SECURE_NO_DEPRECATE_CORE
-#ifdef __WINESRC__
-#define _CRT_NONSTDC_NO_DEPRECATE
-#endif
#define __crt_typefix(ctype)
diff --git a/sdk/lib/crt/oldnames.cmake b/sdk/lib/crt/oldnames.cmake
index c1b2a98999a..0af57b8cfef 100644
--- a/sdk/lib/crt/oldnames.cmake
+++ b/sdk/lib/crt/oldnames.cmake
@@ -21,3 +21,8 @@ else()
add_library(oldnames ${oldnames_asm})
set_target_properties(oldnames PROPERTIES LINKER_LANGUAGE "C")
endif()
+
+target_compile_definitions(oldnames INTERFACE
+ _CRT_DECLARE_NONSTDC_NAMES=1 # This must be set to 1
+ _CRT_NONSTDC_NO_DEPRECATE
+)