Mercurial > hg > octave-kai > gnulib-hg
changeset 11716:b2dcdf7af453
test-pipe: fix mingw build
* tests/test-pipe.c (main): Avoid fcntl on mingw.
Signed-off-by: Eric Blake <ebb9@byu.net>
author | Eric Blake <ebb9@byu.net> |
---|---|
date | Sat, 18 Jul 2009 09:10:05 -0600 |
parents | 5b2f6ef69b28 |
children | 9f091df7a67d |
files | ChangeLog tests/test-pipe.c |
diffstat | 2 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +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.
--- a/tests/test-pipe.c +++ b/tests/test-pipe.c @@ -131,7 +131,13 @@ 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