diff options
Diffstat (limited to 'libstdc++-v3/shadow/bits/std_csignal.h')
| -rw-r--r-- | libstdc++-v3/shadow/bits/std_csignal.h | 82 |
1 files changed, 19 insertions, 63 deletions
diff --git a/libstdc++-v3/shadow/bits/std_csignal.h b/libstdc++-v3/shadow/bits/std_csignal.h index 8c2a9c308f7..71f91260214 100644 --- a/libstdc++-v3/shadow/bits/std_csignal.h +++ b/libstdc++-v3/shadow/bits/std_csignal.h @@ -1,6 +1,6 @@ // -*- C++ -*- header wrapper. -// Copyright (C) 1997-1999 Free Software Foundation, Inc. +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -34,78 +34,34 @@ #ifndef _CPP_CSIGNAL #define _CPP_CSIGNAL 1 - namespace _C_legacy { - extern "C" { +namespace _C_legacy { + extern "C" { # define _IN_C_LEGACY_ + // XXX +# undef __need_sig_atomic_t +# undef __need_sigset_t + # pragma GCC system_header # include_next <signal.h> - typedef void (*_CPP_CSIGFUN_capture)(int); // a C function pointer - typedef sig_atomic_t _CPP_sig_atomic_t_capture; - const _CPP_CSIGFUN_capture _CPP_SIG_DFL_capture = SIG_DFL; - const _CPP_CSIGFUN_capture _CPP_SIG_ERR_capture = SIG_ERR; - const _CPP_CSIGFUN_capture _CPP_SIG_IGN_capture = SIG_IGN; - } - const int _CPP_SIGABRT_capture = SIGABRT; - const int _CPP_SIGFPE_capture = SIGFPE; - const int _CPP_SIGILL_capture = SIGILL; - const int _CPP_SIGINT_capture = SIGINT; - const int _CPP_SIGSEGV_capture = SIGSEGV; - const int _CPP_SIGTERM_capture = SIGTERM; - - namespace _C_shadow { } - } // close namespace ::_C_legacy:: + } +} // namespace _C_legacy # undef sig_atomic_t # undef raise # undef signal -# undef SIG_DFL -# define SIG_DFL \ - reinterpret_cast<void (*)(int)>(::_C_legacy::_CPP_SIG_DFL_capture) -# undef SIG_ERR -# define SIG_ERR \ - reinterpret_cast<void (*)(int)>(::_C_legacy::_CPP_SIG_ERR_capture) -# undef SIG_IGN -# define SIG_IGN \ - reinterpret_cast<void (*)(int)>(::_C_legacy::_CPP_SIG_IGN_capture) -# undef SIGABRT -# define SIGABRT ::_C_legacy::_CPP_SIGABRT_capture -# undef SIGFPE -# define SIGFPE ::_C_legacy::_CPP_SIGFPE_capture -# undef SIGILL -# define SIGILL ::_C_legacy::_CPP_SIGILL_capture -# undef SIGINT -# define SIGINT ::_C_legacy::_CPP_SIGINT_capture -# undef SIGSEGV -# define SIGSEGV ::_C_legacy::_CPP_SIGSEGV_capture -# undef SIGTERM -# define SIGTERM ::_C_legacy::_CPP_SIGTERM_capture - - namespace _C_legacy { - namespace _C_shadow { - typedef ::_C_legacy::_CPP_sig_atomic_t_capture sig_atomic_t; - } - } - namespace std { - // Adopt C names into std:: - using ::_C_legacy::_C_shadow::sig_atomic_t; - using ::_C_legacy::raise; - - inline void (*signal(int __sig, void (* __fun)(int)))(int) - { return reinterpret_cast<void (*)(int)>( - ::_C_legacy::signal(__sig, - reinterpret_cast< ::_C_legacy::_CPP_CSIGFUN_capture>(__fun))); - } - - } // close namespace std:: +namespace std { + // Adopt C names into std:: + using _C_legacy::sig_atomic_t; + using _C_legacy::raise; + using _C_legacy::signal; +} // namespace std - namespace _C_legacy { - namespace _C_shadow { - using ::std::signal; - } - } - # undef _IN_C_LEGACY_ #endif + + + + |

