Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

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