[gdk-pixbuf: 1/5] tests/pixbuf-threads: use g_fopen instead of fopen and force binary mode



commit f6e17d13292ad933327514a2a314a28d402529d2
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Tue Dec 11 13:36:54 2018 +0100

    tests/pixbuf-threads: use g_fopen instead of fopen and force binary mode
    
    So we use the right path encoding on Windows and don't interpret the content
    as text.
    
    This makes the pixbuf-threads run on Windows.

 tests/pixbuf-threads.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/tests/pixbuf-threads.c b/tests/pixbuf-threads.c
index 0690acd82..fdcf4389f 100644
--- a/tests/pixbuf-threads.c
+++ b/tests/pixbuf-threads.c
@@ -18,6 +18,7 @@
  */
 
 #include "config.h"
+#include <glib/gstdio.h>
 #include "gdk-pixbuf/gdk-pixbuf.h"
 #include "test-common.h"
 
@@ -37,7 +38,7 @@ load_image (gpointer data,
   path = g_test_get_filename (G_TEST_DIST, "test-images/randomly-modified", filename, NULL);
 
   g_test_message ("reading %s", path); 
-  file = fopen (path, "r");
+  file = g_fopen (path, "rb");
   g_assert (file != NULL);
 
   while (!feof (file)) 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]