Backwards-compatibility subject to OPENSSL_API_COMPAT
[oweals/openssl.git] / crypto / bn / bn_lib.c
index b9e96b553ee6e1932b1322f63c0bd3c690940df7..6393a34f8ac35f484cfc4ec554a3d737b0714e6d 100644 (file)
 #include <limits.h>
 #include "internal/cryptlib.h"
 #include "bn_lcl.h"
+#include <openssl/opensslconf.h>
 
 /* This stuff appears to be completely unused, so is deprecated */
-#ifndef OPENSSL_NO_DEPRECATED
+#if OPENSSL_API_COMPAT < 0x00908000L
 /*-
  * For a 32 bit machine
  * 2 -   4 ==  128
@@ -258,7 +259,7 @@ void BN_free(BIGNUM *a)
     if (a->flags & BN_FLG_MALLOCED)
         OPENSSL_free(a);
     else {
-#ifndef OPENSSL_NO_DEPRECATED
+#if OPENSSL_API_COMPAT < 0x00908000L
         a->flags |= BN_FLG_FREE;
 #endif
         a->d = NULL;