[llvm-commits] CVS: llvm-gcc/gcc/gensupport.c

Chris Lattner lattner at cs.uiuc.edu
Tue Jun 1 12:34:03 PDT 2004


Changes in directory llvm-gcc/gcc:

gensupport.c updated: 1.1.1.1 -> 1.2

---
Log message:

Fix the gen* utilities that GCC used when running under cygwin.  They were
reading the .md files and getting confused about the \r characters that
windows has in them.  This forces cygwin to open the files in "text" mode.


---
Diffs of the changes:  (+3 -3)

Index: llvm-gcc/gcc/gensupport.c
diff -u llvm-gcc/gcc/gensupport.c:1.1.1.1 llvm-gcc/gcc/gensupport.c:1.2
--- llvm-gcc/gcc/gensupport.c:1.1.1.1	Thu Jan  8 15:58:40 2004
+++ llvm-gcc/gcc/gensupport.c	Tue Jun  1 12:29:16 2004
@@ -205,7 +205,7 @@
 	  static const char sep[2] = { DIR_SEPARATOR, '\0' };
 
 	  pathname = concat (stackp->fname, sep, filename, NULL);
-	  input_file = fopen (pathname, "r");
+	  input_file = fopen (pathname, "rt");
 	  if (input_file != NULL)
 	    goto success;
 	  free (pathname);
@@ -216,7 +216,7 @@
     pathname = concat (base_dir, filename, NULL);
   else
     pathname = xstrdup (filename);
-  input_file = fopen (pathname, "r");
+  input_file = fopen (pathname, "rt");
   if (input_file == NULL)
     {
       free (pathname);
@@ -917,7 +917,7 @@
     base_dir = save_string (filename, lastsl - filename + 1 );
 
   read_rtx_filename = filename;
-  input_file = fopen (filename, "r");
+  input_file = fopen (filename, "rt");
   if (input_file == 0)
     {
       perror (filename);





More information about the llvm-commits mailing list