aboutsummaryrefslogtreecommitdiffstats
path: root/g10/plaintext.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2000-07-28 16:19:07 +0000
committerWerner Koch <[email protected]>2000-07-28 16:19:07 +0000
commitd81c3f733ba813dae4fc6bed6073551449dcc65c (patch)
treedc0bc70f697b7b4623d359b172cae2b035347aa3 /g10/plaintext.c
parentSee ChangeLog: Tue Jul 25 17:44:15 CEST 2000 Werner Koch (diff)
downloadgnupg-d81c3f733ba813dae4fc6bed6073551449dcc65c.tar.gz
gnupg-d81c3f733ba813dae4fc6bed6073551449dcc65c.zip
See ChangeLog: Fri Jul 28 18:19:11 CEST 2000 Werner Koch
Diffstat (limited to 'g10/plaintext.c')
-rw-r--r--g10/plaintext.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/g10/plaintext.c b/g10/plaintext.c
index e3c7a865c..555dd1636 100644
--- a/g10/plaintext.c
+++ b/g10/plaintext.c
@@ -24,6 +24,10 @@
#include <string.h>
#include <errno.h>
#include <assert.h>
+#ifdef HAVE_DOSISH_SYSTEM
+ #include <fcntl.h> /* for setmode() */
+#endif
+
#include "util.h"
#include <gcrypt.h>
#include "options.h"
@@ -81,6 +85,9 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
else if( !*fname || (*fname=='-' && !fname[1])) {
/* no filename or "-" given; write to stdout */
fp = stdout;
+ #ifdef HAVE_DOSISH_SYSTEM
+ setmode ( fileno(fp) , O_BINARY );
+ #endif
}
else if( !overwrite_filep( fname ) ) {
rc = GPGERR_CREATE_FILE;