From: Zack Weinberg Date: Wed, 26 Jan 2000 07:37:30 +0000 (+0000) Subject: Makefile.in (machname.h): SunOS 4 sed can't handle a file with one line and no traili... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cef40e9fa4dd4e57384cc870db87d1e9cf4d7e97;p=gcc.git Makefile.in (machname.h): SunOS 4 sed can't handle a file with one line and no trailing newline. * fixinc/Makefile.in (machname.h): SunOS 4 sed can't handle a file with one line and no trailing newline. Patch by Kaveh Ghazi . * fixinc/fixtests.c (machine_name_test): Fix fencepost error checking if the match is on the line. * fixinc/gnu-regex.c: Provide regerror not __regerror. From-SVN: r31628 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6a7dccaadf8..45ab067116d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2000-01-25 Zack Weinberg + + * fixinc/Makefile.in (machname.h): SunOS 4 sed can't handle a + file with one line and no trailing newline. + Patch by Kaveh Ghazi . + * fixinc/fixtests.c (machine_name_test): Fix fencepost error + checking if the match is on the line. + * fixinc/gnu-regex.c: Provide regerror not __regerror. + 2000-01-25 Richard Henderson * sparc.c (output_cbranch): Fix accidental squashing of the diff --git a/gcc/fixinc/Makefile.in b/gcc/fixinc/Makefile.in index 43d3855be22..ad242fc7402 100644 --- a/gcc/fixinc/Makefile.in +++ b/gcc/fixinc/Makefile.in @@ -145,7 +145,7 @@ machname.h: ../specs sed -n 's/^.*-D\([a-zA-Z_][a-zA-Z0-9_]*\).*$$/\1/p' | sort -u | \ grep -v '^_[_A-Z]' > mn.T @echo "Forbidden identifiers: `tr '\012' ' ' /' machname.h - @echo >> machname.h - @-rm -f mn.T + @sed 's/^/\\\\/' mn.T2 + @echo '' >>mn.T2 + @sed 's/^/#define MN_NAME_PAT "/; s/|$$/"/' < mn.T2 > machname.h + @-rm -f mn.T mn.T2 diff --git a/gcc/fixinc/fixtests.c b/gcc/fixinc/fixtests.c index 72fa7ee0354..5edd75999ab 100644 --- a/gcc/fixinc/fixtests.c +++ b/gcc/fixinc/fixtests.c @@ -307,7 +307,7 @@ TEST_FOR_FIX_PROC_HEAD( machine_name_test ) return SKIP_FIX; /* No match in file - no fix needed */ /* Match; is it on the line? */ - if (match[0].rm_eo < limit - base) + if (match[0].rm_eo <= limit - base) return APPLY_FIX; /* Yup */ /* Otherwise, keep looking... */ diff --git a/gcc/fixinc/gnu-regex.c b/gcc/fixinc/gnu-regex.c index 007aec175d4..553942b1db5 100644 --- a/gcc/fixinc/gnu-regex.c +++ b/gcc/fixinc/gnu-regex.c @@ -5745,7 +5745,7 @@ weak_alias (__regexec, regexec) from either regcomp or regexec. We don't use PREG here. */ size_t -__regerror (errcode, preg, errbuf, errbuf_size) +regerror (errcode, preg, errbuf, errbuf_size) int errcode; const regex_t *preg; char *errbuf;