* update so it can be compiled by both 1.0.x and 1.1

This commit is contained in:
peter 2001-04-08 11:26:03 +00:00
parent a820a0f393
commit f2b653319b
10 changed files with 160 additions and 74 deletions

View File

@ -32,7 +32,12 @@ uses
implementation implementation
uses uses
Unix; {$ifdef ver1_0}
linux
{$else}
unix
{$endif}
;
{ OS - independent class implementations are in /inc directory. } { OS - independent class implementations are in /inc directory. }
{$i classes.inc} {$i classes.inc}
@ -50,7 +55,10 @@ finalization
end. end.
{ {
$Log$ $Log$
Revision 1.3 2001-01-21 20:45:09 marco Revision 1.4 2001-04-08 11:26:03 peter
* update so it can be compiled by both 1.0.x and 1.1
Revision 1.3 2001/01/21 20:45:09 marco
* Rename fest II FCL version. * Rename fest II FCL version.
Revision 1.2 2000/10/26 22:30:21 peter Revision 1.2 2000/10/26 22:30:21 peter

View File

@ -14,7 +14,13 @@
**********************************************************************} **********************************************************************}
uses Unix; uses
{$ifdef ver1_0}
Linux
{$else}
Unix
{$endif}
;
Function TProcess.GetRunning : Boolean; Function TProcess.GetRunning : Boolean;
@ -106,7 +112,10 @@ end;
{ {
$Log$ $Log$
Revision 1.3 2001-01-21 20:45:09 marco Revision 1.4 2001-04-08 11:26:03 peter
* update so it can be compiled by both 1.0.x and 1.1
Revision 1.3 2001/01/21 20:45:09 marco
* Rename fest II FCL version. * Rename fest II FCL version.
Revision 1.2 2000/10/26 22:30:21 peter Revision 1.2 2000/10/26 22:30:21 peter

View File

@ -217,7 +217,7 @@ var
P: Integer; P: Integer;
I: TThreadPriority; I: TThreadPriority;
begin begin
P := Unix.GetPriority(Prio_Process,FHandle); P := {$ifdef ver1_0}Linux{$else}Unix{$endif}.GetPriority(Prio_Process,FHandle);
Result := tpNormal; Result := tpNormal;
for I := Low(TThreadPriority) to High(TThreadPriority) do for I := Low(TThreadPriority) to High(TThreadPriority) do
if Priorities[I] = P then if Priorities[I] = P then
@ -227,7 +227,7 @@ end;
procedure TThread.SetPriority(Value: TThreadPriority); procedure TThread.SetPriority(Value: TThreadPriority);
begin begin
Unix.SetPriority(Prio_Process,FHandle, Priorities[Value]); {$ifdef ver1_0}Linux{$else}Unix{$endif}.SetPriority(Prio_Process,FHandle, Priorities[Value]);
end; end;
@ -283,7 +283,10 @@ end;
{ {
$Log$ $Log$
Revision 1.3 2001-01-21 20:45:09 marco Revision 1.4 2001-04-08 11:26:03 peter
* update so it can be compiled by both 1.0.x and 1.1
Revision 1.3 2001/01/21 20:45:09 marco
* Rename fest II FCL version. * Rename fest II FCL version.
Revision 1.2 2000/10/26 22:30:21 peter Revision 1.2 2000/10/26 22:30:21 peter

View File

@ -144,7 +144,23 @@ type
Implementation Implementation
uses inet,Unix; uses
{$ifdef linux}
{$ifdef ver1_0}
Linux,
{$else}
Unix,
{$endif}
{$endif}
{$ifdef freebsd}
{$ifdef ver1_0}
Linux,
{$else}
Unix,
{$endif}
{$endif}
inet
;
Const Const
SocketWouldBlock = -2; SocketWouldBlock = -2;
@ -497,7 +513,10 @@ end.
{ {
$Log$ $Log$
Revision 1.4 2001-01-21 20:45:09 marco Revision 1.5 2001-04-08 11:26:03 peter
* update so it can be compiled by both 1.0.x and 1.1
Revision 1.4 2001/01/21 20:45:09 marco
* Rename fest II FCL version. * Rename fest II FCL version.
Revision 1.3 2000/11/17 13:40:53 sg Revision 1.3 2000/11/17 13:40:53 sg

View File

@ -32,7 +32,12 @@ uses
implementation implementation
uses uses
Unix; {$ifdef ver1_0}
linux
{$else}
unix
{$endif}
;
{ OS - independent class implementations are in /inc directory. } { OS - independent class implementations are in /inc directory. }
{$i classes.inc} {$i classes.inc}
@ -50,7 +55,10 @@ finalization
end. end.
{ {
$Log$ $Log$
Revision 1.3 2001-01-21 20:45:09 marco Revision 1.4 2001-04-08 11:26:03 peter
* update so it can be compiled by both 1.0.x and 1.1
Revision 1.3 2001/01/21 20:45:09 marco
* Rename fest II FCL version. * Rename fest II FCL version.
Revision 1.2 2000/07/13 11:33:01 michael Revision 1.2 2000/07/13 11:33:01 michael

View File

@ -14,7 +14,13 @@
**********************************************************************} **********************************************************************}
uses Unix; Uses
{$ifdef ver1_0}
Linux
{$else}
Unix
{$endif}
;
Function TProcess.GetRunning : Boolean; Function TProcess.GetRunning : Boolean;
@ -106,7 +112,10 @@ end;
{ {
$Log$ $Log$
Revision 1.3 2001-01-21 20:45:09 marco Revision 1.4 2001-04-08 11:26:03 peter
* update so it can be compiled by both 1.0.x and 1.1
Revision 1.3 2001/01/21 20:45:09 marco
* Rename fest II FCL version. * Rename fest II FCL version.
Revision 1.2 2000/07/13 11:33:01 michael Revision 1.2 2000/07/13 11:33:01 michael

View File

@ -217,7 +217,7 @@ var
P: Integer; P: Integer;
I: TThreadPriority; I: TThreadPriority;
begin begin
P := Unix.GetPriority(Prio_Process,FHandle); P := {$ifdef ver1_0}Linux{$else}Unix{$endif}.GetPriority(Prio_Process,FHandle);
Result := tpNormal; Result := tpNormal;
for I := Low(TThreadPriority) to High(TThreadPriority) do for I := Low(TThreadPriority) to High(TThreadPriority) do
if Priorities[I] = P then if Priorities[I] = P then
@ -227,7 +227,7 @@ end;
procedure TThread.SetPriority(Value: TThreadPriority); procedure TThread.SetPriority(Value: TThreadPriority);
begin begin
Unix.SetPriority(Prio_Process,FHandle, Priorities[Value]); {$ifdef ver1_0}Linux{$else}Unix{$endif}.SetPriority(Prio_Process,FHandle, Priorities[Value]);
end; end;
@ -283,7 +283,10 @@ end;
{ {
$Log$ $Log$
Revision 1.3 2001-01-21 20:45:09 marco Revision 1.4 2001-04-08 11:26:03 peter
* update so it can be compiled by both 1.0.x and 1.1
Revision 1.3 2001/01/21 20:45:09 marco
* Rename fest II FCL version. * Rename fest II FCL version.
Revision 1.2 2000/07/13 11:33:01 michael Revision 1.2 2000/07/13 11:33:01 michael

View File

@ -12,7 +12,13 @@
**********************************************************************} **********************************************************************}
uses Unix,classes; uses
{$ifdef ver1_0}
Linux,
{$else}
Unix,
{$endif}
classes;
const const
MaxHandle = SizeOf(TFDSet) * 8 - 1; MaxHandle = SizeOf(TFDSet) * 8 - 1;
@ -25,7 +31,10 @@ Type
{ {
$Log$ $Log$
Revision 1.3 2001-01-21 20:45:09 marco Revision 1.4 2001-04-08 11:26:03 peter
* update so it can be compiled by both 1.0.x and 1.1
Revision 1.3 2001/01/21 20:45:09 marco
* Rename fest II FCL version. * Rename fest II FCL version.
Revision 1.2 2000/10/26 22:30:21 peter Revision 1.2 2000/10/26 22:30:21 peter

View File

@ -13,7 +13,13 @@
**********************************************************************} **********************************************************************}
Uses Unix; Uses
{$ifdef ver1_0}
Linux
{$else}
Unix
{$endif}
;
{ Declared EXPLICITLY with Ansistring, so NO mistaking is possible } { Declared EXPLICITLY with Ansistring, so NO mistaking is possible }
@ -23,7 +29,7 @@ Var P : Pchar;
begin begin
// Linux version returns pchar. // Linux version returns pchar.
p:=Unix.getenv(EnvVar); p:={$ifdef ver1_0}Linux{$else}Unix{$endif}.getenv(EnvVar);
if P<>nil then if P<>nil then
getenv:=strpas(p) getenv:=strpas(p)
else else
@ -32,7 +38,10 @@ end;
{ {
$Log$ $Log$
Revision 1.3 2001-01-21 20:45:09 marco Revision 1.4 2001-04-08 11:26:03 peter
* update so it can be compiled by both 1.0.x and 1.1
Revision 1.3 2001/01/21 20:45:09 marco
* Rename fest II FCL version. * Rename fest II FCL version.
Revision 1.2 2000/10/26 22:30:21 peter Revision 1.2 2000/10/26 22:30:21 peter

View File

@ -14,7 +14,13 @@
**********************************************************************} **********************************************************************}
uses Unix; Uses
{$ifdef ver1_0}
Linux
{$else}
Unix
{$endif}
;
Function CreatePipeHandles (Var Inhandle,OutHandle : Longint) : Boolean; Function CreatePipeHandles (Var Inhandle,OutHandle : Longint) : Boolean;
@ -24,7 +30,10 @@ end;
{ {
$Log$ $Log$
Revision 1.3 2001-01-21 20:45:09 marco Revision 1.4 2001-04-08 11:26:03 peter
* update so it can be compiled by both 1.0.x and 1.1
Revision 1.3 2001/01/21 20:45:09 marco
* Rename fest II FCL version. * Rename fest II FCL version.
Revision 1.2 2000/10/26 22:30:21 peter Revision 1.2 2000/10/26 22:30:21 peter