Re: [bug-gnulib] regex problems
Bruno Haible [EMAIL PROTECTED] writes: This patch should work. No version of g++ in the 3.2.*, 3.3.*, 3.4.*, 4.0.[01] series supports the [__restrict] syntax. Thanks. I installed that patch, along with the corresponding change to srclist.txt, and some commentary improvements there. I also filed a glibc bug report so that it gets put into glibc. Here's what I installed. 2005-08-15 Paul Eggert [EMAIL PROTECTED] * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h. Add comments for each pending glibc patch. 2005-08-15 Bruno Haible [EMAIL PROTECTED] * lib/regex.h (__restrict_arr): Don't define to __restrict if __cplusplus is defined. Index: config/srclist.txt === RCS file: /cvsroot/gnulib/gnulib/config/srclist.txt,v retrieving revision 1.66 diff -p -u -r1.66 srclist.txt --- config/srclist.txt 8 Jul 2005 17:57:01 - 1.66 +++ config/srclist.txt 16 Aug 2005 00:04:27 - @@ -93,20 +93,30 @@ $LIBCSRC/stdlib/getsubopt.c lib gpl #$LIBCSRC/posix/getopt.h lib gpl (getopt_.h in gnulib) #$LIBCSRC/posix/getopt1.c lib gpl #$LIBCSRC/posix/getopt_int.h lib gpl -# regcomp.c contains a porting fix +# +# http://sources.redhat.com/bugzilla/show_bug.cgi?id=1057 #$LIBCSRC/posix/regcomp.c lib gpl +# $LIBCSRC/posix/regex.c lib gpl -$LIBCSRC/posix/regex.h lib gpl +# +# http://sources.redhat.com/bugzilla/show_bug.cgi?id=1201 +#$LIBCSRC/posix/regex.hlib gpl +# $LIBCSRC/posix/regex_internal.clib gpl -# regex_internal.h contains a porting fix +# +# http://sources.redhat.com/bugzilla/show_bug.cgi?id=1054 #$LIBCSRC/posix/regex_internal.h lib gpl +# $LIBCSRC/posix/regexec.c lib gpl # c89 changes $LIBCSRC/string/strdup.c lib gpl $LIBCSRC/sysdeps/generic/strtoll.c lib gpl $LIBCSRC/sysdeps/generic/strtoul.c lib gpl $LIBCSRC/sysdeps/generic/strtok_r.clib gpl $LIBCSRC/sysdeps/generic/memmem.c lib gpl +# +# http://sources.redhat.com/bugzilla/show_bug.cgi?id=1033 #$LIBCSRC/time/mktime.clib gpl + # # These are close, but ... #$LIBCSRC/crypt/md5.c lib gpl @@ -119,7 +129,10 @@ $LIBCSRC/sysdeps/generic/memmem.c lib gp #$LIBCSRC/misc/error.h lib gpl #$LIBCSRC/misc/getpass.c lib gpl #$LIBCSRC/misc/mkstemp.c lib gpl +# +# http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060 #$LIBCSRC/posix/glob.h lib gpl (glob_.h in gnulib) +# #$LIBCSRC/posix/fnmatch.c lib gpl #$LIBCSRC/posix/fnmatch.h lib gpl (fnmatch_.h in gnulib) #$LIBCSRC/posix/fnmatch_loop.c lib gpl @@ -127,7 +140,12 @@ $LIBCSRC/sysdeps/generic/memmem.c lib gp #$LIBCSRC/stdlib/rpmatch.c lib gpl #$LIBCSRC/string/strndup.c lib gpl #$LIBCSRC/string/strverscmp.c lib gpl +# +# http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060 +# http://sources.redhat.com/bugzilla/show_bug.cgi?id=1061 +# http://sources.redhat.com/bugzilla/show_bug.cgi?id=1062 #$LIBCSRC/sysdeps/generic/glob.c lib gpl +# #$LIBCSRC/sysdeps/generic/memchr.c lib gpl #$LIBCSRC/sysdeps/generic/memcmp.c lib gpl #$LIBCSRC/sysdeps/generic/memrchr.clib gpl Index: lib/regex.h === RCS file: /cvsroot/gnulib/gnulib/lib/regex.h,v retrieving revision 1.25 diff -p -u -r1.25 regex.h --- lib/regex.h 7 Jul 2005 08:08:39 - 1.25 +++ lib/regex.h 16 Aug 2005 00:04:27 - @@ -552,9 +552,9 @@ extern int re_exec _RE_ARGS ((const char # endif # endif #endif -/* gcc 3.1 and up support the [restrict] syntax. */ +/* gcc 3.1 and up support the [restrict] syntax, but g++ doesn't. */ #ifndef __restrict_arr -# if __GNUC__ 3 || (__GNUC__ == 3 __GNUC_MINOR__ = 1) +# if (__GNUC__ 3 || (__GNUC__ == 3 __GNUC_MINOR__ = 1)) !defined __cplusplus # define __restrict_arr __restrict # else # define __restrict_arr ___ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib
Re: [bug-gnulib] regex problems
* Bruno Haible [EMAIL PROTECTED] [2005-08-04 13:22:12 +0200]: Sam Steingold wrote: Does the definition of AC_CHECK_HEADERS_ONCE also find its way into the aclocal.m4 file? ... no, aclocal.m4 does not have the definition. That's the problem. Fix that, and it will work. well, yes, that much is obvious. how do I fix it?! aclocal.m4 is generated by this rule in Makefile.devel: src/autoconf/aclocal.m4 : $(wildcard src/m4/*.m4) $(addsuffix .in,$(CONFIGURES)) egrep '(AC_INIT|AC_PREREQ)' src/configure.in configure.ac cat $(addsuffix .in,$(CONFIGURES)) | egrep -v '(AC_INIT|AC_CONFIG_HEADER|AC_OUTPUT|AC_CONFIG_FILE.*(Makefile|link\.sh)|_CANONICAL_|AC_PREREQ)' configure.ac echo AC_OUTPUT configure.ac aclocal -I `pwd`/src/m4 --output=src/autoconf/aclocal.m4 $(RM) configure.ac -- Sam Steingold (http://www.podval.org/~sds) running w2k http://pmw.org.il/ http://www.palestinefacts.org/ http://www.memri.org/ http://www.camera.org http://www.iris.org.il MS: our tomorrow's software will run on your tomorrow's HW at today's speed. ___ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib
Re: [bug-gnulib] regex problems
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 - 1.25 --- regex.h 3 Aug 2005 20:36:47 - *** *** 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 ___ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib
Re: [bug-gnulib] regex problems
* Bruno Haible [EMAIL PROTECTED] [2005-08-03 22:42:04 +0200]: 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 - 1.25 --- regex.h 3 Aug 2005 20:36:47 - *** *** 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 will you check this into the gnulib CVS? 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. no, aclocal.m4 does not have the definition. (aclocal is generated by a rule in Makefile.devel: src/autoconf/aclocal.m4 : $(wildcard src/m4/*.m4) $(addsuffix .in,$(CONFIGURES)) egrep '(AC_INIT|AC_PREREQ)' src/configure.in configure.ac cat $(addsuffix .in,$(CONFIGURES)) | egrep -v '(AC_INIT|AC_CONFIG_HEADER|AC_OUTPUT|AC_CONFIG_FILE.*(Makefile|link\.sh)|_CANONICAL_|AC_PREREQ)' configure.ac echo AC_OUTPUT configure.ac aclocal -I `pwd`/src/m4 --output=src/autoconf/aclocal.m4 $(RM) configure.ac ) -- Sam Steingold (http://www.podval.org/~sds) running w2k http://pmw.org.il/ http://www.honestreporting.com http://www.memri.org/ http://www.camera.org http://www.jihadwatch.org/ My other CAR is a CDR. ___ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib