[winpr] add WINPR_PRAGMA_WARNING
a compiler independent version of #warning
This commit is contained in:
parent
0b65bf5ba8
commit
32169be68e
@ -22,6 +22,15 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#define WINPR_DO_PRAGMA(x) _Pragma(#x)
|
||||
#if defined(__GNUC__)
|
||||
#define WINPR_PRAGMA_WARNING(msg) WINPR_DO_PRAGMA(GCC warning #msg)
|
||||
#elif defined(__clang__)
|
||||
#define WINPR_PRAGMA_WARNING(msg) WINPR_DO_PRAGMA(GCC warning #msg)
|
||||
#elif defined(_MSC_VER)
|
||||
#define WINPR_PRAGMA_WARNING(msg) WINPR_DO_PRAGMA(message \x28 #msg \x29)
|
||||
#endif
|
||||
|
||||
#if defined(__clang__)
|
||||
#define WINPR_PRAGMA_DIAG_PUSH _Pragma("clang diagnostic push")
|
||||
#define WINPR_PRAGMA_DIAG_IGNORED_OVERLENGTH_STRINGS \
|
||||
|
Loading…
Reference in New Issue
Block a user