[gegl] gegl-gio: Fix stdio handling on windows.



commit 960daff59ffe6d9fd5b3f1d53130b8254a531610
Author: Michael Henning <drawoc darkrefraction com>
Date:   Thu Nov 27 11:29:08 2014 -0500

    gegl-gio: Fix stdio handling on windows.
    
    Untested, but passing in a HANDLE matches the docs.

 gegl/gegl-gio.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gegl/gegl-gio.c b/gegl/gegl-gio.c
index 0b4453f..6f5fcbf 100644
--- a/gegl/gegl-gio.c
+++ b/gegl/gegl-gio.c
@@ -21,6 +21,7 @@
 #include <stdio.h>
 
 #ifdef G_OS_WIN32
+#include <windows.h>
 #include <gio/gwin32inputstream.h>  
 #else
 #include <gio/gunixinputstream.h>
@@ -48,8 +49,8 @@ gegl_gio_open_input_stream(const gchar *uri, const gchar *path, GFile **out_file
     {
       const gboolean close_fd = FALSE;
       infile = NULL;
-#ifdef G_OS_WIN32 // untested :)
-      fis = g_win32_input_stream_new(stdin, close_fd);
+#ifdef G_OS_WIN32
+      fis = g_win32_input_stream_new (GetStdHandle (STD_INPUT_HANDLE), close_fd);
 #else
       fis = g_unix_input_stream_new(STDIN_FILENO, close_fd);
 #endif


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