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 (0 || defined GNULIB_POSIXCHECK) \ 72 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) 98 #if defined __cplusplus && defined GNULIB_NAMESPACE 99 # define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { 100 # define _GL_END_NAMESPACE } 102 # define _GL_BEGIN_NAMESPACE 103 # define _GL_END_NAMESPACE 167 #if defined __cplusplus 168 # define _GL_EXTERN_C extern "C" 170 # define _GL_EXTERN_C extern 180 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ 181 _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) 182 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ 183 _GL_EXTERN_C rettype rpl_func parameters_and_attributes 192 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ 193 _GL_EXTERN_C rettype func parameters_and_attributes 204 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \ 205 _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) 206 #if defined __cplusplus && defined GNULIB_NAMESPACE 207 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ 208 namespace GNULIB_NAMESPACE \ 210 static const struct _gl_ ## func ## _wrapper \ 212 typedef rettype (*type) parameters; \ 214 inline operator type () const \ 220 _GL_EXTERN_C int _gl_cxxalias_dummy 222 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ 223 _GL_EXTERN_C int _gl_cxxalias_dummy 231 #if defined __cplusplus && defined GNULIB_NAMESPACE 232 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ 233 namespace GNULIB_NAMESPACE \ 235 static const struct _gl_ ## func ## _wrapper \ 237 typedef rettype (*type) parameters; \ 239 inline operator type () const \ 241 return reinterpret_cast<type>(::rpl_func); \ 245 _GL_EXTERN_C int _gl_cxxalias_dummy 247 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ 248 _GL_EXTERN_C int _gl_cxxalias_dummy 261 #if defined __cplusplus && defined GNULIB_NAMESPACE 262 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ 263 namespace GNULIB_NAMESPACE \ 265 static const struct _gl_ ## func ## _wrapper \ 267 typedef rettype (*type) parameters; \ 269 inline operator type () const \ 275 _GL_EXTERN_C int _gl_cxxalias_dummy 277 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ 278 _GL_EXTERN_C int _gl_cxxalias_dummy 286 #if defined __cplusplus && defined GNULIB_NAMESPACE 287 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ 288 namespace GNULIB_NAMESPACE \ 290 static const struct _gl_ ## func ## _wrapper \ 292 typedef rettype (*type) parameters; \ 294 inline operator type () const \ 296 return reinterpret_cast<type>(::func); \ 300 _GL_EXTERN_C int _gl_cxxalias_dummy 302 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ 303 _GL_EXTERN_C int _gl_cxxalias_dummy 312 #if defined __cplusplus && defined GNULIB_NAMESPACE 318 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ 319 namespace GNULIB_NAMESPACE \ 321 static const struct _gl_ ## func ## _wrapper \ 323 typedef rettype (*type) parameters; \ 325 inline operator type () const \ 327 return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \ 331 _GL_EXTERN_C int _gl_cxxalias_dummy 333 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ 334 _GL_EXTERN_C int _gl_cxxalias_dummy 341 #if defined __cplusplus && defined GNULIB_NAMESPACE 342 # define _GL_CXXALIASWARN(func) \ 343 _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) 344 # define _GL_CXXALIASWARN_1(func,namespace) \ 345 _GL_CXXALIASWARN_2 (func, namespace) 349 # define _GL_CXXALIASWARN_2(func,namespace) \ 350 _GL_WARN_ON_USE (func, \ 351 "The symbol ::" #func " refers to the system function. " \ 352 "Use " #namespace "::" #func " instead.") 353 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 354 # define _GL_CXXALIASWARN_2(func,namespace) \ 355 extern __typeof__ (func) func 357 # define _GL_CXXALIASWARN_2(func,namespace) \ 358 _GL_EXTERN_C int _gl_cxxalias_dummy 361 # define _GL_CXXALIASWARN(func) \ 362 _GL_EXTERN_C int _gl_cxxalias_dummy 368 #if defined __cplusplus && defined GNULIB_NAMESPACE 369 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ 370 _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ 372 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ 373 _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) 377 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 378 _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ 379 "The symbol ::" #func " refers to the system function. " \ 380 "Use " #namespace "::" #func " instead.") 381 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 382 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 383 extern __typeof__ (func) func 385 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 386 _GL_EXTERN_C int _gl_cxxalias_dummy 389 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ 390 _GL_EXTERN_C int _gl_cxxalias_dummy 415 #ifndef _GL_ARG_NONNULL 416 # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 417 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) 419 # define _GL_ARG_NONNULL(params) 487 #ifndef _GL_WARN_ON_USE 489 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) 491 # define _GL_WARN_ON_USE(function, message) \ 492 extern __typeof__ (function) function __attribute__ ((__warning__ (message))) 493 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 495 # define _GL_WARN_ON_USE(function, message) \ 496 extern __typeof__ (function) function 498 # define _GL_WARN_ON_USE(function, message) \ 499 _GL_WARN_EXTERN_C int _gl_warn_on_use 509 #ifndef _GL_WARN_ON_USE_CXX 510 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) 511 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ 512 extern rettype function parameters_and_attributes \ 513 __attribute__ ((__warning__ (msg))) 514 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 516 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ 517 extern rettype function parameters_and_attributes 519 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ 520 _GL_WARN_EXTERN_C int _gl_warn_on_use 526 #ifndef _GL_WARN_EXTERN_C 527 # if defined __cplusplus 528 # define _GL_WARN_EXTERN_C extern "C" 530 # define _GL_WARN_EXTERN_C extern 539 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 541 # define fcntl rpl_fcntl 552 #elif defined GNULIB_POSIXCHECK 554 # if HAVE_RAW_DECL_FCNTL 556 "use gnulib module fcntl for portability");
562 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 564 # define open rpl_open 577 #elif defined GNULIB_POSIXCHECK 581 "use gnulib module open for portability");
586 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 588 # define openat rpl_openat 591 (
int fd,
char const *file,
int flags, ...)
594 (
int fd,
char const *file,
int flags, ...));
598 (
int fd,
char const *file,
int flags, ...)
602 (
int fd,
char const *file,
int flags, ...));
605 #elif defined GNULIB_POSIXCHECK 607 # if HAVE_RAW_DECL_OPENAT 609 "use gnulib module openat for portability");
617 # define FD_CLOEXEC 1 623 #ifndef F_DUPFD_CLOEXEC 624 # define F_DUPFD_CLOEXEC 0x40000000 626 # define GNULIB_defined_F_DUPFD_CLOEXEC 1 628 # define GNULIB_defined_F_DUPFD_CLOEXEC 0 646 # if defined O_CLOEXEC && ! (INT_MIN <= O_CLOEXEC && O_CLOEXEC <= INT_MAX) 649 # if defined O_NOFOLLOW && ! (INT_MIN <= O_NOFOLLOW && O_NOFOLLOW <= INT_MAX) 652 # if defined O_TTY_INIT && ! (INT_MIN <= O_TTY_INIT && O_TTY_INIT <= INT_MAX) 657 #if !defined O_DIRECT && defined O_DIRECTIO 659 # define O_DIRECT O_DIRECTIO 662 #if !defined O_CLOEXEC && defined O_NOINHERIT 664 # define O_CLOEXEC O_NOINHERIT 668 # define O_CLOEXEC 0x40000000 669 # define GNULIB_defined_O_CLOEXEC 1 671 # define GNULIB_defined_O_CLOEXEC 0 679 # define O_DIRECTORY 0 687 # define O_EXEC O_RDONLY 690 #ifndef O_IGNORE_CTTY 691 # define O_IGNORE_CTTY 0 703 # define O_NONBLOCK O_NDELAY 711 # define GNULIB_defined_O_NONBLOCK 0 713 # define GNULIB_defined_O_NONBLOCK 1 715 # define O_NONBLOCK 0x40000000 724 # define O_NOFOLLOW 0 744 # define O_SEARCH O_RDONLY 752 # define O_TTY_INIT 0 755 #if ~O_ACCMODE & (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH) 757 # define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH) 762 #if !defined O_BINARY && defined _O_BINARY 764 # define O_BINARY _O_BINARY 765 # define O_TEXT _O_TEXT 768 #if defined __BEOS__ || defined __HAIKU__ 785 #if 0 < AT_FDCWD && AT_FDCWD == 0xffd19553 793 # define AT_FDCWD (-3041965) 798 #ifndef AT_SYMLINK_NOFOLLOW 799 # define AT_SYMLINK_NOFOLLOW 4096 803 # define AT_REMOVEDIR 1 807 #ifndef AT_SYMLINK_FOLLOW 808 # define AT_SYMLINK_FOLLOW 2 812 # define AT_EACCESS 4
#define _GL_CXXALIAS_SYS(func, rettype, parameters)
Definition: fcntl.h:277
#define _GL_WARN_ON_USE(function, message)
Definition: fcntl.h:498
#define _GL_CXXALIAS_RPL(func, rettype, parameters)
Definition: fcntl.h:204
#define _GL_FUNCDECL_SYS(func, rettype, parameters_and_attributes)
Definition: fcntl.h:192
#define _GL_ARG_NONNULL(params)
Definition: fcntl.h:419
#define _GL_CXXALIASWARN(func)
Definition: fcntl.h:361
#define _GL_FUNCDECL_RPL(func, rettype, parameters_and_attributes)
Definition: fcntl.h:180