18 #ifndef CRYPTOPP_TRAP_H 19 #define CRYPTOPP_TRAP_H 23 #if defined(CRYPTOPP_DEBUG) 26 # if defined(UNIX_SIGNALS_AVAILABLE) 28 # elif defined(CRYPTOPP_WIN32_AVAILABLE) && !defined(__CYGWIN__) 29 extern "C" __declspec(dllimport)
void __stdcall DebugBreak();
30 extern "C" __declspec(dllimport)
int __stdcall IsDebuggerPresent();
32 #endif // CRYPTOPP_DEBUG 36 #if defined(CRYPTOPP_DOXYGEN_PROCESSING) 68 # define CRYPTOPP_ASSERT(exp) { ... } 71 #if defined(CRYPTOPP_DEBUG) 72 # if defined(UNIX_SIGNALS_AVAILABLE) || defined(__CYGWIN__) 73 # define CRYPTOPP_ASSERT(exp) { \ 75 std::ostringstream oss; \ 76 oss << "Assertion failed: " << __FILE__ << "(" \ 77 << __LINE__ << "): " << __func__ \ 79 std::cout << std::flush; \ 80 std::cerr << oss.str(); \ 84 # elif CRYPTOPP_DEBUG && defined(CRYPTOPP_WIN32_AVAILABLE) 85 # define CRYPTOPP_ASSERT(exp) { \ 87 std::ostringstream oss; \ 88 oss << "Assertion failed: " << __FILE__ << "(" \ 89 << __LINE__ << "): " << __FUNCTION__ \ 91 std::cout << std::flush; \ 92 std::cerr << oss.str(); \ 93 if (IsDebuggerPresent()) {DebugBreak();} \ 96 # endif // Unix or Windows 97 #endif // CRYPTOPP_DEBUG 100 #ifndef CRYPTOPP_ASSERT 101 # define CRYPTOPP_ASSERT(exp) (void)0 108 #if (CRYPTOPP_DEBUG && defined(UNIX_SIGNALS_AVAILABLE)) || defined(CRYPTOPP_DOXYGEN_PROCESSING) 153 #if defined(CRYPTOPP_DOXYGEN_PROCESSING) 159 #endif // Linux, Unix and Documentation 163 #endif // CRYPTOPP_TRAP_H Signal handler for Linux and Unix compatibles.
Library configuration file.
Utility class for trapping OS signals.
Crypto++ library namespace.