123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- {
- $Id$
- This file is part of the Free Pascal run time library.
- Copyright (c) 1993,97 by Michael Van Canneyt,
- 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.
- **********************************************************************}
- type
- {
- Linux system calls take arguments as follows :
-
- i386/m68k:
- %eax/%d0 : System call number
- %ebx/%d1 : first argument
- %ecx/%d2 : second argument
- %edx/%d3 : third argumens
- %esi/%d3 : fourth argument
- %edi/%d4 : fifth argument
- That is why we define a special type, with only these arguments
- To make it processor independent, we don't give any system dependent
- names, but the rather abstract reg1,reg2 etc;
- }
- SysCallRegs=record
- reg1,reg2,reg3,reg4,reg5,reg6 : longint;
- end;
- { The following are records for system calls }
- {$PACKRECORDS 1}
- dirent =record
- ino,
- off : longint;
- reclen : word;
- name : array [0..255] of char;
- end;
- pdirent =^dirent;
- TDir = record
- fd : integer;
- loc : longint;
- size : integer;
- buf : pdirent;
- {The following are used in libc, but NOT in the linux kernel sources ??}
- nextoff: longint;
- dd_max : integer; {size of buf. Irrelevant, as buf is of type dirent}
- lock : pointer;
- end;
- PDir =^TDir;
- stat =record
- dev,
- pad1 : word;
- ino : longint;
- mode,
- nlink,
- uid,
- gid,
- rdev,
- pad2 : word;
- size,
- blksze,
- blocks,
- atime,
- unused1,
- mtime,
- unused2,
- ctime,
- unused3,
- unused4,
- unused5 : longint;
- end;
- statfs =record
- fstype, { File system type }
- bsize, { Optimal block trensfer size }
- blocks, { Data blocks in system }
- bfree, { free blocks in system }
- bavail, { Available free blocks to non-root users }
- files, { File nodes in system }
- ffree, { Free file nodes in system }
- fsid, { File system ID }
- namelen : longint; { Maximum name length in system }
- spare : array [0..6] of longint; { For later use }
- end;
- fdSet=array[0..7] of longint;{=256 bits}
- pfdset=^fdset;
-
- timeval =record
- sec,usec:longint
- end;
- ptimeval=^timeval;
- timezone =record
- minuteswest,dsttime:longint;
- end;
- ptimezone =^timezone;
- utsname =record
- sysname,
- nodename,
- release,
- version,
- machine,
- domainname : Array[0..64] of char;
- end;
- {
- $Log$
- Revision 1.1 1998-03-25 11:18:43 root
- Initial revision
- Revision 1.5 1998/01/26 12:01:13 michael
- + Added log at the end
-
- Working file: rtl/linux/systypes.inc
- description:
- ----------------------------
- revision 1.4
- date: 1998/01/11 02:53:27; author: michael; state: Exp; lines: +7 -2
- * Corrected small things discovered when making examples.
- ----------------------------
- revision 1.3
- date: 1998/01/08 00:18:12; author: michael; state: Exp; lines: +4 -4
- * Made Dup,Dup2 functions retuning Boolean;
- * Name in Dirent is now Array [0..255] of char instead of string.
- + Implemented OpenDir with string as path, instead of pchar.
- ----------------------------
- revision 1.2
- date: 1997/12/01 12:31:20; author: michael; state: Exp; lines: +14 -0
- + Added copyright reference in header.
- ----------------------------
- revision 1.1
- date: 1997/11/27 08:33:56; author: michael; state: Exp;
- Initial revision
- ----------------------------
- revision 1.1.1.1
- date: 1997/11/27 08:33:56; author: michael; state: Exp; lines: +0 -0
- FPC RTL CVS start
- =============================================================================
- }
|