sstat.inc 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. { ---------------------------------------------------------------------
  2. Macros from sys/stat.h
  3. ---------------------------------------------------------------------}
  4. function __S_ISTYPE(mode,mask : __mode_t) : boolean;
  5. begin
  6. __S_ISTYPE:=(mode and __S_IFMT) = mask;
  7. end;
  8. function S_ISDIR(mode : __mode_t) : boolean;
  9. begin
  10. S_ISDIR:=__S_ISTYPE(mode,__S_IFDIR);
  11. end;
  12. function S_ISCHR(mode : __mode_t) : boolean;
  13. begin
  14. S_ISCHR:=__S_ISTYPE(mode,__S_IFCHR);
  15. end;
  16. function S_ISBLK(mode : __mode_t) : boolean;
  17. begin
  18. S_ISBLK:=__S_ISTYPE(mode,__S_IFBLK);
  19. end;
  20. function S_ISREG(mode : __mode_t) : boolean;
  21. begin
  22. S_ISREG:=__S_ISTYPE(mode,__S_IFREG);
  23. end;
  24. function S_ISFIFO(mode : __mode_t) : boolean;
  25. begin
  26. S_ISFIFO:=__S_ISTYPE(mode,__S_IFIFO);
  27. end;
  28. function S_ISLNK(mode : __mode_t) : boolean;
  29. begin
  30. S_ISLNK:=__S_ISTYPE(mode,__S_IFLNK);
  31. end;
  32. function S_ISSOCK(mode : __mode_t) : boolean;
  33. begin
  34. S_ISSOCK:=__S_ISTYPE(mode,__S_IFSOCK);
  35. end;
  36. function fstat(__fd:longint; __buf:Pstat):longint;
  37. begin
  38. __fxstat(_STAT_VER,__fd,__buf);
  39. end;
  40. function lstat(__file:Pchar; __buf:Pstat):longint;
  41. begin
  42. __lxstat(_STAT_VER,__file,__buf);
  43. end;
  44. function stat(__file:Pchar; __buf:Pstat):longint;
  45. begin
  46. __xstat(_STAT_VER,__file,__buf);
  47. end;
  48. function fstat64(__fd:longint; __buf:Pstat64):longint;
  49. begin
  50. __fxstat64(_STAT_VER,__fd,__buf);
  51. end;
  52. function lstat64(__file:Pchar; __buf:Pstat64):longint;
  53. begin
  54. __lxstat64(_STAT_VER,__file,__buf);
  55. end;
  56. function stat64(__file:Pchar; __buf:Pstat64):longint;
  57. begin
  58. __xstat64(_STAT_VER,__file,__buf);
  59. end;
  60. function stat(__file:Pchar; var __buf:_stat):longint;
  61. begin
  62. __xstat(_STAT_VER,__file,__buf);
  63. end;
  64. function fstat(__fd:longint; var __buf:_stat):longint;
  65. begin
  66. __fxstat(_STAT_VER,__fd,__buf);
  67. end;
  68. function stat64(__file:Pchar; var __buf: _stat64):longint;
  69. begin
  70. __xstat64(_STAT_VER,__file,__buf);
  71. end;
  72. function fstat64(__fd:longint; var __buf: _stat64):longint;
  73. begin
  74. __fxstat64(_STAT_VER,__fd,__buf);
  75. end;
  76. function lstat(__file:Pchar; var __buf:_stat):longint;
  77. begin
  78. __lxstat(_STAT_VER,__file,__buf);
  79. end;
  80. function lstat64(__file:Pchar; var __buf:_stat64):longint;
  81. begin
  82. __lxstat64(_STAT_VER,__file,__buf);
  83. end;