Guard DECLARE_DEPRECATED against multiple includes of opensslconf.h

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6689)
This commit is contained in:
Richard Levitte 2018-07-10 19:11:06 +02:00
parent 4e351ca92e
commit 4431107d6c

View File

@ -68,11 +68,13 @@ extern "C" {
* still won't see them if the library has been built to disable deprecated * still won't see them if the library has been built to disable deprecated
* functions. * functions.
*/ */
#define DECLARE_DEPRECATED(f) f; #ifndef DECLARE_DEPRECATED
#ifdef __GNUC__ # define DECLARE_DEPRECATED(f) f;
# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0) # ifdef __GNUC__
# undef DECLARE_DEPRECATED # if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0)
# define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated)); # undef DECLARE_DEPRECATED
# define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated));
# endif
# endif # endif
#endif #endif