diff options
author | Rich Salz <rsalz@akamai.com> | 2016-01-07 21:40:52 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-01-08 14:35:04 -0500 |
commit | 6ac11bd0b9252e4cf53cb0b914db98b401779c15 (patch) | |
tree | a14e20ecab82a453c408f8da3b2f6ed313d97fcb /include | |
parent | 8da94770f0a049497b1a52ee469cca1f4a13b1a7 (diff) | |
download | openssl-6ac11bd0b9252e4cf53cb0b914db98b401779c15.tar.gz |
Fix no CRYPTO_MDEBUG build (windows)
In order for mkdep to find #ifdef'd functions, they must be
wrapped (in the header file) with
#ifndef OPENSSL_NO_...
So do that for various CRYPTO_mem_debug... things.
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/crypto.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/include/openssl/crypto.h b/include/openssl/crypto.h index 65f150ed60..e8b9fcbf60 100644 --- a/include/openssl/crypto.h +++ b/include/openssl/crypto.h @@ -295,10 +295,11 @@ DEFINE_STACK_OF(void) * Set standard debugging functions (not done by default unless CRYPTO_MDEBUG * is defined) */ -# if defined CRYPTO_MDEBUG_ABORT -# ifndef CRYPTO_MDEBUG -# define CRYPTO_MDEBUG -# endif +# if defined(CRYPTO_MDEBUG_ABORT) && !defined(CRYPTO_MDEBUG) +# define CRYPTO_MDEBUG +# endif +# ifndef CRYPTO_MDEBUG +# define OPENSSL_NO_CRYPTO_MDEBUG # endif int CRYPTO_mem_ctrl(int mode); @@ -493,9 +494,10 @@ size_t CRYPTO_secure_used(void); void OPENSSL_cleanse(void *ptr, size_t len); -# define OPENSSL_mem_debug_push(info) \ +# ifndef OPENSSL_NO_CRYPTO_MDEBUG +# define OPENSSL_mem_debug_push(info) \ CRYPTO_mem_debug_push(info, __FILE__, __LINE__) -# define OPENSSL_mem_debug_pop() \ +# define OPENSSL_mem_debug_pop() \ CRYPTO_mem_debug_pop() int CRYPTO_mem_debug_push(const char *info, const char *file, int line); int CRYPTO_mem_debug_pop(void); @@ -512,10 +514,11 @@ void CRYPTO_mem_debug_realloc(void *addr1, void *addr2, size_t num, int flag, const char *file, int line); void CRYPTO_mem_debug_free(void *addr, int flag); -# ifndef OPENSSL_NO_STDIO +# ifndef OPENSSL_NO_STDIO void CRYPTO_mem_leaks_fp(FILE *); -# endif +# endif void CRYPTO_mem_leaks(struct bio_st *bio); +# endif /* die if we have to */ void OpenSSLDie(const char *file, int line, const char *assertion); |