ostypes.inc 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. OS dependant types internal to the Linux RTL.
  7. See the file COPYING.FPC, included in this distribution,
  8. for details about the copyright.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12. **********************************************************************}
  13. Type
  14. {
  15. Linux system calls take arguments as follows :
  16. i386 m68k ppc
  17. %eax %d0 r0 System call number
  18. %ebx %d1 r3 first argument
  19. %ecx %d2 r4 second argument
  20. %edx %d3 r5 third argumens
  21. %esi %d3 r6 fourth argument
  22. %edi %d4 r7 fifth argument
  23. That is why we define a special type, with only these arguments
  24. To make it processor independent, we don't give any system dependent
  25. names, but the rather abstract reg1,reg2 etc;
  26. }
  27. SysCallRegs = record
  28. reg1,
  29. reg2,
  30. reg3,
  31. reg4,
  32. reg5,
  33. reg6 : longint;
  34. end;
  35. PSysCallRegs= ^SysCallRegs;
  36. TSysCallRegs= SysCallRegs;
  37. ptimespec = ^timespec;
  38. timespec = packed record
  39. tv_sec : time_t;
  40. tv_nsec : clong;
  41. end;
  42. timeval = packed record
  43. tv_sec,
  44. tv_usec:clong;
  45. end;
  46. ptimeval = ^timeval;
  47. TTimeVal = timeval;
  48. CONST
  49. _S_IFDIR = $4000;
  50. _S_IFCHR = $2000;
  51. _S_IFBLK = $6000;
  52. _S_IFREG = $8000;
  53. _S_IFMT = $f000;
  54. _S_IFIFO = $1000;
  55. {
  56. $Log$
  57. Revision 1.2 2002-12-18 16:43:26 marco
  58. * new unix rtl, linux part.....
  59. Revision 1.1 2002/11/12 14:37:59 marco
  60. * Parts of new unix rtl
  61. }