File: statbits.h

package info (click to toggle)
dpm-postgres 1.7.4.7-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 13,788 kB
  • ctags: 10,782
  • sloc: ansic: 146,136; sh: 13,362; perl: 11,142; python: 5,529; cpp: 5,113; sql: 1,790; makefile: 955; fortran: 113
file content (167 lines) | stat: -rw-r--r-- 3,285 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
/*
 * @(#)$RCSfile: statbits.h,v $ $Revision: 1.1 $ $Date: 2005/04/13 17:00:30 $ Olof Barring CERN IT-PDP/DM
 */

/*
 * Copyright (C) 2000 by CERN IT-PDP/DM
 * All rights reserved
 */

/*
 * statbits.h - define non-existing file access macros for win32
 */
#ifndef STATBITS_H
#define STATBITS_H

#ifndef __S_IFMT
#define __S_IFMT        0170000    /* These bits determine file type */
#endif

#ifndef __S_IFDIR
#define __S_IFDIR       0040000    /* Directory */
#endif

#ifndef __S_IFCHR
#define __S_IFCHR       0020000    /* Character device */
#endif

#ifndef __S_IFIFO
#define __S_IFIFO       0010000    /* FIFO */
#endif

#ifndef __S_IFBLK
#define __S_IFBLK       0060000    /* Block device */
#endif

#ifndef __S_IFLNK
#define __S_IFLNK       0120000    /* Symbolic link */
#endif

#ifndef __S_IFSOCK
#define __S_IFSOCK      0140000    /* Socket */
#endif

#ifndef __S_ISUID
#define __S_ISUID       04000      /* Set user ID on execution */
#endif

#ifndef __S_ISGID
#define __S_ISGID       02000      /* Set group ID on execution */
#endif

#ifndef __S_ISVTX
#define __S_ISVTX       01000      /* Save swapped text after use (sticky) */
#endif

#ifndef __S_IREAD
#define __S_IREAD       0400       /* Read by owner */
#endif

#ifndef __S_IWRITE
#define __S_IWRITE      0200       /* Write by owner */
#endif

#ifndef __S_IEXEC
#define __S_IEXEC       0100       /* Execute by owner */
#endif

#ifndef S_IFIFO
#define S_IFIFO         __S_IFIFO
#endif

#ifndef S_IFBLK
#define S_IFBLK         __S_IFBLK
#endif

#ifndef S_IFLNK
#define S_IFLNK         __S_IFLNK
#endif

#ifndef S_IFSOCK
#define S_IFSOCK        __S_IFSOCK
#endif

#ifndef S_ISUID
#define S_ISUID         __S_ISUID
#endif

#ifndef S_ISGID
#define S_ISGID         __S_ISGID
#endif

#ifndef S_ISVTX
#define S_ISVTX         __S_ISVTX
#endif

#ifndef S_IRUSR
#define S_IRUSR         __S_IREAD
#endif

#ifndef S_IWUSR
#define S_IWUSR         __S_IWRITE
#endif

#ifndef S_IXUSR
#define S_IXUSR         __S_IEXEC
#endif

#ifndef S_IRWXU
/* Read, write and execute by owner */
#define S_IRWXU         (__S_READ|__S_IWRITE|__S_IEXEC)
#endif

#ifndef S_IRGRP
#define S_IRGRP         (S_IRUSR >> 3)       /* Read by group */
#endif

#ifndef S_IWGRP
#define S_IWGRP         (S_IWUSR >> 3)       /* Write by group */
#endif

#ifndef S_IXGRP
#define S_IXGRP         (S_IXUSR >> 3)       /* Execute by group */
#endif

#ifndef S_IRWXG
/* Read, write and execute by group */
#define S_IRWXG         (S_IRWXU >> 3)
#endif

#ifndef S_IROTH
#define S_IROTH         (S_IRGRP >> 3)       /* Read by others */
#endif

#ifndef S_IWOTH
#define S_IWOTH         (S_IWGRP >> 3)       /* Write by others */
#endif

#ifndef S_IXOTH
#define S_IXOTH         (S_IXGRP >> 3)       /* Execute by others */
#endif

#ifndef S_IRWXO
/* Read, write and execute by others */
#define S_IRWXO         (S_IRWXG >> 3)
#endif

#ifndef __S_ISTYPE
#define __S_ISTYPE(mode, mask)   (((mode) & __S_IFMT) == (mask))
#endif

#ifndef S_ISDIR
#define S_ISDIR(mode)    __S_ISTYPE((mode), __S_IFDIR)
#endif

#ifndef S_ISCHR
#define S_ISCHR(mode)    __S_ISTYPE((mode), __S_IFCHR)
#endif

#ifndef S_ISBLK
#define S_ISBLK(mode)    __S_ISTYPE((mode), __S_IFBLK)
#endif

#ifndef S_ISFIFO
#define S_ISFIFO(mode)    __S_ISTYPE((mode), __S_IFIFO)
#endif

#endif /* STATBITS_H */