summaryrefslogtreecommitdiff
path: root/rsvg-convert.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@gnome.org>2018-01-15 21:19:05 -0600
committerFederico Mena Quintero <federico@gnome.org>2018-01-15 21:19:05 -0600
commita3de426ced7ac90b934fda04e04744202d0da958 (patch)
tree2e41740294c08309eff4ad22ed6022303e314549 /rsvg-convert.c
parent745a35066e944021f475f24d9615fc5f6131dfee (diff)
downloadlibrsvg-a3de426ced7ac90b934fda04e04744202d0da958.tar.gz
gitlab#117 - (Windows) Set stdout to O_BINARY in rsvg-convert.
Thanks to Bakhtiar Hasmanan for the fix. https://gitlab.gnome.org/GNOME/librsvg/issues/117
Diffstat (limited to 'rsvg-convert.c')
-rw-r--r--rsvg-convert.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/rsvg-convert.c b/rsvg-convert.c
index a5504b67..ef4ead6a 100644
--- a/rsvg-convert.c
+++ b/rsvg-convert.c
@@ -44,6 +44,7 @@
#ifdef G_OS_WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
+#include <fcntl.h>
#include <gio/gwin32inputstream.h>
#endif
@@ -211,6 +212,11 @@ main (int argc, char **argv)
g_free (output);
}
+#ifdef G_OS_WIN32
+ else {
+ setmode (fileno (stdout), O_BINARY);
+ }
+#endif
if (args)
while (args[n_args] != NULL)