systypes.inc 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1999-2000 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. PSysCallRegs=^SysCallRegs;
  30. TSysCallRegs=SysCallRegs;
  31. { The following are records for system calls }
  32. dirent = packed record
  33. ino,
  34. off : longint;
  35. reclen : word;
  36. name : array [0..255] of char;
  37. end;
  38. pdirent =^dirent;
  39. TDirEnt = dirent;
  40. TDir = packed record
  41. fd : integer;
  42. loc : longint;
  43. size : integer;
  44. buf : pdirent;
  45. {The following are used in libc, but NOT in the linux kernel sources ??}
  46. nextoff: longint;
  47. dd_max : integer; {size of buf. Irrelevant, as buf is of type dirent}
  48. lock : pointer;
  49. end;
  50. PDir =^TDir;
  51. dev_t = word;
  52. Stat = packed record
  53. dev : dev_t;
  54. pad1 : word;
  55. ino : longint;
  56. mode,
  57. nlink,
  58. uid,
  59. gid : word;
  60. rdev : dev_t;
  61. pad2 : word;
  62. size,
  63. blksze,
  64. blocks,
  65. atime,
  66. unused1,
  67. mtime,
  68. unused2,
  69. ctime,
  70. unused3,
  71. unused4,
  72. unused5 : longint;
  73. end;
  74. PStat=^Stat;
  75. TStat=Stat;
  76. TStatfs = packed record
  77. fstype, { File system type }
  78. bsize, { Optimal block trensfer size }
  79. blocks, { Data blocks in system }
  80. bfree, { free blocks in system }
  81. bavail, { Available free blocks to non-root users }
  82. files, { File nodes in system }
  83. ffree, { Free file nodes in system }
  84. fsid, { File system ID }
  85. namelen : longint; { Maximum name length in system }
  86. spare : array [0..6] of longint; { For later use }
  87. end;
  88. PStatFS=^TStatFS;
  89. fdSet=array[0..7] of longint;{=256 bits}
  90. pfdset=^fdset;
  91. TFDSet=fdset;
  92. timeval = packed record
  93. sec,usec:longint
  94. end;
  95. ptimeval=^timeval;
  96. TTimeVal=timeval;
  97. timespec = packed record
  98. tv_sec,tv_nsec:longint;
  99. end;
  100. timezone = packed record
  101. minuteswest,dsttime:longint;
  102. end;
  103. ptimezone =^timezone;
  104. TTimeZone = timezone;
  105. utsname = packed record
  106. sysname,
  107. nodename,
  108. release,
  109. version,
  110. machine,
  111. domainname : Array[0..64] of char;
  112. end;
  113. PUTSName=^UTSName;
  114. TUTSName=UTSName;
  115. {
  116. $Log$
  117. Revision 1.5 2001-06-03 20:19:09 peter
  118. * FSStat to StatFS
  119. * StatFS structure to TStatFS
  120. Revision 1.4 2001/06/02 00:31:30 peter
  121. * merge unix updates from the 1.0 branch, mostly related to the
  122. solaris target
  123. }