Rev 6099 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6099 | Rev 6536 | ||
---|---|---|---|
Line 64... | Line 64... | ||
64 | #define _O_TEXT O_TEXT |
64 | #define _O_TEXT O_TEXT |
65 | #define _O_BINARY O_BINARY |
65 | #define _O_BINARY O_BINARY |
66 | #define _O_RAW O_BINARY |
66 | #define _O_RAW O_BINARY |
67 | #define _O_NOINHERIT O_NOINHERIT |
67 | #define _O_NOINHERIT O_NOINHERIT |
68 | 68 | #if __MISC_VISIBLE |
|
69 | #ifndef _POSIX_SOURCE |
- | |
70 | 69 | ||
Line 71... | Line 70... | ||
71 | /* |
70 | /* |
72 | * Flags that work for fcntl(fd, F_SETFL, FXXXX) |
71 | * Flags that work for fcntl(fd, F_SETFL, FXXXX) |
73 | */ |
72 | */ |
74 | #define FAPPEND _FAPPEND |
73 | #define FAPPEND _FAPPEND |
Line 97... | Line 96... | ||
97 | #define FTRUNC _FTRUNC |
96 | #define FTRUNC _FTRUNC |
98 | #define FEXCL _FEXCL |
97 | #define FEXCL _FEXCL |
99 | #define FNOCTTY _FNOCTTY |
98 | #define FNOCTTY _FNOCTTY |
100 | 99 | ||
Line 101... | Line 100... | ||
101 | #endif /* !_POSIX_SOURCE */ |
100 | #endif /* __MISC_VISIBLE */ |
Line 102... | Line 101... | ||
102 | 101 | ||
103 | /* XXX close on exec request; must match UF_EXCLOSE in user.h */ |
102 | /* XXX close on exec request; must match UF_EXCLOSE in user.h */ |
Line 104... | Line 103... | ||
104 | #define FD_CLOEXEC 1 /* posix */ |
103 | #define FD_CLOEXEC 1 /* posix */ |
105 | 104 | ||
106 | /* fcntl(2) requests */ |
105 | /* fcntl(2) requests */ |
107 | #define F_DUPFD 0 /* Duplicate fildes */ |
106 | #define F_DUPFD 0 /* Duplicate fildes */ |
108 | #define F_GETFD 1 /* Get fildes flags (close on exec) */ |
107 | #define F_GETFD 1 /* Get fildes flags (close on exec) */ |
109 | #define F_SETFD 2 /* Set fildes flags (close on exec) */ |
108 | #define F_SETFD 2 /* Set fildes flags (close on exec) */ |
110 | #define F_GETFL 3 /* Get file flags */ |
109 | #define F_GETFL 3 /* Get file flags */ |
111 | #define F_SETFL 4 /* Set file flags */ |
110 | #define F_SETFL 4 /* Set file flags */ |
112 | #ifndef _POSIX_SOURCE |
111 | #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 |
113 | #define F_GETOWN 5 /* Get owner - for ASYNC */ |
112 | #define F_GETOWN 5 /* Get owner - for ASYNC */ |
114 | #define F_SETOWN 6 /* Set owner - for ASYNC */ |
113 | #define F_SETOWN 6 /* Set owner - for ASYNC */ |
115 | #endif /* !_POSIX_SOURCE */ |
114 | #endif /* __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 */ |
116 | #define F_GETLK 7 /* Get record-locking information */ |
115 | #define F_GETLK 7 /* Get record-locking information */ |
117 | #define F_SETLK 8 /* Set or Clear a record-lock (Non-Blocking) */ |
116 | #define F_SETLK 8 /* Set or Clear a record-lock (Non-Blocking) */ |
118 | #define F_SETLKW 9 /* Set or Clear a record-lock (Blocking) */ |
117 | #define F_SETLKW 9 /* Set or Clear a record-lock (Blocking) */ |
119 | #ifndef _POSIX_SOURCE |
118 | #if __MISC_VISIBLE |
120 | #define F_RGETLK 10 /* Test a remote lock to see if it is blocked */ |
119 | #define F_RGETLK 10 /* Test a remote lock to see if it is blocked */ |
121 | #define F_RSETLK 11 /* Set or unlock a remote lock */ |
120 | #define F_RSETLK 11 /* Set or unlock a remote lock */ |
122 | #define F_CNVT 12 /* Convert a fhandle to an open fd */ |
121 | #define F_CNVT 12 /* Convert a fhandle to an open fd */ |
123 | #define F_RSETLKW 13 /* Set or Clear remote record-lock(Blocking) */ |
122 | #define F_RSETLKW 13 /* Set or Clear remote record-lock(Blocking) */ |
124 | #endif /* !_POSIX_SOURCE */ |
123 | #endif /* __MISC_VISIBLE */ |
125 | #ifdef __CYGWIN__ |
124 | #if __POSIX_VISIBLE >= 200809 |
Line 126... | Line 125... | ||
126 | #define F_DUPFD_CLOEXEC 14 /* As F_DUPFD, but set close-on-exec flag */ |
125 | #define F_DUPFD_CLOEXEC 14 /* As F_DUPFD, but set close-on-exec flag */ |
127 | #endif |
126 | #endif |
128 | 127 | ||
129 | /* fcntl(2) flags (l_type field of flock structure) */ |
128 | /* fcntl(2) flags (l_type field of flock structure) */ |
130 | #define F_RDLCK 1 /* read lock */ |
129 | #define F_RDLCK 1 /* read lock */ |
131 | #define F_WRLCK 2 /* write lock */ |
130 | #define F_WRLCK 2 /* write lock */ |
132 | #define F_UNLCK 3 /* remove lock(s) */ |
131 | #define F_UNLCK 3 /* remove lock(s) */ |
Line 133... | Line 132... | ||
133 | #ifndef _POSIX_SOURCE |
132 | #if __MISC_VISIBLE |
134 | #define F_UNLKSYS 4 /* remove remote locks for a given system */ |
133 | #define F_UNLKSYS 4 /* remove remote locks for a given system */ |
135 | #endif /* !_POSIX_SOURCE */ |
134 | #endif /* __MISC_VISIBLE */ |
Line 136... | Line 135... | ||
136 | 135 | ||
137 | #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 || defined(__CYGWIN__) |
136 | #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 |
Line 166... | Line 165... | ||
166 | short l_xxx; /* reserved for future use */ |
165 | short l_xxx; /* reserved for future use */ |
167 | }; |
166 | }; |
168 | #endif /* __CYGWIN__ */ |
167 | #endif /* __CYGWIN__ */ |
169 | 168 | ||
Line 170... | Line 169... | ||
170 | #ifndef _POSIX_SOURCE |
169 | #if __MISC_VISIBLE |
171 | /* extended file segment locking set data type */ |
170 | /* extended file segment locking set data type */ |
172 | struct eflock { |
171 | struct eflock { |
173 | short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */ |
172 | short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */ |
174 | short l_whence; /* flag to choose starting offset */ |
173 | short l_whence; /* flag to choose starting offset */ |
175 | long l_start; /* relative offset, in bytes */ |
174 | long l_start; /* relative offset, in bytes */ |
Line 178... | Line 177... | ||
178 | short l_xxx; /* reserved for future use */ |
177 | short l_xxx; /* reserved for future use */ |
179 | long l_rpid; /* Remote process id wanting this lock */ |
178 | long l_rpid; /* Remote process id wanting this lock */ |
180 | long l_rsys; /* Remote system id wanting this lock */ |
179 | long l_rsys; /* Remote system id wanting this lock */ |
181 | }; |
180 | }; |
182 | #endif /* !_POSIX_SOURCE */ |
181 | #endif /* __MISC_VISIBLE */ |
183 | 182 | ||
Line 184... | Line 183... | ||
184 | #include |
183 | #include |
185 | #include |
184 | #include |
Line 186... | Line 185... | ||
186 | 185 | ||
187 | extern int open _PARAMS ((const char *, int, ...)); |
186 | extern int open _PARAMS ((const char *, int, ...)); |
188 | #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 || defined(__CYGWIN__) |
187 | #if __ATFILE_VISIBLE |
189 | extern int openat _PARAMS ((int, const char *, int, ...)); |
188 | extern int openat _PARAMS ((int, const char *, int, ...)); |
190 | #endif |
189 | #endif |
191 | extern int creat _PARAMS ((const char *, mode_t)); |
190 | extern int creat _PARAMS ((const char *, mode_t)); |
192 | extern int fcntl _PARAMS ((int, int, ...)); |
191 | extern int fcntl _PARAMS ((int, int, ...)); |
193 | #if __BSD_VISIBLE |
192 | #if __BSD_VISIBLE |
194 | extern int flock _PARAMS ((int, int)); |
193 | extern int flock _PARAMS ((int, int)); |
195 | #endif |
194 | #endif |
196 | #ifdef __CYGWIN__ |
195 | #if __GNU_VISIBLE |
197 | #include |
196 | #include |
198 | extern int futimesat _PARAMS ((int, const char *, const struct timeval *)); |
197 | extern int futimesat _PARAMS ((int, const char *, const struct timeval *)); |
Line 199... | Line 198... | ||
199 | #endif |
198 | #endif |