summaryrefslogtreecommitdiff
path: root/lib/regex_internal.h
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-01-19 08:47:17 +0100
committerJim Meyering <meyering@redhat.com>2010-01-28 11:33:23 +0100
commit54b5ce0e1a4f6a4af37f970e45e6e173e5b0a1c6 (patch)
tree9703e7ed436d23c485fa3d0bc59540e971b74c91 /lib/regex_internal.h
parent2eb5a8a0ff8348149a9ca985e2ccbfb03bc8de53 (diff)
downloadgnulib-54b5ce0e1a4f6a4af37f970e45e6e173e5b0a1c6.tar.gz
regex_internal.h: define __attribute_warn_unused_result__
* lib/regex_internal.h (__attribute_warn_unused_result__): Define.
Diffstat (limited to 'lib/regex_internal.h')
-rw-r--r--lib/regex_internal.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/regex_internal.h b/lib/regex_internal.h
index f5c3125fbd..704d1cc9d6 100644
--- a/lib/regex_internal.h
+++ b/lib/regex_internal.h
@@ -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 */