|
PcapPlusPlus
Next
|
Go to the documentation of this file.
5 #ifndef PCPP_DEPRECATED
6 # if defined(__GNUC__) || defined(__clang__)
7 # define PCPP_DEPRECATED(msg) __attribute__((deprecated(msg)))
8 # elif defined(_MSC_VER)
9 # define PCPP_DEPRECATED(msg) __declspec(deprecated(msg))
11 # pragma message("WARNING: DEPRECATED feature is not implemented for this compiler")
12 # define PCPP_DEPRECATED(msg)
16 #if !defined(DISABLE_WARNING_PUSH) || !defined(DISABLE_WARNING_POP)
17 # if defined(_MSC_VER)
18 # define DISABLE_WARNING_PUSH __pragma(warning(push))
19 # define DISABLE_WARNING_POP __pragma(warning(pop))
20 # define DISABLE_WARNING(warningNumber) __pragma(warning(disable : warningNumber))
22 # define DISABLE_WARNING_DEPRECATED DISABLE_WARNING(4996)
23 # elif defined(__GNUC__) || defined(__clang__)
24 # define DO_PRAGMA(X) _Pragma(#X)
25 # define DISABLE_WARNING_PUSH DO_PRAGMA(GCC diagnostic push)
26 # define DISABLE_WARNING_POP DO_PRAGMA(GCC diagnostic pop)
27 # define DISABLE_WARNING(warningName) DO_PRAGMA(GCC diagnostic ignored #warningName)
30 # define DISABLE_WARNING_DEPRECATED DISABLE_WARNING(-Wdeprecated-declarations)
33 # pragma message("WARNING: Disabling of warnings is not implemented for this compiler")
34 # define DISABLE_WARNING_PUSH
35 # define DISABLE_WARNING_POP
37 # define DISABLE_WARNING_DEPRECATED