glue.inc 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. { ---------------------------------------------------------------------
  2. glue.inc : Glue between libc and Pascal types
  3. ---------------------------------------------------------------------}
  4. Type
  5. __ptr_t = Pointer;
  6. P__ptr_t = ^__ptr_t;
  7. ptrdiff_t = Integer;
  8. __long_double_t = Extended;
  9. P__long_double_t = ^__long_double_t;
  10. size_t = Cardinal;
  11. Psize_t = size_t;
  12. {$ifdef ver1_0}
  13. UInt64 = Int64; // Must be unsigned.
  14. {$else}
  15. UInt64 = 0..High(Int64); // Must be unsigned.
  16. {$endif}
  17. wchar_t = widechar;
  18. Pwchar_t = ^wchar_t;
  19. PPwchar_t = ^Pwchar_t;
  20. PPByte = ^PByte;
  21. PPPChar = ^PPChar;
  22. { ---------------------------------------------------------------------
  23. Declarations moved forward because C headers are a mess.
  24. ---------------------------------------------------------------------}
  25. Type
  26. __sighandler_t = procedure(SigNum: Integer); cdecl;
  27. timespec = record
  28. tv_sec: Longint;
  29. tv_nsec: Longint;
  30. end;
  31. wint_t = Cardinal;
  32. __mbstate_t = record
  33. count: Integer;
  34. case { __value } Integer of
  35. 0: (__wch: wint_t);
  36. 1: (__wchb: packed array[0..4 - 1] of Char);
  37. end;
  38. mbstate_t = __mbstate_t;
  39. P__mbstate_t = ^__mbstate_t;
  40. { ---------------------------------------------------------------------
  41. Borland compatibility types for forward declarations.
  42. ---------------------------------------------------------------------}
  43. TSignalHandler = __sighandler_t;
  44. TTimeSpec = timespec;
  45. PTimeSpec = ^TTimeSpec;
  46. TMultiByteState = __mbstate_t;
  47. PMultiByteState = ^TMultiByteState;