summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-10-23 14:26:48 +0100
committerMatt Caswell <matt@openssl.org>2020-10-30 14:56:29 +0000
commit62a3614372b8171d2f9f9e20aee07ab3002949bd (patch)
tree7b8b49a4804fe55e4b976a3aa0bb8b1fce82492a /include
parente82f45982cf1660d3287332d3d70bf5b01de1fd1 (diff)
Allow empty deprecation macros to be passed as macro arguments
The OSSL_DEPRECATEDIN_3_0 macro introduced in PR #13074 is intended to be passed as a parameter to the various PEM declaration macros. However, in some cases OSSL_DEPRECATEDIN_3_0 is defined to be empty, and it is not allowed to pass empty macro arguments in C90. Therefore we ensure these macros are always defined. In the case where they were empty previously we use a no-op value instead. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/13227)
Diffstat (limited to 'include')
-rw-r--r--include/openssl/macros.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/openssl/macros.h b/include/openssl/macros.h
index 24fad673bd..87cfde4920 100644
--- a/include/openssl/macros.h
+++ b/include/openssl/macros.h
@@ -69,10 +69,13 @@
# endif
# endif
-/* Still not defined? Then define empty macros */
+/*
+ * Still not defined? Then define no-op macros. This means these macros
+ * are unsuitable for use in a typedef.
+ */
# ifndef OSSL_DEPRECATED
-# define OSSL_DEPRECATED(since)
-# define OSSL_DEPRECATED_FOR(since, message)
+# define OSSL_DEPRECATED(since) extern
+# define OSSL_DEPRECATED_FOR(since, message) extern
# endif
/*