Module: wine Branch: master Commit: aba6423b830939ad98f755f2a54104626483db9c URL: http://source.winehq.org/git/wine.git/?a=commit;h=aba6423b830939ad98f755f2a5...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Mar 13 15:10:15 2012 +0100
msvcrt: Create an i386-specific file for exception handling.
---
dlls/msvcrt/Makefile.in | 2 +- dlls/msvcrt/cpp.c | 14 ++++++++++++++ dlls/msvcrt/{cppexcept.c => except_i386.c} | 22 ++++------------------ dlls/msvcrt/msvcrt.spec | 8 ++++---- 4 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/dlls/msvcrt/Makefile.in b/dlls/msvcrt/Makefile.in index 1f4860a..ba8cdbb 100644 --- a/dlls/msvcrt/Makefile.in +++ b/dlls/msvcrt/Makefile.in @@ -6,13 +6,13 @@ DELAYIMPORTS = advapi32 user32 C_SRCS = \ console.c \ cpp.c \ - cppexcept.c \ ctype.c \ data.c \ dir.c \ environ.c \ errno.c \ except.c \ + except_i386.c \ exit.c \ file.c \ heap.c \ diff --git a/dlls/msvcrt/cpp.c b/dlls/msvcrt/cpp.c index d5c0c64..dc609c1 100644 --- a/dlls/msvcrt/cpp.c +++ b/dlls/msvcrt/cpp.c @@ -1270,3 +1270,17 @@ void* CDECL MSVCRT___RTCastToVoid(void *cppobj) __ENDTRY return ret; } + + +/********************************************************************* + * _CxxThrowException (MSVCRT.@) + */ +void WINAPI _CxxThrowException( exception *object, const cxx_exception_type *type ) +{ + ULONG_PTR args[3]; + + args[0] = CXX_FRAME_MAGIC_VC6; + args[1] = (ULONG_PTR)object; + args[2] = (ULONG_PTR)type; + RaiseException( CXX_EXCEPTION, EH_NONCONTINUABLE, 3, args ); +} diff --git a/dlls/msvcrt/cppexcept.c b/dlls/msvcrt/except_i386.c similarity index 97% rename from dlls/msvcrt/cppexcept.c rename to dlls/msvcrt/except_i386.c index 18e5aa0..c95f49b 100644 --- a/dlls/msvcrt/cppexcept.c +++ b/dlls/msvcrt/except_i386.c @@ -26,6 +26,8 @@ #include "config.h" #include "wine/port.h"
+#ifdef __i386__ + #include <stdarg.h>
#include "windef.h" @@ -38,8 +40,6 @@
#include "cppexcept.h"
-#ifdef __i386__ /* CxxFrameHandler is not supported on non-i386 */ - WINE_DEFAULT_DEBUG_CHANNEL(seh);
DWORD CDECL cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame, @@ -455,9 +455,6 @@ void __stdcall __CxxLongjmpUnwind( const struct MSVCRT___JUMP_BUFFER *buf ) cxx_local_unwind( frame, descr, buf->TryLevel ); }
-#endif /* __i386__ */ - - /********************************************************************* * __CppXcptFilter (MSVCRT.@) */ @@ -469,19 +466,6 @@ int CDECL __CppXcptFilter(NTSTATUS ex, PEXCEPTION_POINTERS ptr) }
/********************************************************************* - * _CxxThrowException (MSVCRT.@) - */ -void WINAPI _CxxThrowException( exception *object, const cxx_exception_type *type ) -{ - ULONG_PTR args[3]; - - args[0] = CXX_FRAME_MAGIC_VC6; - args[1] = (ULONG_PTR)object; - args[2] = (ULONG_PTR)type; - RaiseException( CXX_EXCEPTION, EH_NONCONTINUABLE, 3, args ); -} - -/********************************************************************* * __CxxDetectRethrow (MSVCRT.@) */ BOOL CDECL __CxxDetectRethrow(PEXCEPTION_POINTERS ptrs) @@ -511,3 +495,5 @@ unsigned int CDECL __CxxQueryExceptionSize(void) { return sizeof(cxx_exception_type); } + +#endif /* __i386__ */ diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 1260dfa..c893382 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -145,18 +145,18 @@ @ extern _HUGE MSVCRT__HUGE @ cdecl _Strftime(str long str ptr ptr) @ cdecl _XcptFilter(long ptr) -@ cdecl __CppXcptFilter(long ptr) +@ stdcall -arch=x86_64 __C_specific_handler(ptr long ptr ptr) ntdll.__C_specific_handler +@ cdecl -i386 __CppXcptFilter(long ptr) # stub __CxxCallUnwindDelDtor # stub __CxxCallUnwindDtor # stub __CxxCallUnwindVecDtor -@ cdecl __CxxDetectRethrow(ptr) +@ cdecl -i386 __CxxDetectRethrow(ptr) # stub __CxxExceptionFilter @ cdecl -i386 -norelay __CxxFrameHandler(ptr ptr ptr ptr) @ cdecl -i386 -norelay __CxxFrameHandler2(ptr ptr ptr ptr) __CxxFrameHandler @ cdecl -i386 -norelay __CxxFrameHandler3(ptr ptr ptr ptr) __CxxFrameHandler -@ stdcall -arch=x86_64 __C_specific_handler(ptr long ptr ptr) ntdll.__C_specific_handler @ stdcall -i386 __CxxLongjmpUnwind(ptr) -@ cdecl __CxxQueryExceptionSize() +@ cdecl -i386 __CxxQueryExceptionSize() # stub __CxxRegisterExceptionObject # stub __CxxUnregisterExceptionObject # stub __DestructExceptionObject