22 #pragma GCC system_header 26 #if defined __need_system_fcntl_h 38 #if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && (defined __ICC || !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))) 41 #include_next <fcntl.h> 57 #if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && (defined __ICC || !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))) 61 #include_next <fcntl.h> 71 #if (1 || defined GNULIB_POSIXCHECK) \ 72 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) 82 #if defined __cplusplus && defined GNULIB_NAMESPACE 83 # define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { 84 # define _GL_END_NAMESPACE } 86 # define _GL_BEGIN_NAMESPACE 87 # define _GL_END_NAMESPACE 151 #if defined __cplusplus 152 # define _GL_EXTERN_C extern "C" 154 # define _GL_EXTERN_C extern 164 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ 165 _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) 166 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ 167 _GL_EXTERN_C rettype rpl_func parameters_and_attributes 176 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ 177 _GL_EXTERN_C rettype func parameters_and_attributes 188 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \ 189 _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) 190 #if defined __cplusplus && defined GNULIB_NAMESPACE 191 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ 192 namespace GNULIB_NAMESPACE \ 194 static const struct _gl_ ## func ## _wrapper \ 196 typedef rettype (*type) parameters; \ 197 inline type rpl () const { return ::rpl_func; } \ 198 inline operator type () const { return rpl (); } \ 201 _GL_EXTERN_C int _gl_cxxalias_dummy 203 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ 204 _GL_EXTERN_C int _gl_cxxalias_dummy 212 #if defined __cplusplus && defined GNULIB_NAMESPACE 213 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ 214 namespace GNULIB_NAMESPACE \ 216 static const struct _gl_ ## func ## _wrapper \ 218 typedef rettype (*type) parameters; \ 219 inline type rpl () const \ 220 { return reinterpret_cast<type>(::rpl_func); } \ 221 inline operator type () const { return rpl (); } \ 224 _GL_EXTERN_C int _gl_cxxalias_dummy 226 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ 227 _GL_EXTERN_C int _gl_cxxalias_dummy 240 #if defined __cplusplus && defined GNULIB_NAMESPACE 241 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ 242 namespace GNULIB_NAMESPACE \ 244 static const struct _gl_ ## func ## _wrapper \ 246 typedef rettype (*type) parameters; \ 247 inline type rpl () const { return ::func; } \ 248 inline operator type () const { return rpl (); } \ 251 _GL_EXTERN_C int _gl_cxxalias_dummy 253 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ 254 _GL_EXTERN_C int _gl_cxxalias_dummy 262 #if defined __cplusplus && defined GNULIB_NAMESPACE 263 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ 264 namespace GNULIB_NAMESPACE \ 266 static const struct _gl_ ## func ## _wrapper \ 268 typedef rettype (*type) parameters; \ 269 inline type rpl () const \ 270 { return reinterpret_cast<type>(::func); } \ 271 inline operator type () const { return rpl (); }\ 274 _GL_EXTERN_C int _gl_cxxalias_dummy 276 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ 277 _GL_EXTERN_C int _gl_cxxalias_dummy 286 #if defined __cplusplus && defined GNULIB_NAMESPACE 292 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ 293 namespace GNULIB_NAMESPACE \ 295 static const struct _gl_ ## func ## _wrapper \ 297 typedef rettype (*type) parameters; \ 299 inline type rpl () const \ 300 { return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); }\ 302 inline operator type () const { return rpl (); } \ 305 _GL_EXTERN_C int _gl_cxxalias_dummy 307 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ 308 _GL_EXTERN_C int _gl_cxxalias_dummy 315 #if defined __cplusplus && defined GNULIB_NAMESPACE 316 # define _GL_CXXALIASWARN(func) \ 317 _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) 318 # define _GL_CXXALIASWARN_1(func,namespace) \ 319 _GL_CXXALIASWARN_2 (func, namespace) 323 # define _GL_CXXALIASWARN_2(func,namespace) \ 324 _GL_WARN_ON_USE (func, \ 325 "The symbol ::" #func " refers to the system function. " \ 326 "Use " #namespace "::" #func " instead.") 327 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 328 # define _GL_CXXALIASWARN_2(func,namespace) \ 329 extern __typeof__ (func) func 331 # define _GL_CXXALIASWARN_2(func,namespace) \ 332 _GL_EXTERN_C int _gl_cxxalias_dummy 335 # define _GL_CXXALIASWARN(func) \ 336 _GL_EXTERN_C int _gl_cxxalias_dummy 342 #if defined __cplusplus && defined GNULIB_NAMESPACE 343 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ 344 _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ 346 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ 347 _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) 351 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 352 _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ 353 "The symbol ::" #func " refers to the system function. " \ 354 "Use " #namespace "::" #func " instead.") 355 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 356 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 357 extern __typeof__ (func) func 359 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 360 _GL_EXTERN_C int _gl_cxxalias_dummy 363 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ 364 _GL_EXTERN_C int _gl_cxxalias_dummy 373 #ifndef _GL_ARG_NONNULL 374 # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 375 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) 377 # define _GL_ARG_NONNULL(params) 382 #ifndef _GL_WARN_ON_USE 384 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) 386 # define _GL_WARN_ON_USE(function, message) \ 387 extern __typeof__ (function) function __attribute__ ((__warning__ (message))) 388 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 390 # define _GL_WARN_ON_USE(function, message) \ 391 extern __typeof__ (function) function 393 # define _GL_WARN_ON_USE(function, message) \ 394 _GL_WARN_EXTERN_C int _gl_warn_on_use 404 #ifndef _GL_WARN_ON_USE_CXX 405 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) 406 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ 407 extern rettype function parameters_and_attributes \ 408 __attribute__ ((__warning__ (msg))) 409 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 411 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ 412 extern rettype function parameters_and_attributes 414 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ 415 _GL_WARN_EXTERN_C int _gl_warn_on_use 421 #ifndef _GL_WARN_EXTERN_C 422 # if defined __cplusplus 423 # define _GL_WARN_EXTERN_C extern "C" 425 # define _GL_WARN_EXTERN_C extern 434 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 436 # define fcntl rpl_fcntl 447 #elif defined GNULIB_POSIXCHECK 449 # if HAVE_RAW_DECL_FCNTL 451 "use gnulib module fcntl for portability");
457 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 459 # define open rpl_open 472 #elif defined GNULIB_POSIXCHECK 476 "use gnulib module open for portability");
481 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 483 # define openat rpl_openat 486 (
int fd,
char const *file,
int flags, ...)
489 (
int fd,
char const *file,
int flags, ...));
493 (
int fd,
char const *file,
int flags, ...)
497 (
int fd,
char const *file,
int flags, ...));
500 #elif defined GNULIB_POSIXCHECK 502 # if HAVE_RAW_DECL_OPENAT 504 "use gnulib module openat for portability");
512 # define FD_CLOEXEC 1 518 #ifndef F_DUPFD_CLOEXEC 519 # define F_DUPFD_CLOEXEC 0x40000000 521 # define GNULIB_defined_F_DUPFD_CLOEXEC 1 523 # define GNULIB_defined_F_DUPFD_CLOEXEC 0 541 # if defined O_CLOEXEC && ! (INT_MIN <= O_CLOEXEC && O_CLOEXEC <= INT_MAX) 544 # if defined O_NOFOLLOW && ! (INT_MIN <= O_NOFOLLOW && O_NOFOLLOW <= INT_MAX) 547 # if defined O_TTY_INIT && ! (INT_MIN <= O_TTY_INIT && O_TTY_INIT <= INT_MAX) 552 #if !defined O_DIRECT && defined O_DIRECTIO 554 # define O_DIRECT O_DIRECTIO 557 #if !defined O_CLOEXEC && defined O_NOINHERIT 559 # define O_CLOEXEC O_NOINHERIT 571 # define O_DIRECTORY 0 579 # define O_EXEC O_RDONLY 582 #ifndef O_IGNORE_CTTY 583 # define O_IGNORE_CTTY 0 595 # define O_NONBLOCK O_NDELAY 603 # define GNULIB_defined_O_NONBLOCK 0 605 # define GNULIB_defined_O_NONBLOCK 1 607 # define O_NONBLOCK 0x40000000 616 # define O_NOFOLLOW 0 636 # define O_SEARCH O_RDONLY 644 # define O_TTY_INIT 0 647 #if ~O_ACCMODE & (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH) 649 # define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH) 654 #if !defined O_BINARY && defined _O_BINARY 656 # define O_BINARY _O_BINARY 657 # define O_TEXT _O_TEXT 660 #if defined __BEOS__ || defined __HAIKU__ 677 #if 0 < AT_FDCWD && AT_FDCWD == 0xffd19553 685 # define AT_FDCWD (-3041965) 690 #ifndef AT_SYMLINK_NOFOLLOW 691 # define AT_SYMLINK_NOFOLLOW 4096 695 # define AT_REMOVEDIR 1 699 #ifndef AT_SYMLINK_FOLLOW 700 # define AT_SYMLINK_FOLLOW 2 704 # define AT_EACCESS 4
#define _GL_CXXALIAS_SYS(func, rettype, parameters)
#define _GL_WARN_ON_USE(function, message)
#define _GL_CXXALIAS_RPL(func, rettype, parameters)
#define _GL_FUNCDECL_SYS(func, rettype, parameters_and_attributes)
#define _GL_ARG_NONNULL(params)
#define _GL_CXXALIASWARN(func)
#define _GL_FUNCDECL_RPL(func, rettype, parameters_and_attributes)