ptypes.inc 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 2001 by Free Pascal development team
  5. This file implements all the base types and limits required
  6. for a minimal POSIX compliant subset required to port the compiler
  7. to a new OS.
  8. See the file COPYING.FPC, included in this distribution,
  9. for details about the copyright.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. **********************************************************************}
  14. {***********************************************************************}
  15. { POSIX TYPE DEFINITIONS }
  16. {***********************************************************************}
  17. {$I ctypes.inc}
  18. type
  19. dev_t = cuint32; { used for device numbers }
  20. TDev = dev_t;
  21. pDev = ^dev_t;
  22. gid_t = cuint32; { used for group IDs }
  23. TGid = gid_t;
  24. pGid = ^gid_t;
  25. ino_t = clong; { used for file serial numbers }
  26. TIno = ino_t;
  27. pIno = ^ino_t;
  28. mode_t = cuint32; { used for file attributes }
  29. TMode = mode_t;
  30. pMode = ^mode_t;
  31. nlink_t = cuint32; { used for link counts }
  32. TnLink = nlink_t;
  33. pnLink = ^nlink_t;
  34. off_t = cint64; { used for file sizes }
  35. TOff = off_t;
  36. pOff = ^off_t;
  37. pid_t = cint32; { used as process identifier }
  38. TPid = pid_t;
  39. pPid = ^pid_t;
  40. size_t = cuint32; { as definied in the C standard}
  41. TSize = size_t;
  42. pSize = ^size_t;
  43. ssize_t = cint32; { used by function for returning number of bytes }
  44. TsSize = ssize_t;
  45. psSize = ^ssize_t;
  46. uid_t = cuint32; { used for user ID type }
  47. TUid = Uid_t;
  48. pUid = ^Uid_t;
  49. clock_t = culong;
  50. TClock = clock_t;
  51. pClock = ^clock_t;
  52. time_t = clong; { used for returning the time }
  53. TTime = time_t;
  54. pTime = ^time_t;
  55. socklen_t= cuint32;
  56. TSocklen = socklen_t;
  57. pSocklen = ^socklen_t;
  58. CONST
  59. { System limits, POSIX value in parentheses, used for buffer and stack allocation }
  60. ARG_MAX = 256*1024; {4096} { Maximum number of argument size }
  61. NAME_MAX = 255; {14} { Maximum number of bytes in filename }
  62. PATH_MAX = 1024; {255} { Maximum number of bytes in pathname }
  63. SYS_NMLN = 32; {BSD utsname struct limit}
  64. {
  65. $Log$
  66. Revision 1.3 2003-01-17 22:13:47 marco
  67. * some updates
  68. Revision 1.5 2003/01/03 13:11:32 marco
  69. * split into ptypes and ctypes
  70. }