From: Howard Chu Date: Tue, 20 Oct 2015 23:46:01 +0000 (+0100) Subject: ITS#8280 Fix Windows EOL in test output X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=634ccc758d488c1ff852f15eac5d911543f15a7e;p=openldap ITS#8280 Fix Windows EOL in test output --- 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 ) {