This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: building 3.1 branch on Cygwin


Hi Neil,

Here's the updated patch using the macros.

Chris

>>I haven't quite been able to get everything to build using cygwin on NT 
>>because I still get errors that say something about a linker error and 
>>static libraries or something, but I did make the following patches to 
>>make things build a little easier out of the box using the 2.95 compiler 
>>included with Cygwin. The patch deals line feed issues...
>>
>
>Is it possible to use macros from Zack's safe-ctype.h header?  This issue
>probably wouldn't arise if all code used them.
>
>Neil.
>
Index: gcc/genflags.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/genflags.c,v
retrieving revision 1.42
diff -u -r1.42 genflags.c
--- gcc/genflags.c    2 Dec 2001 00:04:19 -0000    1.42
+++ gcc/genflags.c    7 Mar 2002 23:13:31 -0000
@@ -201,8 +201,8 @@
       printf ("(");
       for (p = XSTR (insn, 2); *p; p++)
     {
-      if (*p == '\n')
-        printf (" \\\n");
+      if (IS_VSPACE(*p))
+        printf (" ");
       else
         printf ("%c", *p);
     }
Index: gcc/genoutput.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/genoutput.c,v
retrieving revision 1.68
diff -u -r1.68 genoutput.c
--- gcc/genoutput.c    2 Dec 2001 00:04:19 -0000    1.68
+++ gcc/genoutput.c    7 Mar 2002 23:13:31 -0000
@@ -366,7 +366,7 @@
         printf ("    \"");
         while (*p)
           {
-        if (*p == '\n' && prev != '\\')
+        if (IS_VSPACE(*p) && prev != '\\')
           printf ("\\n\\\n");
         else
           putchar (*p);
@@ -694,11 +694,11 @@
 
       for (i = 0, cp = &template[1]; *cp; )
     {
-      while (*cp == '\n' || *cp == ' ' || *cp== '\t')
+      while (ISSPACE(*cp))
         cp++;
 
       printf ("  \"");
-      while (*cp != '\n' && *cp != '\0')
+      while (!IS_VSPACE(*cp) && (*cp != '\0'))
         {
           putchar (*cp);
           cp++;



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