macstat.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. Copyright (c) 1990-2000 Info-ZIP. All rights reserved.
  3. See the accompanying file LICENSE, version 2000-Apr-09 or later
  4. (the contents of which are also included in unzip.h) for terms of use.
  5. If, for some reason, all these files are missing, the Info-ZIP license
  6. also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html
  7. */
  8. /*****************************************************************
  9. *
  10. * stat.h
  11. *
  12. *****************************************************************/
  13. #ifndef __macstat_h
  14. #define __macstat_h
  15. #include <time.h>
  16. typedef long dev_t;
  17. typedef long ino_t;
  18. typedef long off_t;
  19. #define _STAT
  20. struct stat {
  21. dev_t st_dev;
  22. ino_t st_ino;
  23. unsigned short st_mode;
  24. short st_nlink;
  25. short st_uid;
  26. short st_gid;
  27. dev_t st_rdev;
  28. off_t st_size;
  29. time_t st_atime, st_mtime, st_ctime;
  30. long st_blksize;
  31. long st_blocks;
  32. };
  33. #define S_IFMT 0xF000
  34. #define S_IFIFO 0x1000
  35. #define S_IFCHR 0x2000
  36. #define S_IFDIR 0x4000
  37. #define S_IFBLK 0x6000
  38. #define S_IFREG 0x8000
  39. #define S_IFLNK 0xA000
  40. #define S_IFSOCK 0xC000
  41. #define S_ISUID 0x800
  42. #define S_ISGID 0x400
  43. #define S_ISVTX 0x200
  44. #define S_IREAD 0x100
  45. #define S_IWRITE 0x80
  46. #define S_IEXEC 0x40
  47. #define S_IRUSR 00400
  48. #define S_IWUSR 00200
  49. #define S_IXUSR 00100
  50. #define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) /* = 00700 */
  51. #define S_IRGRP 00040
  52. #define S_IWGRP 00020
  53. #define S_IXGRP 00010
  54. #define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) /* = 00070 */
  55. #define S_IROTH 00004
  56. #define S_IWOTH 00002
  57. #define S_IXOTH 00001
  58. #define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) /* = 00007 */
  59. extern int UZmacstat(const char *path, struct stat *buf);
  60. #endif /* !__macstat_h */