From ea331f074ce10d2b9c298f7d6bbf43130aa83bf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gardou?= Date: Sat, 22 Jul 2023 23:48:05 +0200 Subject: [PATCH] [FRAMEDYN] Do not define GCC <-> MSVC aliases when building the DLL This fixes some issue when compiling without optimizations on GCC --- dll/win32/framedyn/chstring.cpp | 2 ++ sdk/include/psdk/chstring.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dll/win32/framedyn/chstring.cpp b/dll/win32/framedyn/chstring.cpp index 9f24a90ec2b..df2eacc65c1 100644 --- a/dll/win32/framedyn/chstring.cpp +++ b/dll/win32/framedyn/chstring.cpp @@ -24,6 +24,8 @@ /* INCLUDES ******************************************************************/ +#define CHSTRING_BUILD + #include #define NDEBUG #include diff --git a/sdk/include/psdk/chstring.h b/sdk/include/psdk/chstring.h index a2994bc064b..384f40c8bbb 100644 --- a/sdk/include/psdk/chstring.h +++ b/sdk/include/psdk/chstring.h @@ -196,7 +196,7 @@ inline BOOL operator>=(const CHString& s1, CHSTRING_LPCWSTR s2) { return s1.Comp inline BOOL operator>=(const CHString& s1, const CHString& s2) { return s1.Compare(s2) >= 0; } /* Have GCC link to the symbols exported by framedyn.dll */ -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(CHSTRING_BUILD) #define DEFINE_FRAMEDYN_ALIAS(alias, orig) __asm__(".set " #alias ", \"" #orig "\"");