regex_internal.h: define __attribute_warn_unused_result__
[pspp] / lib / regex_internal.h
index f5c3125fbdc99e914ee7b637561f90253ed039bc..704d1cc9d6d174b7e2ecaf187bd55c28ce6ea189 100644 (file)
@@ -851,4 +851,12 @@ re_string_elem_size_at (const re_string_t *pstr, Idx idx)
 }
 #endif /* RE_ENABLE_I18N */
 
+#if __GNUC_PREREQ (3,4)
+# undef __attribute_warn_unused_result__
+# define __attribute_warn_unused_result__ \
+   __attribute__ ((__warn_unused_result__))
+#else
+# define __attribute_warn_unused_result__ /* empty */
+#endif
+
 #endif /*  _REGEX_INTERNAL_H */