Windows: use binary I/O everywhere
...because newlines matter, at least in the test suite, and because
having a stable file format really helps. No LF/CRLF changes for me,
please.
diff --git a/src/out.c b/src/out.c
index 868e711..c4c80d9 100644
--- a/src/out.c
+++ b/src/out.c
@@ -329,7 +329,7 @@
LY_CHECK_ERR_RET(!*out, LOGMEM(NULL), LY_EMEM);
(*out)->type = LY_OUT_FILEPATH;
- (*out)->method.fpath.f = fopen(filepath, "w");
+ (*out)->method.fpath.f = fopen(filepath, "wb");
if (!(*out)->method.fpath.f) {
LOGERR(NULL, LY_ESYS, "Failed to open file \"%s\" (%s).", filepath, strerror(errno));
free(*out);
@@ -353,7 +353,7 @@
/* replace filepath */
f = out->method.fpath.f;
- out->method.fpath.f = fopen(filepath, "w");
+ out->method.fpath.f = fopen(filepath, "wb");
if (!out->method.fpath.f) {
LOGERR(NULL, LY_ESYS, "Failed to open file \"%s\" (%s).", filepath, strerror(errno));
out->method.fpath.f = f;