X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=urcu%2Fcompiler.h;h=c4ade90920dcf3ed02b46e5d098a432147aa5c93;hb=94e710926b323933ec9ab76fb4fcc4cec2bcb1ed;hp=cd4a49d19dc6e82f454027bfba76dc2f8eb14bf5;hpb=9f59b2209b3a4bde416bcfa55b10c36b16fa91ae;p=urcu.git diff --git a/urcu/compiler.h b/urcu/compiler.h index cd4a49d..c4ade90 100644 --- a/urcu/compiler.h +++ b/urcu/compiler.h @@ -91,4 +91,16 @@ #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 + +#define CAA_ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) + #endif /* _URCU_COMPILER_H */