https://git.reactos.org/?p=reactos.git;a=commitdiff;h=678aa63b3a8b064a057bc…
commit 678aa63b3a8b064a057bcd614e9fb04193e7c4ec
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Sat Oct 19 14:30:55 2024 +0300
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Thu Oct 24 18:39:50 2024 +0300
[MSCTFIME][MSUTB][SHDOCVW] Remove __cxa_pure_virtual
Instead link to cpprt. This fixes build with GCC 13, which generates symbols that
conflict with __cxa_pure_virtual, if there is a pure virtual function in a vtable.
Importing __cxa_pure_virtual from a library works for all versions of GCC.
---
dll/ime/msctfime/CMakeLists.txt | 2 +-
dll/ime/msctfime/msctfime.cpp | 5 -----
dll/win32/msutb/CMakeLists.txt | 2 +-
dll/win32/msutb/msutb.cpp | 9 ++-------
dll/win32/shdocvw/CMakeLists.txt | 2 +-
dll/win32/shdocvw/objects.cpp | 6 ------
dll/win32/shdocvw/objects.h | 1 -
7 files changed, 5 insertions(+), 22 deletions(-)
diff --git a/dll/ime/msctfime/CMakeLists.txt b/dll/ime/msctfime/CMakeLists.txt
index 88c174912fd..dc867fc0c44 100644
--- a/dll/ime/msctfime/CMakeLists.txt
+++ b/dll/ime/msctfime/CMakeLists.txt
@@ -20,7 +20,7 @@ add_library(msctfime MODULE
${CMAKE_CURRENT_BINARY_DIR}/msctfime.def)
set_module_type(msctfime win32dll UNICODE)
set_target_properties(msctfime PROPERTIES SUFFIX ".ime")
-target_link_libraries(msctfime wine uuid cicero)
+target_link_libraries(msctfime cpprt wine uuid cicero)
add_importlibs(msctfime user32 gdi32 advapi32 msvcrt kernel32 ntdll)
add_delay_importlibs(msctfime uxtheme shlwapi comctl32 msctf oleaut32 imm32)
add_cd_file(TARGET msctfime DESTINATION reactos/system32 FOR all)
diff --git a/dll/ime/msctfime/msctfime.cpp b/dll/ime/msctfime/msctfime.cpp
index 60176204374..3ba326b1aa1 100644
--- a/dll/ime/msctfime/msctfime.cpp
+++ b/dll/ime/msctfime/msctfime.cpp
@@ -17,11 +17,6 @@ BOOL gfTFInitLib = FALSE;
CRITICAL_SECTION g_csLock;
CDispAttrPropCache *g_pPropCache = NULL;
-EXTERN_C void __cxa_pure_virtual(void)
-{
- ERR("__cxa_pure_virtual\n");
-}
-
/// Selects or unselects the input context.
/// @implemented
static HRESULT
diff --git a/dll/win32/msutb/CMakeLists.txt b/dll/win32/msutb/CMakeLists.txt
index df523425cff..a82bc47f384 100644
--- a/dll/win32/msutb/CMakeLists.txt
+++ b/dll/win32/msutb/CMakeLists.txt
@@ -13,7 +13,7 @@ add_library(msutb MODULE
${CMAKE_CURRENT_BINARY_DIR}/msutb.def)
set_module_type(msutb win32dll UNICODE)
add_dependencies(msutb msctf psdk)
-target_link_libraries(msutb wine uuid atl_classes cicero)
+target_link_libraries(msutb cpprt wine uuid atl_classes cicero)
add_importlibs(msutb user32 gdi32 advapi32 msvcrt kernel32 ntdll)
add_delay_importlibs(msutb uxtheme imm32 shlwapi comctl32 msctf ole32 oleacc oleaut32
shell32)
add_cd_file(TARGET msutb DESTINATION reactos/system32 FOR all)
diff --git a/dll/win32/msutb/msutb.cpp b/dll/win32/msutb/msutb.cpp
index 4f307c3e82d..f5fa02186bd 100644
--- a/dll/win32/msutb/msutb.cpp
+++ b/dll/win32/msutb/msutb.cpp
@@ -81,11 +81,6 @@ BOOL g_fRTL = FALSE;
#define TIMER_ID_DOACCDEFAULTACTION 11
-EXTERN_C void __cxa_pure_virtual(void)
-{
- ERR("__cxa_pure_virtual\n");
-}
-
class CMsUtbModule : public CComModule
{
};
@@ -1188,7 +1183,7 @@ protected:
public:
CButtonIconItem(CTrayIconWnd *pWnd, DWORD dwUnknown24);
-
+
STDMETHOD_(BOOL, OnMsg)(WPARAM wParam, LPARAM lParam) override;
STDMETHOD_(BOOL, OnDelayMsg)(UINT uMsg) override;
};
@@ -1581,7 +1576,7 @@ public:
void StartModalInput(ITfLangBarEventSink *pSink, DWORD dwThreadId);
void StopModalInput(DWORD dwThreadId);
-
+
CTipbarThread *_CreateThread(DWORD dwThreadId);
CTipbarThread *_FindThread(DWORD dwThreadId);
void EnsureFocusThread();
diff --git a/dll/win32/shdocvw/CMakeLists.txt b/dll/win32/shdocvw/CMakeLists.txt
index 764663a42ed..119e8aaf882 100644
--- a/dll/win32/shdocvw/CMakeLists.txt
+++ b/dll/win32/shdocvw/CMakeLists.txt
@@ -24,7 +24,7 @@ target_include_directories(shdocvw BEFORE PRIVATE
)
set_module_type(shdocvw win32dll UNICODE)
-target_link_libraries(shdocvw uuid wine)
+target_link_libraries(shdocvw cpprt uuid wine)
add_delay_importlibs(shdocvw shell32 user32 gdi32 ole32 oleaut32 ieframe)
add_importlibs(shdocvw shlwapi advapi32 msvcrt comctl32 kernel32 ntdll)
add_dependencies(shdocvw stdole2)
diff --git a/dll/win32/shdocvw/objects.cpp b/dll/win32/shdocvw/objects.cpp
index 2ad4275d4e3..177f62e9936 100644
--- a/dll/win32/shdocvw/objects.cpp
+++ b/dll/win32/shdocvw/objects.cpp
@@ -25,12 +25,6 @@ void operator delete(void *ptr, size_t size)
::LocalFree(ptr);
}
-EXTERN_C void __cxa_pure_virtual(void)
-{
- ERR("__cxa_pure_virtual\n");
- ::DebugBreak();
-}
-
BEGIN_OBJECT_MAP(ObjectMap)
OBJECT_ENTRY(CLSID_SH_FavBand, CFavBand)
OBJECT_ENTRY(CLSID_ExplorerBand, CExplorerBand)
diff --git a/dll/win32/shdocvw/objects.h b/dll/win32/shdocvw/objects.h
index 9720fbec060..c8f778fb55b 100644
--- a/dll/win32/shdocvw/objects.h
+++ b/dll/win32/shdocvw/objects.h
@@ -32,7 +32,6 @@
void *operator new(size_t size);
void operator delete(void *ptr);
void operator delete(void *ptr, size_t size);
-EXTERN_C void __cxa_pure_virtual(void);
#endif /* def C++ */
EXTERN_C VOID SHDOCVW_Init(HINSTANCE hInstance);