mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-06 09:58:29 +02:00
* the stat type is processor-dependent
* the dev_t tpye is processor dependent. Don't use it in the stat type however, as that one is also used at a time where dev_t is already defined as qword
This commit is contained in:
parent
137395876d
commit
54015aaf6e
@ -57,29 +57,13 @@ TYPE
|
|||||||
TUtsName = UtsName;
|
TUtsName = UtsName;
|
||||||
PUtsName = TUtsName;
|
PUtsName = TUtsName;
|
||||||
|
|
||||||
Stat = Packed Record // No unix typing because of differences
|
|
||||||
// kernel <->libc
|
{ Definition of (kernel) stat type }
|
||||||
st_dev : word;
|
{ see kernel/include/asm-<cpu>/stat.h, include/linux/types.h and }
|
||||||
pad1 : word;
|
{ include /include/asm-<cpu>/posix-types.h }
|
||||||
st_ino : longint;
|
|
||||||
st_mode,
|
{$i stat.inc}
|
||||||
nlink,
|
|
||||||
uid,
|
|
||||||
gid : word;
|
|
||||||
rdev : word;
|
|
||||||
pad2 : word;
|
|
||||||
st_size,
|
|
||||||
blksze,
|
|
||||||
blocks,
|
|
||||||
atime,
|
|
||||||
unused1,
|
|
||||||
mtime,
|
|
||||||
unused2,
|
|
||||||
ctime,
|
|
||||||
unused3,
|
|
||||||
unused4,
|
|
||||||
unused5 : longint;
|
|
||||||
end;
|
|
||||||
TStat = Stat;
|
TStat = Stat;
|
||||||
PStat = ^Stat;
|
PStat = ^Stat;
|
||||||
|
|
||||||
@ -262,7 +246,13 @@ CONST
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.1 2002-12-18 16:43:26 marco
|
Revision 1.2 2003-05-15 22:50:50 jonas
|
||||||
|
* the stat type is processor-dependent
|
||||||
|
* the dev_t tpye is processor dependent. Don't use it in the stat type
|
||||||
|
however, as that one is also used at a time where dev_t is already
|
||||||
|
defined as qword
|
||||||
|
|
||||||
|
Revision 1.1 2002/12/18 16:43:26 marco
|
||||||
* new unix rtl, linux part.....
|
* new unix rtl, linux part.....
|
||||||
|
|
||||||
Revision 1.1 2002/11/12 14:37:59 marco
|
Revision 1.1 2002/11/12 14:37:59 marco
|
||||||
|
71
rtl/linux/i386/stat.inc
Normal file
71
rtl/linux/i386/stat.inc
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
{
|
||||||
|
$Id$
|
||||||
|
This file is part of the Free Pascal run time library.
|
||||||
|
Copyright (c) 1999-2000 by Jonas Maebe,
|
||||||
|
member of the Free Pascal development team.
|
||||||
|
|
||||||
|
See the file COPYING.FPC, included in this distribution,
|
||||||
|
for details about the copyright.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
**********************************************************************}
|
||||||
|
|
||||||
|
Stat = Packed Record // No unix typing because of differences
|
||||||
|
// kernel <->libc
|
||||||
|
case byte of
|
||||||
|
0: (st_dev : word;
|
||||||
|
pad1 : word;
|
||||||
|
st_ino : longint;
|
||||||
|
st_mode,
|
||||||
|
nlink,
|
||||||
|
uid,
|
||||||
|
gid : word;
|
||||||
|
rdev : word;
|
||||||
|
pad2 : word;
|
||||||
|
st_size,
|
||||||
|
st_blksze,
|
||||||
|
st_blocks,
|
||||||
|
st_atime,
|
||||||
|
unused1,
|
||||||
|
st_mtime,
|
||||||
|
unused2,
|
||||||
|
st_ctime,
|
||||||
|
unused3,
|
||||||
|
unused4,
|
||||||
|
unused5 : longint;);
|
||||||
|
1: (
|
||||||
|
dev : word;
|
||||||
|
pad1_dummy : word;
|
||||||
|
ino : longint;
|
||||||
|
mode,
|
||||||
|
nlink_dummy,
|
||||||
|
uid_dummy,
|
||||||
|
gid_dummy : word;
|
||||||
|
rdev_dummy : word;
|
||||||
|
pad2_dummy : word;
|
||||||
|
size,
|
||||||
|
blksze,
|
||||||
|
blocks,
|
||||||
|
atime,
|
||||||
|
unused1_dummy,
|
||||||
|
mtime,
|
||||||
|
unused2_dummy,
|
||||||
|
ctime,
|
||||||
|
unused3_dummy,
|
||||||
|
unused4_dummy,
|
||||||
|
unused5_dummy : longint;
|
||||||
|
);
|
||||||
|
end;
|
||||||
|
|
||||||
|
{
|
||||||
|
$Log$
|
||||||
|
Revision 1.1 2003-05-15 22:50:50 jonas
|
||||||
|
* the stat type is processor-dependent
|
||||||
|
* the dev_t tpye is processor dependent. Don't use it in the stat type
|
||||||
|
however, as that one is also used at a time where dev_t is already
|
||||||
|
defined as qword
|
||||||
|
|
||||||
|
}
|
71
rtl/linux/m68k/stat.inc
Normal file
71
rtl/linux/m68k/stat.inc
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
{
|
||||||
|
$Id$
|
||||||
|
This file is part of the Free Pascal run time library.
|
||||||
|
Copyright (c) 1999-2000 by Jonas Maebe,
|
||||||
|
member of the Free Pascal development team.
|
||||||
|
|
||||||
|
See the file COPYING.FPC, included in this distribution,
|
||||||
|
for details about the copyright.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
**********************************************************************}
|
||||||
|
|
||||||
|
Stat = Packed Record // No unix typing because of differences
|
||||||
|
// kernel <->libc
|
||||||
|
case byte of
|
||||||
|
0: (st_dev : word;
|
||||||
|
pad1 : word;
|
||||||
|
st_ino : longint;
|
||||||
|
st_mode,
|
||||||
|
nlink,
|
||||||
|
uid,
|
||||||
|
gid : word;
|
||||||
|
rdev : word;
|
||||||
|
pad2 : word;
|
||||||
|
st_size,
|
||||||
|
st_blksze,
|
||||||
|
st_blocks,
|
||||||
|
st_atime,
|
||||||
|
unused1,
|
||||||
|
st_mtime,
|
||||||
|
unused2,
|
||||||
|
st_ctime,
|
||||||
|
unused3,
|
||||||
|
unused4,
|
||||||
|
unused5 : longint;);
|
||||||
|
1: (
|
||||||
|
dev : word;
|
||||||
|
pad1_dummy : word;
|
||||||
|
ino : longint;
|
||||||
|
mode,
|
||||||
|
nlink_dummy,
|
||||||
|
uid_dummy,
|
||||||
|
gid_dummy : word;
|
||||||
|
rdev_dummy : word;
|
||||||
|
pad2_dummy : word;
|
||||||
|
size,
|
||||||
|
blksze,
|
||||||
|
blocks,
|
||||||
|
atime,
|
||||||
|
unused1_dummy,
|
||||||
|
mtime,
|
||||||
|
unused2_dummy,
|
||||||
|
ctime,
|
||||||
|
unused3_dummy,
|
||||||
|
unused4_dummy,
|
||||||
|
unused5_dummy : longint;
|
||||||
|
);
|
||||||
|
end;
|
||||||
|
|
||||||
|
{
|
||||||
|
$Log$
|
||||||
|
Revision 1.1 2003-05-15 22:50:50 jonas
|
||||||
|
* the stat type is processor-dependent
|
||||||
|
* the dev_t tpye is processor dependent. Don't use it in the stat type
|
||||||
|
however, as that one is also used at a time where dev_t is already
|
||||||
|
defined as qword
|
||||||
|
|
||||||
|
}
|
69
rtl/linux/powerpc/stat.inc
Normal file
69
rtl/linux/powerpc/stat.inc
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
{
|
||||||
|
$Id$
|
||||||
|
This file is part of the Free Pascal run time library.
|
||||||
|
Copyright (c) 1999-2000 by Jonas Maebe,
|
||||||
|
member of the Free Pascal development team.
|
||||||
|
|
||||||
|
See the file COPYING.FPC, included in this distribution,
|
||||||
|
for details about the copyright.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
**********************************************************************}
|
||||||
|
|
||||||
|
{ note: NO packed record, C also inserts padding after the nlink field! }
|
||||||
|
Stat = Record // No unix typing because of differences
|
||||||
|
case byte of
|
||||||
|
0: (st_dev : cardinal;
|
||||||
|
st_ino,
|
||||||
|
st_mode : cardinal;
|
||||||
|
nlink : word;
|
||||||
|
uid,
|
||||||
|
gid,
|
||||||
|
rdev : cardinal;
|
||||||
|
st_size : longint;
|
||||||
|
st_blksize,
|
||||||
|
st_blocks,
|
||||||
|
st_atime,
|
||||||
|
__unused1,
|
||||||
|
st_mtime,
|
||||||
|
__unused2,
|
||||||
|
st_ctime,
|
||||||
|
__unused3,
|
||||||
|
__unused4,
|
||||||
|
__unused5 : cardinal;);
|
||||||
|
1: (
|
||||||
|
dev : cardinal;
|
||||||
|
pad1 : word;
|
||||||
|
ino : longint;
|
||||||
|
mode,
|
||||||
|
nlink_dummy,
|
||||||
|
uid_dummy,
|
||||||
|
gid_dummy : word;
|
||||||
|
rdev_dummy : dev_t;
|
||||||
|
pad2_dummy : word;
|
||||||
|
size,
|
||||||
|
blksze,
|
||||||
|
blocks,
|
||||||
|
atime,
|
||||||
|
unused1_dummy,
|
||||||
|
mtime,
|
||||||
|
unused2_dummy,
|
||||||
|
ctime,
|
||||||
|
unused3_dummy,
|
||||||
|
unused4_dummy,
|
||||||
|
unused5_dummy : longint;
|
||||||
|
);
|
||||||
|
end;
|
||||||
|
|
||||||
|
{
|
||||||
|
$Log$
|
||||||
|
Revision 1.1 2003-05-15 22:50:51 jonas
|
||||||
|
* the stat type is processor-dependent
|
||||||
|
* the dev_t tpye is processor dependent. Don't use it in the stat type
|
||||||
|
however, as that one is also used at a time where dev_t is already
|
||||||
|
defined as qword
|
||||||
|
|
||||||
|
}
|
@ -57,30 +57,25 @@ type
|
|||||||
end;
|
end;
|
||||||
PDir =^TDir;
|
PDir =^TDir;
|
||||||
|
|
||||||
|
{ can't put definition in stat.inc because stat.inc is also included in }
|
||||||
|
{ bunxtype.inc, which is used together with ptypes.inc, which defines }
|
||||||
|
{ def_t in another way :( }
|
||||||
|
{$ifdef i386}
|
||||||
dev_t = word;
|
dev_t = word;
|
||||||
|
{$else i386}
|
||||||
|
{$ifdef m68k}
|
||||||
|
dev_t = word;
|
||||||
|
{$else m68k}
|
||||||
|
{$ifdef powerpc}
|
||||||
|
dev_t = cardinal;
|
||||||
|
{$else powerpc}
|
||||||
|
{$error dev_t unknown for this processor}
|
||||||
|
{$endif powerpc}
|
||||||
|
{$endif m68k}
|
||||||
|
{$endif i386}
|
||||||
|
|
||||||
Stat = packed record
|
{ definition of stat record type }
|
||||||
dev : dev_t;
|
{$i stat.inc}
|
||||||
pad1 : word;
|
|
||||||
ino : longint;
|
|
||||||
mode,
|
|
||||||
nlink,
|
|
||||||
uid,
|
|
||||||
gid : word;
|
|
||||||
rdev : dev_t;
|
|
||||||
pad2 : word;
|
|
||||||
size,
|
|
||||||
blksze,
|
|
||||||
blocks,
|
|
||||||
atime,
|
|
||||||
unused1,
|
|
||||||
mtime,
|
|
||||||
unused2,
|
|
||||||
ctime,
|
|
||||||
unused3,
|
|
||||||
unused4,
|
|
||||||
unused5 : longint;
|
|
||||||
end;
|
|
||||||
PStat=^Stat;
|
PStat=^Stat;
|
||||||
TStat=Stat;
|
TStat=Stat;
|
||||||
|
|
||||||
@ -131,10 +126,17 @@ type
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.7 2002-09-07 16:01:20 peter
|
Revision 1.8 2003-05-15 22:50:50 jonas
|
||||||
|
* the stat type is processor-dependent
|
||||||
|
* the dev_t tpye is processor dependent. Don't use it in the stat type
|
||||||
|
however, as that one is also used at a time where dev_t is already
|
||||||
|
defined as qword
|
||||||
|
|
||||||
|
Revision 1.7 2002/09/07 16:01:20 peter
|
||||||
* old logs removed and tabs fixed
|
* old logs removed and tabs fixed
|
||||||
|
|
||||||
Revision 1.6 2002/07/29 17:50:02 florian
|
Revision 1.6 2002/07/29 17:50:02 florian
|
||||||
+ added register location description for ppc
|
+ added register location description for ppc
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user