From: Gabriel Ivăncescu gabrielopcode@gmail.com
msvcirt's PARENTSRC imports exception.c from msvcp90, but it uses a function pointer for these functions, resulting in a type mismatch.
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/msvcp90/msvcp90.h | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/dlls/msvcp90/msvcp90.h b/dlls/msvcp90/msvcp90.h index 3b97cfefd4b..70b2a1ac542 100644 --- a/dlls/msvcp90/msvcp90.h +++ b/dlls/msvcp90/msvcp90.h @@ -37,8 +37,13 @@ void __cdecl _invalid_parameter_noinfo(void); BOOL __cdecl __uncaught_exception(void); int __cdecl _callnewh(size_t);
+#ifdef _MSVCIRT +extern void* (__cdecl *operator_new)(SIZE_T); +extern void (__cdecl *operator_delete)(void*); +#else void* __cdecl operator_new(size_t); void __cdecl operator_delete(void*); +#endif extern void* (__cdecl *MSVCRT_set_new_handler)(void*);
#if _MSVCP_VER >= 110
There's already similar problem for `_MSVCP_VER < 140` case that was solved differently. I think it's better to change msvcirt code in the same way. Both for consistency and so msvcp90.h doesn't contain any msvcirt specific code.
On Thu Jan 18 18:13:05 2024 +0000, Piotr Caban wrote:
Sorry, I'm not familiar with these modules at all, can you please elaborate what I have to change?
On Thu Jan 18 18:13:04 2024 +0000, Gabriel Ivăncescu wrote:
Sorry, I'm not familiar with these modules at all, can you please elaborate what I have to change?
Take a look on `operator_new` and `operator_delete` functions in dlls/msvcp90/msvcp_main.c. It's a simple wrapper that calls `MSVCRT_operator_new` function.