Makefile.in (machname.h): SunOS 4 sed can't handle a file with one line and no traili...
authorZack Weinberg <zack@wolery.cumb.org>
Wed, 26 Jan 2000 07:37:30 +0000 (07:37 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Wed, 26 Jan 2000 07:37:30 +0000 (07:37 +0000)
* fixinc/Makefile.in (machname.h): SunOS 4 sed can't handle a
file with one line and no trailing newline.
Patch by Kaveh Ghazi <ghazi@caip.rutgers.edu>.
* 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

gcc/ChangeLog
gcc/fixinc/Makefile.in
gcc/fixinc/fixtests.c
gcc/fixinc/gnu-regex.c

index 6a7dcca..45ab067 100644 (file)
@@ -1,3 +1,12 @@
+2000-01-25  Zack Weinberg  <zack@wolery.cumb.org>
+
+       * fixinc/Makefile.in (machname.h): SunOS 4 sed can't handle a
+       file with one line and no trailing newline.
+       Patch by Kaveh Ghazi <ghazi@caip.rutgers.edu>.
+       * 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  <rth@cygnus.com>
 
        * sparc.c (output_cbranch): Fix accidental squashing of the
index 43d3855..ad242fc 100644 (file)
@@ -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' ' ' <mn.T`"
-       @sed 's/^/\\\\</; s/$$/\\\\>/' <mn.T | tr '\012' '|' | \
-            sed 's/^/#define MN_NAME_PAT "/; s/|$$/"/' > machname.h
-       @echo >> machname.h
-       @-rm -f mn.T
+       @sed 's/^/\\\\</; s/$$/\\\\>/' <mn.T | tr '\012' '|' > mn.T2
+       @echo '' >>mn.T2
+       @sed 's/^/#define MN_NAME_PAT "/; s/|$$/"/' < mn.T2 > machname.h
+       @-rm -f mn.T mn.T2
index 72fa7ee..5edd759 100644 (file)
@@ -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... */
index 007aec1..553942b 100644 (file)
@@ -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;