From: Bruno Haible Date: Sat, 17 Jan 2009 15:39:41 +0000 (+0100) Subject: Avoid test-fflush2.sh failure on mingw. X-Git-Tag: v0.1~6456 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=2ce0c024d8f5f537b8c1b2509c615af1ea430537;p=gnulib.git Avoid test-fflush2.sh failure on mingw. --- diff --git a/ChangeLog b/ChangeLog index 0feaefc1d..9a2c3fc38 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2009-01-17 Bruno Haible + Avoid test-fflush2.sh failure on mingw. + * tests/test-fflush2.c: Include binary-io.h. + (main): Put standard input into binary mode. + * modules/fflush-tests (Depends-on): Add binary-io. + +2009-01-17 Bruno Haible + * lib/wchar.in.h: In another particular situation, include only the system's file. (_GL_ALREADY_INCLUDING_WCHAR_H): New macro. diff --git a/modules/fflush-tests b/modules/fflush-tests index d7ed9b1b6..da29805b8 100644 --- a/modules/fflush-tests +++ b/modules/fflush-tests @@ -4,6 +4,7 @@ tests/test-fflush2.sh tests/test-fflush2.c Depends-on: +binary-io fseeko configure.ac: diff --git a/tests/test-fflush2.c b/tests/test-fflush2.c index 5ec1e5504..a395c6dba 100644 --- a/tests/test-fflush2.c +++ b/tests/test-fflush2.c @@ -20,6 +20,8 @@ #include +#include "binary-io.h" + #define ASSERT(expr) \ do \ { \ @@ -37,6 +39,10 @@ main (int argc, char **argv) { int c; + /* Avoid the well-known bugs of fflush() on streams in O_TEXT mode + on native Windows platforms. */ + SET_BINARY (0); + if (argc > 1) switch (argv[1][0]) {