summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2009-01-17 16:39:41 +0100
committerBruno Haible <bruno@clisp.org>2009-01-17 16:39:41 +0100
commit2ce0c024d8f5f537b8c1b2509c615af1ea430537 (patch)
tree1cd5716da29b526293eaab190b2e1fa8022b493a
parentacf373f5be4f82bd47e386288553282e44f85ce0 (diff)
downloadgnulib-2ce0c024d8f5f537b8c1b2509c615af1ea430537.tar.gz
Avoid test-fflush2.sh failure on mingw.
-rw-r--r--ChangeLog7
-rw-r--r--modules/fflush-tests1
-rw-r--r--tests/test-fflush2.c6
3 files changed, 14 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 0feaefc1d0..9a2c3fc388 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2009-01-17 Bruno Haible <bruno@clisp.org>
+ 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 <bruno@clisp.org>
+
* lib/wchar.in.h: In another particular situation, include only the
system's <wchar.h> file.
(_GL_ALREADY_INCLUDING_WCHAR_H): New macro.
diff --git a/modules/fflush-tests b/modules/fflush-tests
index d7ed9b1b66..da29805b88 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 5ec1e55048..a395c6dbad 100644
--- a/tests/test-fflush2.c
+++ b/tests/test-fflush2.c
@@ -20,6 +20,8 @@
#include <stdlib.h>
+#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])
{