#if (defined(__GNUC__) && __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) || \
(defined(__clang__) && (__has_extension(attribute_deprecated_with_message)))
+# define HAVE_ATTR_DEPRECATED
int rand(void) __attribute__((deprecated("Do not use rand, use i_rand")));
int rand_r(unsigned int*) __attribute__((deprecated("Do not use rand_r, use i_rand")));
#endif
#else
# define ATTR_RETURNS_NONNULL
#endif
+#ifdef HAVE_ATTR_DEPRECATED
+# define ATTR_DEPRECATED(str) __attribute__((deprecated(str)))
+#else
+# define ATTR_DEPRECATED(str)
+#endif
/* Macros to provide type safety for callback functions' context parameters */
#ifdef HAVE_TYPE_CHECKS