* Unix reform

This commit is contained in:
marco 2003-09-14 20:26:18 +00:00
parent 1ecb35ae20
commit 4144f93ce5
4 changed files with 34 additions and 18 deletions

View File

@ -45,7 +45,7 @@ uses
{$ifdef ver1_0} {$ifdef ver1_0}
Linux, Linux,
{$else} {$else}
Unix, BaseUnix,Unix,
{$endif} {$endif}
{$endif} {$endif}
{$endif} {$endif}
@ -106,17 +106,20 @@ begin
{$ifdef has_signal} {$ifdef has_signal}
NewSignal:=SignalHandler({$ifdef fpcprocvar}@{$endif}CatchSignal); NewSignal:=SignalHandler({$ifdef fpcprocvar}@{$endif}CatchSignal);
{$ifndef sunos} {$ifndef sunos}
OldSigSegm:=Signal (SIGSEGV,NewSignal); OldSigSegm:={$ifdef VER1_0}Signal{$else}fpSignal{$endif} (SIGSEGV,NewSignal);
{$endif} // lxrun on solaris hooks this for handling linux-calls! {$endif} // lxrun on solaris hooks this for handling linux-calls!
OldSigInt:=Signal (SIGINT,NewSignal); OldSigInt:={$ifdef VER1_0}Signal{$else}fpSignal{$endif} (SIGINT,NewSignal);
OldSigFPE:=Signal (SIGFPE,NewSignal); OldSigFPE:={$ifdef VER1_0}Signal{$else}fpSignal{$endif} (SIGFPE,NewSignal);
{$endif} {$endif}
{$endif nocatch} {$endif nocatch}
end. end.
{ {
$Log$ $Log$
Revision 1.14 2003-09-05 17:41:12 florian Revision 1.15 2003-09-14 20:26:18 marco
* Unix reform
Revision 1.14 2003/09/05 17:41:12 florian
* merged Wiktor's Watcom patches in 1.1 * merged Wiktor's Watcom patches in 1.1
Revision 1.13 2003/04/23 10:10:31 peter Revision 1.13 2003/04/23 10:10:31 peter

View File

@ -37,7 +37,7 @@ interface
{$ifdef ver1_0} {$ifdef ver1_0}
linux, linux,
{$else} {$else}
unix, Baseunix,unix,
{$endif} {$endif}
{$endif} {$endif}
{$ifdef Delphi} {$ifdef Delphi}
@ -968,12 +968,16 @@ implementation
Function GetFileTime ( Var F : File) : Longint; Function GetFileTime ( Var F : File) : Longint;
Var Var
{$ifdef hasunix} {$ifdef hasunix}
Info : Stat; info: Stat;
{$endif} {$endif}
L : longint; L : longint;
begin begin
{$ifdef hasunix} {$ifdef hasunix}
{$IFDEF VER1_0}
FStat (F,Info); FStat (F,Info);
{$ELSE}
FPFStat (F,Info);
{$ENDIF}
L:=Info.Mtime; L:=Info.Mtime;
{$else} {$else}
GetFTime(f,l); GetFTime(f,l);
@ -1158,7 +1162,7 @@ implementation
{$endif} {$endif}
begin begin
{$ifdef hasunix} {$ifdef hasunix}
GetEnvPchar:={$ifdef ver1_0}Linux{$else}Unix{$endif}.Getenv(envname); GetEnvPchar:={$ifdef ver1_0}Linux.getenv{$else}BaseUnix.fpGetEnv{$endif}(envname);
{$define GETENVOK} {$define GETENVOK}
{$endif} {$endif}
{$ifdef win32} {$ifdef win32}
@ -1674,7 +1678,10 @@ implementation
end. end.
{ {
$Log$ $Log$
Revision 1.98 2003-09-14 12:55:06 jonas Revision 1.99 2003-09-14 20:26:18 marco
* Unix reform
Revision 1.98 2003/09/14 12:55:06 jonas
* fixed compilation for non-x86 * fixed compilation for non-x86
Revision 1.97 2003/09/07 22:09:34 peter Revision 1.97 2003/09/07 22:09:34 peter

View File

@ -97,7 +97,7 @@ uses
{$ifdef ver1_0} {$ifdef ver1_0}
Linux, Linux,
{$else} {$else}
Unix, BaseUnix,Unix,
{$endif} {$endif}
{$endif} {$endif}
cutils, cutils,
@ -174,7 +174,7 @@ begin
Close(t); Close(t);
{$ifdef hasUnix} {$ifdef hasUnix}
if executable then if executable then
ChMod(fn,493); {$ifdef VER1_0}ChMod{$else}fpchmod{$endif}(fn,493);
{$endif} {$endif}
end; end;
@ -419,7 +419,10 @@ end;
end. end.
{ {
$Log$ $Log$
Revision 1.21 2003-04-22 14:33:38 peter Revision 1.22 2003-09-14 20:26:18 marco
* Unix reform
Revision 1.21 2003/04/22 14:33:38 peter
* removed some notes/hints * removed some notes/hints
Revision 1.20 2003/02/07 21:21:39 marco Revision 1.20 2003/02/07 21:21:39 marco

View File

@ -28,7 +28,7 @@ uses
{$ifdef ver1_0} {$ifdef ver1_0}
linux, linux,
{$else} {$else}
unix, Baseunix,Unix,
{$endif} {$endif}
{$else unix} {$else unix}
dos, dos,
@ -133,7 +133,7 @@ Var
{$endif} {$endif}
begin begin
{$ifdef unix} {$ifdef unix}
FileExists:=FStat (F,Info); FileExists:={$ifdef VER1_0}FStat{$ELSE}FpStat{$endif} (F,Info){$ifndef VER1_0}=0{$endif};
{$else} {$else}
FindFirst (F,anyfile,Info); FindFirst (F,anyfile,Info);
FileExists:=DosError=0; FileExists:=DosError=0;
@ -473,7 +473,7 @@ begin
Error('Fatal: Library building stage failed.',true); Error('Fatal: Library building stage failed.',true);
{ fix permission to 644, so it's not 755 } { fix permission to 644, so it's not 755 }
{$ifdef unix} {$ifdef unix}
ChMod(OutputFile,420); {$ifdef VER1_0}ChMod{$ELSE}FPChmod{$endif}(OutputFile,420);
{$endif} {$endif}
{ Rename to the destpath } { Rename to the destpath }
if DestPath<>'' then if DestPath<>'' then
@ -605,7 +605,7 @@ begin
Writeln('Writing pmove'+BatchExt); Writeln('Writing pmove'+BatchExt);
Close(BatchFile); Close(BatchFile);
{$ifdef unix} {$ifdef unix}
ChMod('pmove'+BatchExt,493); {$ifdef VER1_0}ChMod{$ELSE}FPChmod{$endif}('pmove'+BatchExt,493);
{$endif} {$endif}
end; end;
{ The End } { The End }
@ -614,7 +614,10 @@ begin
end. end.
{ {
$Log$ $Log$
Revision 1.5 2002-05-18 13:34:27 peter Revision 1.6 2003-09-14 20:26:18 marco
* Unix reform
Revision 1.5 2002/05/18 13:34:27 peter
* readded missing revisions * readded missing revisions
Revision 1.4 2002/05/16 19:46:54 carl Revision 1.4 2002/05/16 19:46:54 carl