From 59fdf311951aa40aed9d416dc172ead76925e2a4 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 12 Sep 2012 15:26:50 +1000 Subject: [PATCH] turn binary mode on for raw/fast --- bin/check/check-tool.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/check/check-tool.c b/bin/check/check-tool.c index 445c0cc029..5bbf1f0c67 100644 --- a/bin/check/check-tool.c +++ b/bin/check/check-tool.c @@ -640,6 +640,9 @@ dump_zone(const char *zonename, dns_zone_t *zone, const char *filename, { isc_result_t result; FILE *output = stdout; + const char *flags; + + flags = (fileformat == dns_masterformat_text) ? "w+" : "wb+"; if (debug) { if (filename != NULL && strcmp(filename, "-") != 0) @@ -650,7 +653,7 @@ dump_zone(const char *zonename, dns_zone_t *zone, const char *filename, } if (filename != NULL && strcmp(filename, "-") != 0) { - result = isc_stdio_open(filename, "w+", &output); + result = isc_stdio_open(filename, flags, &output); if (result != ISC_R_SUCCESS) { fprintf(stderr, "could not open output "