summaryrefslogtreecommitdiff
path: root/lib/regex_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/regex_internal.h')
-rw-r--r--lib/regex_internal.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/regex_internal.h b/lib/regex_internal.h
index 02087592b..95df77cac 100644
--- a/lib/regex_internal.h
+++ b/lib/regex_internal.h
@@ -27,6 +27,10 @@
#include <stdlib.h>
#include <string.h>
+#ifndef _LIBC
+# include "strcase.h"
+#endif
+
#if defined HAVE_LANGINFO_H || defined HAVE_LANGINFO_CODESET || defined _LIBC
# include <langinfo.h>
#endif
@@ -84,11 +88,25 @@
# define RE_ENABLE_I18N
#endif
+#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, 1)
+# define always_inline
+#endif
+
#if __GNUC__ >= 3
# define BE(expr, val) __builtin_expect (expr, val)
#else
# define BE(expr, val) (expr)
# define inline
+# define pure
#endif
/* Number of single byte character. */