Use __debugbreak rather than DebugBreak on Windows

Also see "How to get a declaration for DebugBreak without including Windows.h?" (http://stackoverflow.com/q/39551229) on Stack Overflow
pull/286/head
Jeffrey Walton 2016-09-17 17:17:28 -04:00
parent dc09f7446c
commit b7a08f1110
1 changed files with 5 additions and 4 deletions

9
trap.h
View File

@ -22,9 +22,10 @@
#if CRYPTOPP_DEBUG
# include <iostream>
# include <sstream>
# if defined(CRYPTOPP_WIN32_AVAILABLE)
# define WIN32_LEAN_AND_MEAN
# include <Windows.h>
# if defined(CRYPTOPP_BSD_AVAILABLE) || defined(CRYPTOPP_UNIX_AVAILABLE)
# include <signal.h>
# elif defined(CRYPTOPP_WIN32_AVAILABLE)
# include <intrin.h>
# endif
#endif // CRYPTOPP_DEBUG
@ -79,7 +80,7 @@
<< (int)(__LINE__) << "): " << (char*)(__FUNCTION__) \
<< std::endl; \
std::cerr << oss.str(); \
DebugBreak(); \
__debugbreak(); \
} \
}
#endif // DEBUG and Unix or Windows