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]

Patch installed to fixfixes.c to avoid ANSI string concatenation


I installed the following patch to allow fixfixes.c to be compiled
with sunos4's K&R cc.  Tested by compiling/running fixincludes on
sunos4 and diff'ing the fixed headers.

		--Kaveh


2000-07-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* fixinc/fixfixes.c (emit_gnu_type): Avoid string concatenation.

diff -rup ../egcs-CVS20000716/gcc/fixinc/fixfixes.c egcs-CVS20000716/gcc/fixinc/fixfixes.c
--- ../egcs-CVS20000716/gcc/fixinc/fixfixes.c	Thu Jul 13 12:12:23 2000
+++ egcs-CVS20000716/gcc/fixinc/fixfixes.c	Sun Jul 16 13:10:51 2000
@@ -164,15 +164,17 @@ emit_gnu_type ( text, rm )
   /*
    *  Now print out the reformed typedef
    */
-  printf ("#ifndef __%s_TYPE__\n"
-          "#define __%s_TYPE__ %s\n"
-          "#endif\n",
+  printf ("\
+#ifndef __%s_TYPE__\n\
+#define __%s_TYPE__ %s\n\
+#endif\n",
           p_tm->pz_TYPE, p_tm->pz_TYPE, p_tm->pz_gtype );
 
-  printf ("#if !defined(_GCC_%s_T)%s\n"
-          "#define _GCC_%s_T\n"
-          "typedef __%s_TYPE__ %s_t;\n"
-          "#endif\n",
+  printf ("\
+#if !defined(_GCC_%s_T)%s\n\
+#define _GCC_%s_T\n\
+typedef __%s_TYPE__ %s_t;\n\
+#endif\n",
           p_tm->pz_TYPE, p_tm->pz_cxx_guard,
           p_tm->pz_TYPE, p_tm->pz_TYPE, p_tm->pz_type);
 

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