+ added fppause() for FPC_USE_LIBC

* fixed test

git-svn-id: trunk@13436 -
This commit is contained in:
Jonas Maebe 2009-07-24 21:52:01 +00:00
parent 5127c74132
commit ef1c033f49
2 changed files with 3 additions and 2 deletions

View File

@ -109,6 +109,7 @@ const
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; 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 FpMkfifo (path: pchar; mode: tmode): cint; cdecl; external clib name 'mkfifo';
{$ifdef solaris}

View File

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