https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c332b917dccf7b3c9563c…
commit c332b917dccf7b3c9563c24f02a1550b8a5ab600
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Thu Aug 10 12:12:22 2023 +0300
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Sat Aug 19 23:50:52 2023 +0300
[CRT] Reduce diff to wine-5.0
---
sdk/lib/crt/except/i386/cpp.s | 16 ++++++++++++++++
sdk/lib/crt/wine/cpp.c | 2 --
sdk/lib/crt/wine/cxx.h | 6 +++++-
sdk/lib/crt/wine/except_i386.c | 20 --------------------
sdk/lib/crt/wine/undname.c | 14 ++++++++------
5 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/sdk/lib/crt/except/i386/cpp.s b/sdk/lib/crt/except/i386/cpp.s
index 0a553936060..7985dc1d9fe 100644
--- a/sdk/lib/crt/except/i386/cpp.s
+++ b/sdk/lib/crt/except/i386/cpp.s
@@ -5,6 +5,8 @@
.code
.align 4
+EXTERN _cxx_frame_handler:PROC
+
MACRO(DEFINE_THISCALL_ALIAS, cxxname, target)
#ifdef _USE_ML
EXTERN ___thiscall&target:PROC
@@ -166,5 +168,19 @@ _call_handler:
pop ebp
ret
+
+PUBLIC ___CxxFrameHandler
+___CxxFrameHandler:
+ push 0
+ push 0
+ push eax
+ push[esp + 28]
+ push[esp + 28]
+ push[esp + 28]
+ push[esp + 28]
+ call _cxx_frame_handler
+ add esp, 28
+ ret
+
END
diff --git a/sdk/lib/crt/wine/cpp.c b/sdk/lib/crt/wine/cpp.c
index 4b12b2dfbe1..b5636b1fb1a 100644
--- a/sdk/lib/crt/wine/cpp.c
+++ b/sdk/lib/crt/wine/cpp.c
@@ -995,7 +995,6 @@ void __thiscall MSVCRT_improper_scheduler_detach_dtor(
#endif /* _MSVCR_VER >= 100 */
-#ifndef _MSC_VER
#ifndef __GNUC__
void __asm_dummy_vtables(void) {
#endif
@@ -1049,7 +1048,6 @@ __ASM_VTABLE(improper_scheduler_detach,
#ifndef __GNUC__
}
#endif
-#endif /* !_MSC_VER */
DEFINE_RTTI_DATA0( type_info, 0, ".?AVtype_info@@" )
#if _MSVCR_VER >= 80
diff --git a/sdk/lib/crt/wine/cxx.h b/sdk/lib/crt/wine/cxx.h
index b22ff22cc85..58afc75bd15 100644
--- a/sdk/lib/crt/wine/cxx.h
+++ b/sdk/lib/crt/wine/cxx.h
@@ -18,6 +18,9 @@
#include "wine/asm.h"
+#ifdef _MSC_VER
+#define __ASM_VTABLE(name,funcs)
+#else
#ifdef _WIN64
#define VTABLE_ADD_FUNC(name) "\t.quad " THISCALL_NAME(name) "\n"
@@ -43,6 +46,7 @@
funcs "\n\t.text")
#endif /* _WIN64 */
+#endif // _MSC_VER
#ifndef __x86_64__
@@ -264,4 +268,4 @@ extern void *vtbl_wrapper_48;
#endif
-//exception* __thiscall MSVCRT_exception_ctor(exception*, const char**);
+exception* __thiscall MSVCRT_exception_ctor(exception*, const char**);
diff --git a/sdk/lib/crt/wine/except_i386.c b/sdk/lib/crt/wine/except_i386.c
index 7512196c096..68f6c75c1b3 100644
--- a/sdk/lib/crt/wine/except_i386.c
+++ b/sdk/lib/crt/wine/except_i386.c
@@ -652,25 +652,6 @@ DWORD CDECL cxx_frame_handler( PEXCEPTION_RECORD rec,
cxx_exception_frame* frame
*/
extern DWORD CDECL __CxxFrameHandler( PEXCEPTION_RECORD rec,
EXCEPTION_REGISTRATION_RECORD* frame,
PCONTEXT context, EXCEPTION_REGISTRATION_RECORD**
dispatch );
-#ifdef _MSC_VER
-DWORD _declspec(naked) __CxxFrameHandler(PEXCEPTION_RECORD rec,
EXCEPTION_REGISTRATION_RECORD* frame,
- PCONTEXT context,
EXCEPTION_REGISTRATION_RECORD** dispatch)
-{
- __asm
- {
- push 0
- push 0
- push eax
- push[esp + 28]
- push[esp + 28]
- push[esp + 28]
- push[esp + 28]
- call cxx_frame_handler
- add esp, 28
- ret
- }
-}
-#else
__ASM_GLOBAL_FUNC( __CxxFrameHandler,
"pushl $0\n\t" /* nested_trylevel */
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
@@ -690,7 +671,6 @@ __ASM_GLOBAL_FUNC( __CxxFrameHandler,
"add $28,%esp\n\t"
__ASM_CFI(".cfi_adjust_cfa_offset -28\n\t")
"ret" )
-#endif
/*********************************************************************
diff --git a/sdk/lib/crt/wine/undname.c b/sdk/lib/crt/wine/undname.c
index c81dfcc273a..df3e4e8cc80 100644
--- a/sdk/lib/crt/wine/undname.c
+++ b/sdk/lib/crt/wine/undname.c
@@ -19,12 +19,15 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define __WINE_DEBUG_CHANNEL__
-#include <precomp.h>
+#include "config.h"
+#include "wine/port.h"
+
#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "msvcrt.h"
-#include <internal/wine/msvcrt.h>
-#include <internal/wine/cppexcept.h>
+#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
@@ -199,8 +202,7 @@ static BOOL str_array_push(struct parsed_symbol* sym, const char* ptr,
int len,
c = '>';
if (i < a->start) c = '-';
else if (i >= a->num) c = '}';
- /* This check is as useless as the unused-but-set gcc warning that we want to
silence here */
- if (c != 0) TRACE("%p\t%d%c %s\n", a, i, c,
debugstr_a(a->elts[i]));
+ TRACE("%p\t%d%c %s\n", a, i, c, debugstr_a(a->elts[i]));
}
}