diff dw.h @ 1599:d2864925afb9

Last commit didn't work with GCC... not quite as pretty but this works.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sat, 25 Feb 2012 23:22:49 +0000
parents a2cd4b78048f
children cbfdd56e3e72
line wrap: on
line diff
--- a/dw.h	Sat Feb 25 23:12:11 2012 +0000
+++ b/dw.h	Sat Feb 25 23:22:49 2012 +0000
@@ -1439,15 +1439,20 @@
 /* Visual C */
 #if defined(_MSC_VER) 
 #define DW_DEPRECATED(func, message) __declspec(deprecated(message)) func
-/* Clang with message */
-#elif defined(__has_extension) && __has_extension(attribute_deprecated_with_message)) 
-#define DW_DEPRECATED(func, message) func __attribute__ ((deprecated (message)))
-/* GCC with message */
-#elif defined(__GNUC__) && (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40500 
-#define DW_DEPRECATED(func, message) func __attribute__ ((deprecated (message)))
-/* Clang or GCC without message */
-#elif defined(__clang__) || defined(__GNUC__)
-#define DW_DEPRECATED(func, message) func __attribute__ ((deprecated))
+/* Clang */
+#elif defined(__has_extension)
+#	if __has_extension(attribute_deprecated_with_message) 
+#	define DW_DEPRECATED(func, message) func __attribute__ ((deprecated (message)))
+#	else
+#	define DW_DEPRECATED(func, message) func __attribute__ ((deprecated))
+#	endif
+/* GCC */
+#elif defined(__GNUC__)
+#	if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40500 
+#	define DW_DEPRECATED(func, message) func __attribute__ ((deprecated (message)))
+#	else
+#	define DW_DEPRECATED(func, message) func __attribute__ ((deprecated))
+#	endif
 #else
 /* Compiler without deprecation support */
 #define DW_DEPRECATED(func) func