|
|
1.1 root 1: /*++
2:
3: Copyright (c) 1989 Microsoft Corporation
4:
5: Module Name:
6:
7: stat.h
8:
9: Abstract:
10:
11: This module contains the stat structure described in section 5.6.1
12: of IEEE P1003.1/Draft 13.
13:
14: --*/
15:
16: #ifndef _SYS_STAT_
17: #define _SYS_STAT_
18:
19: #include <sys/types.h>
20:
1.1.1.2 ! root 21: #ifdef __cplusplus
! 22: extern "C" {
! 23: #endif
! 24:
1.1 root 25: struct stat {
26: mode_t st_mode;
27: ino_t st_ino;
28: dev_t st_dev;
29: nlink_t st_nlink;
30: uid_t st_uid;
31: gid_t st_gid;
32: off_t st_size;
33: time_t st_atime;
34: time_t st_mtime;
35: time_t st_ctime;
36: };
37:
38: /*
39: * Type bits for mode field
40: */
41:
1.1.1.2 ! root 42: #define S_IFMT 000770000
1.1 root 43:
1.1.1.2 ! root 44: #define S_IFIFO 000010000
! 45: #define S_IFCHR 000020000
! 46: #define S_IFDIR 000040000
! 47: #define S_IFBLK 000060000
! 48: #define S_IFREG 000100000
1.1 root 49:
50: /*
51: * Set Id Bits for mode
52: */
53:
1.1.1.2 ! root 54: #define S_ISUID 000004000
! 55: #define S_ISGID 000002000
1.1 root 56:
57: /*
58: * Protection Bits for mode
59: */
60:
61: #define _S_PROT 000000777
62:
63: #define S_IRWXU 000000700
64: #define S_IRUSR 000000400
65: #define S_IWUSR 000000200
66: #define S_IXUSR 000000100
67:
68: #define S_IRWXG 000000070
69: #define S_IRGRP 000000040
70: #define S_IWGRP 000000020
71: #define S_IXGRP 000000010
72:
73: #define S_IRWXO 000000007
74: #define S_IROTH 000000004
75: #define S_IWOTH 000000002
76: #define S_IXOTH 000000001
77:
1.1.1.2 ! root 78: #define S_ISDIR(m) ( ((m) & S_IFMT) == S_IFDIR )
! 79: #define S_ISCHR(m) ( ((m) & S_IFMT) == S_IFCHR )
! 80: #define S_ISBLK(m) ( ((m) & S_IFMT) == S_IFBLK )
! 81: #define S_ISREG(m) ( ((m) & S_IFMT) == S_IFREG )
! 82: #define S_ISFIFO(m) ( ((m) & S_IFMT) == S_IFIFO )
1.1 root 83:
84: mode_t _CRTAPI1 umask(mode_t);
85: int _CRTAPI1 mkdir(const char *, mode_t);
86: int _CRTAPI1 mkfifo(const char *, mode_t);
87: int _CRTAPI1 stat(const char *, struct stat *);
88: int _CRTAPI1 fstat(int, struct stat *);
89: int _CRTAPI1 chmod(const char *, mode_t);
90:
1.1.1.2 ! root 91: #ifdef __cplusplus
! 92: }
! 93: #endif
! 94:
1.1 root 95: #endif /* _SYS_STAT_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.