mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-11 10:29:21 +02:00
* fix FPC_USES_LIBC cycling, by fixing libc stat records (both 32 and 64 bit)
git-svn-id: trunk@8018 -
This commit is contained in:
parent
edb6dd6ce4
commit
389ea20704
@ -60,78 +60,119 @@
|
|||||||
|
|
||||||
{$else}
|
{$else}
|
||||||
|
|
||||||
|
// info taken from /usr/include/asm-i386/stat.h you must have some -dev installed for this I think.. or linux-headers
|
||||||
|
|
||||||
{$packrecords C}
|
{$packrecords C}
|
||||||
|
|
||||||
|
{$ifdef fs32bit}
|
||||||
Stat = Record
|
Stat = Record
|
||||||
case byte of
|
case byte of
|
||||||
0:
|
0:(dev: cuLong deprecated;
|
||||||
// kernel <->libc
|
ino: cuLong deprecated;
|
||||||
(dev : dev_t deprecated;
|
mode: cuShort deprecated;
|
||||||
pad1 : word deprecated;
|
nlink: cuShort deprecated;
|
||||||
{$ifdef fs32bit}
|
uid: cuShort deprecated;
|
||||||
ino : ino_t deprecated;
|
gid: cuShort deprecated;
|
||||||
{$else}
|
rdev: cuLong deprecated;
|
||||||
__ino : ino_t deprecated;
|
size: cuLong deprecated;
|
||||||
{$endif}
|
blksize: cuLong deprecated;
|
||||||
mode : mode_t deprecated;
|
blocks: cuLong deprecated;
|
||||||
nlink : nlink_t deprecated;
|
atime: cuLong deprecated;
|
||||||
uid : uid_t deprecated;
|
atime_nsec: cuLong deprecated;
|
||||||
gid : gid_t deprecated;
|
mtime: cuLong deprecated;
|
||||||
rdev : dev_t deprecated;
|
mtime_nsec: cuLong deprecated;
|
||||||
pad2 : word deprecated;
|
ctime: cuLong deprecated;
|
||||||
size : off_t deprecated;
|
ctime_nsec: cuLong deprecated;
|
||||||
blksize : blksize_t deprecated;
|
__unused4: cuLong deprecated;
|
||||||
{$ifdef fs32bit}
|
__unused5: cuLong deprecated);
|
||||||
blocks : blkcnt_t deprecated;
|
|
||||||
{$else}
|
1:(st_dev: cuLong;
|
||||||
blocks : blkcnt64_t deprecated;
|
st_ino: cuLong;
|
||||||
{$endif}
|
st_mode: cuShort;
|
||||||
atime : cardinal deprecated;
|
st_nlink: cuShort;
|
||||||
atime_nsec : cardinal deprecated;
|
st_uid: cuShort;
|
||||||
mtime : cardinal deprecated;
|
st_gid: cuShort;
|
||||||
mtime_nsec : cardinal deprecated;
|
st_rdev: cuLong;
|
||||||
ctime : cardinal deprecated;
|
st_size: cuLong;
|
||||||
ctime_nsec : cardinal deprecated;
|
st_blksize: cuLong;
|
||||||
{$ifdef fs32bit}
|
st_blocks: cuLong;
|
||||||
unused4 : cardinal deprecated;
|
st_atime: cuLong;
|
||||||
unused5 : cardinal deprecated;
|
st_atime_nsec: cuLong;
|
||||||
{$else}
|
st_mtime: cuLong;
|
||||||
ino : ino64_t deprecated;
|
st_mtime_nsec: cuLong;
|
||||||
{$endif});
|
st_ctime: cuLong;
|
||||||
1:
|
st_ctime_nsec: cuLong;
|
||||||
// kernel <->libc
|
__unused4_: cuLong;
|
||||||
(st_dev : dev_t;
|
__unused5_: cuLong);
|
||||||
pad1_ : word;
|
|
||||||
{$ifdef fs32bit}
|
|
||||||
st_ino : ino_t;
|
|
||||||
{$else}
|
|
||||||
__st_ino : ino_t;
|
|
||||||
{$endif}
|
|
||||||
st_mode : mode_t;
|
|
||||||
st_nlink : nlink_t;
|
|
||||||
st_uid : uid_t;
|
|
||||||
st_gid : gid_t;
|
|
||||||
st_rdev : dev_t;
|
|
||||||
pad2_ : word;
|
|
||||||
st_size : off_t;
|
|
||||||
st_blksize : blksize_t;
|
|
||||||
{$ifdef fs32bit}
|
|
||||||
st_blocks : blkcnt_t;
|
|
||||||
{$else}
|
|
||||||
st_blocks : blkcnt64_t;
|
|
||||||
{$endif}
|
|
||||||
st_atime,
|
|
||||||
st_atime_nsec,
|
|
||||||
st_mtime,
|
|
||||||
st_mtime_nsec,
|
|
||||||
st_ctime,
|
|
||||||
st_ctime_nsec : culong;
|
|
||||||
{$ifdef fs32bit}
|
|
||||||
unused4_, unused5_: culong;
|
|
||||||
{$else}
|
|
||||||
st_ino : ino64_t;
|
|
||||||
{$endif});
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$else} // 64 bit stat
|
||||||
|
|
||||||
|
Stat = record
|
||||||
|
case Byte of
|
||||||
|
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;
|
||||||
|
|
||||||
|
__st_ino: cuLong;
|
||||||
|
|
||||||
|
st_mode: cuInt;
|
||||||
|
st_nlink: cuInt;
|
||||||
|
|
||||||
|
st_uid: cuLong;
|
||||||
|
st_gid: cuLong;
|
||||||
|
|
||||||
|
st_rdev: cuLongLong;
|
||||||
|
__pad3_: array[0..3] of cuChar;
|
||||||
|
|
||||||
|
st_size: cLongLong;
|
||||||
|
st_blksize: cuLong;
|
||||||
|
|
||||||
|
st_blocks: cuLongLong; //* Number 512-byte blocks allocated. */
|
||||||
|
|
||||||
|
st_atime: cuLong;
|
||||||
|
st_atime_nsec: cuLong;
|
||||||
|
|
||||||
|
st_mtime: cuLong;
|
||||||
|
st_mtime_nsec: cuInt;
|
||||||
|
|
||||||
|
st_ctime: cuLong;
|
||||||
|
st_ctime_nsec: cuLong;
|
||||||
|
|
||||||
|
st_ino: cuLongLong);
|
||||||
|
end;
|
||||||
|
|
||||||
|
{$endif}
|
||||||
|
|
||||||
|
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user