* tests/test-pipe.c (main): Avoid fcntl on mingw.
Signed-off-by: Eric Blake <ebb9@byu.net>
+2009-07-18 Eric Blake <ebb9@byu.net>
+
+ test-pipe: fix mingw build
+ * tests/test-pipe.c (main): Avoid fcntl on mingw.
+
2009-07-18 Bruno Haible <bruno@clisp.org>
* modules/pipe-tests (Makefile.am): Fix typo.
buffer[0]++;
ASSERT (write (STDOUT_FILENO, buffer, 1) == 1);
errno = 0;
+#ifdef F_GETFL
+ /* Try to keep stderr open for better diagnostics. */
i = fcntl (STDERR_FILENO, F_GETFL);
+#else
+ /* But allow compilation on mingw. */
+ i = close (STDERR_FILENO);
+#endif
if (test == 8)
ASSERT (0 <= i);
else