15 #ifndef CRYPTOPP_TRAP_H 16 #define CRYPTOPP_TRAP_H 20 #if defined(CRYPTOPP_DEBUG) 23 # if defined(UNIX_SIGNALS_AVAILABLE) 25 # elif defined(CRYPTOPP_WIN32_AVAILABLE) && !defined(__CYGWIN__) 26 extern "C" __declspec(dllimport)
void __stdcall DebugBreak();
27 extern "C" __declspec(dllimport)
int __stdcall IsDebuggerPresent();
29 #endif // CRYPTOPP_DEBUG 33 #if defined(CRYPTOPP_DOXYGEN_PROCESSING) 60 # define CRYPTOPP_ASSERT(exp) { ... } 63 #if defined(CRYPTOPP_DEBUG) && defined(UNIX_SIGNALS_AVAILABLE) 64 # define CRYPTOPP_ASSERT(exp) { \ 66 std::ostringstream oss; \ 67 oss << "Assertion failed: " << __FILE__ << "(" \ 68 << __LINE__ << "): " << __func__ \ 70 std::cerr << oss.str(); \ 74 #elif CRYPTOPP_DEBUG && defined(CRYPTOPP_WIN32_AVAILABLE) && !defined(__CYGWIN__) 75 # define CRYPTOPP_ASSERT(exp) { \ 77 std::ostringstream oss; \ 78 oss << "Assertion failed: " << __FILE__ << "(" \ 79 << __LINE__ << "): " << __FUNCTION__ \ 81 std::cerr << oss.str(); \ 82 if (IsDebuggerPresent()) {DebugBreak();} \ 85 #endif // DEBUG and Unix or Windows 89 #ifndef CRYPTOPP_ASSERT 90 # define CRYPTOPP_ASSERT(exp) (void)0 97 #if (CRYPTOPP_DEBUG && defined(UNIX_SIGNALS_AVAILABLE)) || defined(CRYPTOPP_DOXYGEN_PROCESSING) 134 #if defined(CRYPTOPP_DOXYGEN_PROCESSING) 140 #endif // Linux, Unix and Documentation 144 #endif // CRYPTOPP_TRAP_H Signal handler for Linux and Unix compatibles.
Library configuration file.
Utility class for trapping OS signals.
Crypto++ library namespace.