Go to the documentation of this file.00001 #ifndef wali_nwa_DEPRECATE_H
00002 #define wali_nwa_DEPRECATE_H
00003
00004
00005
00006 #if defined(__GNUC__)
00007 # define TEMP_GCC_VERSION (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__)
00008 # if TEMP_GCC_VERSION > 40500 // if at least 4.5
00009 # define DEPRECATE(msg) __attribute__((__deprecated__(msg)))
00010 # else
00011 # define DEPRECATE(msg) __attribute__((__deprecated__))
00012 # endif
00013 #elif defined(_MSC_VER)
00014 # define DEPRECATE(msg) __declspec(deprecated(msg))
00015 #else
00016 # warning I do not know how to deprecate something with your compiler
00017 #endif
00018
00019
00020
00021 #if defined(__GNUC__)
00022 # define TEMP_GCC_VERSION (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__)
00023 # if TEMP_GCC_VERSION > 40600 // if at least 4.6
00024 # define DEPRECATE_PUSH_AND_DISABLE _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
00025 # define DEPRECATE_POP _Pragma("GCC diagnostic pop")
00026 # else
00027
00028 # define DEPRECATE_PUSH_AND_DISABLE _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
00029 # define DEPRECATE_POP _Pragma("GCC diagnostic warning \"-Wdeprecated-declarations\"")
00030 # endif
00031 #elif defined(_MSC_VER)
00032 # define DEPRECATE_PUSH_AND_DISABLE __pragma(warning(push)) __pragma(warning(disable:4996))
00033 # define DEPRECATE_POP __pragma(warning(pop))
00034 #else
00035 # warning I do not know how to turn on and off deprecated warnings
00036 #endif
00037
00038
00039 #endif