16 #ifndef CRYPTOPP_TRAP_H 17 #define CRYPTOPP_TRAP_H 21 #if defined(CRYPTOPP_DEBUG) 24 # if defined(UNIX_SIGNALS_AVAILABLE) 26 # elif defined(CRYPTOPP_WIN32_AVAILABLE) && !defined(__CYGWIN__) 27 # if (_MSC_VER >= 1400) 31 #endif // CRYPTOPP_DEBUG 35 #if defined(CRYPTOPP_DOXYGEN_PROCESSING) 36 # define CRYPTOPP_ASSERT(exp) { ... } 65 #if defined(CRYPTOPP_DEBUG) && defined(UNIX_SIGNALS_AVAILABLE) 66 # define CRYPTOPP_ASSERT(exp) { \ 68 std::ostringstream oss; \ 69 oss << "Assertion failed: " << (char*)(__FILE__) << "(" \ 70 << (int)(__LINE__) << "): " << (char*)(__func__) \ 72 std::cerr << oss.str(); \ 76 #elif CRYPTOPP_DEBUG && defined(CRYPTOPP_WIN32_AVAILABLE) && !defined(__CYGWIN__) 77 # define CRYPTOPP_ASSERT(exp) { \ 79 std::ostringstream oss; \ 80 oss << "Assertion failed: " << (char*)(__FILE__) << "(" \ 81 << (int)(__LINE__) << "): " << (char*)(__FUNCTION__) \ 83 std::cerr << oss.str(); \ 87 #endif // DEBUG and Unix or Windows 91 #ifndef CRYPTOPP_ASSERT 92 # define CRYPTOPP_ASSERT(exp) (void)0 99 #if (CRYPTOPP_DEBUG && defined(UNIX_SIGNALS_AVAILABLE)) || defined(CRYPTOPP_DOXYGEN_PROCESSING) 136 #if defined(CRYPTOPP_DOXYGEN_PROCESSING) 137 class DebugTrapHandler :
public SignalHandler<SIGILL, false> { };
139 typedef SignalHandler<SIGILL, false> DebugTrapHandler;
142 #endif // Linux, Unix and Documentation 146 #endif // CRYPTOPP_TRAP_H #define NAMESPACE_BEGIN(x)
Library configuration file.
Utility class for trapping OS signals.