提交 3550d915 编写于 作者: R Richard Levitte

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: NRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6680)
上级 89778806
......@@ -68,10 +68,12 @@ extern "C" {
* still won't see them if the library has been built to disable deprecated
* functions.
*/
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0)
# define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated));
#else
# define DECLARE_DEPRECATED(f) f;
#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
#ifndef OPENSSL_FILE
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册