From: Mark Andrews Date: Wed, 12 Sep 2012 05:26:50 +0000 (+1000) Subject: turn binary mode on for raw/fast X-Git-Tag: v9.7.7~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d72f1e275f54506d49e2ca7d2edf606610ae6d70;p=thirdparty%2Fbind9.git turn binary mode on for raw/fast --- diff --git a/bin/check/check-tool.c b/bin/check/check-tool.c index 75ed316b481..727d714ef7a 100644 --- a/bin/check/check-tool.c +++ b/bin/check/check-tool.c @@ -639,6 +639,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) @@ -649,7 +652,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 "