MWE: Added IFDEFs so non linux targetswill compile

git-svn-id: trunk@397 -
This commit is contained in:
lazarus 2001-11-07 00:17:33 +00:00
parent cf74c12a01
commit 91b2218c07

View File

@ -62,7 +62,13 @@ procedure SendBreak(const AHandle: Integer);
implementation implementation
uses uses
Linux, {$IFDEF Linux}
{$IFDEF Ver1_0}
Linux,
{$ELSE}
Unix,
{$ENDIF}
{$ENDIF}
SysUtils, Forms; SysUtils, Forms;
////////////////////////////////////////////////// //////////////////////////////////////////////////
@ -77,8 +83,10 @@ uses
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
procedure SendBreak(const AHandle: Integer); procedure SendBreak(const AHandle: Integer);
begin begin
{$IFDEF Linux}
if AHandle <> 0 if AHandle <> 0
then Kill(AHandle, SIGINT); then Kill(AHandle, SIGINT);
{$ENDIF}
end; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
@ -87,6 +95,7 @@ end;
Returns: BitArray of handles set, 0 when an error ocoured Returns: BitArray of handles set, 0 when an error ocoured
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
function WaitForHandles(const AHandles: array of Integer): Integer; function WaitForHandles(const AHandles: array of Integer): Integer;
{$IFDEF Linux}
var var
n, R, Max, Count: Integer; n, R, Max, Count: Integer;
TimeOut: Integer; TimeOut: Integer;
@ -124,6 +133,10 @@ begin
if R=0 then Break; if R=0 then Break;
end; end;
end; end;
{$ELSE}
begin
Result := 0;
{$ENDIF}
end; end;
////////////////////////////////////////////////// //////////////////////////////////////////////////
@ -322,6 +335,9 @@ end;
end. end.
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.3 2001/11/07 00:17:33 lazarus
MWE: Added IFDEFs so non linux targetswill compile
Revision 1.2 2001/11/06 23:59:12 lazarus Revision 1.2 2001/11/06 23:59:12 lazarus
MWE: + Initial breakpoint support MWE: + Initial breakpoint support
+ Added exeption handling on process.free + Added exeption handling on process.free