From 62a799f7b67bdfe6b65504c3a4f72f87524cfaaa Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Tue, 28 Feb 2006 16:54:59 +0000 Subject: [PATCH] 2006-02-28 Marcus Brinkmann * w32-glib-io.c (O_BINARY) [!O_BINARY]: New macro. (_gpgme_io_pipe): Open pipes in binary mode. --- trunk/gpgme/ChangeLog | 5 +++++ trunk/gpgme/w32-glib-io.c | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/trunk/gpgme/ChangeLog b/trunk/gpgme/ChangeLog index cf149c2..20c5d0a 100644 --- a/trunk/gpgme/ChangeLog +++ b/trunk/gpgme/ChangeLog @@ -1,3 +1,8 @@ +2006-02-28 Marcus Brinkmann + + * w32-glib-io.c (O_BINARY) [!O_BINARY]: New macro. + (_gpgme_io_pipe): Open pipes in binary mode. + 2006-02-22 Marcus Brinkmann * engine.c (gpgme_engine_check_version): Reimplemented to allow diff --git a/trunk/gpgme/w32-glib-io.c b/trunk/gpgme/w32-glib-io.c index 593cfba..97758ba 100644 --- a/trunk/gpgme/w32-glib-io.c +++ b/trunk/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. */ -- 2.26.2