Browse Source

* fixed baseunix.signal for CPU using rt_sigaction
* fixed it for x86_64 too

florian 21 years ago
parent
commit
efc6c7793e
2 changed files with 27 additions and 9 deletions
  1. 8 4
      rtl/linux/osmain.inc
  2. 19 5
      rtl/unix/bunxovl.inc

+ 8 - 4
rtl/linux/osmain.inc

@@ -494,9 +494,9 @@ begin
   act.sa_handler := signalhandler(@SignalToRunError);
   act.sa_handler := signalhandler(@SignalToRunError);
 {$ifdef RTSIGACTION}
 {$ifdef RTSIGACTION}
   act.sa_flags:=SA_SIGINFO
   act.sa_flags:=SA_SIGINFO
-{$ifdef x86_64}
+{$ifdef cpux86_64}
     or $4000000
     or $4000000
-{$endif x86_64}
+{$endif cpux86_64}
     ;
     ;
 {$endif RTSIGACTION}
 {$endif RTSIGACTION}
   FpSigAction(SIGFPE,@act,nil);
   FpSigAction(SIGFPE,@act,nil);
@@ -565,7 +565,11 @@ end;
 
 
 {
 {
  $Log$
  $Log$
- Revision 1.21  2004-10-25 15:38:59  peter
+ Revision 1.22  2004-11-02 14:49:48  florian
+   * fixed baseunix.signal for CPU using rt_sigaction
+   * fixed it for x86_64 too
+
+ Revision 1.21  2004/10/25 15:38:59  peter
    * compiler defined HEAP and HEAPSIZE removed
    * compiler defined HEAP and HEAPSIZE removed
 
 
  Revision 1.20  2004/08/04 19:27:09  florian
  Revision 1.20  2004/08/04 19:27:09  florian
@@ -660,4 +664,4 @@ end;
  Revision 1.1.2.16  2002/02/15 18:13:35  carl
  Revision 1.1.2.16  2002/02/15 18:13:35  carl
  * bugfix for paramstr(0)
  * bugfix for paramstr(0)
 
 
-}
+}

+ 19 - 5
rtl/unix/bunxovl.inc

@@ -14,6 +14,10 @@
 
 
  **********************************************************************}
  **********************************************************************}
 
 
+{$if defined(CPUARM) or defined(CPUX86_64) or defined(CPUSPARC)}
+  {$define RTSIGACTION}
+{$endif}
+
 {$I textrec.inc}
 {$I textrec.inc}
 {$I filerec.inc}
 {$I filerec.inc}
 
 
@@ -61,7 +65,7 @@ End;
 Function  FpChdir (path : AnsiString): cInt;
 Function  FpChdir (path : AnsiString): cInt;
 Begin
 Begin
  FpChDir:=FpChdir(pchar(Path));
  FpChDir:=FpChdir(pchar(Path));
-End;		   
+End;
 
 
 Function  FpOpen (path : AnsiString; flags : cInt; Mode: TMode):cInt;
 Function  FpOpen (path : AnsiString; flags : cInt; Mode: TMode):cInt;
 Begin
 Begin
@@ -94,7 +98,7 @@ begin
   FpStat:=FpStat(pchar(path),buf);
   FpStat:=FpStat(pchar(path),buf);
 End;
 End;
 
 
-Function FpAccess (pathname : AnsiString; aMode : cInt): cInt; 
+Function FpAccess (pathname : AnsiString; aMode : cInt): cInt;
 Begin
 Begin
   FpAccess:=FpAccess(pchar(pathname),amode);
   FpAccess:=FpAccess(pchar(pathname),amode);
 End;
 End;
@@ -132,6 +136,13 @@ begin
  {restart behaviour needs libc}
  {restart behaviour needs libc}
       sa.sa_flags :=sa.sa_flags or SA_RESTART;
       sa.sa_flags :=sa.sa_flags or SA_RESTART;
 }
 }
+{$ifdef RTSIGACTION}
+      sa.sa_flags:=SA_SIGINFO
+{$ifdef cpux86_64}
+         or $4000000
+{$endif cpux86_64}
+      ;
+{$endif RTSIGACTION}
      FPSigaction(signum,@sa,@osa);
      FPSigaction(signum,@sa,@osa);
      if fpgetErrNo<>0 then
      if fpgetErrNo<>0 then
        fpsignal:=NIL
        fpsignal:=NIL
@@ -203,7 +214,7 @@ Function  FpStat (path: String; var buf : stat): cInt;
 
 
 begin
 begin
  path:=path+#0;
  path:=path+#0;
- FpStat:=FpStat(pchar(@path[1]),buf); 
+ FpStat:=FpStat(pchar(@path[1]),buf);
 end;
 end;
 
 
 Function fpDup(var oldfile,newfile:text):cint;
 Function fpDup(var oldfile,newfile:text):cint;
@@ -331,7 +342,11 @@ end;
 
 
 {
 {
  $Log$
  $Log$
- Revision 1.11  2004-06-01 10:30:03  jonas
+ Revision 1.12  2004-11-02 14:49:48  florian
+   * fixed baseunix.signal for CPU using rt_sigaction
+   * fixed it for x86_64 too
+
+ Revision 1.11  2004/06/01 10:30:03  jonas
    * fixed missing cdecl procedure directive
    * fixed missing cdecl procedure directive
 
 
  Revision 1.10  2004/03/28 19:36:19  marco
  Revision 1.10  2004/03/28 19:36:19  marco
@@ -367,4 +382,3 @@ end;
 
 
 
 
 }
 }
-