aboutsummaryrefslogtreecommitdiffstats
path: root/util/iobuf.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2002-11-06 22:51:44 +0000
committerDavid Shaw <[email protected]>2002-11-06 22:51:44 +0000
commitd771dd272dbb29ff076e4506045105931e015354 (patch)
treec35d4dce6219275ba5f130451784779ba6a34690 /util/iobuf.c
parent* util.h: Add wipememory2() macro (same as wipememory, but can specify the (diff)
downloadgnupg-d771dd272dbb29ff076e4506045105931e015354.tar.gz
gnupg-d771dd272dbb29ff076e4506045105931e015354.zip
* w32reg.c (read_w32_registry_string): Fixed expanding of the environment
buffer; didn't worked at all. Reported by Thijmen Klok. From Werner on stable branch. * secmem.c (secmem_free, secmem_term): Use wipememory2() instead of memset() to overwrite secure memory * iobuf.c (direct_open): Handle mode 'b' if O_BINARY is available. From Werner on stable branch. * fileutil.c: Comment from stable branch.
Diffstat (limited to '')
-rw-r--r--util/iobuf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/util/iobuf.c b/util/iobuf.c
index a3e9ad3e6..953d9f3df 100644
--- a/util/iobuf.c
+++ b/util/iobuf.c
@@ -208,6 +208,10 @@ direct_open (const char *fname, const char *mode)
else {
oflag = O_RDONLY;
}
+#ifdef O_BINARY
+ if (strchr (mode, 'b'))
+ oflag |= O_BINARY;
+#endif
#ifndef __riscos__
return open (fname, oflag, cflag );
#else