-/* Constructor priorities exist since gcc 4.3. Apparently, they are however not
- * supported on Macs. */
-# if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && !defined(__APPLE__)
-# define _XBT_GNUC_CONSTRUCTOR(prio) __attribute__((__constructor__ (prio)))
-# define _XBT_GNUC_DESTRUCTOR(prio) __attribute__((__destructor__ (prio)))
-# else
-# define _XBT_GNUC_CONSTRUCTOR(prio) __attribute__((__constructor__))
-# define _XBT_GNUC_DESTRUCTOR(prio) __attribute__((__destructor__))
-# endif
+#ifndef XBT_ATTRIB_NORETURN
+#define XBT_ATTRIB_NORETURN __attribute__((noreturn))
+#endif
+#ifndef XBT_ATTRIB_UNUSED
+#define XBT_ATTRIB_UNUSED __attribute__((unused))
+#endif
+#ifndef XBT_ATTRIB_DEPRECATED
+#define XBT_ATTRIB_DEPRECATED(mesg) __attribute__((deprecated(mesg)))
+#endif
+
+#define XBT_ATTRIB_DEPRECATED_v321(mesg) XBT_ATTRIB_DEPRECATED(mesg) /* Will be dropped in v3.21 */
+#define XBT_ATTRIB_DEPRECATED_v322(mesg) XBT_ATTRIB_DEPRECATED(mesg) /* Will be dropped in v3.22 */
+#define XBT_ATTRIB_DEPRECATED_v323(mesg) XBT_ATTRIB_DEPRECATED(mesg) /* Will be dropped in v3.23 */
+
+#define XBT_ATTRIB_CONSTRUCTOR(prio) __attribute__((__constructor__(prio)))
+#define XBT_ATTRIB_DESTRUCTOR(prio) __attribute__((__destructor__(prio)))