Hi Eric,
> + /* For a read-only regular file input file descriptor, fsync should
> + succeed (since at least atime changes can be synchronized). */
> + fd = open (file, O_RDONLY);
> + ASSERT (0 <= fd);
> + {
> + char buf[1];
> + ASSERT (read (fd, buf, sizeof buf) == sizeof buf);
> + }
> + ASSERT (fsync (fd) == 0); <===
> + ASSERT (close (fd) == 0);
> +
This test fails on several platforms:
- AIX 5.1..7.1,
- Cygwin 1.5.25, Cygwin 1.7.9,
- mingw.
I think it makes unportable assumptions, and it's better to relax the test
than to override fsync() in gnulib.
Bruno
--
In memoriam Orlando Letelier <http://en.wikipedia.org/wiki/Orlando_Letelier>