This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: FIXINCL goes into an infinite loop on alpha-osf4


Ok.  Here is my patch for the problems you saw and for a silly fencepost
error in machine_name_test.  With this applied, I am confident that
fixincludes doesn't munge anything it shouldn't in the SunOS 4 headers.
I am less confident that it does munge everything that it should, but an
eyeball of the diffs looks okay.

An interesting statistic:  If you turn off else_endif_label, the number
of headers touched on SunOS drops by 313 files.

zw

===================================================================
Index: Makefile.in
--- Makefile.in	2000/01/20 18:25:12	1.13
+++ Makefile.in	2000/01/26 02:16:25
@@ -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: fixtests.c
--- fixtests.c	2000/01/20 18:25:12	1.10
+++ fixtests.c	2000/01/26 02:16:25
@@ -307,7 +307,7 @@ TEST_FOR_FIX_PROC_HEAD( machine_name_tes
 	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: gnu-regex.c
--- gnu-regex.c	2000/01/20 18:25:12	1.3
+++ gnu-regex.c	2000/01/26 02:16:27
@@ -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;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]