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 Overflowpull/286/head
parent
dc09f7446c
commit
b7a08f1110
9
trap.h
9
trap.h
|
|
@ -22,9 +22,10 @@
|
||||||
#if CRYPTOPP_DEBUG
|
#if CRYPTOPP_DEBUG
|
||||||
# include <iostream>
|
# include <iostream>
|
||||||
# include <sstream>
|
# include <sstream>
|
||||||
# if defined(CRYPTOPP_WIN32_AVAILABLE)
|
# if defined(CRYPTOPP_BSD_AVAILABLE) || defined(CRYPTOPP_UNIX_AVAILABLE)
|
||||||
# define WIN32_LEAN_AND_MEAN
|
# include <signal.h>
|
||||||
# include <Windows.h>
|
# elif defined(CRYPTOPP_WIN32_AVAILABLE)
|
||||||
|
# include <intrin.h>
|
||||||
# endif
|
# endif
|
||||||
#endif // CRYPTOPP_DEBUG
|
#endif // CRYPTOPP_DEBUG
|
||||||
|
|
||||||
|
|
@ -79,7 +80,7 @@
|
||||||
<< (int)(__LINE__) << "): " << (char*)(__FUNCTION__) \
|
<< (int)(__LINE__) << "): " << (char*)(__FUNCTION__) \
|
||||||
<< std::endl; \
|
<< std::endl; \
|
||||||
std::cerr << oss.str(); \
|
std::cerr << oss.str(); \
|
||||||
DebugBreak(); \
|
__debugbreak(); \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
#endif // DEBUG and Unix or Windows
|
#endif // DEBUG and Unix or Windows
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue