home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c040 / 6.ddi / INCLUDE / SYS / STAT.H$ / STAT.bin
Encoding:
Text File  |  1989-09-27  |  1.3 KB  |  60 lines

  1. /***
  2. *sys\stat.h - defines structure used by stat() and fstat()
  3. *
  4. *    Copyright (c) 1985-1990, Microsoft Corporation.  All rights reserved.
  5. *
  6. *Purpose:
  7. *    This file defines the structure used by the stat() and fstat()
  8. *    routines.
  9. *    [System V]
  10. *
  11. ****/
  12.  
  13. #if defined(_DLL) && !defined(_MT)
  14. #error Cannot define _DLL without _MT
  15. #endif
  16.  
  17. #ifdef _MT
  18. #define _FAR_ _far
  19. #else
  20. #define _FAR_
  21. #endif
  22.  
  23. #ifndef _TIME_T_DEFINED
  24. typedef long time_t;
  25. #define _TIME_T_DEFINED
  26. #endif
  27.  
  28. /* define structure for returning status information */
  29.  
  30. #ifndef _STAT_DEFINED
  31. struct stat {
  32.     dev_t st_dev;
  33.     ino_t st_ino;
  34.     unsigned short st_mode;
  35.     short st_nlink;
  36.     short st_uid;
  37.     short st_gid;
  38.     dev_t st_rdev;
  39.     off_t st_size;
  40.     time_t st_atime;
  41.     time_t st_mtime;
  42.     time_t st_ctime;
  43.     };
  44. #define _STAT_DEFINED
  45. #endif
  46.  
  47. #define S_IFMT        0170000     /* file type mask */
  48. #define S_IFDIR     0040000     /* directory */
  49. #define S_IFCHR     0020000     /* character special */
  50. #define S_IFREG     0100000     /* regular */
  51. #define S_IREAD     0000400     /* read permission, owner */
  52. #define S_IWRITE    0000200     /* write permission, owner */
  53. #define S_IEXEC     0000100     /* execute/search permission, owner */
  54.  
  55.  
  56. /* function prototypes */
  57.  
  58. int _FAR_ _cdecl fstat(int, struct stat _FAR_ *);
  59. int _FAR_ _cdecl stat(char _FAR_ *, struct stat _FAR_ *);
  60.