From: Richard Levitte Date: Thu, 27 Sep 2018 14:15:54 +0000 (+0200) Subject: include/openssl/opensslconf.h.in: allow future deprecation for v4.0 X-Git-Tag: openssl-3.0.0-alpha1~2838 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=478d4f912c001f18717d1364132184ff9d31f944;p=oweals%2Fopenssl.git include/openssl/opensslconf.h.in: allow future deprecation for v4.0 Reviewed-by: Tim Hudson Reviewed-by: Matthias St. Pierre Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/7724) --- diff --git a/include/openssl/opensslconf.h.in b/include/openssl/opensslconf.h.in index a364bfb1cc..12b16631e8 100644 --- a/include/openssl/opensslconf.h.in +++ b/include/openssl/opensslconf.h.in @@ -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