mirror of
https://github.com/reactos/reactos.git
synced 2024-12-30 19:14:31 +00:00
Fixes for Borland C++ compilation, and one variable is now qualified "volatile" to disable dangerous optimizations
svn path=/trunk/; revision=9603
This commit is contained in:
parent
df6802c1fd
commit
f739268bbb
4 changed files with 10 additions and 3 deletions
|
@ -99,7 +99,7 @@ static __declspec(noreturn) void __stdcall _SEHCompilerSpecificHandler
|
|||
}; \
|
||||
\
|
||||
_SEHFrame_t _SEHFrame; \
|
||||
_SEHPortableFrame_t * _SEHPortableFrame; \
|
||||
volatile _SEHPortableFrame_t * _SEHPortableFrame; \
|
||||
\
|
||||
_SEHFrame.SEH_Header.SPF_Handlers = &_SEHHandlers; \
|
||||
\
|
||||
|
|
|
@ -33,6 +33,10 @@ extern void __cdecl _SEHRegisterFrame(_SEHRegistration_t *);
|
|||
extern void __cdecl _SEHUnregisterFrame(const _SEHRegistration_t *);
|
||||
extern void __cdecl _SEHUnwind(_SEHPortableFrame_t *);
|
||||
|
||||
/* Borland C++ uses a different decoration (i.e. none) for stdcall functions */
|
||||
extern void __stdcall RtlUnwind(void *, void *, void *, void *);
|
||||
void const * _SEHRtlUnwind = RtlUnwind;
|
||||
|
||||
__declspec(noreturn) void __cdecl _SEHCallHandler(_SEHPortableFrame_t * frame)
|
||||
{
|
||||
frame->SPF_Handling = 1;
|
||||
|
|
|
@ -44,7 +44,7 @@ __SEHUnregisterFrame:
|
|||
global __SEHUnwind
|
||||
__SEHUnwind:
|
||||
|
||||
extern _RtlUnwind@16
|
||||
extern __SEHRtlUnwind
|
||||
|
||||
mov ecx, [esp+4]
|
||||
|
||||
|
@ -53,11 +53,12 @@ __SEHUnwind:
|
|||
push edi
|
||||
push ebx
|
||||
|
||||
xor eax, eax
|
||||
push eax
|
||||
push eax
|
||||
push eax
|
||||
push ecx
|
||||
call _RtlUnwind@16
|
||||
call [__SEHRtlUnwind]
|
||||
|
||||
pop ebx
|
||||
pop edi
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
cpu 486
|
||||
segment .text use32
|
||||
|
||||
; Note: the undecorated names are for Borland C++ (and possibly other compilers
|
||||
; using the OMF format)
|
||||
global SEHSetJmp
|
||||
global __SEHSetJmp
|
||||
SEHSetJmp:
|
||||
|
|
Loading…
Reference in a new issue