Add the ability to supress deprecation warnings
[openssl.git] / include / openssl / macros.h
index 8548bde542530362cda7ede405dfc778c26c1d4f..a38387f1312f031e636a15b0fc8f07accffb734e 100644 (file)
  */
 # 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