summaryrefslogtreecommitdiff
path: root/lib/regex_internal.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-09-25 04:18:39 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-09-25 04:18:39 +0000
commit793ffcaac0656a06388293f734c2b6a521f9ba7d (patch)
treed8754dac63368a9e31dd3b1ac4b9d6fd6b6f443b /lib/regex_internal.h
parent1e32f96bf215be0598453da00c43cbae65a0a174 (diff)
downloadcoreutils-793ffcaac0656a06388293f734c2b6a521f9ba7d.tar.xz
(__GNUC_PREREQ, always_inline, inline, pure):
Remove. (__attribute): Define to empty unless GCC 3.1 or later. This works around a core dump on OpenBSD 3.4, which has GCC 2.95.3, which dumps core when given __attribute__(()). It also simplifies other tests, since we really don't want to bother with worrying about which ancient version of GCC supported what. Original problem reported by Yoann Vandoorselaere, with part of the fix suggested by Derek Price.
Diffstat (limited to 'lib/regex_internal.h')
-rw-r--r--lib/regex_internal.h17
1 files changed, 1 insertions, 16 deletions
diff --git a/lib/regex_internal.h b/lib/regex_internal.h
index 361647344..a36ae4c8a 100644
--- a/lib/regex_internal.h
+++ b/lib/regex_internal.h
@@ -88,25 +88,10 @@
# 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. */
@@ -131,7 +116,7 @@
# define attribute_hidden
#endif /* not _LIBC */
-#if __GNUC__ >= 3
+#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
# define __attribute(arg) __attribute__ (arg)
#else
# define __attribute(arg)