Commit ab747408 by Zack Weinberg Committed by Zack Weinberg

Makefile.in (fixinc.sh): Remove gnu-regex.[ch] from dependencies.

	* Makefile.in (fixinc.sh): Remove gnu-regex.[ch] from dependencies.
	* fixinc/Makefile.in: Remove all references to gnu-regex.[och].
	* fixinc/fixfixes.c, fixinc/fixincl.c, fixinc/fixlib.c
	* fixinc/fixtests.c: Use xregexec not regexec, xregcomp not regcomp.
	* fixinc/fixlib.h: Include xregex.h not gnu-regex.h.
	* fixinc/inclhack.def (hpux10_cpp_pow_inline, hpux11_cpp_pow_inline):
	Escape { and } characters which are not part of range expressions.
	* fixinc/fixincl.x: Regenerate.

From-SVN: r69099
parent c094e9b9
2003-07-08 Zack Weinberg <zack@codesourcery.com>
* Makefile.in (fixinc.sh): Remove gnu-regex.[ch] from dependencies.
* fixinc/Makefile.in: Remove all references to gnu-regex.[och].
* fixinc/fixfixes.c, fixinc/fixincl.c, fixinc/fixlib.c
* fixinc/fixtests.c: Use xregexec not regexec, xregcomp not regcomp.
* fixinc/fixlib.h: Include xregex.h not gnu-regex.h.
* fixinc/inclhack.def (hpux10_cpp_pow_inline, hpux11_cpp_pow_inline):
Escape { and } characters which are not part of range expressions.
* fixinc/fixincl.x: Regenerate.
2003-07-08 Steven Bosscher <steven@gcc.gnu.org>
PR c/1687
......
......@@ -2507,8 +2507,7 @@ fixinc.sh-warn = -Wno-error
FIXINCSRCDIR=$(srcdir)/fixinc
fixinc.sh: $(FIXINCSRCDIR)/mkfixinc.sh $(FIXINCSRCDIR)/fixincl.c \
$(FIXINCSRCDIR)/procopen.c $(FIXINCSRCDIR)/gnu-regex.c \
$(FIXINCSRCDIR)/server.c $(FIXINCSRCDIR)/gnu-regex.h \
$(FIXINCSRCDIR)/procopen.c $(FIXINCSRCDIR)/server.c \
$(FIXINCSRCDIR)/server.h $(FIXINCSRCDIR)/inclhack.def specs.ready
(MAKE="$(MAKE)"; srcdir=`cd $(srcdir)/fixinc && ${PWD_COMMAND}` ; \
CC="$(CC_FOR_BUILD)"; CFLAGS="$(BUILD_CFLAGS)"; LDFLAGS="$(BUILD_LDFLAGS)"; \
......
......@@ -68,12 +68,12 @@ INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. \
LIBERTY = ../../libiberty/libiberty.a
ALLOBJ = fixincl.o fixtests.o fixfixes.o server.o procopen.o \
gnu-regex.o fixlib.o
fixlib.o
TESTOBJ = fixincl.o fixlib.o fixtests.o gnu-regex.o
FIXOBJ = fixfixes.o fixlib.o gnu-regex.o
TESTOBJ = fixincl.o fixlib.o fixtests.o
FIXOBJ = fixfixes.o fixlib.o
HDR = server.h gnu-regex.h fixlib.h machname.h
HDR = server.h fixlib.h machname.h
FI = fixincl@build_exeext@
AF = applyfix@build_exeext@
......@@ -96,8 +96,6 @@ $(AF): $(FIXOBJ) $(LIBERTY)
# String length warnings
fixincl.o-warn = -Wno-error
# Signed/Unsigned warnings, but in code pulled from upstream.
gnu-regex.o-warn = -Wno-error
$(ALLOBJ) : $(HDR)
fixincl.o : fixincl.c $(srcdir)/fixincl.x
......@@ -105,7 +103,6 @@ fixtests.o : fixtests.c
fixfixes.o : fixfixes.c $(srcdir)/fixincl.x
server.o : server.c
procopen.o : procopen.c
gnu-regex.o : gnu-regex.c
fixlib.o : fixlib.c
# 'machname.h' is built in the build directory.
......
......@@ -291,7 +291,7 @@ FIX_PROC_HEAD( format_fix )
* Replace every copy of the text we find
*/
compile_re (pz_pat, &re, 1, "format search-text", "format_fix" );
while (regexec (&re, text, 10, rm, 0) == 0)
while (xregexec (&re, text, 10, rm, 0) == 0)
{
fwrite( text, rm[0].rm_so, 1, stdout );
format_write( pz_fmt, text, rm );
......@@ -341,7 +341,7 @@ FIX_PROC_HEAD( char_macro_use_fix )
compile_re (pat, &re, 1, "macro pattern", "char_macro_use_fix");
for (p = text;
regexec (&re, p, 1, rm, 0) == 0;
xregexec (&re, p, 1, rm, 0) == 0;
p = limit + 1)
{
/* p + rm[0].rm_eo is the first character of the macro replacement.
......@@ -426,7 +426,7 @@ FIX_PROC_HEAD( char_macro_def_fix )
compile_re (pat, &re, 1, "macro pattern", "fix_char_macro_defines");
for (p = text;
regexec (&re, p, 1, rm, 0) == 0;
xregexec (&re, p, 1, rm, 0) == 0;
p = limit + 1)
{
/* p + rm[0].rm_eo is the first character of the macro name.
......@@ -516,7 +516,7 @@ FIX_PROC_HEAD( machine_name_fix )
scratch[1] = '_';
for (base = text;
regexec (label_re, base, 2, match, 0) == 0;
xregexec (label_re, base, 2, match, 0) == 0;
base = limit)
{
base += match[0].rm_eo;
......@@ -547,7 +547,7 @@ FIX_PROC_HEAD( machine_name_fix )
if (base == limit)
break;
if (regexec (name_re, base, 1, match, REG_NOTBOL))
if (xregexec (name_re, base, 1, match, REG_NOTBOL))
goto done; /* No remaining match in this file */
/* Match; is it on the line? */
......@@ -608,7 +608,7 @@ FIX_PROC_HEAD( wrap_fix )
* IF we do *not* match the no-wrap re, then we have a double negative.
* A double negative means YES.
*/
if (regexec( &no_wrapping_re, text, 0, NULL, 0 ) != 0)
if (xregexec( &no_wrapping_re, text, 0, NULL, 0 ) != 0)
{
/*
* A single file can get wrapped more than once by different fixes.
......@@ -690,7 +690,7 @@ FIX_PROC_HEAD( gnu_type_fix )
compile_re (pz_pat, &re, 1, "gnu type typedef", "gnu_type_fix");
while (regexec (&re, text, GTYPE_SE_CT+1, rm, 0) == 0)
while (xregexec (&re, text, GTYPE_SE_CT+1, rm, 0) == 0)
{
text = emit_gnu_type (text, rm);
}
......
......@@ -693,7 +693,7 @@ egrep_test (pz_data, p_test)
fprintf (stderr, "fixincl ERROR RE not compiled: `%s'\n",
p_test->pz_test_text);
#endif
if (regexec (p_test->p_test_regex, pz_data, 0, 0, 0) == 0)
if (xregexec (p_test->p_test_regex, pz_data, 0, 0, 0) == 0)
return APPLY_FIX;
return SKIP_FIX;
}
......@@ -808,7 +808,7 @@ extract_quoted_files (pz_data, pz_fixed_file, p_re_match)
}
/* Find the next entry */
if (regexec (&incl_quote_re, pz_incl_quot, 1, p_re_match, 0) != 0)
if (xregexec (&incl_quote_re, pz_incl_quot, 1, p_re_match, 0) != 0)
break;
}
}
......@@ -1315,7 +1315,7 @@ test_for_changes (read_fd)
/* Close the file and see if we have to worry about
`#include "file.h"' constructs. */
fclose (out_fp);
if (regexec (&incl_quote_re, pz_curr_data, 1, &match, 0) == 0)
if (xregexec (&incl_quote_re, pz_curr_data, 1, &match, 0) == 0)
extract_quoted_files (pz_curr_data, pz_curr_file, &match);
}
......
......@@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
* It has been AutoGen-ed Wednesday July 2, 2003 at 03:26:19 AM MEST
* It has been AutoGen-ed Tuesday July 8, 2003 at 01:41:54 PM PDT
* From the definitions inclhack.def
* and the template file fixincl
*/
/* DO NOT CVS-MERGE THIS FILE, EITHER Wed Jul 2 03:26:20 MEST 2003
/* DO NOT CVS-MERGE THIS FILE, EITHER Tue Jul 8 13:41:54 PDT 2003
*
* You must regenerate it. Use the ./genfixes script.
*
......@@ -1697,11 +1697,11 @@ tSCC zHpux10_Cpp_Pow_InlineList[] =
*/
tSCC zHpux10_Cpp_Pow_InlineSelect0[] =
"^# +ifdef +__cplusplus\n\
+}\n\
+inline +double +pow\\(double +__d,int +__expon\\) +{\n\
+\\}\n\
+inline +double +pow\\(double +__d,int +__expon\\) +\\{\n\
[ \t]+return +pow\\(__d,\\(double\\)__expon\\);\n\
+}\n\
+extern +\"C\" +{\n\
+\\}\n\
+extern +\"C\" +\\{\n\
#else\n\
# +endif";
......@@ -1738,9 +1738,9 @@ tSCC zHpux11_Cpp_Pow_InlineList[] =
* content selection pattern - do fix if pattern found
*/
tSCC zHpux11_Cpp_Pow_InlineSelect0[] =
" +inline double pow\\(double d,int expon\\) {\n\
" +inline double pow\\(double d,int expon\\) \\{\n\
+return pow\\(d, \\(double\\)expon\\);\n\
+}\n";
+\\}\n";
#define HPUX11_CPP_POW_INLINE_TEST_CT 1
static tTestDesc aHpux11_Cpp_Pow_InlineTests[] = {
......
......@@ -131,7 +131,7 @@ template[ \t]*<|\
if (!compiled)
compile_re (cxxpat, &cxxre, 0, "contents check", "is_cxx_header");
if (regexec (&cxxre, text, 0, 0, 0) == 0)
if (xregexec (&cxxre, text, 0, 0, 0) == 0)
return BOOL_TRUE;
}
......@@ -181,7 +181,7 @@ skip_quote( q, text )
Compile one regular expression pattern for later use. PAT contains
the pattern, RE points to a regex_t structure (which should have
been bzeroed). MATCH is 1 if we need to know where the regex
matched, 0 if not. If regcomp fails, prints an error message and
matched, 0 if not. If xregcomp fails, prints an error message and
aborts; E1 and E2 are strings to shove into the error message.
The patterns we search for are all egrep patterns.
......@@ -201,7 +201,7 @@ compile_re( pat, re, match, e1, e2 )
flags = (match ? REG_EXTENDED|REG_NEWLINE
: REG_EXTENDED|REG_NEWLINE|REG_NOSUB);
err = regcomp (re, pat, flags);
err = xregcomp (re, pat, flags);
if (err)
{
......
......@@ -32,7 +32,7 @@ Boston, MA 02111-1307, USA. */
#include "tm.h"
#include <signal.h>
#include "gnu-regex.h"
#include "xregex.h"
#include "machname.h"
#include "libiberty.h"
......
......@@ -82,7 +82,7 @@ TEST_FOR_FIX_PROC_HEAD( machine_name_test )
mn_get_regexps(&label_re, &name_re, "machine_name_test");
for (base = text;
regexec (label_re, base, 2, match, 0) == 0;
xregexec (label_re, base, 2, match, 0) == 0;
base = limit)
{
base += match[0].rm_eo;
......@@ -107,7 +107,7 @@ TEST_FOR_FIX_PROC_HEAD( machine_name_test )
shouldn't matter since the name_re has no ^ anchor, but let's
be accurate anyway. */
if (regexec (name_re, base, 1, match, REG_NOTBOL))
if (xregexec (name_re, base, 1, match, REG_NOTBOL))
return SKIP_FIX; /* No match in file - no fix needed */
/* Match; is it on the line? */
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -1003,11 +1003,11 @@ fix = {
files = fixinc-test-limits.h, math.h;
select = <<- END_POW_INLINE
^# +ifdef +__cplusplus
+}
+inline +double +pow\(double +__d,int +__expon\) +{
+\}
+inline +double +pow\(double +__d,int +__expon\) +\{
[ ]+return +pow\(__d,\(double\)__expon\);
+}
+extern +"C" +{
+\}
+extern +"C" +\{
#else
# +endif
END_POW_INLINE;
......@@ -1029,9 +1029,9 @@ fix = {
fix = {
hackname = hpux11_cpp_pow_inline;
files = math.h;
select = " +inline double pow\\(double d,int expon\\) {\n"
select = " +inline double pow\\(double d,int expon\\) \\{\n"
" +return pow\\(d, \\(double\\)expon\\);\n"
" +}\n";
" +\\}\n";
c_fix = format;
c_fix_arg = "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment