[ruby/digest] Suppress md5 deprecation warnings by gcc as well as clang
https://github.com/ruby/digest/commit/76878e3201
This commit is contained in:
parent
0e7b6e348f
commit
7387a09791
@ -1,8 +1,16 @@
|
|||||||
#define COMMON_DIGEST_FOR_OPENSSL 1
|
#define COMMON_DIGEST_FOR_OPENSSL 1
|
||||||
#include <CommonCrypto/CommonDigest.h>
|
#include <CommonCrypto/CommonDigest.h>
|
||||||
|
|
||||||
#ifdef __clang__
|
#ifdef __GNUC__
|
||||||
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
# define RB_DIGEST_DIAGNOSTIC(compiler, op, flag) _Pragma(STRINGIZE(compiler diagnostic op flag))
|
||||||
|
# ifdef RBIMPL_WARNING_IGNORED
|
||||||
|
# define RB_DIGEST_WARNING_IGNORED(flag) RBIMPL_WARNING_IGNORED(flag)
|
||||||
|
# elif defined(__clang__)
|
||||||
|
# define RB_DIGEST_WARNING_IGNORED(flag) RB_DIGEST_DIAGNOSTIC(clang, ignored, #flag)
|
||||||
|
# else /* __GNUC__ */
|
||||||
|
# define RB_DIGEST_WARNING_IGNORED(flag) RB_DIGEST_DIAGNOSTIC(GCC, ignored, #flag)
|
||||||
|
# endif
|
||||||
|
RB_DIGEST_WARNING_IGNORED(-Wdeprecated-declarations)
|
||||||
/* Suppress deprecation warnings of MD5 from Xcode 11.1 */
|
/* Suppress deprecation warnings of MD5 from Xcode 11.1 */
|
||||||
/* Although we know MD5 is deprecated too, provide just for backward
|
/* Although we know MD5 is deprecated too, provide just for backward
|
||||||
* compatibility, as well as Apple does. */
|
* compatibility, as well as Apple does. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user