systypes.inc 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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 ppc
  16. %eax %d0 r0 System call number
  17. %ebx %d1 r3 first argument
  18. %ecx %d2 r4 second argument
  19. %edx %d3 r5 third argumens
  20. %esi %d3 r6 fourth argument
  21. %edi %d4 r7 fifth argument
  22. }
  23. {
  24. TStatfs = packed record
  25. fstype, { File system type }
  26. bsize, { Optimal block trensfer size }
  27. blocks, { Data blocks in system }
  28. bfree, { free blocks in system }
  29. bavail, { Available free blocks to non-root users }
  30. files, { File nodes in system }
  31. ffree, { Free file nodes in system }
  32. fsid, { File system ID }
  33. namelen : longint; { Maximum name length in system }
  34. spare : array [0..6] of longint; { For later use }
  35. end;
  36. PStatFS=^TStatFS;
  37. }
  38. {
  39. { The following are records for system calls }
  40. dirent = packed record
  41. ino,
  42. off : longint;
  43. reclen : word;
  44. name : array [0..255] of char;
  45. end;
  46. pdirent =^dirent;
  47. TDirEnt = dirent;
  48. TDir = packed record
  49. fd : integer;
  50. loc : longint;
  51. size : integer;
  52. buf : pdirent;
  53. {The following are used in libc, but NOT in the linux kernel sources ??}
  54. nextoff: longint;
  55. dd_max : integer; {size of buf. Irrelevant, as buf is of type dirent}
  56. lock : pointer;
  57. end;
  58. PDir =^TDir;
  59. }
  60. { can't put definition in stat.inc because stat.inc is also included in }
  61. { bunxtype.inc, which is used together with ptypes.inc, which defines }
  62. { def_t in another way :( }
  63. {
  64. {$ifdef cpui386}
  65. dev_t = word;
  66. {$else cpui386}
  67. {$ifdef cpum68k}
  68. dev_t = word;
  69. {$else cpum68k}
  70. {$ifdef cpupowerpc}
  71. dev_t = cardinal;
  72. {$else cpupowerpc}
  73. {$ifdef cpusparc}
  74. dev_t = cardinal;
  75. {$else cpusparc}
  76. {$error dev_t unknown for this processor}
  77. {$endif cpusparc}
  78. {$endif cpupowerpc}
  79. {$endif cpum68k}
  80. {$endif cpui386}
  81. }{
  82. { definition of stat record type }
  83. {i stat.inc}
  84. PStat=^Stat;
  85. TStat=Stat;
  86. }
  87. {
  88. fdSet=array[0..31] of longint;{=1024 bits}
  89. pfdset=^fdset;
  90. TFDSet=fdset;
  91. timeval = packed record
  92. sec,usec:longint
  93. end;
  94. ptimeval=^timeval;
  95. TTimeVal=timeval;
  96. timespec = packed record
  97. tv_sec,tv_nsec:longint;
  98. end;
  99. timezone = packed record
  100. minuteswest,dsttime:longint;
  101. end;
  102. ptimezone =^timezone;
  103. TTimeZone = timezone;
  104. utsname = packed record
  105. sysname,
  106. nodename,
  107. release,
  108. version,
  109. machine,
  110. domainname : Array[0..64] of char;
  111. end;
  112. PUTSName=^UTSName;
  113. TUTSName=UTSName;
  114. }
  115. {
  116. $Log$
  117. Revision 1.14 2004-02-06 23:06:16 florian
  118. - killed tsyscallregs
  119. Revision 1.13 2004/01/11 09:56:20 jonas
  120. * moved tstatfs from systypes.inc to ptypes.inc to fix make cycle with
  121. -dFPC_USE_LIBC (systypes.inc is now completely commented out)
  122. Revision 1.12 2003/09/14 20:15:01 marco
  123. * Unix reform stage two. Remove all calls from Unix that exist in Baseunix.
  124. Revision 1.11 2003/08/21 22:24:52 olle
  125. - removed parameter from fpc_iocheck
  126. Revision 1.10 2003/07/08 21:23:24 peter
  127. * sparc fixes
  128. Revision 1.9 2003/07/08 14:18:40 peter
  129. * fdset changed to 1024 bits
  130. Revision 1.8 2003/05/15 22:50:50 jonas
  131. * the stat type is processor-dependent
  132. * the dev_t tpye is processor dependent. Don't use it in the stat type
  133. however, as that one is also used at a time where dev_t is already
  134. defined as qword
  135. Revision 1.7 2002/09/07 16:01:20 peter
  136. * old logs removed and tabs fixed
  137. Revision 1.6 2002/07/29 17:50:02 florian
  138. + added register location description for ppc
  139. }