This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: fixincl failure on solaris2 mainline
- From: "Zack Weinberg" <zack at codesourcery dot com>
- To: Phil Edwards <phil at jaj dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 17 Jul 2003 10:35:48 -0700
- Subject: Re: fixincl failure on solaris2 mainline
- References: <20030717172528.GA26477@disaster.jaj.com>
Phil Edwards <phil@jaj.com> writes:
> With current CVS:
>
> Applying solaris_mutex_init_2 to pthread.h
> fixincl ERROR: cannot compile format search-text regex for format_fix
> expr = `(^#define[ ]+PTHREAD_(MUTEX|COND)_INITIALIZER[ ]+{.*),[ ]*0}(|[ ].*)$'
> error Invalid content of \{\}
>
> I know nothing about fixincl, so I don't know what else to report or
> investigate here. What more do you need to know?
That's enough. The error message is misleading -- it's really the
unbackslashed { ... } it doesn't like. (libiberty/xregex.c is pickier
about braces than the old gnu-regex.c was.) Please try the appended
patch.
zw
* fixinc/inclhack.def (solaris_mutex_init_2): Escape braces
in regexp that don't form a range expression.
* fixinc/fixincl.def: Regenerate.
===================================================================
Index: fixinc/inclhack.def
--- fixinc/inclhack.def 15 Jul 2003 00:43:23 -0000 1.166
+++ fixinc/inclhack.def 17 Jul 2003 17:34:58 -0000
@@ -2198,8 +2198,8 @@ fix = {
"#else\n"
"%1, {0}}%3\n"
"#endif";
- c_fix_arg = "(^#define[ \t]+PTHREAD_(MUTEX|COND)_INITIALIZER[ \t]+{.*)"
- ",[ \t]*0}" "(|[ \t].*)$";
+ c_fix_arg = "(^#define[ \t]+PTHREAD_(MUTEX|COND)_INITIALIZER[ \t]+\\{.*)"
+ ",[ \t]*0\\}" "(|[ \t].*)$";
test_text =
'#ident "@(#)pthread.h 1.26 98/04/12 SMI"'"\n"
"#define PTHREAD_MUTEX_INITIALIZER\t{{{0},0}, {{{0}}}, 0}\n"
===================================================================
Index: fixinc/fixincl.x
--- fixinc/fixincl.x 15 Jul 2003 00:43:24 -0000 1.158
+++ fixinc/fixincl.x 17 Jul 2003 17:34:57 -0000
@@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
- * It has been AutoGen-ed Monday July 14, 2003 at 08:37:56 PM EDT
+ * It has been AutoGen-ed Thursday July 17, 2003 at 10:34:33 AM PDT
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT CVS-MERGE THIS FILE, EITHER Mon Jul 14 20:37:56 EDT 2003
+/* DO NOT CVS-MERGE THIS FILE, EITHER Thu Jul 17 10:34:33 PDT 2003
*
* You must regenerate it. Use the ./genfixes script.
*
@@ -3968,7 +3968,7 @@ static const char* apzSolaris_Mutex_Init
#else\n\
%1, {0}}%3\n\
#endif",
- "(^#define[ \t]+PTHREAD_(MUTEX|COND)_INITIALIZER[ \t]+{.*),[ \t]*0}(|[ \t].*)$",
+ "(^#define[ \t]+PTHREAD_(MUTEX|COND)_INITIALIZER[ \t]+\\{.*),[ \t]*0\\}(|[ \t].*)$",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *