00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #if __GNUC__ >= 3
00023 @PRAGMA_SYSTEM_HEADER@
00024 #endif
00025 @PRAGMA_COLUMNS@
00026
00027 #if defined __need_system_fcntl_h
00028
00029
00030 #include <sys/types.h>
00031
00032
00033
00034
00035
00036
00037 #if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
00038 # include <sys/stat.h>
00039 #endif
00040 #@INCLUDE_NEXT@ @NEXT_FCNTL_H@
00041
00042 #else
00043
00044
00045 #ifndef _GL_FCNTL_H
00046
00047 #include <sys/types.h>
00048
00049
00050
00051
00052
00053
00054 #if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
00055 # include <sys/stat.h>
00056 #endif
00057
00058 #@INCLUDE_NEXT@ @NEXT_FCNTL_H@
00059
00060 #ifndef _GL_FCNTL_H
00061 #define _GL_FCNTL_H
00062
00063 #ifndef __GLIBC__
00064 # include <unistd.h>
00065 #endif
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077 #if @GNULIB_FCNTL@
00078 # if @REPLACE_FCNTL@
00079 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00080 # undef fcntl
00081 # define fcntl rpl_fcntl
00082 # endif
00083 _GL_FUNCDECL_RPL (fcntl, int, (int fd, int action, ...));
00084 _GL_CXXALIAS_RPL (fcntl, int, (int fd, int action, ...));
00085 # else
00086 # if !@HAVE_FCNTL@
00087 _GL_FUNCDECL_SYS (fcntl, int, (int fd, int action, ...));
00088 # endif
00089 _GL_CXXALIAS_SYS (fcntl, int, (int fd, int action, ...));
00090 # endif
00091 _GL_CXXALIASWARN (fcntl);
00092 #elif defined GNULIB_POSIXCHECK
00093 # undef fcntl
00094 # if HAVE_RAW_DECL_FCNTL
00095 _GL_WARN_ON_USE (fcntl, "fcntl is not always POSIX compliant - "
00096 "use gnulib module fcntl for portability");
00097 # endif
00098 #endif
00099
00100 #if @GNULIB_OPEN@
00101 # if @REPLACE_OPEN@
00102 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00103 # undef open
00104 # define open rpl_open
00105 # endif
00106 _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
00107 _GL_ARG_NONNULL ((1)));
00108 _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
00109 # else
00110 _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
00111 # endif
00112
00113
00114 # if !defined __hpux
00115 _GL_CXXALIASWARN (open);
00116 # endif
00117 #elif defined GNULIB_POSIXCHECK
00118 # undef open
00119
00120 _GL_WARN_ON_USE (open, "open is not always POSIX compliant - "
00121 "use gnulib module open for portability");
00122 #endif
00123
00124 #if @GNULIB_OPENAT@
00125 # if @REPLACE_OPENAT@
00126 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00127 # undef openat
00128 # define openat rpl_openat
00129 # endif
00130 _GL_FUNCDECL_RPL (openat, int,
00131 (int fd, char const *file, int flags, ...)
00132 _GL_ARG_NONNULL ((2)));
00133 _GL_CXXALIAS_RPL (openat, int,
00134 (int fd, char const *file, int flags, ...));
00135 # else
00136 # if !@HAVE_OPENAT@
00137 _GL_FUNCDECL_SYS (openat, int,
00138 (int fd, char const *file, int flags, ...)
00139 _GL_ARG_NONNULL ((2)));
00140 # endif
00141 _GL_CXXALIAS_SYS (openat, int,
00142 (int fd, char const *file, int flags, ...));
00143 # endif
00144 _GL_CXXALIASWARN (openat);
00145 #elif defined GNULIB_POSIXCHECK
00146 # undef openat
00147 # if HAVE_RAW_DECL_OPENAT
00148 _GL_WARN_ON_USE (openat, "openat is not portable - "
00149 "use gnulib module openat for portability");
00150 # endif
00151 #endif
00152
00153
00154
00155
00156 #ifndef FD_CLOEXEC
00157 # define FD_CLOEXEC 1
00158 #endif
00159
00160
00161
00162
00163 #ifndef F_DUPFD_CLOEXEC
00164 # define F_DUPFD_CLOEXEC 0x40000000
00165
00166 # define GNULIB_defined_F_DUPFD_CLOEXEC 1
00167 #else
00168 # define GNULIB_defined_F_DUPFD_CLOEXEC 0
00169 #endif
00170
00171 #ifndef F_DUPFD
00172 # define F_DUPFD 1
00173 #endif
00174
00175 #ifndef F_GETFD
00176 # define F_GETFD 2
00177 #endif
00178
00179
00180
00181 #if !defined O_DIRECT && defined O_DIRECTIO
00182
00183 # define O_DIRECT O_DIRECTIO
00184 #endif
00185
00186 #if !defined O_CLOEXEC && defined O_NOINHERIT
00187
00188
00189 # define O_CLOEXEC O_NOINHERIT
00190 #endif
00191
00192 #ifndef O_CLOEXEC
00193 # define O_CLOEXEC 0
00194 #endif
00195
00196 #ifndef O_DIRECT
00197 # define O_DIRECT 0
00198 #endif
00199
00200 #ifndef O_DIRECTORY
00201 # define O_DIRECTORY 0
00202 #endif
00203
00204 #ifndef O_DSYNC
00205 # define O_DSYNC 0
00206 #endif
00207
00208 #ifndef O_EXEC
00209 # define O_EXEC O_RDONLY
00210 #endif
00211
00212 #ifndef O_NDELAY
00213 # define O_NDELAY 0
00214 #endif
00215
00216 #ifndef O_NOATIME
00217 # define O_NOATIME 0
00218 #endif
00219
00220 #ifndef O_NONBLOCK
00221 # define O_NONBLOCK O_NDELAY
00222 #endif
00223
00224 #ifndef O_NOCTTY
00225 # define O_NOCTTY 0
00226 #endif
00227
00228 #ifndef O_NOFOLLOW
00229 # define O_NOFOLLOW 0
00230 #endif
00231
00232 #ifndef O_NOLINKS
00233 # define O_NOLINKS 0
00234 #endif
00235
00236 #ifndef O_RSYNC
00237 # define O_RSYNC 0
00238 #endif
00239
00240 #ifndef O_SEARCH
00241 # define O_SEARCH O_RDONLY
00242 #endif
00243
00244 #ifndef O_SYNC
00245 # define O_SYNC 0
00246 #endif
00247
00248 #ifndef O_TTY_INIT
00249 # define O_TTY_INIT 0
00250 #endif
00251
00252
00253
00254 #if !defined O_BINARY && defined _O_BINARY
00255
00256 # define O_BINARY _O_BINARY
00257 # define O_TEXT _O_TEXT
00258 #endif
00259
00260 #if defined __BEOS__ || defined __HAIKU__
00261
00262 # undef O_BINARY
00263 # undef O_TEXT
00264 #endif
00265
00266 #ifndef O_BINARY
00267 # define O_BINARY 0
00268 # define O_TEXT 0
00269 #endif
00270
00271
00272
00273
00274
00275
00276
00277 #if 0 < AT_FDCWD && AT_FDCWD == 0xffd19553
00278 # undef AT_FDCWD
00279 #endif
00280
00281
00282
00283
00284 #ifndef AT_FDCWD
00285 # define AT_FDCWD (-3041965)
00286 #endif
00287
00288
00289
00290 #ifndef AT_SYMLINK_NOFOLLOW
00291 # define AT_SYMLINK_NOFOLLOW 4096
00292 #endif
00293
00294 #ifndef AT_REMOVEDIR
00295 # define AT_REMOVEDIR 1
00296 #endif
00297
00298
00299 #ifndef AT_SYMLINK_FOLLOW
00300 # define AT_SYMLINK_FOLLOW 2
00301 #endif
00302
00303 #ifndef AT_EACCESS
00304 # define AT_EACCESS 4
00305 #endif
00306
00307
00308 #endif
00309 #endif
00310 #endif