diff options
author | Werner Koch <[email protected]> | 2000-07-28 16:19:07 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2000-07-28 16:19:07 +0000 |
commit | d81c3f733ba813dae4fc6bed6073551449dcc65c (patch) | |
tree | dc0bc70f697b7b4623d359b172cae2b035347aa3 /util | |
parent | See ChangeLog: Tue Jul 25 17:44:15 CEST 2000 Werner Koch (diff) | |
download | gnupg-d81c3f733ba813dae4fc6bed6073551449dcc65c.tar.gz gnupg-d81c3f733ba813dae4fc6bed6073551449dcc65c.zip |
See ChangeLog: Fri Jul 28 18:19:11 CEST 2000 Werner Koch
Diffstat (limited to '')
-rw-r--r-- | util/ChangeLog | 7 | ||||
-rw-r--r-- | util/iobuf.c | 16 |
2 files changed, 21 insertions, 2 deletions
diff --git a/util/ChangeLog b/util/ChangeLog index d1eba0291..68964a664 100644 --- a/util/ChangeLog +++ b/util/ChangeLog @@ -1,3 +1,10 @@ +Fri Jul 28 18:19:11 CEST 2000 Werner Koch <[email protected]> + + * iobuf.c: Use setmode() at several places to set stdin and stdout + to binary mode for MSDOS based systems + + * iobuf.c (underflow): Initialize dummy_len to keep memory checker happy. + Fri Jul 14 19:38:23 CEST 2000 Werner Koch <wk@> * iobuf.c (iobuf_cancel): Broadcast the new Cancel message to all diff --git a/util/iobuf.c b/util/iobuf.c index ce63b55b8..f7035ae4c 100644 --- a/util/iobuf.c +++ b/util/iobuf.c @@ -28,6 +28,9 @@ #include <sys/stat.h> #include <unistd.h> #include <gcrypt.h> +#ifdef HAVE_DOSISH_SYSTEM + #include <fcntl.h> /* for setmode() */ +#endif #include "memory.h" #include "util.h" @@ -580,7 +583,10 @@ iobuf_open( const char *fname ) int print_only = 0; if( !fname || (*fname=='-' && !fname[1]) ) { - fp = stdin; /* fixme: set binary mode for msdoze */ + fp = stdin; + #ifdef HAVE_DOSISH_SYSTEM + setmode ( fileno(fp) , O_BINARY ); + #endif fname = "[stdin]"; print_only = 1; } @@ -647,6 +653,9 @@ iobuf_create( const char *fname ) if( !fname || (*fname=='-' && !fname[1]) ) { fp = stdout; + #ifdef HAVE_DOSISH_SYSTEM + setmode ( fileno(fp) , O_BINARY ); + #endif fname = "[stdout]"; print_only = 1; } @@ -742,7 +751,10 @@ iobuf_fopen( const char *fname, const char *mode ) int print_only = 0; if( !fname || (*fname=='-' && !fname[1]) ) { - fp = stdin; /* fixme: set binary mode for msdoze */ + fp = stdin; + #ifdef HAVE_DOSISH_SYSTEM + setmode ( fileno(fp) , O_BINARY ); + #endif fname = "[stdin]"; print_only = 1; } |