mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
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@g10code.com>
This commit is contained in:
parent
2d1d795481
commit
661ba477e0
@ -17,6 +17,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
|
||||||
#ifndef RAND_MAX /* for SunOS */
|
#ifndef RAND_MAX /* for SunOS */
|
||||||
@ -30,6 +31,11 @@ main(int argc, char **argv)
|
|||||||
int limit =0;
|
int limit =0;
|
||||||
int char_mode = 0;
|
int char_mode = 0;
|
||||||
|
|
||||||
|
#if HAVE_W32_SYSTEM
|
||||||
|
if (setmode (fileno (stdout), O_BINARY) == -1)
|
||||||
|
perror ("setmode");
|
||||||
|
#endif
|
||||||
|
|
||||||
if (argc)
|
if (argc)
|
||||||
{
|
{
|
||||||
argc--;
|
argc--;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user