home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c221 / 1.ddi / INC / STAT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-19  |  2.1 KB  |  112 lines

  1. /*   stat.h -- extra-ANSI
  2.  *
  3.  *   Function, types and constants for determining device and file status.
  4.  *           Copyright (c) 1990, MetaWare Incorporated
  5.  */
  6. #ifndef _STAT_H
  7. #define _STAT_H
  8. #pragma push_align_members(64);
  9.  
  10. #ifdef __CPLUSPLUS__
  11. extern "C" {
  12. #endif
  13.  
  14. #define _S_IFMT   61440
  15. #define _S_IFDIR  16384
  16. #define _S_IFCHR   8192
  17. #define _S_IFREG  32768
  18. #define _S_IREAD    256
  19. #define _S_IWRITE   128
  20. #define _S_IEXEC     64
  21.  
  22. #ifndef _TIME_T_DEFINED
  23. #define _TIME_T_DEFINED
  24. typedef long time_t;
  25. #endif
  26.  
  27. #ifndef _INO_T_DEFINED
  28. #define _INO_T_DEFINED
  29. typedef unsigned short _ino_t;
  30. #endif
  31.  
  32. #ifndef _DEV_T_DEFINED
  33. #define _DEV_T_DEFINED
  34. typedef short _dev_t;
  35. #endif
  36.  
  37. #ifndef _OFF_T_DEFINED
  38. #define _OFF_T_DEFINED
  39. typedef long _off_t;
  40. #endif
  41.  
  42. #ifndef _STAT_DEFINED
  43. #define _STAT_DEFINED
  44. struct _stat {
  45.     _dev_t st_dev;
  46.     _ino_t st_ino;
  47.     unsigned short st_mode;
  48.     short st_nlink;
  49.     short st_uid;
  50.     short st_gid;
  51.     _dev_t st_rdev;
  52.     _off_t st_size;
  53.     time_t st_atime;
  54.     time_t st_mtime;
  55.     time_t st_ctime;
  56.     };
  57. #endif
  58.  
  59. extern int _stat(char * __path, struct _stat * __buffer);
  60. extern int _fstat(int __handle, struct _stat * __buffer);
  61.  
  62. #if __HIGHC__
  63. #define S_IFMT   _S_IFMT
  64. #define S_IFDIR  _S_IFDIR
  65. #define S_IFCHR  _S_IFCHR
  66. #define S_IFREG  _S_IFREG
  67. #define S_IREAD  _S_IREAD
  68. #define S_IWRITE _S_IWRITE
  69. #define S_IEXEC  _S_IEXEC
  70.  
  71. #ifndef __INO_T_DEFINED
  72. #define __INO_T_DEFINED
  73. typedef unsigned short ino_t;
  74. #endif
  75.  
  76. #ifndef __DEV_T_DEFINED
  77. #define __DEV_T_DEFINED
  78. typedef short dev_t;
  79. #endif
  80.  
  81. #ifndef __OFF_T_DEFINED
  82. #define __OFF_T_DEFINED
  83. typedef long off_t;
  84. #endif
  85.  
  86. #ifndef __STAT_DEFINED
  87. #define __STAT_DEFINED
  88. struct stat {
  89.     dev_t st_dev;
  90.     ino_t st_ino;
  91.     unsigned short st_mode;
  92.     short st_nlink;
  93.     short st_uid;
  94.     short st_gid;
  95.     dev_t st_rdev;
  96.     off_t st_size;
  97.     time_t st_atime;
  98.     time_t st_mtime;
  99.     time_t st_ctime;
  100.     };
  101. #endif
  102.  
  103. extern int stat(char * __path, struct stat * __buffer);
  104. extern int fstat(int __handle, struct stat * __buffer);
  105.  
  106. #endif /* __HIGHC__ */
  107. #ifdef __CPLUSPLUS__
  108. }
  109. #endif
  110. #pragma pop_align_members();
  111. #endif /* _STAT_H */
  112.