19 #ifndef CRYPTOPP_TRAP_H 20 #define CRYPTOPP_TRAP_H 24 #if defined(CRYPTOPP_DEBUG) 27 # if defined(UNIX_SIGNALS_AVAILABLE) 29 # elif defined(CRYPTOPP_WIN32_AVAILABLE) && !defined(__CYGWIN__) 30 extern "C" __declspec(dllimport)
void __stdcall DebugBreak();
31 extern "C" __declspec(dllimport)
int __stdcall IsDebuggerPresent();
33 #endif // CRYPTOPP_DEBUG 37 #if defined(CRYPTOPP_DOXYGEN_PROCESSING) 69 # define CRYPTOPP_ASSERT(exp) { ... } 72 #if defined(CRYPTOPP_DEBUG) && defined(UNIX_SIGNALS_AVAILABLE) 73 # define CRYPTOPP_ASSERT(exp) { \ 75 std::ostringstream oss; \ 76 oss << "Assertion failed: " << __FILE__ << "(" \ 77 << __LINE__ << "): " << __func__ \ 79 std::cerr << oss.str(); \ 83 #elif CRYPTOPP_DEBUG && defined(CRYPTOPP_WIN32_AVAILABLE) && !defined(__CYGWIN__) 84 # define CRYPTOPP_ASSERT(exp) { \ 86 std::ostringstream oss; \ 87 oss << "Assertion failed: " << __FILE__ << "(" \ 88 << __LINE__ << "): " << __FUNCTION__ \ 90 std::cerr << oss.str(); \ 91 if (IsDebuggerPresent()) {DebugBreak();} \ 94 #endif // DEBUG and Unix or Windows 98 #ifndef CRYPTOPP_ASSERT 99 # define CRYPTOPP_ASSERT(exp) (void)0 106 #if (CRYPTOPP_DEBUG && defined(UNIX_SIGNALS_AVAILABLE)) || defined(CRYPTOPP_DOXYGEN_PROCESSING) 151 #if defined(CRYPTOPP_DOXYGEN_PROCESSING) 157 #endif // Linux, Unix and Documentation 161 #endif // CRYPTOPP_TRAP_H Signal handler for Linux and Unix compatibles.
Library configuration file.
Utility class for trapping OS signals.
Crypto++ library namespace.