mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 21:49:11 +02:00
--- Merging r39644 into '.':
U rtl/linux/arm/stat.inc U rtl/linux/m68k/stat.inc U rtl/linux/aarch64/stat.inc U rtl/linux/powerpc64/stat.inc U rtl/linux/i386/stat.inc U rtl/linux/x86_64/stat.inc --- Recording mergeinfo for merge of r39644 into '.': U . --- Merging r39651 into '.': U packages/fcl-process/src/process.pp U packages/fcl-process/src/processunicode.pp U packages/fcl-process/src/processbody.inc --- Recording mergeinfo for merge of r39651 into '.': G . --- Merging r39655 into '.': U rtl/linux/powerpc/stat.inc --- Recording mergeinfo for merge of r39655 into '.': G . # revisions: 39644,39651,39655 git-svn-id: branches/fixes_3_2@39656 -
This commit is contained in:
parent
6c18952679
commit
f53309b61c
@ -40,6 +40,13 @@ Type
|
|||||||
|
|
||||||
TProcessOptions = set of TProcessOption;
|
TProcessOptions = set of TProcessOption;
|
||||||
TStartupOptions = set of TStartupOption;
|
TStartupOptions = set of TStartupOption;
|
||||||
|
TRunCommandEventCode = (RunCommandIdle,RunCommandReadOutput,RunCommandFinished,RunCommandException);
|
||||||
|
TOnRunCommandEvent = procedure(Sender,Context : TObject;Status:TRunCommandEventCode;const Message:string) of object;
|
||||||
|
EProcess = Class(Exception);
|
||||||
|
|
||||||
|
{$ifdef UNIX}
|
||||||
|
TProcessForkEvent = procedure(Sender : TObject) of object;
|
||||||
|
{$endif UNIX}
|
||||||
|
|
||||||
{$macro on}
|
{$macro on}
|
||||||
{define processunicodestring}
|
{define processunicodestring}
|
||||||
|
@ -40,13 +40,6 @@ Type
|
|||||||
TProcessStringList = TStringList;
|
TProcessStringList = TStringList;
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
{$ifdef UNIX}
|
|
||||||
TProcessForkEvent = procedure(Sender : TObject) of object;
|
|
||||||
{$endif UNIX}
|
|
||||||
|
|
||||||
TRunCommandEventCode = (RunCommandIdle,RunCommandFinished,RunCommandException);
|
|
||||||
TOnRunCommandEvent = procedure(Sender : TObject;Status:TRunCommandEventCode;const Message:string) of object;
|
|
||||||
|
|
||||||
{ TProcess }
|
{ TProcess }
|
||||||
|
|
||||||
TProcessnamemacro = Class (TComponent)
|
TProcessnamemacro = Class (TComponent)
|
||||||
@ -103,7 +96,7 @@ Type
|
|||||||
procedure SetEnvironment(const Value: TProcessStrings);
|
procedure SetEnvironment(const Value: TProcessStrings);
|
||||||
Procedure ConvertCommandLine;
|
Procedure ConvertCommandLine;
|
||||||
function PeekExitStatus: Boolean;
|
function PeekExitStatus: Boolean;
|
||||||
Procedure IntOnIdleSleep(Sender : TObject;Status:TRunCommandEventCode;const Message:String);
|
Procedure IntOnIdleSleep(Sender,Context : TObject;Status:TRunCommandEventCode;const Message:String);
|
||||||
Protected
|
Protected
|
||||||
FRunning : Boolean;
|
FRunning : Boolean;
|
||||||
FExitCode : Cardinal;
|
FExitCode : Cardinal;
|
||||||
@ -174,7 +167,6 @@ Type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
TProcessClass = Class of TProcessnamemacro;
|
TProcessClass = Class of TProcessnamemacro;
|
||||||
EProcess = Class(Exception);
|
|
||||||
|
|
||||||
Procedure CommandToList(S : TProcessString; List : TProcessStrings);
|
Procedure CommandToList(S : TProcessString; List : TProcessStrings);
|
||||||
|
|
||||||
@ -532,7 +524,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TProcessnamemacro.IntOnIdleSleep(Sender : TObject;status:TRunCommandEventCode;const message:string);
|
procedure TProcessnamemacro.IntOnIdleSleep(Sender,Context : TObject;status:TRunCommandEventCode;const message:string);
|
||||||
begin
|
begin
|
||||||
if status=RunCommandIdle then
|
if status=RunCommandIdle then
|
||||||
sleep(FRunCommandSleepTime);
|
sleep(FRunCommandSleepTime);
|
||||||
@ -571,7 +563,7 @@ begin
|
|||||||
gotoutputstderr:=ReadInputStream(StdErr,StdErrBytesRead,StdErrLength,StdErrString,1);
|
gotoutputstderr:=ReadInputStream(StdErr,StdErrBytesRead,StdErrLength,StdErrString,1);
|
||||||
|
|
||||||
if not gotoutput and not gotoutputstderr and Assigned(FOnRunCommandEvent) Then
|
if not gotoutput and not gotoutputstderr and Assigned(FOnRunCommandEvent) Then
|
||||||
FOnRunCommandEvent(self,RunCommandIdle,'');
|
FOnRunCommandEvent(self,Nil,RunCommandIdle,'');
|
||||||
end;
|
end;
|
||||||
// Get left output after end of execution
|
// Get left output after end of execution
|
||||||
ReadInputStream(output,BytesRead,OutputLength,OutputString,250);
|
ReadInputStream(output,BytesRead,OutputLength,OutputString,250);
|
||||||
@ -582,7 +574,7 @@ begin
|
|||||||
anexitstatus:=exitstatus;
|
anexitstatus:=exitstatus;
|
||||||
result:=0; // we came to here, document that.
|
result:=0; // we came to here, document that.
|
||||||
if Assigned(FOnRunCommandEvent) then // allow external apps to react to that and finish GUI
|
if Assigned(FOnRunCommandEvent) then // allow external apps to react to that and finish GUI
|
||||||
FOnRunCommandEvent(self,RunCommandFinished,'');
|
FOnRunCommandEvent(self,Nil,RunCommandFinished,'');
|
||||||
|
|
||||||
except
|
except
|
||||||
on e : Exception do
|
on e : Exception do
|
||||||
@ -591,7 +583,7 @@ begin
|
|||||||
setlength(outputstring,BytesRead);
|
setlength(outputstring,BytesRead);
|
||||||
setlength(stderrstring,StderrBytesRead);
|
setlength(stderrstring,StderrBytesRead);
|
||||||
if Assigned(FOnRunCommandEvent) then
|
if Assigned(FOnRunCommandEvent) then
|
||||||
FOnRunCommandEvent(self,RunCommandException,e.Message);
|
FOnRunCommandEvent(self,Nil,RunCommandException,e.Message);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -29,10 +29,17 @@ Type
|
|||||||
TProcessPriority = process.TProcessPriority;
|
TProcessPriority = process.TProcessPriority;
|
||||||
TProcessOptions = process.TProcessOptions;
|
TProcessOptions = process.TProcessOptions;
|
||||||
TStartupOptions = process.TStartupOptions;
|
TStartupOptions = process.TStartupOptions;
|
||||||
|
{$ifdef UNIX}
|
||||||
|
TProcessForkEvent = Process.TProcessForkEvent;
|
||||||
|
{$endif UNIX}
|
||||||
|
|
||||||
|
TRunCommandEventCode = Process.TRunCommandEventCode;
|
||||||
|
TOnRunCommandEvent = Process.TOnRunCommandEvent;
|
||||||
|
EProcess = Process.EProcess;
|
||||||
|
|
||||||
{$macro on}
|
{$macro on}
|
||||||
{$define processunicodestring}
|
{$define processunicodestring}
|
||||||
{$define TProcessnamemacro:=TProcessUnicode}
|
{$define TProcessnamemacro:=TProcess}
|
||||||
|
|
||||||
{$i processbody.inc}
|
{$i processbody.inc}
|
||||||
end.
|
end.
|
||||||
|
@ -24,8 +24,6 @@
|
|||||||
|
|
||||||
{$PACKRECORDS C}
|
{$PACKRECORDS C}
|
||||||
stat = record
|
stat = record
|
||||||
case integer of
|
|
||||||
0 : (
|
|
||||||
st_dev : cULong;
|
st_dev : cULong;
|
||||||
st_ino : cULong;
|
st_ino : cULong;
|
||||||
st_mode : cUInt;
|
st_mode : cUInt;
|
||||||
@ -46,27 +44,4 @@
|
|||||||
st_ctime_nsec : cULong;
|
st_ctime_nsec : cULong;
|
||||||
__unused4a : cUInt;
|
__unused4a : cUInt;
|
||||||
__unused5a : cUInt;
|
__unused5a : cUInt;
|
||||||
);
|
|
||||||
1 : (
|
|
||||||
dev : cULong deprecated;
|
|
||||||
ino : cULong deprecated;
|
|
||||||
mode : cUInt deprecated;
|
|
||||||
nlink : cUInt deprecated;
|
|
||||||
uid : cUInt deprecated;
|
|
||||||
gid : cUInt deprecated;
|
|
||||||
rdev : cULong deprecated;
|
|
||||||
__pad1b : cULong deprecated;
|
|
||||||
size : cLong deprecated;
|
|
||||||
blksize : cInt deprecated;
|
|
||||||
__pad2b : cInt deprecated;
|
|
||||||
blocks : cLong deprecated;
|
|
||||||
atime : cLong deprecated;
|
|
||||||
atime_nsec : cULong deprecated;
|
|
||||||
mtime : cLong deprecated;
|
|
||||||
mtime_nsec : cULong deprecated;
|
|
||||||
ctime : cLong deprecated;
|
|
||||||
ctime_nsec : cULong deprecated;
|
|
||||||
__unused4b : cUInt deprecated;
|
|
||||||
__unused5b : cUInt deprecated;
|
|
||||||
);
|
|
||||||
end;
|
end;
|
||||||
|
@ -13,29 +13,7 @@
|
|||||||
**********************************************************************}
|
**********************************************************************}
|
||||||
|
|
||||||
Stat = record // No unix typing because of differences
|
Stat = record // No unix typing because of differences
|
||||||
case byte of
|
st_dev : culonglong;
|
||||||
0:
|
|
||||||
(dev : culonglong deprecated;
|
|
||||||
__pad0 : array[0..3] of cuchar deprecated;
|
|
||||||
__st_ino : culong deprecated;
|
|
||||||
mode : cuint deprecated;
|
|
||||||
nlink : cuint deprecated;
|
|
||||||
uid : culong deprecated;
|
|
||||||
gid : culong deprecated;
|
|
||||||
rdev : culonglong deprecated;
|
|
||||||
__pad3 : array[0..3] of cuchar deprecated;
|
|
||||||
size : culonglong deprecated;
|
|
||||||
blksize: culong deprecated;
|
|
||||||
blocks : culonglong deprecated;
|
|
||||||
atime : culong deprecated;
|
|
||||||
atime_nsec : culong deprecated;
|
|
||||||
mtime : culong deprecated;
|
|
||||||
mtime_nsec : culong deprecated;
|
|
||||||
ctime : culong deprecated;
|
|
||||||
ctime_nsec : culong deprecated;
|
|
||||||
ino : culonglong deprecated;);
|
|
||||||
1:
|
|
||||||
(st_dev : culonglong;
|
|
||||||
__pad0_ : array[0..3] of cuchar;
|
__pad0_ : array[0..3] of cuchar;
|
||||||
__st_ino_ : culong;
|
__st_ino_ : culong;
|
||||||
st_mode : cuint;
|
st_mode : cuint;
|
||||||
@ -53,6 +31,6 @@
|
|||||||
st_mtime_nsec : culong;
|
st_mtime_nsec : culong;
|
||||||
st_ctime : culong;
|
st_ctime : culong;
|
||||||
st_ctime_nsec : culong;
|
st_ctime_nsec : culong;
|
||||||
st_ino : culonglong);
|
st_ino : culonglong;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -15,29 +15,7 @@
|
|||||||
{$ifndef FPC_USE_LIBC} // kernel record
|
{$ifndef FPC_USE_LIBC} // kernel record
|
||||||
|
|
||||||
Stat = packed record
|
Stat = packed record
|
||||||
case byte of
|
st_dev : qword;
|
||||||
0:
|
|
||||||
(dev : qword deprecated;
|
|
||||||
__pad0 : array[0..3] of byte deprecated;
|
|
||||||
__ino : cardinal deprecated;
|
|
||||||
mode : cardinal deprecated;
|
|
||||||
nlink : cardinal deprecated;
|
|
||||||
uid : cardinal deprecated;
|
|
||||||
gid : cardinal deprecated;
|
|
||||||
rdev : qword deprecated;
|
|
||||||
__pad3 : array[0..3] of byte deprecated;
|
|
||||||
size : qword deprecated;
|
|
||||||
blksize : cardinal deprecated;
|
|
||||||
blocks : qword deprecated;
|
|
||||||
atime : cardinal deprecated;
|
|
||||||
atime_nsec : cardinal deprecated;
|
|
||||||
mtime : cardinal deprecated;
|
|
||||||
mtime_nsec : cardinal deprecated;
|
|
||||||
ctime : cardinal deprecated;
|
|
||||||
ctime_nsec : cardinal deprecated;
|
|
||||||
ino : qword deprecated);
|
|
||||||
1: // Unix typing will be reintroduced.
|
|
||||||
(st_dev : qword;
|
|
||||||
__pad0_ : array[0..3] of byte;
|
__pad0_ : array[0..3] of byte;
|
||||||
__st_ino_,
|
__st_ino_,
|
||||||
st_mode,
|
st_mode,
|
||||||
@ -55,7 +33,7 @@
|
|||||||
st_mtime_nsec,
|
st_mtime_nsec,
|
||||||
st_ctime,
|
st_ctime,
|
||||||
st_ctime_nsec : cardinal;
|
st_ctime_nsec : cardinal;
|
||||||
st_ino : qword);
|
st_ino : qword;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$else}
|
{$else}
|
||||||
@ -66,27 +44,7 @@
|
|||||||
|
|
||||||
{$ifdef fs32bit}
|
{$ifdef fs32bit}
|
||||||
Stat = Record
|
Stat = Record
|
||||||
case byte of
|
st_dev: cuLong;
|
||||||
0:(dev: cuLong deprecated;
|
|
||||||
ino: cuLong deprecated;
|
|
||||||
mode: cuShort deprecated;
|
|
||||||
nlink: cuShort deprecated;
|
|
||||||
uid: cuShort deprecated;
|
|
||||||
gid: cuShort deprecated;
|
|
||||||
rdev: cuLong deprecated;
|
|
||||||
size: cuLong deprecated;
|
|
||||||
blksize: cuLong deprecated;
|
|
||||||
blocks: cuLong deprecated;
|
|
||||||
atime: cuLong deprecated;
|
|
||||||
atime_nsec: cuLong deprecated;
|
|
||||||
mtime: cuLong deprecated;
|
|
||||||
mtime_nsec: cuLong deprecated;
|
|
||||||
ctime: cuLong deprecated;
|
|
||||||
ctime_nsec: cuLong deprecated;
|
|
||||||
__unused4: cuLong deprecated;
|
|
||||||
__unused5: cuLong deprecated);
|
|
||||||
|
|
||||||
1:(st_dev: cuLong;
|
|
||||||
st_ino: cuLong;
|
st_ino: cuLong;
|
||||||
st_mode: cuShort;
|
st_mode: cuShort;
|
||||||
st_nlink: cuShort;
|
st_nlink: cuShort;
|
||||||
@ -103,44 +61,13 @@
|
|||||||
st_ctime: cuLong;
|
st_ctime: cuLong;
|
||||||
st_ctime_nsec: cuLong;
|
st_ctime_nsec: cuLong;
|
||||||
__unused4_: cuLong;
|
__unused4_: cuLong;
|
||||||
__unused5_: cuLong);
|
__unused5_: cuLong;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$else} // 64 bit stat
|
{$else} // 64 bit stat
|
||||||
|
|
||||||
Stat = record
|
Stat = record
|
||||||
case Byte of
|
st_dev: cuLongLong;
|
||||||
0 :(dev: cuLongLong deprecated;
|
|
||||||
__pad0: array[0..3] of cuChar deprecated;
|
|
||||||
|
|
||||||
__ino: cuLong deprecated;
|
|
||||||
|
|
||||||
mode: cuInt deprecated;
|
|
||||||
nlink: cuInt deprecated;
|
|
||||||
|
|
||||||
uid: cuLong deprecated;
|
|
||||||
gid: cuLong deprecated;
|
|
||||||
|
|
||||||
rdev: cuLongLong deprecated;
|
|
||||||
__pad3: array[0..3] of cuChar deprecated;
|
|
||||||
|
|
||||||
size: cLongLong deprecated;
|
|
||||||
blksize: cuLong deprecated;
|
|
||||||
|
|
||||||
blocks: cuLongLong deprecated; //* Number 512-byte blocks allocated. */
|
|
||||||
|
|
||||||
atime: cuLong deprecated;
|
|
||||||
atime_nsec: cuLong deprecated;
|
|
||||||
|
|
||||||
mtime: cuLong deprecated;
|
|
||||||
mtime_nsec: cuInt deprecated;
|
|
||||||
|
|
||||||
ctime: cuLong deprecated;
|
|
||||||
ctime_nsec: cuLong deprecated;
|
|
||||||
|
|
||||||
ino: cuLongLong deprecated);
|
|
||||||
|
|
||||||
1 :(st_dev: cuLongLong;
|
|
||||||
__pad0_: array[0..3] of cuChar;
|
__pad0_: array[0..3] of cuChar;
|
||||||
|
|
||||||
__st_ino: cuLong;
|
__st_ino: cuLong;
|
||||||
@ -168,7 +95,7 @@
|
|||||||
st_ctime: cuLong;
|
st_ctime: cuLong;
|
||||||
st_ctime_nsec: cuLong;
|
st_ctime_nsec: cuLong;
|
||||||
|
|
||||||
st_ino: cuLongLong);
|
st_ino: cuLongLong;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$endif}
|
{$endif}
|
||||||
|
@ -13,29 +13,7 @@
|
|||||||
**********************************************************************}
|
**********************************************************************}
|
||||||
|
|
||||||
Stat = packed record // No unix typing because of differences
|
Stat = packed record // No unix typing because of differences
|
||||||
case byte of
|
st_dev : qword;
|
||||||
0:
|
|
||||||
(dev : qword;
|
|
||||||
__pad0 : array[0..1] of byte;
|
|
||||||
__ino,
|
|
||||||
mode,
|
|
||||||
nlink,
|
|
||||||
uid,
|
|
||||||
gid : cardinal;
|
|
||||||
rdev : qword;
|
|
||||||
__pad3 : array[0..1] of byte;
|
|
||||||
size : qword;
|
|
||||||
blksize : cardinal;
|
|
||||||
blocks : qword;
|
|
||||||
atime,
|
|
||||||
atime_nsec,
|
|
||||||
mtime,
|
|
||||||
mtime_nsec,
|
|
||||||
ctime,
|
|
||||||
ctime_nsec : cardinal;
|
|
||||||
ino : qword);
|
|
||||||
1:
|
|
||||||
(st_dev : qword;
|
|
||||||
__pad0_ : array[0..1] of byte;
|
__pad0_ : array[0..1] of byte;
|
||||||
__st_ino_,
|
__st_ino_,
|
||||||
st_mode,
|
st_mode,
|
||||||
@ -53,5 +31,5 @@
|
|||||||
st_mtime_nsec,
|
st_mtime_nsec,
|
||||||
st_ctime,
|
st_ctime,
|
||||||
st_ctime_nsec : cardinal;
|
st_ctime_nsec : cardinal;
|
||||||
st_ino : qword);
|
st_ino : qword;
|
||||||
end;
|
end;
|
||||||
|
@ -26,30 +26,7 @@
|
|||||||
{$IFNDEF FPC_USE_LIBC}
|
{$IFNDEF FPC_USE_LIBC}
|
||||||
|
|
||||||
Stat = record // No unix typing because of differences
|
Stat = record // No unix typing because of differences
|
||||||
case byte of
|
st_dev : culonglong;
|
||||||
0:
|
|
||||||
(dev : culonglong deprecated;
|
|
||||||
ino : culonglong deprecated;
|
|
||||||
mode : cuint deprecated;
|
|
||||||
nlink : cuint deprecated;
|
|
||||||
uid : cuint deprecated;
|
|
||||||
gid : cuint deprecated;
|
|
||||||
rdev : culonglong deprecated;
|
|
||||||
__pad2 : cushort deprecated;
|
|
||||||
size : clonglong deprecated;
|
|
||||||
blksize: clong deprecated;
|
|
||||||
|
|
||||||
blocks : clonglong deprecated;
|
|
||||||
atime : clong deprecated;
|
|
||||||
atime_nsec : culong deprecated;
|
|
||||||
mtime : clong deprecated;
|
|
||||||
mtime_nsec : culong deprecated;
|
|
||||||
ctime : clong deprecated;
|
|
||||||
__unused3 : culong deprecated;
|
|
||||||
__unused4 : culong deprecated;
|
|
||||||
__unused5 : culong deprecated;);
|
|
||||||
1:
|
|
||||||
(st_dev : culonglong;
|
|
||||||
st_ino : culonglong;
|
st_ino : culonglong;
|
||||||
st_mode : cuint;
|
st_mode : cuint;
|
||||||
st_nlink : cuint;
|
st_nlink : cuint;
|
||||||
@ -68,7 +45,7 @@
|
|||||||
st_ctime : clong;
|
st_ctime : clong;
|
||||||
__unused3_ : culong;
|
__unused3_ : culong;
|
||||||
__unused4_ : culong;
|
__unused4_ : culong;
|
||||||
__unused5_ : culong;);
|
__unused5_ : culong;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$ELSE FPC_USE_LIBC}
|
{$ELSE FPC_USE_LIBC}
|
||||||
@ -78,8 +55,6 @@
|
|||||||
{ i.e. powerpc kernel sources (2.6.20-15) /include/asm-powerpc/stat.h, stat64 struct }
|
{ i.e. powerpc kernel sources (2.6.20-15) /include/asm-powerpc/stat.h, stat64 struct }
|
||||||
|
|
||||||
stat = record
|
stat = record
|
||||||
case byte of
|
|
||||||
0: (
|
|
||||||
st_dev : cULongLong;
|
st_dev : cULongLong;
|
||||||
st_ino : cULongLong;
|
st_ino : cULongLong;
|
||||||
st_mode : cUInt;
|
st_mode : cUInt;
|
||||||
@ -98,27 +73,7 @@
|
|||||||
st_ctime,
|
st_ctime,
|
||||||
st_ctime_nsec,
|
st_ctime_nsec,
|
||||||
__unused4,
|
__unused4,
|
||||||
__unused5 : cULong);
|
__unused5 : cULong;
|
||||||
1: (
|
|
||||||
dev : cULongLong deprecated;
|
|
||||||
ino : cULongLong deprecated;
|
|
||||||
mode : cUInt deprecated;
|
|
||||||
nlink : cUInt deprecated;
|
|
||||||
uid : cUInt deprecated;
|
|
||||||
gid : cUInt deprecated;
|
|
||||||
rdev : cULongLong deprecated;
|
|
||||||
__pad2_: cUShort deprecated;
|
|
||||||
size : cLongLong deprecated;
|
|
||||||
blksize: cInt deprecated;
|
|
||||||
blocks : cULongLong deprecated;
|
|
||||||
atime,
|
|
||||||
__unused1_dummy,
|
|
||||||
mtime,
|
|
||||||
__unused2_dummy,
|
|
||||||
ctime,
|
|
||||||
__unused3_dummy,
|
|
||||||
__unused4_dummy,
|
|
||||||
__unused5_dummy : cULong deprecated);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$ENDIF FPC_USE_LIBC}
|
{$ENDIF FPC_USE_LIBC}
|
||||||
|
@ -24,8 +24,6 @@
|
|||||||
|
|
||||||
{$PACKRECORDS C}
|
{$PACKRECORDS C}
|
||||||
stat = record
|
stat = record
|
||||||
case integer of
|
|
||||||
0 : (
|
|
||||||
st_dev : cULong;
|
st_dev : cULong;
|
||||||
st_ino : cULong; { wrongly defined in RTL? }
|
st_ino : cULong; { wrongly defined in RTL? }
|
||||||
st_nlink : cULong; { wrongly defined in RTL? }
|
st_nlink : cULong; { wrongly defined in RTL? }
|
||||||
@ -45,25 +43,5 @@
|
|||||||
st_mtime_nsec : cULong;
|
st_mtime_nsec : cULong;
|
||||||
st_ctime : cULong;
|
st_ctime : cULong;
|
||||||
st_ctime_nsec : cULong;
|
st_ctime_nsec : cULong;
|
||||||
__unused : array[0..2] of cULong
|
__unused : array[0..2] of cULong;
|
||||||
);
|
|
||||||
1 : (
|
|
||||||
dev : cULong deprecated;
|
|
||||||
ino : cULong deprecated;
|
|
||||||
nlink : cULong deprecated;
|
|
||||||
mode : mode_t deprecated;
|
|
||||||
uid : uid_t deprecated;
|
|
||||||
gid : gid_t deprecated;
|
|
||||||
rdev : cULong deprecated;
|
|
||||||
size : off_t deprecated;
|
|
||||||
blksize,
|
|
||||||
blocks,
|
|
||||||
atime,
|
|
||||||
atime_nsec,
|
|
||||||
mtime,
|
|
||||||
mtime_nsec,
|
|
||||||
ctime,
|
|
||||||
ctime_nsec : cULong deprecated;
|
|
||||||
__unused_dummy : array[0..2] of cULong deprecated;
|
|
||||||
);
|
|
||||||
end;
|
end;
|
||||||
|
@ -15,30 +15,7 @@
|
|||||||
{$ifndef FPC_USE_LIBC} // kernel record
|
{$ifndef FPC_USE_LIBC} // kernel record
|
||||||
|
|
||||||
stat = packed record // No unix typing because of differences
|
stat = packed record // No unix typing because of differences
|
||||||
case byte of
|
st_dev,
|
||||||
0:
|
|
||||||
(dev,
|
|
||||||
ino,
|
|
||||||
nlink : qword deprecated;
|
|
||||||
|
|
||||||
mode,
|
|
||||||
uid,
|
|
||||||
gid,
|
|
||||||
__pad0 : cardinal deprecated;
|
|
||||||
rdev : qword deprecated;
|
|
||||||
size,
|
|
||||||
blksize,
|
|
||||||
blocks : int64 deprecated;
|
|
||||||
|
|
||||||
atime,
|
|
||||||
atime_nsec,
|
|
||||||
mtime,
|
|
||||||
mtime_nsec,
|
|
||||||
ctime,
|
|
||||||
ctime_nsec : qword deprecated;
|
|
||||||
__unused : array[0..2] of qword deprecated);
|
|
||||||
1:
|
|
||||||
(st_dev,
|
|
||||||
st_ino,
|
st_ino,
|
||||||
st_nlink : qword;
|
st_nlink : qword;
|
||||||
|
|
||||||
@ -57,7 +34,7 @@
|
|||||||
st_mtime_nsec,
|
st_mtime_nsec,
|
||||||
st_ctime,
|
st_ctime,
|
||||||
st_ctime_nsec : qword;
|
st_ctime_nsec : qword;
|
||||||
__unused2 : array[0..2] of qword;);
|
__unused2 : array[0..2] of qword;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$else}
|
{$else}
|
||||||
@ -66,29 +43,7 @@
|
|||||||
// god from /usr/include/asm-x86_64 some -dev of linux-headers must be installed
|
// god from /usr/include/asm-x86_64 some -dev of linux-headers must be installed
|
||||||
|
|
||||||
Stat = record
|
Stat = record
|
||||||
case Byte of
|
st_dev: cuLong;
|
||||||
0:(dev: cuLong deprecated;
|
|
||||||
ino: cuLong deprecated;
|
|
||||||
nlink: cuLong deprecated;
|
|
||||||
|
|
||||||
mode: cuInt deprecated;
|
|
||||||
uid: cuInt deprecated;
|
|
||||||
gid: cuInt deprecated;
|
|
||||||
__pad0: cuInt deprecated;
|
|
||||||
rdev: cuLong deprecated;
|
|
||||||
size: cLong deprecated;
|
|
||||||
blksize: cLong deprecated;
|
|
||||||
blocks: cLong deprecated; //* Number 512-byte blocks allocated. */
|
|
||||||
|
|
||||||
atime: cuLong deprecated;
|
|
||||||
atime_nsec: cuLong deprecated;
|
|
||||||
mtime: cuLong deprecated;
|
|
||||||
mtime_nsec: cuLong deprecated;
|
|
||||||
ctime: cuLong deprecated;
|
|
||||||
ctime_nsec: cuLong deprecated;
|
|
||||||
__unused: array[0..2] of cLong deprecated;);
|
|
||||||
|
|
||||||
1:(st_dev: cuLong;
|
|
||||||
st_ino: cuLong;
|
st_ino: cuLong;
|
||||||
st_nlink: cuLong;
|
st_nlink: cuLong;
|
||||||
|
|
||||||
@ -107,7 +62,7 @@
|
|||||||
st_mtime_nsec: cuLong;
|
st_mtime_nsec: cuLong;
|
||||||
st_ctime: cuLong;
|
st_ctime: cuLong;
|
||||||
st_ctime_nsec: cuLong;
|
st_ctime_nsec: cuLong;
|
||||||
__unused2: array[0..2] of cLong);
|
__unused2: array[0..2] of cLong;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$endif}
|
{$endif}
|
||||||
|
Loading…
Reference in New Issue
Block a user