home *** CD-ROM | disk | FTP | other *** search
/ Total Destruction / Total_Destruction.iso / addons / Lccwin32.exe / Lccwin32 / lccpub / include / sys / stat.h next >
Encoding:
C/C++ Source or Header  |  1997-06-24  |  1.2 KB  |  49 lines

  1. /*
  2. *sys/stat.h - defines structure used by stat() and fstat()
  3. */
  4.  
  5. #ifndef _INC_STAT
  6. #define _INC_STAT
  7. struct stat {
  8.     unsigned short st_dev;
  9.     unsigned short st_ino;
  10.     unsigned short st_mode;
  11.     short st_nlink;
  12.     short st_uid;
  13.     short st_gid;
  14.     unsigned long st_rdev;
  15.     long st_size;
  16.     long st_atime;
  17.     long st_mtime;
  18.     long st_ctime;
  19.     };
  20. #define _stat stat
  21.  
  22. #define _S_IFMT     0170000     /* file type mask */
  23. #define _S_IFDIR    0040000     /* directory */
  24. #define _S_IFCHR    0020000     /* character special */
  25. #define _S_IFIFO    0010000     /* pipe */
  26. #define _S_IFREG    0100000     /* regular */
  27. #define _S_IREAD    0000400     /* read permission, owner */
  28. #define _S_IWRITE    0000200     /* write permission, owner */
  29. #define _S_IEXEC    0000100     /* execute/search permission, owner */
  30.  
  31. #define S_IFMT         0170000
  32. #define S_IFDIR        0040000
  33. #define S_IFCHR        0020000
  34. #define S_IFIFO        0010000
  35. #define S_IFREG        0100000
  36. #define S_IREAD        0000400
  37. #define S_IWRITE       0000200
  38. #define S_IEXEC        0000100
  39.  
  40. /* Function prototypes */
  41.  
  42. int fstat(int, struct stat *);
  43. #define _fstat fstat
  44. int stat(char *, struct stat *);
  45. int umask(int);
  46. #define _umask umask
  47.  
  48. #endif    /* _INC_STAT */
  49.