[core] restore NS_DEPRECATED functionality
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
* \deprecated This method will go away in future versions of ns-3.
|
||||
* See instead TheNewWay()
|
||||
*/
|
||||
void SomethingUseful (void);
|
||||
NS_DEPRECATED(void SomethingUseful (void) );
|
||||
/*
|
||||
* Do something more useful.
|
||||
*/
|
||||
|
||||
@@ -41,10 +41,21 @@
|
||||
* \snippet src/core/doc/deprecated-example.h doxygen snippet
|
||||
*/
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ > 1)
|
||||
#define NS_DEPRECATED __attribute__ ((deprecated))
|
||||
#if defined(__GNUC__)
|
||||
/* Test for GCC >= 4.1 */
|
||||
#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100)
|
||||
#if (GCC_VERSION >= 40100)
|
||||
#define NS_DEPRECATED(x) x __attribute__ ((deprecated))
|
||||
#endif
|
||||
#undef GCC_VERSION
|
||||
|
||||
|
||||
#elif defined(__clang__) || defined(__llvm__)
|
||||
#define NS_DEPRECATED(x) x __attribute__ ((deprecated))
|
||||
#elif defined(_MSC_VER)
|
||||
#define NS_DEPRECATED __declspec(deprecated) x
|
||||
#else
|
||||
#define NS_DEPRECATED
|
||||
#define NS_DEPRECATED(x) x
|
||||
#endif
|
||||
|
||||
#endif /* NS3_DEPRECATED_H */
|
||||
|
||||
Reference in New Issue
Block a user