aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/thr_id.c
diff options
context:
space:
mode:
authorViktor Dukhovni <openssl-users@dukhovni.org>2016-01-04 23:00:33 -0500
committerViktor Dukhovni <openssl-users@dukhovni.org>2016-01-07 20:53:18 -0500
commit98186eb4e4aef6262ed6b0f499348defa2c26893 (patch)
tree38ddc0aea1be4b31a4a48d74dc307ad30288af47 /crypto/thr_id.c
parentcddd424a5bda94e238e4ff06c0efc80cff3b07d1 (diff)
downloadopenssl-98186eb4e4aef6262ed6b0f499348defa2c26893.tar.gz
Backwards-compatibility subject to OPENSSL_API_COMPAT
Provide backwards-compatiblity for functions, macros and include files if OPENSSL_API_COMPAT is either not defined or defined less than the version number of the release in which the feature was deprecated. Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/thr_id.c')
-rw-r--r--crypto/thr_id.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/thr_id.c b/crypto/thr_id.c
index 51088e4fb5..73711d89e3 100644
--- a/crypto/thr_id.c
+++ b/crypto/thr_id.c
@@ -115,8 +115,9 @@
*/
#include "internal/cryptlib.h"
+#include <openssl/opensslconf.h>
-#ifndef OPENSSL_NO_DEPRECATED
+#if OPENSSL_API_COMPAT < 0x10000000L
static unsigned long (*id_callback) (void) = 0;
#endif
static void (*threadid_callback) (CRYPTO_THREADID *) = 0;
@@ -189,7 +190,7 @@ void CRYPTO_THREADID_current(CRYPTO_THREADID *id)
threadid_callback(id);
return;
}
-#ifndef OPENSSL_NO_DEPRECATED
+#if OPENSSL_API_COMPAT < 0x10000000L
/* If the deprecated callback was set, fall back to that */
if (id_callback) {
CRYPTO_THREADID_set_numeric(id, id_callback());
@@ -220,7 +221,7 @@ unsigned long CRYPTO_THREADID_hash(const CRYPTO_THREADID *id)
return id->val;
}
-#ifndef OPENSSL_NO_DEPRECATED
+#if OPENSSL_API_COMPAT < 0x10000000L
unsigned long (*CRYPTO_get_id_callback(void)) (void) {
return (id_callback);
}