deprecation: fix build with gcc < 4.5
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 23 Oct 2012 15:40:37 +0000 (11:40 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 23 Oct 2012 15:40:37 +0000 (11:40 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
urcu/compiler.h
urcu/rculfstack.h
urcu/wfqueue.h

index cd4a49d19dc6e82f454027bfba76dc2f8eb14bf5..318ca65911d688a3168fbf3a0b96a845065369a3 100644 (file)
 #define caa_cast_long_keep_sign(v)     \
        (caa_is_signed_type(__typeof__(v)) ? (long) (v) : (unsigned long) (v))
 
+#if defined (__GNUC__) \
+       && ((__GNUC_MAJOR__ == 4) && (__GNUC_MINOR__ >= 5)      \
+               || __GNUC_MAJOR__ >= 5)
+#define CDS_DEPRECATED(msg)    \
+       __attribute__((deprecated(msg)))
+#else
+#define CDS_DEPRECATED(msg)    \
+       __attribute__((deprecated))
+#endif
+
 #endif /* _URCU_COMPILER_H */
index 2d1ecceba729524700804f85821a73c03c1d0ba0..c7e5599d07fa12f13573c6dd877432be08a120e9 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include <urcu/compiler.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 #ifndef CDS_LFS_RCU_DEPRECATED
 #define CDS_LFS_RCU_DEPRECATED \
-       __attribute__((deprecated("urcu/rculfstack.h is deprecated. Please use urcu/lfstack.h instead.")))
+       CDS_DEPRECATED("urcu/rculfstack.h is deprecated. Please use urcu/lfstack.h instead.")
 #endif
 
 struct cds_lfs_node_rcu {
index 342ee48e0a61e7e7b7a0d765da456e8952d8a686..4cd4b135860c2c59ac5c88bfe9298eaff3a1adfe 100644 (file)
@@ -33,7 +33,7 @@ extern "C" {
 
 #ifndef CDS_WFQ_DEPRECATED
 #define CDS_WFQ_DEPRECATED     \
-       __attribute__((deprecated("urcu/wfqueue.h is deprecated. Please use urcu/wfcqueue.h instead.")))
+       CDS_DEPRECATED("urcu/wfqueue.h is deprecated. Please use urcu/wfcqueue.h instead.")
 #endif
 
 /*
This page took 0.026082 seconds and 4 git commands to generate.