[openssl-commits] [openssl] OpenSSL_1_1_0-stable update
Richard Levitte
levitte at openssl.org
Wed Jul 11 13:34:08 UTC 2018
The branch OpenSSL_1_1_0-stable has been updated
via dcb8333087d56eef97c482aabb506b8be8299cde (commit)
from 5c06c7d748161697642bd4d1369acad4297abb3c (commit)
- Log -----------------------------------------------------------------
commit dcb8333087d56eef97c482aabb506b8be8299cde
Author: Richard Levitte <levitte at openssl.org>
Date: Tue Jul 10 16:05:55 2018 +0200
Avoid __GNUC__ warnings when defining DECLARE_DEPRECATED
We need to check that __GNUC__ is defined before trying to use it.
This demands a slightly different way to define DECLARE_DEPRECATED.
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre at ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/6688)
-----------------------------------------------------------------------
Summary of changes:
include/openssl/opensslconf.h.in | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/include/openssl/opensslconf.h.in b/include/openssl/opensslconf.h.in
index 9f8634a..17807fb 100644
--- a/include/openssl/opensslconf.h.in
+++ b/include/openssl/opensslconf.h.in
@@ -68,12 +68,18 @@ extern "C" {
* still won't see them if the library has been built to disable deprecated
* functions.
*/
-#if defined(OPENSSL_NO_DEPRECATED)
-# define DECLARE_DEPRECATED(f)
-#elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0)
-# define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated));
-#else
-# define DECLARE_DEPRECATED(f) f;
+#ifndef DECLARE_DEPRECATED
+# if defined(OPENSSL_NO_DEPRECATED)
+# define DECLARE_DEPRECATED(f)
+# else
+# 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
#endif
#ifndef OPENSSL_FILE
More information about the openssl-commits
mailing list