From eee0305d40d48a3612d49d7177d29947bf97a67a Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Sun, 27 Mar 2016 12:34:17 +0200 Subject: Set stdin to binary mode on Windows Fixes EOLs when reading from stdin. Fully fixes issue #113. --- src/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.c b/src/main.c index f9fa29c..a78c76a 100644 --- a/src/main.c +++ b/src/main.c @@ -75,6 +75,7 @@ int main(int argc, char *argv[]) { int options = CMARK_OPT_DEFAULT; #if defined(_WIN32) && !defined(__CYGWIN__) + _setmode(_fileno(stdin), _O_BINARY); _setmode(_fileno(stdout), _O_BINARY); #endif -- cgit v1.2.3