From 634ccc758d488c1ff852f15eac5d911543f15a7e Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 21 Oct 2015 00:46:01 +0100 Subject: [PATCH] ITS#8280 Fix Windows EOL in test output --- tests/progs/ldif-filter.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/progs/ldif-filter.c b/tests/progs/ldif-filter.c index 1bdb37cac9..cf9d257394 100644 --- a/tests/progs/ldif-filter.c +++ b/tests/progs/ldif-filter.c @@ -21,6 +21,9 @@ #include #include #include +#ifdef _WIN32 +#include +#endif #define DEFAULT_SPECS "ndb=a,null=n" @@ -233,6 +236,9 @@ main( int argc, char **argv ) backend = ""; } +#ifdef _WIN32 + _setmode(1, _O_BINARY); /* don't convert \n to \r\n on stdout */ +#endif flags = get_flags( backend, specs ); filter_stdin( flags ? flags : get_flags( backend, DEFAULT_SPECS )); if ( fclose( stdout ) == EOF ) { -- 2.39.5