glue.inc 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. UInt64 = 0..High(Int64); // Must be unsigned.
  13. wchar_t = widechar;
  14. Pwchar_t = ^wchar_t;
  15. PPwchar_t = ^Pwchar_t;
  16. { ---------------------------------------------------------------------
  17. Declarations moved forward because C headers are a mess.
  18. ---------------------------------------------------------------------}
  19. Type
  20. __sighandler_t = procedure(SigNum: Integer); cdecl;
  21. timespec = record
  22. tv_sec: Longint;
  23. tv_nsec: Longint;
  24. end;
  25. wint_t = Cardinal;
  26. __mbstate_t = record
  27. count: Integer;
  28. case { __value } Integer of
  29. 0: (__wch: wint_t);
  30. 1: (__wchb: packed array[0..4 - 1] of Char);
  31. end;
  32. mbstate_t = __mbstate_t;
  33. P__mbstate_t = ^__mbstate_t;
  34. { ---------------------------------------------------------------------
  35. Borland compatibility types for forward declarations.
  36. ---------------------------------------------------------------------}
  37. TSignalHandler = __sighandler_t;
  38. TTimeSpec = timespec;
  39. PTimeSpec = ^TTimeSpec;
  40. TMultiByteState = __mbstate_t;
  41. PMultiByteState = ^TMultiByteState;