[Pkg-gnupg-commit] [gnupg2] 45/205: tools/mk-tdata: Fix data generation on Windows.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed May 11 08:38:13 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch experimental
in repository gnupg2.
commit 661ba477e01b796db161fa612b46c353393c6b10
Author: Justus Winter <justus at g10code.com>
Date: Fri Jan 22 11:45:00 2016 +0100
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 <justus at g10code.com>
---
tools/mk-tdata.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/mk-tdata.c b/tools/mk-tdata.c
index b197961..0aca035 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--;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list