2
0
Эх сурвалжийг харах

* inside the Win64 system unit convert FPC_USE_WIN64_SEH to a SYSTEM_USE_WIN_SEH

git-svn-id: trunk@44939 -
svenbarth 5 жил өмнө
parent
commit
bfa5bf80e2

+ 2 - 2
rtl/win64/seh64.inc

@@ -194,7 +194,7 @@ procedure RtlUnwindEx(
 
 
 { FPC specific stuff }
-{$ifdef FPC_USE_WIN64_SEH}
+{$ifdef SYSTEM_USE_WIN_SEH}
 
 function ContextGetIP(const Context: TContext): PtrUInt; inline;
 begin
@@ -571,5 +571,5 @@ begin
     end;
   end;
 end;
-{$endif FPC_USE_WIN64_SEH}
+{$endif SYSTEM_USE_WIN_SEH}
 

+ 12 - 8
rtl/win64/system.pp

@@ -30,11 +30,15 @@ interface
 {$define FPC_SYSTEM_HAS_SYSDLH}
 {$define FPC_HAS_SETCTRLBREAKHANDLER}
 
-{$ifdef FPC_USE_WIN64_SEH}
+{$if defined(FPC_USE_WIN64_SEH)}
+{$define SYSTEM_USE_WIN_SEH}
+{$endif}
+
+{$ifdef SYSTEM_USE_WIN_SEH}
   {$define FPC_SYSTEM_HAS_RAISEEXCEPTION}
   {$define FPC_SYSTEM_HAS_RERAISE}
   {$define FPC_SYSTEM_HAS_CAPTUREBACKTRACE}
-{$endif FPC_USE_WIN64_SEH}
+{$endif SYSTEM_USE_WIN_SEH}
 
 { include system-independent routine headers }
 {$I systemh.inc}
@@ -148,9 +152,9 @@ end;
                          System Dependent Exit code
 *****************************************************************************}
 
-{$ifndef FPC_USE_WIN64_SEH}
+{$ifndef SYSTEM_USE_WIN_SEH}
 procedure install_exception_handlers;forward;
-{$endif FPC_USE_WIN64_SEH}
+{$endif SYSTEM_USE_WIN_SEH}
 {$ifdef VER3_0}
 procedure PascalMain;external name 'PASCALMAIN';
 {$endif VER3_0}
@@ -219,9 +223,9 @@ procedure Exe_entry(constref info: TEntryInformation);[public,alias:'_FPC_EXE_En
      IsLibrary:=false;
      { install the handlers for exe only ?
        or should we install them for DLL also ? (PM) }
-{$ifndef FPC_USE_WIN64_SEH}
+{$ifndef SYSTEM_USE_WIN_SEH}
      install_exception_handlers;
-{$endif FPC_USE_WIN64_SEH}
+{$endif SYSTEM_USE_WIN_SEH}
      ExitCode:=0;
 {$ifdef CPUX86_64}
      asm
@@ -333,7 +337,7 @@ type
 function AddVectoredExceptionHandler(FirstHandler : DWORD;VectoredHandler : TVectoredExceptionHandler) : longint;
         external 'kernel32' name 'AddVectoredExceptionHandler';
 
-{$ifndef FPC_USE_WIN64_SEH}
+{$ifndef SYSTEM_USE_WIN_SEH}
 const
   MaxExceptionLevel = 16;
   exceptLevel : Byte = 0;
@@ -509,7 +513,7 @@ procedure install_exception_handlers;
   begin
     AddVectoredExceptionHandler(1,@syswin64_x86_64_exception_handler);
   end;
-{$endif ndef FPC_USE_WIN64_SEH}
+{$endif ndef SYSTEM_USE_WIN_SEH}
 
 {$ifdef VER3_0}
 procedure LinkIn(p1,p2,p3: Pointer); inline;