Skip to content

Commit

Permalink
gegl-gio: Fix stdio handling on windows.
Browse files Browse the repository at this point in the history
Untested, but passing in a HANDLE matches the docs.
  • Loading branch information
drawoc committed Nov 27, 2014
1 parent 9c30bb4 commit 960daff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gegl/gegl-gio.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <stdio.h>

#ifdef G_OS_WIN32
#include <windows.h>
#include <gio/gwin32inputstream.h>
#else
#include <gio/gunixinputstream.h>
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 960daff

Please sign in to comment.