aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcus Brinkmann <[email protected]>2006-02-28 16:54:59 +0000
committerMarcus Brinkmann <[email protected]>2006-02-28 16:54:59 +0000
commita30bcb457c766bcd51d33619019b0b40573344fd (patch)
tree8e1e31a12e2004533ca895d6b16a33ae065f2e47
parentChange history. That's double plus good. (diff)
downloadgpgme-a30bcb457c766bcd51d33619019b0b40573344fd.tar.gz
gpgme-a30bcb457c766bcd51d33619019b0b40573344fd.zip
2006-02-28 Marcus Brinkmann <[email protected]>
* w32-glib-io.c (O_BINARY) [!O_BINARY]: New macro. (_gpgme_io_pipe): Open pipes in binary mode.
-rw-r--r--gpgme/ChangeLog5
-rw-r--r--gpgme/w32-glib-io.c9
2 files changed, 13 insertions, 1 deletions
diff --git a/gpgme/ChangeLog b/gpgme/ChangeLog
index cf149c2d..20c5d0a3 100644
--- a/gpgme/ChangeLog
+++ b/gpgme/ChangeLog
@@ -1,3 +1,8 @@
+2006-02-28 Marcus Brinkmann <[email protected]>
+
+ * w32-glib-io.c (O_BINARY) [!O_BINARY]: New macro.
+ (_gpgme_io_pipe): Open pipes in binary mode.
+
2006-02-22 Marcus Brinkmann <[email protected]>
* engine.c (gpgme_engine_check_version): Reimplemented to allow
diff --git a/gpgme/w32-glib-io.c b/gpgme/w32-glib-io.c
index 593cfba8..97758bab 100644
--- a/gpgme/w32-glib-io.c
+++ b/gpgme/w32-glib-io.c
@@ -41,6 +41,13 @@
#include "sema.h"
#include "debug.h"
+#ifndef O_BINARY
+#ifdef _O_BINARY
+#define O_BINARY _O_BINARY
+#else
+#define O_BINARY 0
+#endif
+#endif
/* This file is an ugly hack to get GPGME working with glib on Windows
@@ -206,7 +213,7 @@ _gpgme_io_pipe (int filedes[2], int inherit_idx)
GIOChannel *chan;
#define PIPEBUF_SIZE 4096
- if (_pipe (filedes, PIPEBUF_SIZE, O_NOINHERIT) == -1)
+ if (_pipe (filedes, PIPEBUF_SIZE, O_NOINHERIT | O_BINARY) == -1)
return -1;
/* Make one end inheritable. */