bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Austin group ruling on ungetc vs. fflush


From: Bruno Haible
Subject: Re: Austin group ruling on ungetc vs. fflush
Date: Sat, 17 Jan 2009 16:41:15 +0100
User-agent: KMail/1.9.9

And this, finally, makes the test-fflush2.sh test failure on mingw go away.

2009-01-17  Bruno Haible  <address@hidden>

        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.

--- tests/test-fflush2.c.orig   2009-01-17 16:38:02.000000000 +0100
+++ tests/test-fflush2.c        2009-01-17 16:37:13.000000000 +0100
@@ -20,6 +20,8 @@
 
 #include <stdlib.h>
 
+#include "binary-io.h"
+
 #define ASSERT(expr) \
   do                                                                        \
     {                                                                       \
@@ -37,6 +39,10 @@
 {
   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])
       {
--- modules/fflush-tests.orig   2009-01-17 16:38:02.000000000 +0100
+++ modules/fflush-tests        2009-01-17 16:34:53.000000000 +0100
@@ -4,6 +4,7 @@
 tests/test-fflush2.c
 
 Depends-on:
+binary-io
 fseeko
 
 configure.ac:




reply via email to

[Prev in Thread] Current Thread [Next in Thread]