systypes.inc 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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/ppc:
  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,reg7,reg8 : longint;
  28. end;
  29. PSysCallRegs=^SysCallRegs;
  30. TSysCallRegs=SysCallRegs;
  31. dev_t = CARDINAL;
  32. {$packrecords C}
  33. Stat =record {BSD version}
  34. dev : dev_t; { inode's device }
  35. ino : cardinal; { inode's number }
  36. mode, { inode protection mode }
  37. nlink : word; { number of hard links }
  38. uid, { user ID of the file's owner }
  39. gid, { group ID of the file's group }
  40. dev_t : cardinal; { device type }
  41. atime, { time of last access }
  42. atime_nsec, { nsec of last access }
  43. mtime, { time of last data modification }
  44. mtime_nsec, { nsec of last data modification }
  45. ctime, { time of last file status change }
  46. ctime_nsec : longint; { nsec of last file status change }
  47. size, { file size, in bytes }
  48. blocks : Int64; { blocks allocated for file }
  49. blksze, { optimal blocksize for I/O }
  50. flags, { user defined flags for file }
  51. filegen : cardinal; { file generation number }
  52. lspare : longint;
  53. qspare : array[0..1] of int64;
  54. end;
  55. PStat=^Stat;
  56. TStat=Stat;
  57. TStatfs = packed record
  58. spare2, { place holder}
  59. bsize, { fundamental block size}
  60. iosize, { optimal block size }
  61. blocks, { total blocks}
  62. bfree, { blocks free}
  63. bavail, { block available for mortal users}
  64. files, { Total file nodes}
  65. ffree : longint; { file nodes free}
  66. fsid : array[0..1] of longint;
  67. fowner : longint; {mounter uid}
  68. ftype : longint;
  69. fflags : longint; {copy of mount flags}
  70. spare : array [0..1] of longint; { For later use }
  71. fstypename : array[0..15] of char;
  72. mountpoint : array[0..89] of char;
  73. mnfromname : array[0..89] of char;
  74. end;
  75. PStatFS=^TStatFS;
  76. fdSet=array[0..7] of longint;{=256 bits}
  77. pfdset=^fdset;
  78. TFDSet=fdset;
  79. timeval = packed record
  80. sec,usec:longint;
  81. end;
  82. ptimeval=^timeval;
  83. TTimeVal=timeval;
  84. timespec = packed record
  85. tv_sec,tv_nsec:{longint or int64 ?}longint;
  86. end;
  87. timezone = packed record
  88. minuteswest,dsttime:longint;
  89. end;
  90. ptimezone =^timezone;
  91. TTimeZone = timezone;
  92. utsname = packed record
  93. sysname,
  94. nodename,
  95. release,
  96. version,
  97. machine,
  98. domainname : Array[0..64] of char;
  99. end;
  100. PUTSName=^UTSName;
  101. TUTSName=UTSName;
  102. ITimerVal= Record
  103. It_Interval,
  104. It_Value : TimeVal;
  105. end;
  106. {
  107. $Log$
  108. Revision 1.2 2002-09-07 16:01:17 peter
  109. * old logs removed and tabs fixed
  110. Revision 1.1 2002/09/06 18:35:59 jonas
  111. * implemented most syscalls, except readdir because the getdents
  112. syscall is declared obsolete in Darwin...
  113. }