summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2013-04-01 10:38:31 +0100
committerPeter Powell <petpow@saberuk.com>2013-04-01 10:39:55 +0100
commit52fa9f8fbc2b58f987e6cf7af110b3b5ba98a9e1 (patch)
treef0752b61147dc964aa936217d10b069e5b24835c /include
parent65155ef5c520e89b1d96d1768c1d7308334940c9 (diff)
Add macro for marking methods as deprecated.
Diffstat (limited to 'include')
-rw-r--r--include/inspircd.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/inspircd.h b/include/inspircd.h
index 86853a94f..054b7c148 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -46,6 +46,15 @@
#define CUSTOM_PRINTF(STRING, FIRST)
#endif
+#if defined __clang__ || defined __GNUC__
+# define DEPRECATED_METHOD(function) function __attribute__((deprecated))
+#elif defined _MSC_VER
+# define DEPRECATED_METHOD(function) __declspec(deprecated) function
+#else
+# pragma message ("Warning! DEPRECATED_METHOD() does not work on your compiler!")
+# define DEPRECATED_METHOD(function) function
+#endif
+
// Required system headers.
#include <ctime>
#include <cstdarg>