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]

building 3.1 branch on Cygwin


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...

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 21:31:49 -0000
@@ -201,8 +201,8 @@
       printf ("(");
       for (p = XSTR (insn, 2); *p; p++)
     {
-      if (*p == '\n')
-        printf (" \\\n");
+      if (*p == '\n' || *p == '\r')
+        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 21:31:50 -0000
@@ -366,7 +366,7 @@
         printf ("    \"");
         while (*p)
           {
-        if (*p == '\n' && prev != '\\')
+        if ((*p == '\n' || *p == '\r') && 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 (*cp == '\n' || *cp == '\r' || *cp == ' ' || *cp== '\t')
         cp++;
 
       printf ("  \"");
-      while (*cp != '\n' && *cp != '\0')
+      while (*cp != '\n' && *cp != '\r' && *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]