X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=urcu%2Fcompiler.h;h=318ca65911d688a3168fbf3a0b96a845065369a3;hb=c7ba06ba1bd70d77a6530503cf216d3a9878d672;hp=0c6ece252ca0e8bee2a480ab45588bb8ccd15bcd;hpb=e51500edbd9919cee53bc85cbb4b22cd4786fc42;p=urcu.git diff --git a/urcu/compiler.h b/urcu/compiler.h index 0c6ece2..318ca65 100644 --- a/urcu/compiler.h +++ b/urcu/compiler.h @@ -70,7 +70,7 @@ }) #define CAA_BUILD_BUG_ON_ZERO(cond) (sizeof(struct { int:-!!(cond); })) -#define CAA_BUILD_BUG_ON(cond) ((void)BUILD_BUG_ON_ZERO(cond)) +#define CAA_BUILD_BUG_ON(cond) ((void)CAA_BUILD_BUG_ON_ZERO(cond)) /* * __rcu is an annotation that documents RCU pointer accesses that need @@ -91,4 +91,14 @@ #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 */