+/* This attribute was added in GCC 4.0. */
+#if __GNUC__ >= 4
+#define WARN_UNUSED_RESULT ATTRIBUTE ((warn_unused_result))
+#else
+#define WARN_UNUSED_RESULT
+#endif
+
+/* This attribute indicates that the function does not examine
+ any values except its arguments, and has no effects except the
+ return value. A function that has pointer arguments and
+ examines the data pointed to must _not_ be declared
+ `const'. */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5)
+#define CONST_FUNCTION ATTRIBUTE ((const))
+#else
+#define CONST_FUNCTION
+#endif
+
+/* This attribute indicates that the function has no effects
+ except the return value and its return value depends only on
+ the parameters and/or global variables. */
+#if __GNUC__ > 2
+#define PURE_FUNCTION ATTRIBUTE ((pure))
+#else
+#define PURE_FUNCTION
+#endif
+
+/* This attribute indicates that the argument with the given
+ IDX must be a null pointer. IDX counts backward in the
+ argument list, so that 0 is the last argument, 1 is the
+ second-from-last argument, and so on. */
+#if __GNUC__ > 3
+#define SENTINEL(IDX) ATTRIBUTE ((sentinel(IDX)))
+#else
+#define SENTINEL(IDX)
+#endif
+