Browse Source

+ added fppause() for FPC_USE_LIBC
* fixed test

git-svn-id: trunk@13436 -

Jonas Maebe 16 years ago
parent
commit
ef1c033f49
2 changed files with 3 additions and 2 deletions
  1. 1 0
      rtl/unix/oscdeclh.inc
  2. 2 2
      tests/webtbs/tw14149.pp

+ 1 - 0
rtl/unix/oscdeclh.inc

@@ -109,6 +109,7 @@ const
     Function  FpFcntl      (fildes : cInt; cmd : cInt): cInt; {$ifdef FPC_IS_SYSTEM}forward;{$endif}
     Function  FpFcntl      (fildes : cInt; cmd : cInt): cInt; {$ifdef FPC_IS_SYSTEM}forward;{$endif}
     Function  FpFcntl      (fildes : cInt; cmd : cInt; arg :cInt): cInt; {$ifdef FPC_IS_SYSTEM}forward;{$endif}
     Function  FpFcntl      (fildes : cInt; cmd : cInt; arg :cInt): cInt; {$ifdef FPC_IS_SYSTEM}forward;{$endif}
     Function  FpFcntl      (fildes : cInt; cmd : cInt; var arg : flock): cInt; {$ifdef FPC_IS_SYSTEM}forward;{$endif}
     Function  FpFcntl      (fildes : cInt; cmd : cInt; var arg : flock): cInt; {$ifdef FPC_IS_SYSTEM}forward;{$endif}
+    Function  FpAlarm      (seconds : cuint) : cuint; cdecl;external clib name 'alarm';
     Function  FpPause   : cInt; cdecl; external clib name 'pause';
     Function  FpPause   : cInt; cdecl; external clib name 'pause';
     Function  FpMkfifo     (path: pchar; mode: tmode): cint; cdecl; external clib name 'mkfifo';
     Function  FpMkfifo     (path: pchar; mode: tmode): cint; cdecl; external clib name 'mkfifo';
 {$ifdef solaris}   
 {$ifdef solaris}   

+ 2 - 2
tests/webtbs/tw14149.pp

@@ -15,10 +15,10 @@ begin
   Writeln('Setting alarm handler');
   Writeln('Setting alarm handler');
   fpSignal(SIGALRM,SignalHandler(@AlarmHandler));
   fpSignal(SIGALRM,SignalHandler(@AlarmHandler));
   Writeln ('Scheduling Alarm in 10 seconds');
   Writeln ('Scheduling Alarm in 10 seconds');
-  fpAlarm(10);
+  fpAlarm(2);
   Writeln ('Pausing');
   Writeln ('Pausing');
   fpPause;
   fpPause;
-  if fpGetErrno<>0 then
+  if fpGetErrno<>ESysEINTR then
     halt(1);
     halt(1);
   Writeln ('Pause returned');
   Writeln ('Pause returned');
 end.
 end.