include/openssl/opensslconf.h.in: allow future deprecation for v4.0
authorRichard Levitte <levitte@openssl.org>
Thu, 27 Sep 2018 14:15:54 +0000 (16:15 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 6 Dec 2018 11:24:48 +0000 (12:24 +0100)
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7724)

include/openssl/opensslconf.h.in

index a364bfb1ccce0330d99ad7c44f6c3512fa1b663a..12b16631e84f5d99bd3fae04c5998c5fc86a61d0 100644 (file)
@@ -85,6 +85,18 @@ extern "C" {
 # define OPENSSL_API_COMPAT OPENSSL_MIN_API
 #endif
 
+/*
+ * Do not deprecate things to be deprecated in version 4.0 before the
+ * OpenSSL version number matches.
+ */
+#if OPENSSL_VERSION_MAJOR < 4
+# define DEPRECATEDIN_4(f)       f;
+#elif OPENSSL_API_COMPAT < 0x40000000L
+# define DEPRECATEDIN_4(f)       DECLARE_DEPRECATED(f)
+#else
+# define DEPRECATEDIN_4(f)
+#endif
+
 #if OPENSSL_API_COMPAT < 0x30000000L
 # define DEPRECATEDIN_3(f)       DECLARE_DEPRECATED(f)
 #else