Guard DECLARE_DEPRECATED against multiple includes of opensslconf.h
authorRichard Levitte <levitte@openssl.org>
Tue, 10 Jul 2018 17:11:06 +0000 (19:11 +0200)
committerRichard Levitte <levitte@openssl.org>
Tue, 10 Jul 2018 17:11:06 +0000 (19:11 +0200)
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6689)

include/openssl/opensslconf.h.in

index 200a11a..b793d48 100644 (file)
@@ -68,11 +68,13 @@ extern "C" {
  * still won't see them if the library has been built to disable deprecated
  * functions.
  */
-#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));
+#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
 # endif
 #endif