ctypes.inc 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. Basic types for C interfacing. Check the 64-bit defines.
  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. {***********************************************************************}
  13. { POSIX TYPE DEFINITIONS }
  14. {***********************************************************************}
  15. { Introduced defines
  16. - 64bitarch (for 64-bits OSS BSD systems)
  17. }
  18. Type
  19. { the following type definitions are compiler dependant }
  20. { and system dependant }
  21. cInt8 = shortint;
  22. cUInt8 = byte;
  23. cUInt16= word;
  24. cInt16 = smallint;
  25. cInt32 = longint;
  26. cUInt32= cardinal;
  27. cInt64 = int64;
  28. {$ifndef VER1_0}
  29. cUInt64= qword;
  30. {$else}
  31. cUInt64= int64;
  32. {$endif}
  33. cuchar = byte;
  34. cchar = shortint;
  35. cInt = longint; { minimum range is : 32-bit }
  36. cUInt = Cardinal; { minimum range is : 32-bit }
  37. {$ifdef CPU64}
  38. cLong = int64;
  39. {$ifdef VER1_0}
  40. cuLong = int64;
  41. {$else}
  42. cuLong = qword;
  43. {$endif}
  44. {$else}
  45. cLong = longint;
  46. cuLong = Cardinal;
  47. {$endif}
  48. clonglong = int64;
  49. {$ifndef VER1_0}
  50. culonglong = qword;
  51. {$else VER1_0}
  52. culonglong = int64;
  53. {$endif VER1_0}
  54. cshort = integer;
  55. cushort= word;
  56. pcInt = ^cInt;
  57. pcUInt = ^cUInt;
  58. pcLong = ^cLong;
  59. pculong = ^cuLong;
  60. pcshort = ^cshort;
  61. pcushort= ^cushort;
  62. pcchar = ^cchar;
  63. pcuchar = ^cuchar;
  64. cunsigned = cuint;
  65. pcunsigned = ^cunsigned;
  66. {
  67. $Log$
  68. Revision 1.5 2005-02-06 08:50:22 florian
  69. + added the new types from linux
  70. Revision 1.4 2004/09/09 20:29:06 jonas
  71. * fixed definition of pthread_mutex_t for non-linux targets (and for
  72. linux as well, actually).
  73. * base libpthread definitions are now in ptypes.inc, included in unixtype
  74. They sometimes have an extra underscore in front of their name, in
  75. case they were also exported by the packages/base/pthreads unit, so
  76. they can keep their original name there
  77. * cthreadds unit now imports systuils, because it uses exceptions (it
  78. already did so before as well)
  79. * fixed many linux definitions of libpthread functions in pthrlinux.inc
  80. (integer -> cint etc)
  81. + added culonglong type to ctype.inc
  82. Revision 1.3 2004/05/17 19:20:09 marco
  83. * x86_64 patches
  84. Revision 1.2 2003/09/16 21:20:40 marco
  85. * pointer's of some basetypes
  86. Revision 1.1 2003/01/03 11:21:32 marco
  87. * copied and checked from Linux.
  88. }