20 #pragma GCC system_header 24 #if defined __need_sig_atomic_t || defined __need_sigset_t || defined _GL_ALREADY_INCLUDING_SIGNAL_H || (defined _SIGNAL_H && !defined __SIZEOF_PTHREAD_MUTEX_T) 36 # include_next <signal.h> 43 #define _GL_ALREADY_INCLUDING_SIGNAL_H 52 #include_next <signal.h> 54 #undef _GL_ALREADY_INCLUDING_SIGNAL_H 62 #if (0 || defined GNULIB_POSIXCHECK) \ 63 && ((defined __APPLE__ && defined __MACH__) \ 64 || defined __FreeBSD__ || defined __OpenBSD__ || defined __osf__ \ 65 || defined __sun || defined __ANDROID__) \ 66 && ! defined __GLIBC__ 75 #if defined __cplusplus && defined GNULIB_NAMESPACE 76 # define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { 77 # define _GL_END_NAMESPACE } 79 # define _GL_BEGIN_NAMESPACE 80 # define _GL_END_NAMESPACE 144 #if defined __cplusplus 145 # define _GL_EXTERN_C extern "C" 147 # define _GL_EXTERN_C extern 157 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ 158 _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) 159 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ 160 _GL_EXTERN_C rettype rpl_func parameters_and_attributes 169 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ 170 _GL_EXTERN_C rettype func parameters_and_attributes 181 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \ 182 _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) 183 #if defined __cplusplus && defined GNULIB_NAMESPACE 184 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ 185 namespace GNULIB_NAMESPACE \ 187 static const struct _gl_ ## func ## _wrapper \ 189 typedef rettype (*type) parameters; \ 190 inline type rpl () const { return ::rpl_func; } \ 191 inline operator type () const { return rpl (); } \ 194 _GL_EXTERN_C int _gl_cxxalias_dummy 196 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ 197 _GL_EXTERN_C int _gl_cxxalias_dummy 205 #if defined __cplusplus && defined GNULIB_NAMESPACE 206 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ 207 namespace GNULIB_NAMESPACE \ 209 static const struct _gl_ ## func ## _wrapper \ 211 typedef rettype (*type) parameters; \ 212 inline type rpl () const \ 213 { return reinterpret_cast<type>(::rpl_func); } \ 214 inline operator type () const { return rpl (); } \ 217 _GL_EXTERN_C int _gl_cxxalias_dummy 219 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ 220 _GL_EXTERN_C int _gl_cxxalias_dummy 233 #if defined __cplusplus && defined GNULIB_NAMESPACE 234 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ 235 namespace GNULIB_NAMESPACE \ 237 static const struct _gl_ ## func ## _wrapper \ 239 typedef rettype (*type) parameters; \ 240 inline type rpl () const { return ::func; } \ 241 inline operator type () const { return rpl (); } \ 244 _GL_EXTERN_C int _gl_cxxalias_dummy 246 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ 247 _GL_EXTERN_C int _gl_cxxalias_dummy 255 #if defined __cplusplus && defined GNULIB_NAMESPACE 256 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ 257 namespace GNULIB_NAMESPACE \ 259 static const struct _gl_ ## func ## _wrapper \ 261 typedef rettype (*type) parameters; \ 262 inline type rpl () const \ 263 { return reinterpret_cast<type>(::func); } \ 264 inline operator type () const { return rpl (); }\ 267 _GL_EXTERN_C int _gl_cxxalias_dummy 269 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ 270 _GL_EXTERN_C int _gl_cxxalias_dummy 279 #if defined __cplusplus && defined GNULIB_NAMESPACE 285 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ 286 namespace GNULIB_NAMESPACE \ 288 static const struct _gl_ ## func ## _wrapper \ 290 typedef rettype (*type) parameters; \ 292 inline type rpl () const \ 293 { return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); }\ 295 inline operator type () const { return rpl (); } \ 298 _GL_EXTERN_C int _gl_cxxalias_dummy 300 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ 301 _GL_EXTERN_C int _gl_cxxalias_dummy 308 #if defined __cplusplus && defined GNULIB_NAMESPACE 309 # define _GL_CXXALIASWARN(func) \ 310 _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) 311 # define _GL_CXXALIASWARN_1(func,namespace) \ 312 _GL_CXXALIASWARN_2 (func, namespace) 316 # define _GL_CXXALIASWARN_2(func,namespace) \ 317 _GL_WARN_ON_USE (func, \ 318 "The symbol ::" #func " refers to the system function. " \ 319 "Use " #namespace "::" #func " instead.") 320 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 321 # define _GL_CXXALIASWARN_2(func,namespace) \ 322 extern __typeof__ (func) func 324 # define _GL_CXXALIASWARN_2(func,namespace) \ 325 _GL_EXTERN_C int _gl_cxxalias_dummy 328 # define _GL_CXXALIASWARN(func) \ 329 _GL_EXTERN_C int _gl_cxxalias_dummy 335 #if defined __cplusplus && defined GNULIB_NAMESPACE 336 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ 337 _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ 339 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ 340 _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) 344 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 345 _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ 346 "The symbol ::" #func " refers to the system function. " \ 347 "Use " #namespace "::" #func " instead.") 348 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 349 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 350 extern __typeof__ (func) func 352 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 353 _GL_EXTERN_C int _gl_cxxalias_dummy 356 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ 357 _GL_EXTERN_C int _gl_cxxalias_dummy 366 #ifndef _GL_ARG_NONNULL 367 # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 368 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) 370 # define _GL_ARG_NONNULL(params) 375 #ifndef _GL_WARN_ON_USE 377 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) 379 # define _GL_WARN_ON_USE(function, message) \ 380 extern __typeof__ (function) function __attribute__ ((__warning__ (message))) 381 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 383 # define _GL_WARN_ON_USE(function, message) \ 384 extern __typeof__ (function) function 386 # define _GL_WARN_ON_USE(function, message) \ 387 _GL_WARN_EXTERN_C int _gl_warn_on_use 397 #ifndef _GL_WARN_ON_USE_CXX 398 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) 399 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ 400 extern rettype function parameters_and_attributes \ 401 __attribute__ ((__warning__ (msg))) 402 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 404 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ 405 extern rettype function parameters_and_attributes 407 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ 408 _GL_WARN_EXTERN_C int _gl_warn_on_use 414 #ifndef _GL_WARN_EXTERN_C 415 # if defined __cplusplus 416 # define _GL_WARN_EXTERN_C extern "C" 418 # define _GL_WARN_EXTERN_C extern 426 # if !GNULIB_defined_sig_atomic_t 427 typedef int rpl_sig_atomic_t;
429 # define sig_atomic_t rpl_sig_atomic_t 430 # define GNULIB_defined_sig_atomic_t 1 436 # if !GNULIB_defined_sigset_t 437 typedef unsigned int sigset_t;
438 # define GNULIB_defined_sigset_t 1 447 # if !GNULIB_defined_sighandler_t 448 typedef void (*sighandler_t) (int);
449 # define GNULIB_defined_sighandler_t 1 461 # define GNULIB_defined_SIGPIPE 1 470 # if defined __TANDEM 478 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 479 # undef pthread_sigmask 480 # define pthread_sigmask rpl_pthread_sigmask 483 (
int how,
const sigset_t *new_mask, sigset_t *old_mask));
485 (
int how,
const sigset_t *new_mask, sigset_t *old_mask));
489 (
int how,
const sigset_t *new_mask, sigset_t *old_mask));
492 (
int how,
const sigset_t *new_mask, sigset_t *old_mask));
495 #elif defined GNULIB_POSIXCHECK 496 # undef pthread_sigmask 497 # if HAVE_RAW_DECL_PTHREAD_SIGMASK 499 "use gnulib module pthread_sigmask for portability");
506 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 508 # define raise rpl_raise 519 #elif defined GNULIB_POSIXCHECK 523 "use gnulib module raise for portability");
530 # ifndef GNULIB_defined_signal_blocking 531 # define GNULIB_defined_signal_blocking 1 540 # if !GNULIB_defined_verify_NSIG_constraint 541 typedef int verify_NSIG_constraint[NSIG <= 32 ? 1 : -1];
542 # define GNULIB_defined_verify_NSIG_constraint 1 552 #if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \ 553 && (defined __i386__ || defined __x86_64__)) 564 # if defined __cplusplus && defined GNULIB_NAMESPACE 577 # if defined __cplusplus && defined GNULIB_NAMESPACE 589 # if defined __cplusplus && defined GNULIB_NAMESPACE 602 # if defined __cplusplus && defined GNULIB_NAMESPACE 615 # if defined __cplusplus && defined GNULIB_NAMESPACE 638 # define SIG_SETMASK 1 639 # define SIG_UNBLOCK 2 641 (
int operation,
const sigset_t *
set, sigset_t *old_set));
644 (
int operation,
const sigset_t *
set, sigset_t *old_set));
652 # if !GNULIB_defined_function_taking_int_returning_void_t 653 typedef void (*_gl_function_taking_int_returning_void_t) (int);
654 # define GNULIB_defined_function_taking_int_returning_void_t 1 660 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 661 # define signal rpl_signal 664 (
int sig, _gl_function_taking_int_returning_void_t func));
666 (
int sig, _gl_function_taking_int_returning_void_t func));
669 (
int sig, _gl_function_taking_int_returning_void_t func));
673 # if !1 && GNULIB_defined_SIGPIPE 678 #elif defined GNULIB_POSIXCHECK 680 # if HAVE_RAW_DECL_SIGADDSET 682 "use the gnulib module sigprocmask for portability");
685 # if HAVE_RAW_DECL_SIGDELSET 687 "use the gnulib module sigprocmask for portability");
690 # if HAVE_RAW_DECL_SIGEMPTYSET 692 "use the gnulib module sigprocmask for portability");
695 # if HAVE_RAW_DECL_SIGFILLSET 697 "use the gnulib module sigprocmask for portability");
700 # if HAVE_RAW_DECL_SIGISMEMBER 702 "use the gnulib module sigprocmask for portability");
705 # if HAVE_RAW_DECL_SIGPENDING 707 "use the gnulib module sigprocmask for portability");
710 # if HAVE_RAW_DECL_SIGPROCMASK 712 "use the gnulib module sigprocmask for portability");
722 # if !GNULIB_defined_siginfo_types 742 union sigval si_value;
744 typedef struct siginfo_t siginfo_t;
746 # define GNULIB_defined_siginfo_types 1 754 # if !GNULIB_defined_struct_sigaction 760 void (*_sa_handler) (int);
765 void (*_sa_sigaction) (int, siginfo_t *,
void *);
771 # define sa_handler _sa_func._sa_handler 772 # define sa_sigaction _sa_func._sa_sigaction 774 # define SA_RESETHAND 1 775 # define SA_NODEFER 2 776 # define SA_RESTART 4 778 # define GNULIB_defined_struct_sigaction 1 786 # define sa_sigaction sa_handler 794 #elif defined GNULIB_POSIXCHECK 796 # if HAVE_RAW_DECL_SIGACTION 798 "use the gnulib module sigaction for portability");
804 # define SA_NODEFER 0
#define _GL_CXXALIAS_SYS(func, rettype, parameters)
#define _GL_FUNCDECL_SYS(func, rettype, parameters_and_attributes)
#define _GL_WARN_ON_USE(function, message)
#define _GL_FUNCDECL_RPL(func, rettype, parameters_and_attributes)
#define _GL_ARG_NONNULL(params)
#define _GL_CXXALIASWARN(func)
#define _GL_CXXALIAS_RPL(func, rettype, parameters)