Add old locking constants back
authorKurt Roeckx <kurt@roeckx.be>
Wed, 29 Jun 2016 09:45:51 +0000 (11:45 +0200)
committerKurt Roeckx <kurt@roeckx.be>
Fri, 1 Jul 2016 15:02:33 +0000 (17:02 +0200)
Fixes #1260

Reviewed-by: Matt Caswell <matt@openssl.org>
GH: #1266

include/openssl/crypto.h

index e9a8d53f4d1644d2020ee7f8eb64d9a3068e6217..acdb48bd614f480a5862c4b34701b0c96689c7fe 100644 (file)
@@ -221,6 +221,16 @@ void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx);
 #  define CRYPTO_set_add_lock_callback(func)
 #  define CRYPTO_get_add_lock_callback()        (NULL)
 
 #  define CRYPTO_set_add_lock_callback(func)
 #  define CRYPTO_get_add_lock_callback()        (NULL)
 
+/*
+ * These defines where used in combination with the old locking callbacks,
+ * they are not called anymore, but old code that's not called might still
+ * use them.
+ */
+#  define CRYPTO_LOCK             1
+#  define CRYPTO_UNLOCK           2
+#  define CRYPTO_READ             4
+#  define CRYPTO_WRITE            8
+
 /* This structure is no longer used */
 typedef struct crypto_threadid_st {
     int dummy;
 /* This structure is no longer used */
 typedef struct crypto_threadid_st {
     int dummy;