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:
KJK::Hyperion 2004-06-03 22:19:10 +00:00
parent df6802c1fd
commit f739268bbb
4 changed files with 10 additions and 3 deletions

View file

@ -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; \
\

View file

@ -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;

View file

@ -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

View file

@ -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: