Avoid test-fflush2.sh failure on mingw.
[gnulib.git] / tests / test-ftell.c
index e25bc02..092be19 100644 (file)
@@ -29,6 +29,7 @@
       if (!(expr))                                                          \
         {                                                                   \
           fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
+          fflush (stderr);                                                  \
           abort ();                                                         \
         }                                                                   \
     }                                                                       \
@@ -79,9 +80,11 @@ main (int argc, char **argv)
   ASSERT (ch == '@');
   ASSERT (ftell (stdin) == 3);
 
+#if !defined __hpux /* HP-UX 11 has a known bug here */
   /* Test ftell after ungetc without read.  */
   ASSERT (fseek (stdin, 0, SEEK_CUR) == 0);
   ASSERT (ftell (stdin) == 3);
+#endif
 
   ch = ungetc ('~', stdin);
   ASSERT (ch == '~');