From: Matt Caswell Date: Fri, 29 Nov 2019 12:01:18 +0000 (+0000) Subject: Add the ability to supress deprecation warnings X-Git-Tag: openssl-3.0.0-alpha1~864 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=67b8f5bdbf95ad4def2dd27c220545b15d847aae;p=oweals%2Fopenssl.git Add the ability to supress deprecation warnings We add a new macro OPENSSL_SUPRESS_DEPRECATED which enables applications to supress deprecation warnings where necessary. Reviewed-by: Richard Levitte Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/10558) --- diff --git a/include/openssl/macros.h b/include/openssl/macros.h index 8548bde542..a38387f131 100644 --- a/include/openssl/macros.h +++ b/include/openssl/macros.h @@ -28,15 +28,17 @@ */ # ifndef DECLARE_DEPRECATED # define DECLARE_DEPRECATED(f) f; -# ifdef __GNUC__ -# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0) -# undef DECLARE_DEPRECATED -# define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated)); -# endif -# elif defined(__SUNPRO_C) -# if (__SUNPRO_C >= 0x5130) -# undef DECLARE_DEPRECATED -# define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated)); +# ifndef OPENSSL_SUPPRESS_DEPRECATED +# ifdef __GNUC__ +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0) +# undef DECLARE_DEPRECATED +# define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated)); +# endif +# elif defined(__SUNPRO_C) +# if (__SUNPRO_C >= 0x5130) +# undef DECLARE_DEPRECATED +# define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated)); +# endif # endif # endif # endif