testsuite: fix reading .orc files with win32 line endings on windows
authorTim-Philipp Müller <tim@centricular.com>
Fri, 22 May 2015 13:11:32 +0000 (14:11 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 22 May 2015 13:20:03 +0000 (14:20 +0100)
Just read them in binary form with win32 line endings and
parse them to the orc parser as-is now that the parser
can handle win32 line endings.

testsuite/benchmorc/benchmorc.c
testsuite/bytecode_parse.c
testsuite/compile_parse.c
testsuite/compile_parse_c.c
testsuite/compile_parse_neon.c
testsuite/exec_parse.c
testsuite/perf_parse.c
testsuite/perf_parse_compare.c
testsuite/show_parse.c

index b27354e..477b568 100644 (file)
@@ -89,7 +89,7 @@ read_file (const char *filename)
   long size;
   int ret;
 
-  file = fopen (filename, "r");
+  file = fopen (filename, "rb");
   if (file == NULL) return NULL;
 
   ret = fseek (file, 0, SEEK_END);
index 0998a7c..2f50651 100644 (file)
@@ -73,7 +73,7 @@ read_file (const char *filename)
   long size;
   int ret;
 
-  file = fopen (filename, "r");
+  file = fopen (filename, "rb");
   if (file == NULL) return NULL;
 
   ret = fseek (file, 0, SEEK_END);
index 572b681..775efea 100644 (file)
@@ -65,7 +65,7 @@ read_file (const char *filename)
   long size;
   int ret;
 
-  file = fopen (filename, "r");
+  file = fopen (filename, "rb");
   if (file == NULL) return NULL;
 
   ret = fseek (file, 0, SEEK_END);
index 98c2d12..8fb901d 100644 (file)
@@ -59,7 +59,7 @@ read_file (const char *filename)
   long size;
   int ret;
 
-  file = fopen (filename, "r");
+  file = fopen (filename, "rb");
   if (file == NULL) return NULL;
 
   ret = fseek (file, 0, SEEK_END);
index bdee28a..2adde8c 100644 (file)
@@ -65,7 +65,7 @@ read_file (const char *filename)
   long size;
   int ret;
 
-  file = fopen (filename, "r");
+  file = fopen (filename, "rb");
   if (file == NULL) return NULL;
 
   ret = fseek (file, 0, SEEK_END);
index dd3d52f..9301a01 100644 (file)
@@ -37,7 +37,7 @@ main (int argc, char *argv[])
   }
   code = read_file (filename);
   if (!code) {
-    printf("perf_parse <file.orc>\n");
+    printf("exec_parse <file.orc>\n");
     exit(1);
   }
 
@@ -61,7 +61,7 @@ read_file (const char *filename)
   long size;
   int ret;
 
-  file = fopen (filename, "r");
+  file = fopen (filename, "rb");
   if (file == NULL) return NULL;
 
   ret = fseek (file, 0, SEEK_END);
index 758f0f7..185650b 100644 (file)
@@ -63,7 +63,7 @@ read_file (const char *filename)
   long size;
   int ret;
 
-  file = fopen (filename, "r");
+  file = fopen (filename, "rb");
   if (file == NULL) return NULL;
 
   ret = fseek (file, 0, SEEK_END);
index 12136ac..cd43d6f 100644 (file)
@@ -66,7 +66,7 @@ read_file (const char *filename)
   long size;
   int ret;
 
-  file = fopen (filename, "r");
+  file = fopen (filename, "rb");
   if (file == NULL) return NULL;
 
   ret = fseek (file, 0, SEEK_END);
index bad86b3..7022f23 100644 (file)
@@ -108,7 +108,7 @@ read_file (const char *filename)
   long size;
   int ret;
 
-  file = fopen (filename, "r");
+  file = fopen (filename, "rb");
   if (file == NULL) return NULL;
 
   ret = fseek (file, 0, SEEK_END);