Browse Source

Add code to includee new file to handle changing openbsd syscall numbers

git-svn-id: trunk@28830 -
pierre 10 năm trước cách đây
mục cha
commit
72a0dfecf0
1 tập tin đã thay đổi với 10 bổ sung1 xóa
  1. 10 1
      rtl/bsd/system.pp

+ 10 - 1
rtl/bsd/system.pp

@@ -79,6 +79,10 @@ Implementation
 
 
 {$I system.inc}
 {$I system.inc}
 
 
+{$ifdef FPC_HAS_SETSYSNR_INC}
+{$I setsysnr.inc}
+{$endif FPC_HAS_SETSYSNR_INC}
+
 {*****************************************************************************
 {*****************************************************************************
                        Misc. System Dependent Functions
                        Misc. System Dependent Functions
 *****************************************************************************}
 *****************************************************************************}
@@ -301,7 +305,7 @@ begin
   argv:= argvparam;
   argv:= argvparam;
   envp:= envpparam;
   envp:= envpparam;
 {$ifdef cpui386}
 {$ifdef cpui386}
-  Set8087CW(Default8087CW);  
+  Set8087CW(Default8087CW);
 {$endif cpui386}
 {$endif cpui386}
   pascalmain;  {run the pascal main program}
   pascalmain;  {run the pascal main program}
 end;
 end;
@@ -327,6 +331,11 @@ Begin
   IsConsole := TRUE;
   IsConsole := TRUE;
   StackLength := CheckInitialStkLen(InitialStkLen);
   StackLength := CheckInitialStkLen(InitialStkLen);
   StackBottom := Sptr - StackLength;
   StackBottom := Sptr - StackLength;
+{$ifdef FPC_HAS_SETSYSNR_INC}
+  { This procedure is needed for openbsd system which re-uses
+    the same syscall numbers depending on OS version }
+  SetSyscallNumbers;
+{$endif FPC_HAS_SETSYSNR_INC}
   { Set up signals handlers (may be needed by init code to test cpu features) }
   { Set up signals handlers (may be needed by init code to test cpu features) }
   InstallSignals;
   InstallSignals;