diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2014-07-23 12:09:17 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2014-07-23 12:09:45 -0400 |
commit | 23dce494d1850ee28a9c8d67972052c5a784cacf (patch) | |
tree | 33c8259fe12dca687ca09811c78cde0a41933581 /test/any2ppm.c | |
parent | f4dbba26d4fc571e0621f3c7a98196c501f8bcc5 (diff) | |
download | cairo-23dce494d1850ee28a9c8d67972052c5a784cacf.tar.gz |
Binary mode in any2ppm
From:
https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-cairo/0010-binary-mode-in-any2ppm.mingw.patch
Diffstat (limited to 'test/any2ppm.c')
-rw-r--r-- | test/any2ppm.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/any2ppm.c b/test/any2ppm.c index 3e0806f58..665314f1e 100644 --- a/test/any2ppm.c +++ b/test/any2ppm.c @@ -81,8 +81,11 @@ #include <errno.h> -#if HAVE_UNISTD_H && HAVE_FCNTL_H && HAVE_SIGNAL_H && HAVE_SYS_STAT_H && HAVE_SYS_SOCKET_H && HAVE_SYS_POLL_H && HAVE_SYS_UN_H +#if HAVE_FCNTL_H #include <fcntl.h> +#endif + +#if HAVE_UNISTD_H && HAVE_SIGNAL_H && HAVE_SYS_STAT_H && HAVE_SYS_SOCKET_H && HAVE_SYS_POLL_H && HAVE_SYS_UN_H #include <signal.h> #include <sys/stat.h> #include <sys/socket.h> @@ -874,6 +877,10 @@ main (int argc, char **argv) rsvg_set_default_dpi (72.0); #endif +#if defined(_WIN32) && !defined (__CYGWIN__) + _setmode (1, _O_BINARY); +#endif + if (argc == 1) err = any2ppm_daemon (); else |