I have the following configuration option. It currently resides in trap.h. It was fine in trap.h until code paths were selected based on CRYPTOPP_POSIX_ASSERT.
Due to responding to CRYPTOPP_POSIX_ASSERT, I think CRYPTOPP_DEBUG and accompanying comments should be moved into config.h. Any thoughts, comments or objections? ********* # (Partial diff of config.h and trap.h that show relevant changes) +// Only one or the other, but not both +#if (defined(DEBUG) || defined(_DEBUG)) && (defined(NDEBUG) || defined(_NDEBUG)) +# error Both DEBUG and NDEBUG are defined. +#endif ... +#include "config.h" + +// CRYPTOPP_POSIX_ASSERT unconditionally disables the library assert and yields to Posix assert. +#if !defined(NDEBUG) && !defined(_NDEBUG) && !defined(CRYPTOPP_POSIX_ASSERT) +# define CRYPTOPP_DEBUG 1 +#endif + ... +#if defined(CRYPTOPP_DEBUG) && (defined(CRYPTOPP_BSD_AVAILABLE) || defined(CRYPTOPP_UNIX_AVAILABLE) || defined(CRYPTOPP_WIN32_AVAILABLE)) +# if defined(CRYPTOPP_BSD_AVAILABLE) || defined(CRYPTOPP_UNIX_AVAILABLE) +# include <signal.h> ... -- -- You received this message because you are subscribed to the "Crypto++ Users" Google Group. To unsubscribe, send an email to [email protected]. More information about Crypto++ and this group is available at http://www.cryptopp.com. --- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
