systypes.inc 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1998-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. Stat = packed record
  52. dev,
  53. pad1 : word;
  54. ino : longint;
  55. mode,
  56. nlink,
  57. uid,
  58. gid,
  59. rdev,
  60. pad2 : word;
  61. size,
  62. blksze,
  63. blocks,
  64. atime,
  65. unused1,
  66. mtime,
  67. unused2,
  68. ctime,
  69. unused3,
  70. unused4,
  71. unused5 : longint;
  72. end;
  73. PStat=^Stat;
  74. TStat=Stat;
  75. Statfs = packed record
  76. fstype, { File system type }
  77. bsize, { Optimal block trensfer size }
  78. blocks, { Data blocks in system }
  79. bfree, { free blocks in system }
  80. bavail, { Available free blocks to non-root users }
  81. files, { File nodes in system }
  82. ffree, { Free file nodes in system }
  83. fsid, { File system ID }
  84. namelen : longint; { Maximum name length in system }
  85. spare : array [0..6] of longint; { For later use }
  86. end;
  87. PStatFS=^StatFS;
  88. TStatFS=StatFS;
  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. timezone = packed record
  98. minuteswest,dsttime:longint;
  99. end;
  100. ptimezone =^timezone;
  101. TTimeZone = timezone;
  102. utsname = packed record
  103. sysname,
  104. nodename,
  105. release,
  106. version,
  107. machine,
  108. domainname : Array[0..64] of char;
  109. end;
  110. PUTSName=^UTSName;
  111. TUTSName=UTSName;
  112. {
  113. $Log$
  114. Revision 1.4 2000-01-07 16:32:28 daniel
  115. * copyright 2000 added
  116. Revision 1.3 1998/10/15 08:31:10 peter
  117. * type aliases using delphi typenaming
  118. }