* regex_internal.h (__attribute): Define to nothing for GCC 2.
[gnulib.git] / lib / regex_internal.h
index fe37c0b..3616473 100644 (file)
 #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
 # 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.  */
 # define attribute_hidden
 #endif /* not _LIBC */
 
-#ifdef __GNUC__
+#if __GNUC__ >= 3
 # define __attribute(arg) __attribute__ (arg)
 #else
 # define __attribute(arg)
@@ -833,7 +851,7 @@ bitset_not (bitset set)
     set[i] = ~set[i];
   if (SBC_MAX % BITSET_WORD_BITS != 0)
     set[BITSET_WORDS - 1] =
-      (((bitset_word) 1 << SBC_MAX % BITSET_WORD_BITS) - 1
+      ((((bitset_word) 1 << SBC_MAX % BITSET_WORD_BITS) - 1)
        & ~set[BITSET_WORDS - 1]);
 }