|
|
1.1 root 1: /***
2: *sys\stat.h - defines structure used by stat() and fstat()
3: *
4: * Copyright (c) 1985-1991, 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: #ifndef _INC_STAT
14:
15: #ifdef __cplusplus
16: extern "C" {
17: #endif
18:
19:
20: #if (_MSC_VER <= 600)
21: #define __cdecl _cdecl
22: #endif
23:
24: #ifndef _TIME_T_DEFINED
25: typedef long time_t;
26: #define _TIME_T_DEFINED
27: #endif
28:
29: /* define structure for returning status information */
30:
31: #ifndef _STAT_DEFINED
32:
33:
34: struct _stat {
35: _dev_t st_dev;
36: _ino_t st_ino;
37: unsigned short st_mode;
38: short st_nlink;
39: short st_uid;
40: short st_gid;
41: _dev_t st_rdev;
42: _off_t st_size;
43: time_t st_atime;
44: time_t st_mtime;
45: time_t st_ctime;
46: };
47:
48: #if !__STDC__
49: /* Non-ANSI name for compatibility */
50: // stat already mapped to _stat below
51: #endif
52:
53:
54: #define _STAT_DEFINED
55: #endif
56:
57: #define _S_IFMT 0170000 /* file type mask */
58: #define _S_IFDIR 0040000 /* directory */
59: #define _S_IFCHR 0020000 /* character special */
60: #define _S_IFREG 0100000 /* regular */
61: #define _S_IREAD 0000400 /* read permission, owner */
62: #define _S_IWRITE 0000200 /* write permission, owner */
63: #define _S_IEXEC 0000100 /* execute/search permission, owner */
64:
65:
66: /* function prototypes */
67:
68: int _fstat(int, struct _stat *);
69: int _stat(char *, struct _stat *);
70:
71: #if !__STDC__
72: /* Non-ANSI names for compatibility */
73:
74: #define S_IFMT _S_IFMT
75: #define S_IFDIR _S_IFDIR
76: #define S_IFCHR _S_IFCHR
77: #define S_IFREG _S_IFREG
78: #define S_IREAD _S_IREAD
79: #define S_IWRITE _S_IWRITE
80: #define S_IEXEC _S_IEXEC
81:
82: #define fstat _fstat
83: #define stat _stat
84:
85: #endif /* __STDC__ */
86:
87: #ifdef __cplusplus
88: }
89: #endif
90:
91: #define _INC_STAT
92: #endif /* _INC_STAT */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.