1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21: #ifndef _GL_FCNTL_H
22: #define _GL_FCNTL_H
23:
24: #include <sys/types.h>
25: #include <sys/stat.h>
26: #include <unistd.h>
27: #include @ABSOLUTE_FCNTL_H@
28:
29:
30:
31:
32: #ifdef __cplusplus
33: extern "C" {
34: #endif
35:
36: #ifdef FCHDIR_REPLACEMENT
37: # define open rpl_open
38: extern int open (const char *, int, ...);
39: #endif
40:
41: #ifdef __cplusplus
42: }
43: #endif
44:
45:
46:
47:
48: #if !defined O_DIRECT && defined O_DIRECTIO
49:
50: # define O_DIRECT O_DIRECTIO
51: #endif
52:
53: #ifndef O_DIRECT
54: # define O_DIRECT 0
55: #endif
56:
57: #ifndef O_DIRECTORY
58: # define O_DIRECTORY 0
59: #endif
60:
61: #ifndef O_DSYNC
62: # define O_DSYNC 0
63: #endif
64:
65: #ifndef O_NDELAY
66: # define O_NDELAY 0
67: #endif
68:
69: #ifndef O_NOATIME
70: # define O_NOATIME 0
71: #endif
72:
73: #ifndef O_NONBLOCK
74: # define O_NONBLOCK O_NDELAY
75: #endif
76:
77: #ifndef O_NOCTTY
78: # define O_NOCTTY 0
79: #endif
80:
81: #ifndef O_NOFOLLOW
82: # define O_NOFOLLOW 0
83: #endif
84:
85: #ifndef O_NOLINKS
86: # define O_NOLINKS 0
87: #endif
88:
89: #ifndef O_RSYNC
90: # define O_RSYNC 0
91: #endif
92:
93: #ifndef O_SYNC
94: # define O_SYNC 0
95: #endif
96:
97:
98:
99: #if !defined O_BINARY && defined _O_BINARY
100:
101: # define O_BINARY _O_BINARY
102: # define O_TEXT _O_TEXT
103: #endif
104:
105: #ifdef __BEOS__
106:
107: # undef O_BINARY
108: # undef O_TEXT
109: #endif
110:
111: #ifndef O_BINARY
112: # define O_BINARY 0
113: # define O_TEXT 0
114: #endif
115:
116: #endif