Skip to content

Commit

Permalink
Guard inclusion of <intrin.h> with VS2005 and above
Browse files Browse the repository at this point in the history
  • Loading branch information
noloader committed Sep 17, 2016
1 parent a0bc85c commit 7620976
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions trap.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//! \brief Debugging and diagnostic assertions
//! \details <tt>CRYPTOPP_ASSERT</tt> is the library's debugging and diagnostic assertion. <tt>CRYPTOPP_ASSERT</tt>
//! is enabled by <tt>CRYPTOPP_DEBUG</tt>, <tt>DEBUG</tt> or <tt>_DEBUG</tt>.
//! \details <tt>CRYPTOPP_ASSERT</tt> raises a <tt>SIGTRAP</tt> (Unix) or calls <tt>DebugBreak()</tt> (Windows).
//! \details <tt>CRYPTOPP_ASSERT</tt> raises a <tt>SIGTRAP</tt> (Unix) or calls <tt>__debugbreak()</tt> (Windows).
//! <tt>CRYPTOPP_ASSERT</tt> is only in effect when the user requests a debug configuration. Unlike Posix assert,
//! <tt>NDEBUG</tt> (or failure to define it) does not affect the library.
//! The traditional Posix define <tt>NDEBUG</tt> has no effect on <tt>CRYPTOPP_DEBUG</tt> or DebugTrapHandler.
Expand All @@ -25,7 +25,9 @@
# if defined(CRYPTOPP_BSD_AVAILABLE) || defined(CRYPTOPP_UNIX_AVAILABLE)
# include <signal.h>
# elif defined(CRYPTOPP_WIN32_AVAILABLE)
# include <intrin.h>
# if (_MSC_VER >= 1400)
# include <intrin.h>
# endif
# endif
#endif // CRYPTOPP_DEBUG

Expand Down

1 comment on commit 7620976

@noloader
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Crayon2000, Can you test this change under Borland? I want to ensure it did not knock something loose.

Also see Issue 277: Cut-over to CRYPTOPP_ASSERT due to CVE-2016-7420.

Please sign in to comment.