Rev 5369 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5369 | Rev 6099 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | extern "C" { |
3 | extern "C" { |
4 | #endif |
4 | #endif |
5 | #define _SYS__DEFAULT_FCNTL_H_ |
5 | #define _SYS__DEFAULT_FCNTL_H_ |
6 | #include <_ansi.h> |
6 | #include <_ansi.h> |
7 | #define _FOPEN (-1) /* from sys/file.h, kernel use only */ |
7 | #include |
- | 8 | #define _FOPEN (-1) /* from sys/file.h, kernel use only */ |
|
8 | #define _FREAD 0x0001 /* read enabled */ |
9 | #define _FREAD 0x0001 /* read enabled */ |
9 | #define _FWRITE 0x0002 /* write enabled */ |
10 | #define _FWRITE 0x0002 /* write enabled */ |
10 | #define _FAPPEND 0x0008 /* append (writes guaranteed at the end) */ |
11 | #define _FAPPEND 0x0008 /* append (writes guaranteed at the end) */ |
11 | #define _FMARK 0x0010 /* internal; mark during gc() */ |
12 | #define _FMARK 0x0010 /* internal; mark during gc() */ |
12 | #define _FDEFER 0x0020 /* internal; defer for next gc pass */ |
13 | #define _FDEFER 0x0020 /* internal; defer for next gc pass */ |
Line 132... | Line 133... | ||
132 | #ifndef _POSIX_SOURCE |
133 | #ifndef _POSIX_SOURCE |
133 | #define F_UNLKSYS 4 /* remove remote locks for a given system */ |
134 | #define F_UNLKSYS 4 /* remove remote locks for a given system */ |
134 | #endif /* !_POSIX_SOURCE */ |
135 | #endif /* !_POSIX_SOURCE */ |
135 | 136 | ||
Line 136... | Line 137... | ||
136 | #ifdef __CYGWIN__ |
137 | #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 || defined(__CYGWIN__) |
137 | /* Special descriptor value to denote the cwd in calls to openat(2) etc. */ |
138 | /* Special descriptor value to denote the cwd in calls to openat(2) etc. */ |
138 | #define AT_FDCWD -2 |
139 | #define AT_FDCWD -2 |
Line 139... | Line 140... | ||
139 | 140 | ||
140 | /* Flag values for faccessat2) et al. */ |
141 | /* Flag values for faccessat2) et al. */ |
141 | #define AT_EACCESS 1 |
142 | #define AT_EACCESS 1 |
142 | #define AT_SYMLINK_NOFOLLOW 2 |
143 | #define AT_SYMLINK_NOFOLLOW 2 |
143 | #define AT_SYMLINK_FOLLOW 4 |
144 | #define AT_SYMLINK_FOLLOW 4 |
144 | #define AT_REMOVEDIR 8 |
145 | #define AT_REMOVEDIR 8 |
Line -... | Line 146... | ||
- | 146 | #endif |
|
- | 147 | ||
- | 148 | #if __BSD_VISIBLE |
|
- | 149 | /* lock operations for flock(2) */ |
|
- | 150 | #define LOCK_SH 0x01 /* shared file lock */ |
|
- | 151 | #define LOCK_EX 0x02 /* exclusive file lock */ |
|
- | 152 | #define LOCK_NB 0x04 /* don't block when locking */ |
|
- | 153 | #define LOCK_UN 0x08 /* unlock file */ |
|
145 | #endif |
154 | #endif |
Line 146... | Line 155... | ||
146 | 155 | ||
147 | /*#include |
156 | /*#include |
148 | 157 | ||
Line 171... | Line 180... | ||
171 | long l_rsys; /* Remote system id wanting this lock */ |
180 | long l_rsys; /* Remote system id wanting this lock */ |
172 | }; |
181 | }; |
173 | #endif /* !_POSIX_SOURCE */ |
182 | #endif /* !_POSIX_SOURCE */ |
174 | 183 | ||
Line 175... | Line -... | ||
175 | - | ||
176 | #include |
184 | #include |
177 | #include |
185 | #include |
Line 178... | Line 186... | ||
178 | 186 | ||
- | 187 | extern int open _PARAMS ((const char *, int, ...)); |
|
- | 188 | #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 || defined(__CYGWIN__) |
|
- | 189 | extern int openat _PARAMS ((int, const char *, int, ...)); |
|
179 | extern int open _PARAMS ((const char *, int, ...)); |
190 | #endif |
180 | extern int creat _PARAMS ((const char *, mode_t)); |
191 | extern int creat _PARAMS ((const char *, mode_t)); |
- | 192 | extern int fcntl _PARAMS ((int, int, ...)); |
|
- | 193 | #if __BSD_VISIBLE |
|
- | 194 | extern int flock _PARAMS ((int, int)); |
|
181 | extern int fcntl _PARAMS ((int, int, ...)); |
195 | #endif |
182 | #ifdef __CYGWIN__ |
196 | #ifdef __CYGWIN__ |
183 | #include |
197 | #include |
184 | extern int futimesat _PARAMS ((int, const char *, const struct timeval *)); |
- | |
185 | extern int openat _PARAMS ((int, const char *, int, ...)); |
198 | extern int futimesat _PARAMS ((int, const char *, const struct timeval *)); |
Line 186... | Line 199... | ||
186 | #endif |
199 | #endif |
187 | 200 | ||
188 | /* Provide _ |
201 | /* Provide _ |