Mercurial > hg > octave-kai > gnulib-hg
changeset 6296:ac6a92dc851d
* regex_internal.h (__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.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Sun, 25 Sep 2005 04:20:16 +0000 |
parents | 26aeca19bf5e |
children | 10379892281e |
files | lib/ChangeLog lib/regex_internal.h |
diffstat | 2 files changed, 9 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,8 +1,14 @@ 2005-09-24 Paul Eggert <eggert@cs.ucla.edu> - * regex_internal.h (__attribute): Define to nothing for GCC 2. + * regex_internal.h (__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__(()). + 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. 2005-09-24 Jim Meyering <jim@meyering.net>
--- 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)