diff options
author | Justus Winter <[email protected]> | 2016-01-22 10:45:00 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2016-02-23 10:58:20 +0000 |
commit | 661ba477e01b796db161fa612b46c353393c6b10 (patch) | |
tree | b640b082b5a756b714d527828e895962c75ac748 | |
parent | gpg: Systematically detect and fix signatures that are out of order. (diff) | |
download | gnupg-661ba477e01b796db161fa612b46c353393c6b10.tar.gz gnupg-661ba477e01b796db161fa612b46c353393c6b10.zip |
tools/mk-tdata: Fix data generation on Windows.
* tools/mk-tdata.c (main): Set stdout to binary mode to avoid newline
conversion.
Signed-off-by: Justus Winter <[email protected]>
-rw-r--r-- | tools/mk-tdata.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/mk-tdata.c b/tools/mk-tdata.c index b19796110..0aca035ca 100644 --- a/tools/mk-tdata.c +++ b/tools/mk-tdata.c @@ -17,6 +17,7 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <fcntl.h> #ifndef RAND_MAX /* for SunOS */ @@ -30,6 +31,11 @@ main(int argc, char **argv) int limit =0; int char_mode = 0; +#if HAVE_W32_SYSTEM + if (setmode (fileno (stdout), O_BINARY) == -1) + perror ("setmode"); +#endif + if (argc) { argc--; |