|
|
1.1 root 1: /*** 1.1.1.3 ! root 2: *sys/stat.h - defines structure used by stat() and fstat() 1.1 root 3: * 1.1.1.3 ! root 4: * Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. 1.1 root 5: * 6: *Purpose: 7: * This file defines the structure used by the _stat() and _fstat() 8: * routines. 9: * [System V] 10: * 11: ****/ 12: 13: #ifndef _INC_STAT 14: 15: #ifdef __cplusplus 16: extern "C" { 17: #endif 18: 19: 1.1.1.3 ! root 20: #include <sys/types.h> ! 21: ! 22: /* ! 23: * Conditional macro definition for function calling type and variable type ! 24: * qualifiers. ! 25: */ ! 26: #if ( (_MSC_VER >= 800) && (_M_IX86 >= 300) ) ! 27: ! 28: /* ! 29: * Definitions for MS C8-32 (386/486) compiler ! 30: */ ! 31: #define _CRTAPI1 __cdecl ! 32: #define _CRTAPI2 __cdecl ! 33: ! 34: #elif ( _MSC_VER == 600 ) ! 35: ! 36: /* ! 37: * Definitions for old MS C6-386 compiler ! 38: */ ! 39: #define _CRTAPI1 _cdecl ! 40: #define _CRTAPI2 _cdecl ! 41: #define _M_IX86 300 ! 42: ! 43: #else ! 44: ! 45: /* ! 46: * Other compilers (e.g., MIPS) ! 47: */ ! 48: #define _CRTAPI1 ! 49: #define _CRTAPI2 ! 50: 1.1.1.2 root 51: #endif 1.1 root 52: 1.1.1.3 ! root 53: 1.1 root 54: #ifndef _TIME_T_DEFINED 55: typedef long time_t; 56: #define _TIME_T_DEFINED 57: #endif 58: 59: /* define structure for returning status information */ 60: 61: #ifndef _STAT_DEFINED 62: 63: 64: struct _stat { 65: _dev_t st_dev; 66: _ino_t st_ino; 67: unsigned short st_mode; 68: short st_nlink; 69: short st_uid; 70: short st_gid; 71: _dev_t st_rdev; 72: _off_t st_size; 73: time_t st_atime; 74: time_t st_mtime; 75: time_t st_ctime; 76: }; 77: 78: #if !__STDC__ 79: /* Non-ANSI name for compatibility */ 80: // stat already mapped to _stat below 81: #endif 82: 83: 84: #define _STAT_DEFINED 85: #endif 86: 87: #define _S_IFMT 0170000 /* file type mask */ 88: #define _S_IFDIR 0040000 /* directory */ 89: #define _S_IFCHR 0020000 /* character special */ 90: #define _S_IFREG 0100000 /* regular */ 91: #define _S_IREAD 0000400 /* read permission, owner */ 92: #define _S_IWRITE 0000200 /* write permission, owner */ 93: #define _S_IEXEC 0000100 /* execute/search permission, owner */ 94: 95: 96: /* function prototypes */ 97: 1.1.1.3 ! root 98: int _CRTAPI1 _fstat(int, struct _stat *); ! 99: int _CRTAPI1 _stat(char *, struct _stat *); 1.1 root 100: 101: #if !__STDC__ 102: /* Non-ANSI names for compatibility */ 103: 104: #define S_IFMT _S_IFMT 105: #define S_IFDIR _S_IFDIR 106: #define S_IFCHR _S_IFCHR 107: #define S_IFREG _S_IFREG 108: #define S_IREAD _S_IREAD 109: #define S_IWRITE _S_IWRITE 110: #define S_IEXEC _S_IEXEC 111: 112: #define fstat _fstat 113: #define stat _stat 114: 115: #endif /* __STDC__ */ 116: 117: #ifdef __cplusplus 118: } 119: #endif 120: 121: #define _INC_STAT 122: #endif /* _INC_STAT */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.