1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-17 12:41:05 +03:00

fclose: add some tests

POSIX requires that fclose() on seekable input streams rewind back
to the next byte not actually given to the application.  Glibc fails
this test.  See:
http://sourceware.org/bugzilla/show_bug.cgi?id=3746
http://sourceware.org/bugzilla/show_bug.cgi?id=12724

Likewise for FreeBSD.

Cygwin 1.7.9 and Solaris 10 pass, however.

* modules/fclose-tests: New test module.
* tests/test-fclose.c: New file.

Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
Eric Blake
2011-05-02 13:38:23 -06:00
parent 001e7d63df
commit 1fc3525d1f
4 changed files with 109 additions and 0 deletions

View File

@@ -17,6 +17,10 @@ followed by @code{fdopen} do not return streams that can be closed by
Portability problems not fixed by Gnulib:
@itemize
@item
On some platforms, this function fails to set the file position of a
seekable input stream to the byte after the last one actually read:
glibc 2.13, FreeBSD.
@item
On Windows platforms (excluding Cygwin), this function does not set @code{errno}
upon failure.
@end itemize