aboutsummaryrefslogtreecommitdiff
path: root/gl/regex_internal.h
diff options
context:
space:
mode:
authorGravatar Thomas Guyot-Sionnest <dermoth@aei.ca> 2010-04-07 21:11:46 -0400
committerGravatar Thomas Guyot-Sionnest <dermoth@aei.ca> 2010-04-12 21:26:35 -0400
commit74da141e618ef99959d509cb2e7be35a348a39db (patch)
tree88ebc38b381a1021fc2d74864a71e230ae591c3d /gl/regex_internal.h
parentc63a4f726a0b6ad8cf6040f947754a81fd4683bb (diff)
downloadmonitoring-plugins-74da141e618ef99959d509cb2e7be35a348a39db.tar.gz
Sync with the latest Gnulib code (177f525)
Signed-off-by: Thomas Guyot-Sionnest <dermoth@aei.ca>
Diffstat (limited to 'gl/regex_internal.h')
-rw-r--r--gl/regex_internal.h26
1 files changed, 21 insertions, 5 deletions
diff --git a/gl/regex_internal.h b/gl/regex_internal.h
index dc322ec5..2cb8c4d0 100644
--- a/gl/regex_internal.h
+++ b/gl/regex_internal.h
@@ -1,6 +1,6 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
- Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+ Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -28,9 +28,8 @@
#include <stdlib.h>
#include <string.h>
-#ifdef _LIBC
-# include <langinfo.h>
-#else
+#include <langinfo.h>
+#ifndef _LIBC
# include "localcharset.h"
#endif
#if defined HAVE_LOCALE_H || defined _LIBC
@@ -852,4 +851,21 @@ re_string_elem_size_at (const re_string_t *pstr, Idx idx)
}
#endif /* RE_ENABLE_I18N */
+#ifndef __GNUC_PREREQ
+# if defined __GNUC__ && defined __GNUC_MINOR__
+# define __GNUC_PREREQ(maj, min) \
+ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
+# else
+# define __GNUC_PREREQ(maj, min) 0
+# endif
+#endif
+
+#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 */