systypes.inc 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1993,97 by Michael Van Canneyt,
  5. member of the Free Pascal development team.
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. type
  13. {
  14. Linux system calls take arguments as follows :
  15. i386/m68k:
  16. %eax/%d0 : System call number
  17. %ebx/%d1 : first argument
  18. %ecx/%d2 : second argument
  19. %edx/%d3 : third argumens
  20. %esi/%d3 : fourth argument
  21. %edi/%d4 : fifth argument
  22. That is why we define a special type, with only these arguments
  23. To make it processor independent, we don't give any system dependent
  24. names, but the rather abstract reg1,reg2 etc;
  25. }
  26. SysCallRegs=record
  27. reg1,reg2,reg3,reg4,reg5,reg6 : longint;
  28. end;
  29. { The following are records for system calls }
  30. {$PACKRECORDS 1}
  31. dirent =record
  32. ino,
  33. off : longint;
  34. reclen : word;
  35. name : array [0..255] of char;
  36. end;
  37. pdirent =^dirent;
  38. TDir = record
  39. fd : integer;
  40. loc : longint;
  41. size : integer;
  42. buf : pdirent;
  43. {The following are used in libc, but NOT in the linux kernel sources ??}
  44. nextoff: longint;
  45. dd_max : integer; {size of buf. Irrelevant, as buf is of type dirent}
  46. lock : pointer;
  47. end;
  48. PDir =^TDir;
  49. stat =record
  50. dev,
  51. pad1 : word;
  52. ino : longint;
  53. mode,
  54. nlink,
  55. uid,
  56. gid,
  57. rdev,
  58. pad2 : word;
  59. size,
  60. blksze,
  61. blocks,
  62. atime,
  63. unused1,
  64. mtime,
  65. unused2,
  66. ctime,
  67. unused3,
  68. unused4,
  69. unused5 : longint;
  70. end;
  71. statfs =record
  72. fstype, { File system type }
  73. bsize, { Optimal block trensfer size }
  74. blocks, { Data blocks in system }
  75. bfree, { free blocks in system }
  76. bavail, { Available free blocks to non-root users }
  77. files, { File nodes in system }
  78. ffree, { Free file nodes in system }
  79. fsid, { File system ID }
  80. namelen : longint; { Maximum name length in system }
  81. spare : array [0..6] of longint; { For later use }
  82. end;
  83. fdSet=array[0..7] of longint;{=256 bits}
  84. pfdset=^fdset;
  85. timeval =record
  86. sec,usec:longint
  87. end;
  88. ptimeval=^timeval;
  89. timezone =record
  90. minuteswest,dsttime:longint;
  91. end;
  92. ptimezone =^timezone;
  93. utsname =record
  94. sysname,
  95. nodename,
  96. release,
  97. version,
  98. machine,
  99. domainname : Array[0..64] of char;
  100. end;
  101. {
  102. $Log$
  103. Revision 1.2 1998-05-06 12:38:22 michael
  104. + Removed log from before restored version.
  105. Revision 1.1.1.1 1998/03/25 11:18:43 root
  106. * Restored version
  107. }