https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1de09c477c8aa31a1cc01…
commit 1de09c477c8aa31a1cc019ebefccb9e7cdb6aba6
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Tue May 21 19:33:42 2024 +0300
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Sun Oct 20 14:12:25 2024 +0300
[3RDPARTY] Link to oldnames for stricmp/wcsicmp
---
base/applications/cmdutils/cscript/CMakeLists.txt | 2 +-
base/applications/cmdutils/reg/CMakeLists.txt | 2 +-
base/applications/cmdutils/wscript/CMakeLists.txt | 2 +-
base/applications/network/telnet/CMakeLists.txt | 7 +------
base/applications/winhlp32/CMakeLists.txt | 6 +++---
base/services/nfsd/CMakeLists.txt | 2 ++
base/services/tftpd/CMakeLists.txt | 2 ++
base/system/format/CMakeLists.txt | 2 +-
dll/directx/wine/d3dcompiler_43/CMakeLists.txt | 1 +
dll/directx/wine/d3dx9_36/d3dx9.cmake | 2 +-
dll/win32/comctl32/CMakeLists.txt | 2 +-
dll/win32/comdlg32/CMakeLists.txt | 2 +-
dll/win32/credui/CMakeLists.txt | 2 +-
dll/win32/crypt32/CMakeLists.txt | 4 +++-
dll/win32/cryptui/CMakeLists.txt | 2 +-
dll/win32/fusion/CMakeLists.txt | 1 +
dll/win32/fusion/fusion_1_1/CMakeLists.txt | 2 +-
dll/win32/fusion/fusion_2_0/CMakeLists.txt | 2 +-
dll/win32/hlink/CMakeLists.txt | 2 +-
dll/win32/inseng/CMakeLists.txt | 6 +++++-
dll/win32/itss/CMakeLists.txt | 2 +-
dll/win32/jscript/CMakeLists.txt | 2 +-
dll/win32/mlang/CMakeLists.txt | 2 +-
dll/win32/msacm32/CMakeLists.txt | 2 +-
dll/win32/mshtml/CMakeLists.txt | 5 ++++-
dll/win32/ole32/CMakeLists.txt | 2 +-
dll/win32/oleacc/CMakeLists.txt | 2 +-
dll/win32/oleaut32/CMakeLists.txt | 2 +-
dll/win32/rpcrt4/CMakeLists.txt | 2 +-
dll/win32/scrrun/CMakeLists.txt | 2 +-
dll/win32/setupapi/CMakeLists.txt | 4 ++--
dll/win32/urlmon/CMakeLists.txt | 2 +-
dll/win32/vbscript/CMakeLists.txt | 2 +-
dll/win32/version/CMakeLists.txt | 2 +-
dll/win32/wbemdisp/CMakeLists.txt | 2 +-
dll/win32/wbemprox/CMakeLists.txt | 2 +-
dll/win32/winmm/CMakeLists.txt | 2 +-
dll/win32/wshom.ocx/CMakeLists.txt | 2 +-
dll/win32/xmllite/CMakeLists.txt | 2 +-
modules/rostests/winetests/inetcomm/CMakeLists.txt | 5 ++++-
modules/rostests/winetests/kernel32/CMakeLists.txt | 4 ++++
modules/rostests/winetests/msi/CMakeLists.txt | 2 +-
modules/rostests/winetests/oleaut32/CMakeLists.txt | 4 +++-
modules/rostests/winetests/setupapi/CMakeLists.txt | 5 +++++
modules/rostests/winetests/shell32/CMakeLists.txt | 5 ++++-
modules/rostests/winetests/userenv/CMakeLists.txt | 1 +
sdk/lib/3rdparty/libmpg123/CMakeLists.txt | 7 +++----
sdk/lib/crt/locale/locale.c | 2 ++
48 files changed, 80 insertions(+), 51 deletions(-)
diff --git a/base/applications/cmdutils/cscript/CMakeLists.txt
b/base/applications/cmdutils/cscript/CMakeLists.txt
index 4d639fc7b63..2d86060efe3 100644
--- a/base/applications/cmdutils/cscript/CMakeLists.txt
+++ b/base/applications/cmdutils/cscript/CMakeLists.txt
@@ -13,7 +13,7 @@ add_executable(cscript ${SOURCE} rsrc.rc)
add_idl_headers(cscript_idlheader ihost.idl)
add_typelib(ihost.idl)
set_source_files_properties(rsrc.rc PROPERTIES OBJECT_DEPENDS
${CMAKE_CURRENT_BINARY_DIR}/ihost.tlb)
-target_link_libraries(cscript uuid wine)
+target_link_libraries(cscript uuid wine oldnames)
set_module_type(cscript win32cui UNICODE)
add_delay_importlibs(cscript shlwapi)
add_importlibs(cscript shell32 oleaut32 ole32 advapi32 user32 msvcrt kernel32 ntdll)
diff --git a/base/applications/cmdutils/reg/CMakeLists.txt
b/base/applications/cmdutils/reg/CMakeLists.txt
index 1d2b98df682..707e6080d92 100644
--- a/base/applications/cmdutils/reg/CMakeLists.txt
+++ b/base/applications/cmdutils/reg/CMakeLists.txt
@@ -5,6 +5,6 @@ add_definitions(-D_WIN32_WINNT=0x600)
add_definitions(-D__WINESRC__)
add_executable(reg add.c copy.c delete.c export.c import.c query.c reg.c reg.rc)
set_module_type(reg win32cui UNICODE)
-target_link_libraries(reg wine)
+target_link_libraries(reg wine oldnames)
add_importlibs(reg advapi32 advapi32_vista user32 msvcrt kernel32 ntdll)
add_cd_file(TARGET reg DESTINATION reactos/system32 FOR all)
diff --git a/base/applications/cmdutils/wscript/CMakeLists.txt
b/base/applications/cmdutils/wscript/CMakeLists.txt
index d177b8b9948..4ae6b1b4019 100644
--- a/base/applications/cmdutils/wscript/CMakeLists.txt
+++ b/base/applications/cmdutils/wscript/CMakeLists.txt
@@ -11,7 +11,7 @@ add_executable(wscript ${SOURCE} rsrc.rc)
add_idl_headers(wscript_idlheader ihost.idl)
add_typelib(ihost.idl)
set_source_files_properties(rsrc.rc PROPERTIES OBJECT_DEPENDS
${CMAKE_CURRENT_BINARY_DIR}/ihost.tlb)
-target_link_libraries(wscript uuid wine)
+target_link_libraries(wscript uuid wine oldnames)
set_module_type(wscript win32gui UNICODE)
add_delay_importlibs(wscript shlwapi)
add_importlibs(wscript shell32 oleaut32 ole32 user32 advapi32 msvcrt kernel32 ntdll)
diff --git a/base/applications/network/telnet/CMakeLists.txt
b/base/applications/network/telnet/CMakeLists.txt
index a11ea4f3628..237d450d6ed 100644
--- a/base/applications/network/telnet/CMakeLists.txt
+++ b/base/applications/network/telnet/CMakeLists.txt
@@ -27,12 +27,7 @@ set_target_cpp_properties(telnet WITH_EXCEPTIONS)
if (MSVC)
# C4838: conversion from 'int' to 'SHORT' requires a narrowing
conversion
- # C4996: 'strnicmp': Deprecated POSIX name, Try _strnicmp instead!
- target_compile_options(telnet PRIVATE /wd4838 /wd4996)
-endif()
-
-if (NOT MSVC)
- target_compile_definitions(telnet PRIVATE _CRT_NONSTDC_NO_DEPRECATE)
+ target_compile_options(telnet PRIVATE /wd4838)
endif()
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL
"Clang")
diff --git a/base/applications/winhlp32/CMakeLists.txt
b/base/applications/winhlp32/CMakeLists.txt
index bc6958d6981..1e2b6148442 100644
--- a/base/applications/winhlp32/CMakeLists.txt
+++ b/base/applications/winhlp32/CMakeLists.txt
@@ -4,8 +4,8 @@ include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
add_definitions(
-D__WINESRC__
-D__ROS_LONG64__
- -Dfileno=_fileno
- -Disatty=_isatty)
+ -Dstrcasecmp=_stricmp
+)
list(APPEND SOURCE
callback.c
@@ -27,7 +27,7 @@ add_executable(winhlp32
rsrc.rc)
set_module_type(winhlp32 win32gui)
-target_link_libraries(winhlp32 wine)
+target_link_libraries(winhlp32 wine oldnames)
add_importlibs(winhlp32 user32 gdi32 shell32 comctl32 comdlg32 msvcrt kernel32 ntdll)
add_pch(winhlp32 precomp.h "${PCH_SKIP_SOURCE}")
add_cd_file(TARGET winhlp32 DESTINATION reactos FOR all)
diff --git a/base/services/nfsd/CMakeLists.txt b/base/services/nfsd/CMakeLists.txt
index 9d079e00c46..77054777c8c 100644
--- a/base/services/nfsd/CMakeLists.txt
+++ b/base/services/nfsd/CMakeLists.txt
@@ -56,6 +56,8 @@ else()
target_compile_options(nfsd PRIVATE "-w")
endif()
+target_link_libraries(nfsd oldnames)
+
set_module_type(nfsd win32cui)
add_importlibs(nfsd advapi32 iphlpapi kernel32_vista libtirpc msvcrt shell32 ws2_32
wldap32 kernel32 ntdll)
add_pch(nfsd precomp.h SOURCE)
diff --git a/base/services/tftpd/CMakeLists.txt b/base/services/tftpd/CMakeLists.txt
index 3fa949c31a0..8e67ca68d9f 100644
--- a/base/services/tftpd/CMakeLists.txt
+++ b/base/services/tftpd/CMakeLists.txt
@@ -4,6 +4,8 @@ set_module_type(tftpd win32cui)
add_importlibs(tftpd advapi32 ws2_32 iphlpapi msvcrt kernel32)
add_cd_file(TARGET tftpd DESTINATION reactos/system32 FOR all)
+add_definitions(-Dstrcasecmp=_stricmp)
+
if (MSVC)
# Disable warning C4267: 'initializing': conversion from 'size_t' to
'unsigned short', possible loss of data
target_compile_options(tftpd PRIVATE /wd4267)
diff --git a/base/system/format/CMakeLists.txt b/base/system/format/CMakeLists.txt
index eb0c275b4a2..eeea98a6235 100644
--- a/base/system/format/CMakeLists.txt
+++ b/base/system/format/CMakeLists.txt
@@ -4,7 +4,7 @@ include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils)
add_executable(format format.c format.rc)
set_module_type(format win32cui UNICODE)
-target_link_libraries(format conutils ${PSEH_LIB})
+target_link_libraries(format conutils ${PSEH_LIB} oldnames)
add_importlibs(format fmifs msvcrt kernel32 ntdll)
set_target_properties(format PROPERTIES SUFFIX ".com")
add_cd_file(TARGET format DESTINATION reactos/system32 FOR all)
diff --git a/dll/directx/wine/d3dcompiler_43/CMakeLists.txt
b/dll/directx/wine/d3dcompiler_43/CMakeLists.txt
index baa23c10e72..210bc3340a9 100644
--- a/dll/directx/wine/d3dcompiler_43/CMakeLists.txt
+++ b/dll/directx/wine/d3dcompiler_43/CMakeLists.txt
@@ -2,6 +2,7 @@
add_definitions(
-D__WINESRC__
-D__ROS_LONG64__
+ -Dstrcasecmp=_stricmp
-DDIRECT3D_VERSION=0x0900)
include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
diff --git a/dll/directx/wine/d3dx9_36/d3dx9.cmake
b/dll/directx/wine/d3dx9_36/d3dx9.cmake
index 2354a5b4ed7..dee354437e9 100644
--- a/dll/directx/wine/d3dx9_36/d3dx9.cmake
+++ b/dll/directx/wine/d3dx9_36/d3dx9.cmake
@@ -39,7 +39,7 @@ function(add_d3dx9_target __version)
add_definitions(-D__ROS_LONG64__)
set_module_type(${module} win32dll)
add_dependencies(${module} d3d_idl_headers)
- target_link_libraries(${module} dxguid wine)
+ target_link_libraries(${module} dxguid wine oldnames)
add_importlibs(${module} d3dcompiler_43 d3dxof usp10 user32 ole32 gdi32 msvcrt
kernel32 ntdll)
add_delay_importlibs(${module} windowscodecs)
add_pch(${module} ../d3dx9_36/precomp.h "${PCH_SKIP_SOURCE}")
diff --git a/dll/win32/comctl32/CMakeLists.txt b/dll/win32/comctl32/CMakeLists.txt
index 511167db4a1..57baf681c0c 100644
--- a/dll/win32/comctl32/CMakeLists.txt
+++ b/dll/win32/comctl32/CMakeLists.txt
@@ -72,7 +72,7 @@ if(MSVC)
endif()
set_module_type(comctl32 win32dll UNICODE)
-target_link_libraries(comctl32 uuid wine ${PSEH_LIB})
+target_link_libraries(comctl32 uuid wine ${PSEH_LIB} oldnames)
add_delay_importlibs(comctl32 winmm uxtheme)
add_importlibs(comctl32 user32 gdi32 advapi32 usp10 imm32 msvcrt kernel32 ntdll)
add_pch(comctl32 precomp.h "${PCH_SKIP_SOURCE}")
diff --git a/dll/win32/comdlg32/CMakeLists.txt b/dll/win32/comdlg32/CMakeLists.txt
index a0f2d69ca75..2516c4e2d22 100644
--- a/dll/win32/comdlg32/CMakeLists.txt
+++ b/dll/win32/comdlg32/CMakeLists.txt
@@ -26,7 +26,7 @@ add_library(comdlg32 MODULE
${CMAKE_CURRENT_BINARY_DIR}/comdlg32.def)
set_module_type(comdlg32 win32dll)
-target_link_libraries(comdlg32 uuid wine)
+target_link_libraries(comdlg32 uuid wine oldnames)
add_delay_importlibs(comdlg32 ole32)
add_importlibs(comdlg32 shell32 shlwapi comctl32 winspool user32 gdi32 advapi32 msvcrt
kernel32 ntdll)
add_pch(comdlg32 precomp.h SOURCE)
diff --git a/dll/win32/credui/CMakeLists.txt b/dll/win32/credui/CMakeLists.txt
index ab1fa0c3f3a..6c2ec1d583f 100644
--- a/dll/win32/credui/CMakeLists.txt
+++ b/dll/win32/credui/CMakeLists.txt
@@ -10,6 +10,6 @@ list(APPEND SOURCE
add_library(credui MODULE ${SOURCE} credui.rc)
set_module_type(credui win32dll)
-target_link_libraries(credui wine)
+target_link_libraries(credui wine oldnames)
add_importlibs(credui advapi32 user32 comctl32 msvcrt kernel32 ntdll)
add_cd_file(TARGET credui DESTINATION reactos/system32 FOR all)
diff --git a/dll/win32/crypt32/CMakeLists.txt b/dll/win32/crypt32/CMakeLists.txt
index 2ee0078b2c1..6796617d624 100644
--- a/dll/win32/crypt32/CMakeLists.txt
+++ b/dll/win32/crypt32/CMakeLists.txt
@@ -6,7 +6,9 @@ add_definitions(
-D__WINESRC__
-D__ROS_LONG64__
-D_WINE
- -D_CRYPT32_)
+ -D_CRYPT32_
+ -Dstrncasecmp=_strnicmp
+)
include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
spec2def(crypt32.dll crypt32.spec ADD_IMPORTLIB)
diff --git a/dll/win32/cryptui/CMakeLists.txt b/dll/win32/cryptui/CMakeLists.txt
index d6398711d44..92ab7aaed0d 100644
--- a/dll/win32/cryptui/CMakeLists.txt
+++ b/dll/win32/cryptui/CMakeLists.txt
@@ -13,7 +13,7 @@ list(APPEND SOURCE
add_library(cryptui MODULE ${SOURCE} cryptui.rc)
set_module_type(cryptui win32dll)
-target_link_libraries(cryptui uuid wine)
+target_link_libraries(cryptui uuid wine oldnames)
add_delay_importlibs(cryptui urlmon wintrust)
add_importlibs(cryptui user32 ole32 crypt32 gdi32 advapi32 comctl32 comdlg32 msvcrt
kernel32 ntdll)
add_cd_file(TARGET cryptui DESTINATION reactos/system32 FOR all)
diff --git a/dll/win32/fusion/CMakeLists.txt b/dll/win32/fusion/CMakeLists.txt
index b180daf21f9..93f40cea51c 100644
--- a/dll/win32/fusion/CMakeLists.txt
+++ b/dll/win32/fusion/CMakeLists.txt
@@ -13,6 +13,7 @@ list(APPEND COMMON_SOURCE
${CMAKE_CURRENT_BINARY_DIR}/fusion_stubs.c)
add_library(fusion_common STATIC ${COMMON_SOURCE})
+target_link_libraries(fusion_common oldnames)
add_dependencies(fusion_common psdk)
add_pch(fusion_common precomp.h COMMON_SOURCE)
diff --git a/dll/win32/fusion/fusion_1_1/CMakeLists.txt
b/dll/win32/fusion/fusion_1_1/CMakeLists.txt
index 1c0c7f1379f..fc494855b67 100644
--- a/dll/win32/fusion/fusion_1_1/CMakeLists.txt
+++ b/dll/win32/fusion/fusion_1_1/CMakeLists.txt
@@ -9,7 +9,7 @@ add_library(fusion_1_1 MODULE
${CMAKE_CURRENT_BINARY_DIR}/fusion.def)
set_module_type(fusion_1_1 win32dll)
-target_link_libraries(fusion_1_1 fusion_common uuid wine)
+target_link_libraries(fusion_1_1 fusion_common uuid wine oldnames)
set_target_properties(fusion_1_1 PROPERTIES OUTPUT_NAME "fusion"
PDB_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
add_importlibs(fusion_1_1 bcrypt advapi32 dbghelp shlwapi user32 msvcrt kernel32 ntdll)
add_cd_file(TARGET fusion_1_1 DESTINATION
reactos/Microsoft.NET/Framework/v1.1.4322 FOR
all)
diff --git a/dll/win32/fusion/fusion_2_0/CMakeLists.txt
b/dll/win32/fusion/fusion_2_0/CMakeLists.txt
index d2b562033f1..5fa7d92833f 100644
--- a/dll/win32/fusion/fusion_2_0/CMakeLists.txt
+++ b/dll/win32/fusion/fusion_2_0/CMakeLists.txt
@@ -9,7 +9,7 @@ add_library(fusion_2_0 MODULE
${CMAKE_CURRENT_BINARY_DIR}/fusion.def)
set_module_type(fusion_2_0 win32dll)
-target_link_libraries(fusion_2_0 fusion_common uuid wine)
+target_link_libraries(fusion_2_0 fusion_common uuid wine oldnames)
set_target_properties(fusion_2_0 PROPERTIES OUTPUT_NAME "fusion"
PDB_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
add_importlibs(fusion_2_0 bcrypt advapi32 dbghelp shlwapi user32 msvcrt kernel32 ntdll)
add_cd_file(TARGET fusion_2_0 DESTINATION
reactos/Microsoft.NET/Framework/v2.0.50727 FOR
all)
diff --git a/dll/win32/hlink/CMakeLists.txt b/dll/win32/hlink/CMakeLists.txt
index 86e5e1a11bb..d1463d0fdf3 100644
--- a/dll/win32/hlink/CMakeLists.txt
+++ b/dll/win32/hlink/CMakeLists.txt
@@ -19,7 +19,7 @@ add_library(hlink MODULE
${CMAKE_CURRENT_BINARY_DIR}/hlink.def)
set_module_type(hlink win32dll)
-target_link_libraries(hlink uuid wine)
+target_link_libraries(hlink uuid wine oldnames)
add_delay_importlibs(hlink urlmon)
add_importlibs(hlink shell32 ole32 advapi32 msvcrt kernel32 ntdll)
add_pch(hlink precomp.h "${PCH_SKIP_SOURCE}")
diff --git a/dll/win32/inseng/CMakeLists.txt b/dll/win32/inseng/CMakeLists.txt
index af11eeaffd1..b8dee48b7cf 100644
--- a/dll/win32/inseng/CMakeLists.txt
+++ b/dll/win32/inseng/CMakeLists.txt
@@ -2,7 +2,11 @@
remove_definitions(-D_WIN32_WINNT=0x502)
add_definitions(-D_WIN32_WINNT=0x600)
-add_definitions(-D__WINESRC__)
+add_definitions(
+ -D__WINESRC__
+ -Dstrcasecmp=_stricmp
+ -Dstrncasecmp=_strnicmp
+)
include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
spec2def(inseng.dll inseng.spec)
diff --git a/dll/win32/itss/CMakeLists.txt b/dll/win32/itss/CMakeLists.txt
index eb2f50c1631..7568e08f6f8 100644
--- a/dll/win32/itss/CMakeLists.txt
+++ b/dll/win32/itss/CMakeLists.txt
@@ -22,7 +22,7 @@ add_library(itss MODULE
${CMAKE_CURRENT_BINARY_DIR}/itss.def)
set_module_type(itss win32dll)
-target_link_libraries(itss uuid wine)
+target_link_libraries(itss uuid wine oldnames)
add_importlibs(itss urlmon shlwapi ole32 msvcrt kernel32 ntdll)
add_pch(itss precomp.h "${PCH_SKIP_SOURCE}")
add_dependencies(itss wineheaders)
diff --git a/dll/win32/jscript/CMakeLists.txt b/dll/win32/jscript/CMakeLists.txt
index 1690bd6e2f6..4f4f9c6b09b 100644
--- a/dll/win32/jscript/CMakeLists.txt
+++ b/dll/win32/jscript/CMakeLists.txt
@@ -65,7 +65,7 @@ add_idl_headers(jscript_idlheader jscript_classes.idl)
add_typelib(jsglobal.idl)
add_dependencies(jscript jscript_idlheader stdole2)
set_module_type(jscript win32dll)
-target_link_libraries(jscript uuid wine)
+target_link_libraries(jscript uuid wine oldnames)
add_importlibs(jscript user32 ole32 oleaut32 advapi32 msvcrt kernel32 ntdll)
add_pch(jscript precomp.h "${PCH_SKIP_SOURCE}")
add_cd_file(TARGET jscript DESTINATION reactos/system32 FOR all)
diff --git a/dll/win32/mlang/CMakeLists.txt b/dll/win32/mlang/CMakeLists.txt
index 0afca92b55c..806d7d7b3c9 100644
--- a/dll/win32/mlang/CMakeLists.txt
+++ b/dll/win32/mlang/CMakeLists.txt
@@ -13,7 +13,7 @@ list(APPEND SOURCE
add_library(mlang MODULE ${SOURCE} mlang.rc)
set_module_type(mlang win32dll UNICODE)
-target_link_libraries(mlang uuid wine)
+target_link_libraries(mlang uuid wine oldnames)
add_delay_importlibs(mlang oleaut32)
add_importlibs(mlang gdi32 advapi32 msvcrt kernel32 ntdll)
add_cd_file(TARGET mlang DESTINATION reactos/system32 FOR all)
diff --git a/dll/win32/msacm32/CMakeLists.txt b/dll/win32/msacm32/CMakeLists.txt
index 822bb649b53..ecc5abd5d64 100644
--- a/dll/win32/msacm32/CMakeLists.txt
+++ b/dll/win32/msacm32/CMakeLists.txt
@@ -20,7 +20,7 @@ add_library(msacm32 MODULE
${CMAKE_CURRENT_BINARY_DIR}/msacm32.def)
set_module_type(msacm32 win32dll ENTRYPOINT DllMain 12 UNICODE)
-target_link_libraries(msacm32 wine)
+target_link_libraries(msacm32 wine oldnames)
add_importlibs(msacm32 advapi32 user32 winmm msvcrt kernel32 ntdll)
add_pch(msacm32 precomp.h SOURCE)
add_cd_file(TARGET msacm32 DESTINATION reactos/system32 FOR all)
diff --git a/dll/win32/mshtml/CMakeLists.txt b/dll/win32/mshtml/CMakeLists.txt
index 0f66f5e59f6..d7c767f26f0 100644
--- a/dll/win32/mshtml/CMakeLists.txt
+++ b/dll/win32/mshtml/CMakeLists.txt
@@ -5,7 +5,10 @@ add_definitions(-D_WIN32_WINNT=0x600)
add_definitions(
-D__WINESRC__
-D__ROS_LONG64__
- -DCOM_NO_WINDOWS_H)
+ -DCOM_NO_WINDOWS_H
+ -Dstrcasecmp=_stricmp
+ -Dstrncasecmp=_strnicmp
+)
include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
add_idl_headers(mshtml_nsiface_header nsiface.idl)
diff --git a/dll/win32/ole32/CMakeLists.txt b/dll/win32/ole32/CMakeLists.txt
index 2ba952e681d..a4c2728cf51 100644
--- a/dll/win32/ole32/CMakeLists.txt
+++ b/dll/win32/ole32/CMakeLists.txt
@@ -88,7 +88,7 @@ if(MSVC)
endif()
set_module_type(ole32 win32dll)
-target_link_libraries(ole32 wine uuid ${PSEH_LIB})
+target_link_libraries(ole32 wine uuid ${PSEH_LIB} oldnames)
add_delay_importlibs(ole32 oleaut32)
add_importlibs(ole32 advapi32 user32 gdi32 rpcrt4 msvcrt kernel32 kernel32_vista ntdll)
add_dependencies(ole32 ole32idl)
diff --git a/dll/win32/oleacc/CMakeLists.txt b/dll/win32/oleacc/CMakeLists.txt
index 5d58a0be264..abd7d6b5d58 100644
--- a/dll/win32/oleacc/CMakeLists.txt
+++ b/dll/win32/oleacc/CMakeLists.txt
@@ -39,7 +39,7 @@ add_library(oleacc MODULE
add_dependencies(oleacc oleacc_idlheader stdole2)
set_module_type(oleacc win32dll)
-target_link_libraries(oleacc uuid wine ${PSEH_LIB})
+target_link_libraries(oleacc uuid wine ${PSEH_LIB} oldnames)
add_importlibs(oleacc oleaut32 ole32 user32 rpcrt4 msvcrt kernel32 ntdll)
add_pch(oleacc precomp.h "${PCH_SKIP_SOURCE}")
add_cd_file(TARGET oleacc DESTINATION reactos/system32 FOR all)
diff --git a/dll/win32/oleaut32/CMakeLists.txt b/dll/win32/oleaut32/CMakeLists.txt
index 700a878c631..076582b8699 100644
--- a/dll/win32/oleaut32/CMakeLists.txt
+++ b/dll/win32/oleaut32/CMakeLists.txt
@@ -58,7 +58,7 @@ endif()
add_idl_headers(oleaut32_idlheader oleaut32_oaidl.idl)
add_dependencies(oleaut32 oleaut32_idlheader)
set_module_type(oleaut32 win32dll)
-target_link_libraries(oleaut32 wine wineldr uuid ${PSEH_LIB})
+target_link_libraries(oleaut32 wine wineldr uuid ${PSEH_LIB} oldnames)
add_delay_importlibs(oleaut32 comctl32 urlmon windowscodecs)
add_importlibs(oleaut32 ole32 rpcrt4 user32 gdi32 advapi32 kernel32_vista msvcrt kernel32
ntdll)
add_pch(oleaut32 precomp.h "${PCH_SKIP_SOURCE}")
diff --git a/dll/win32/rpcrt4/CMakeLists.txt b/dll/win32/rpcrt4/CMakeLists.txt
index d2a7e0f2702..0b6491043ad 100644
--- a/dll/win32/rpcrt4/CMakeLists.txt
+++ b/dll/win32/rpcrt4/CMakeLists.txt
@@ -64,7 +64,7 @@ if(MSVC)
endif()
set_module_type(rpcrt4 win32dll)
-target_link_libraries(rpcrt4 wine uuid ${PSEH_LIB})
+target_link_libraries(rpcrt4 wine uuid ${PSEH_LIB} oldnames)
add_delay_importlibs(rpcrt4 iphlpapi wininet secur32 user32 oleaut32)
add_importlibs(rpcrt4 advapi32 advapi32_vista kernel32_vista ws2_32 msvcrt kernel32
ntdll)
add_dependencies(rpcrt4 ndr_types_header)
diff --git a/dll/win32/scrrun/CMakeLists.txt b/dll/win32/scrrun/CMakeLists.txt
index ae3dd1785ff..0be68f7d022 100644
--- a/dll/win32/scrrun/CMakeLists.txt
+++ b/dll/win32/scrrun/CMakeLists.txt
@@ -29,7 +29,7 @@ add_library(scrrun MODULE
add_dependencies(scrrun scrrun_idlheader stdole2)
set_module_type(scrrun win32dll)
-target_link_libraries(scrrun uuid wine)
+target_link_libraries(scrrun uuid wine oldnames)
add_importlibs(scrrun oleaut32 version advapi32 msvcrt kernel32 ntdll)
add_pch(scrrun precomp.h "${PCH_SKIP_SOURCE}")
add_cd_file(TARGET scrrun DESTINATION reactos/system32 FOR all)
diff --git a/dll/win32/setupapi/CMakeLists.txt b/dll/win32/setupapi/CMakeLists.txt
index e1b473f92c6..70063512fff 100644
--- a/dll/win32/setupapi/CMakeLists.txt
+++ b/dll/win32/setupapi/CMakeLists.txt
@@ -7,7 +7,7 @@ include_directories(
add_definitions(
-D_SETUPAPI_
-D_CFGMGR32_
- -Dwcsnicmp=_wcsnicmp)
+)
add_rpc_files(client ${REACTOS_SOURCE_DIR}/sdk/include/reactos/idl/pnp.idl)
spec2def(setupapi.dll setupapi.spec ADD_IMPORTLIB)
@@ -42,7 +42,7 @@ add_library(setupapi MODULE
${CMAKE_CURRENT_BINARY_DIR}/setupapi.def)
set_module_type(setupapi win32dll UNICODE)
-target_link_libraries(setupapi uuid wine ${PSEH_LIB})
+target_link_libraries(setupapi uuid wine ${PSEH_LIB} oldnames)
add_delay_importlibs(setupapi comdlg32 shell32 winspool.drv wintrust)
add_importlibs(setupapi gdi32 comctl32 advapi32 user32 rpcrt4 version msvcrt kernel32
ntdll)
add_pch(setupapi setupapi_private.h "${PCH_SKIP_SOURCE}")
diff --git a/dll/win32/urlmon/CMakeLists.txt b/dll/win32/urlmon/CMakeLists.txt
index a61bb6f3298..6b5bef1759f 100644
--- a/dll/win32/urlmon/CMakeLists.txt
+++ b/dll/win32/urlmon/CMakeLists.txt
@@ -50,7 +50,7 @@ add_library(urlmon MODULE
${CMAKE_CURRENT_BINARY_DIR}/urlmon.def)
set_module_type(urlmon win32dll)
-target_link_libraries(urlmon uuid wine ${PSEH_LIB})
+target_link_libraries(urlmon uuid wine ${PSEH_LIB} oldnames)
add_delay_importlibs(urlmon advpack)
add_importlibs(urlmon rpcrt4 propsys ole32 oleaut32 shlwapi shell32 wininet user32
advapi32 kernel32_vista msvcrt kernel32 ntdll)
add_pch(urlmon precomp.h "${PCH_SKIP_SOURCE}")
diff --git a/dll/win32/vbscript/CMakeLists.txt b/dll/win32/vbscript/CMakeLists.txt
index f2842c8d4e0..d6664cd5478 100644
--- a/dll/win32/vbscript/CMakeLists.txt
+++ b/dll/win32/vbscript/CMakeLists.txt
@@ -45,7 +45,7 @@ if(MSVC)
endif()
set_module_type(vbscript win32dll)
-target_link_libraries(vbscript uuid wine)
+target_link_libraries(vbscript uuid wine oldnames)
add_importlibs(vbscript oleaut32 ole32 user32 msvcrt kernel32 ntdll)
add_dependencies(vbscript vbscript_idlheader stdole2)
add_pch(vbscript precomp.h "${PCH_SKIP_SOURCE}")
diff --git a/dll/win32/version/CMakeLists.txt b/dll/win32/version/CMakeLists.txt
index 2e56518c160..4b2fb4d00da 100644
--- a/dll/win32/version/CMakeLists.txt
+++ b/dll/win32/version/CMakeLists.txt
@@ -9,6 +9,6 @@ list(APPEND SOURCE
add_library(version MODULE ${SOURCE} version.rc)
set_module_type(version win32dll)
-target_link_libraries(version wine)
+target_link_libraries(version wine oldnames)
add_importlibs(version msvcrt kernel32 ntdll)
add_cd_file(TARGET version DESTINATION reactos/system32 FOR all)
diff --git a/dll/win32/wbemdisp/CMakeLists.txt b/dll/win32/wbemdisp/CMakeLists.txt
index 9ce0d0f1f9e..0b6857472ab 100644
--- a/dll/win32/wbemdisp/CMakeLists.txt
+++ b/dll/win32/wbemdisp/CMakeLists.txt
@@ -27,7 +27,7 @@ add_library(wbemdisp MODULE
${CMAKE_CURRENT_BINARY_DIR}/wbemdisp.def)
set_module_type(wbemdisp win32dll)
-target_link_libraries(wbemdisp uuid wine)
+target_link_libraries(wbemdisp uuid wine oldnames)
add_dependencies(wbemdisp stdole2 wbemdisp_idlheader)
add_importlibs(wbemdisp oleaut32 ole32 msvcrt kernel32 ntdll)
add_pch(wbemdisp precomp.h "${PCH_SKIP_SOURCE}")
diff --git a/dll/win32/wbemprox/CMakeLists.txt b/dll/win32/wbemprox/CMakeLists.txt
index aff723c5bf2..7b69cd71f8c 100644
--- a/dll/win32/wbemprox/CMakeLists.txt
+++ b/dll/win32/wbemprox/CMakeLists.txt
@@ -34,7 +34,7 @@ add_library(wbemprox MODULE
set_source_files_properties(wbemprox.rc PROPERTIES OBJECT_DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/wbemprox.rgs)
set_module_type(wbemprox win32dll)
-target_link_libraries(wbemprox uuid wine)
+target_link_libraries(wbemprox uuid wine oldnames)
add_importlibs(wbemprox iphlpapi oleaut32 advapi32 user32 gdi32 version winspool ws2_32
rpcrt4 setupapi msvcrt kernel32 ntdll)
add_dependencies(wbemprox d3d_idl_headers)
add_pch(wbemprox precomp.h "${PCH_SKIP_SOURCE}")
diff --git a/dll/win32/winmm/CMakeLists.txt b/dll/win32/winmm/CMakeLists.txt
index f6943f915b4..aca0942d4be 100644
--- a/dll/win32/winmm/CMakeLists.txt
+++ b/dll/win32/winmm/CMakeLists.txt
@@ -29,7 +29,7 @@ if(MSVC)
endif()
set_module_type(winmm win32dll)
-target_link_libraries(winmm wine ${PSEH_LIB})
+target_link_libraries(winmm wine ${PSEH_LIB} oldnames)
add_importlibs(winmm advapi32 user32 msvcrt kernel32 ntdll)
add_pch(winmm winemm.h SOURCE)
add_cd_file(TARGET winmm DESTINATION reactos/system32 FOR all)
diff --git a/dll/win32/wshom.ocx/CMakeLists.txt b/dll/win32/wshom.ocx/CMakeLists.txt
index c790331ac22..98c2d8ad479 100644
--- a/dll/win32/wshom.ocx/CMakeLists.txt
+++ b/dll/win32/wshom.ocx/CMakeLists.txt
@@ -29,7 +29,7 @@ list(APPEND wshom_rc_deps
set_source_files_properties(wshom.rc PROPERTIES OBJECT_DEPENDS
"${wshom_rc_deps}")
set_module_type(wshom win32ocx)
-target_link_libraries(wshom uuid wine)
+target_link_libraries(wshom uuid wine oldnames)
add_importlibs(wshom oleaut32 ole32 shell32 advapi32 advapi32_vista user32 msvcrt
kernel32 ntdll)
add_dependencies(wshom stdole2 wshom_idlheader)
add_pch(wshom precomp.h "${PCH_SKIP_SOURCE}")
diff --git a/dll/win32/xmllite/CMakeLists.txt b/dll/win32/xmllite/CMakeLists.txt
index 8d432444ec4..ed7dbc8c388 100644
--- a/dll/win32/xmllite/CMakeLists.txt
+++ b/dll/win32/xmllite/CMakeLists.txt
@@ -21,7 +21,7 @@ if(MSVC)
endif()
set_module_type(xmllite win32dll)
-target_link_libraries(xmllite uuid wine)
+target_link_libraries(xmllite uuid wine oldnames)
add_importlibs(xmllite msvcrt kernel32 ntdll)
add_pch(xmllite precomp.h SOURCE)
add_cd_file(TARGET xmllite DESTINATION reactos/system32 FOR all)
diff --git a/modules/rostests/winetests/inetcomm/CMakeLists.txt
b/modules/rostests/winetests/inetcomm/CMakeLists.txt
index 648a066f260..c2f9b364a53 100644
--- a/modules/rostests/winetests/inetcomm/CMakeLists.txt
+++ b/modules/rostests/winetests/inetcomm/CMakeLists.txt
@@ -1,5 +1,8 @@
-add_definitions(-DUSE_WINE_TODOS)
+add_definitions(
+ -DUSE_WINE_TODOS
+ -Dstrcasecmp=_stricmp
+)
list(APPEND SOURCE
mimeintl.c
diff --git a/modules/rostests/winetests/kernel32/CMakeLists.txt
b/modules/rostests/winetests/kernel32/CMakeLists.txt
index 862aaed9076..29646c7c9b4 100644
--- a/modules/rostests/winetests/kernel32/CMakeLists.txt
+++ b/modules/rostests/winetests/kernel32/CMakeLists.txt
@@ -3,6 +3,10 @@ include_directories(BEFORE
${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
remove_definitions(-DWINVER=0x502 -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x502)
add_definitions(-DWINVER=0x600 -D_WIN32_WINNT=0x601)
+add_definitions(
+ -Dstrcasecmp=_stricmp
+)
+
list(APPEND SOURCE
actctx.c
atom.c
diff --git a/modules/rostests/winetests/msi/CMakeLists.txt
b/modules/rostests/winetests/msi/CMakeLists.txt
index 7d08f5211de..0d6215e659f 100644
--- a/modules/rostests/winetests/msi/CMakeLists.txt
+++ b/modules/rostests/winetests/msi/CMakeLists.txt
@@ -43,7 +43,7 @@ add_idl_headers(msi_winetest_idlheader typelib.idl)
generate_idl_iids(typelib.idl)
add_typelib(typelib.idl)
-target_compile_definitions(msi_winetest PRIVATE __WINESRC__ USE_WINE_TODOS)
+target_compile_definitions(msi_winetest PRIVATE __WINESRC__ USE_WINE_TODOS
strcasecmp=_stricmp)
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
target_compile_options(msi_winetest PRIVATE -Wno-format-overflow -Wno-format)
diff --git a/modules/rostests/winetests/oleaut32/CMakeLists.txt
b/modules/rostests/winetests/oleaut32/CMakeLists.txt
index 9351c512735..38ed3958cd0 100644
--- a/modules/rostests/winetests/oleaut32/CMakeLists.txt
+++ b/modules/rostests/winetests/oleaut32/CMakeLists.txt
@@ -3,7 +3,9 @@ add_definitions(
-D__WINESRC__
-DUSE_WINE_TODOS
-DWINETEST_USE_DBGSTR_LONGLONG
- -D_USE_MATH_DEFINES)
+ -D_USE_MATH_DEFINES
+ -Dstrcasecmp=_stricmp
+)
include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
add_typelib(test_reg.idl test_tlb.idl tmarshal.idl)
diff --git a/modules/rostests/winetests/setupapi/CMakeLists.txt
b/modules/rostests/winetests/setupapi/CMakeLists.txt
index 7233a7900b1..1687969a082 100644
--- a/modules/rostests/winetests/setupapi/CMakeLists.txt
+++ b/modules/rostests/winetests/setupapi/CMakeLists.txt
@@ -1,4 +1,9 @@
+add_definitions(
+ -D__WINESRC__
+ -Dstrcasecmp=_stricmp
+)
+
list(APPEND SOURCE
devinst.c
dialog.c
diff --git a/modules/rostests/winetests/shell32/CMakeLists.txt
b/modules/rostests/winetests/shell32/CMakeLists.txt
index 23dcd7c751b..9d8fc47ad1e 100644
--- a/modules/rostests/winetests/shell32/CMakeLists.txt
+++ b/modules/rostests/winetests/shell32/CMakeLists.txt
@@ -1,5 +1,8 @@
-add_definitions(-DWINETEST_USE_DBGSTR_LONGLONG)
+add_definitions(
+ -DWINETEST_USE_DBGSTR_LONGLONG
+ -Dstrcasecmp=_stricmp
+)
remove_definitions(-DWINVER=0x502 -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x502)
diff --git a/modules/rostests/winetests/userenv/CMakeLists.txt
b/modules/rostests/winetests/userenv/CMakeLists.txt
index 748f0d40967..9ff21fc869e 100644
--- a/modules/rostests/winetests/userenv/CMakeLists.txt
+++ b/modules/rostests/winetests/userenv/CMakeLists.txt
@@ -1,5 +1,6 @@
add_executable(userenv_winetest userenv.c testlist.c)
set_module_type(userenv_winetest win32cui)
+target_link_libraries(userenv_winetest oldnames)
add_importlibs(userenv_winetest userenv advapi32 msvcrt kernel32)
add_rostests_file(TARGET userenv_winetest)
diff --git a/sdk/lib/3rdparty/libmpg123/CMakeLists.txt
b/sdk/lib/3rdparty/libmpg123/CMakeLists.txt
index e14a3dfa2f3..876e78b6d28 100644
--- a/sdk/lib/3rdparty/libmpg123/CMakeLists.txt
+++ b/sdk/lib/3rdparty/libmpg123/CMakeLists.txt
@@ -5,10 +5,8 @@ add_definitions(
-DNOXFERMEM
-DHAVE_CONFIG_H
-DEOVERFLOW=75
- -Dlseek=_lseek
- -Dread=_read
- -Dstrdup=_strdup
- -D_CRT_NONSTDC_NO_DEPRECATE
+ -Dstrcasecmp=_stricmp
+ -Dstrncasecmp=_strnicmp
-D_DLL -D__USE_CRTIMP
-D_CRT_NO_POSIX_ERROR_CODES)
@@ -48,5 +46,6 @@ add_library(libmpg123
${SOURCE}
${PCH_SKIP_SOURCE})
+target_link_libraries(libmpg123 oldnames)
add_dependencies(libmpg123 psdk)
add_pch(libmpg123 precomp.h "${PCH_SKIP_SOURCE}")
diff --git a/sdk/lib/crt/locale/locale.c b/sdk/lib/crt/locale/locale.c
index 897aa2ec38d..88e8988a4e9 100644
--- a/sdk/lib/crt/locale/locale.c
+++ b/sdk/lib/crt/locale/locale.c
@@ -31,6 +31,8 @@
#error _pctype should not be defined
#endif
+#define strcasecmp _stricmp
+#define strncasecmp _strnicmp
unsigned int __lc_codepage = 0;
int MSVCRT___lc_collate_cp = 0;
LCID MSVCRT___lc_handle[LC_MAX - LC_MIN + 1] = { 0 };