[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gnulib] regex problems
From: |
Bruno Haible |
Subject: |
Re: [bug-gnulib] regex problems |
Date: |
Wed, 3 Aug 2005 22:42:04 +0200 |
User-agent: |
KMail/1.5 |
Sam Steingold wrote:
> when trying to upgrade to the latest gnulib regexp, I encountered the
> following problems:
>
> 1. g++ cannot compile regexp:
>
> ./regex.h:569: error: expected primary-expression before "__restrict__"
> ./regex.h:569: error: expected `]' before "__restrict__"
> ./regex.h:569: error: expected `,' or `...' before "__restrict__"
This patch should work. No version of g++ in the 3.2.*, 3.3.*, 3.4.*,
4.0.[01] series supports the [__restrict] syntax.
*** regex.h 7 Jul 2005 08:08:39 -0000 1.25
--- regex.h 3 Aug 2005 20:36:47 -0000
***************
*** 552,560 ****
# endif
# endif
#endif
! /* gcc 3.1 and up support the [restrict] syntax. */
#ifndef __restrict_arr
! # if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
# define __restrict_arr __restrict
# else
# define __restrict_arr
--- 552,560 ----
# endif
# endif
#endif
! /* gcc 3.1 and up support the [restrict] syntax, but g++ doesn't. */
#ifndef __restrict_arr
! # if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) && !defined
__cplusplus
# define __restrict_arr __restrict
# else
# define __restrict_arr
> 2. autoconf does not recognize AC_CHECK_HEADERS_ONCE even though I put
> onceonly.m4 right next to the files that use it in my m4 directory:
>
> configure:5675: error: possibly undefined macro: AC_CHECK_HEADERS_ONCE
> If this token and others are legitimate, please use m4_pattern_allow.
> See the Autoconf documentation.
> configure:5676: error: possibly undefined macro: AC_CHECK_FUNCS_ONCE
Does the definition of AC_CHECK_HEADERS_ONCE also find its way into the
aclocal.m4 file? (Remember that autoconf doesn't look at a directory of m4
files; it looks at an aclocal.m4 file in the current directory.) If yes,
the cause is likely to be over-quoting in a .m4 or configure.ac file.
Bruno