Mercurial > hg > octave-jordi > gnulib-hg
changeset 9819:9ccce8a9bf52
Pass test-freadseek on cygwin.
* modules/freadseek (Depends-on): Use freadptr, not freadseek.
* lib/freadseek.c (freadseek): Don't increment beyond bounds of
ungetc buffer.
* tests/test-fflush2.c (main): Fix typo.
Signed-off-by: Eric Blake <ebb9@byu.net>
author | Eric Blake <ebb9@byu.net> |
---|---|
date | Sat, 29 Mar 2008 07:15:50 -0600 |
parents | fc76a5b22f64 |
children | 03b4e25928e9 |
files | ChangeLog lib/freadseek.c modules/freadseek tests/test-fflush2.c |
diffstat | 4 files changed, 12 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-03-29 Eric Blake <ebb9@byu.net> + + Pass test-freadseek on cygwin. + * modules/freadseek (Depends-on): Use freadptr, not freadseek. + * lib/freadseek.c (freadseek): Don't increment beyond bounds of + ungetc buffer. + * tests/test-fflush2.c (main): Fix typo. + 2008-03-29 Bruno Haible <bruno@clisp.org> * tests/test-fflush2.c (main): Temporarily disable the contents of
--- a/lib/freadseek.c +++ b/lib/freadseek.c @@ -22,7 +22,7 @@ #include <stdlib.h> #include <unistd.h> -#include "freadahead.h" +#include "freadptr.h" int freadseek (FILE *fp, size_t offset) @@ -34,7 +34,7 @@ return 0; /* Increment the in-memory pointer. This is very cheap (no system calls). */ - buffered = freadahead (fp); + freadptr (fp, &buffered); if (buffered > 0) { size_t increment = (buffered < offset ? buffered : offset);
--- a/modules/freadseek +++ b/modules/freadseek @@ -6,7 +6,7 @@ lib/freadseek.c Depends-on: -freadahead +freadptr lseek configure.ac:
--- a/tests/test-fflush2.c +++ b/tests/test-fflush2.c @@ -54,7 +54,7 @@ The Austin Group has not yet decided how this should behave. */ #endif #if 0 - /* Check fflush after a non-backup ungetc() call. This is case 1 in terms of + /* Check fflush after a non-backup ungetc() call. This is case 2 in terms of <http://lists.gnu.org/archive/html/bug-gnulib/2008-03/msg00131.html>. The Austin Group has not yet decided how this should behave. */ /* Check that fflush after a non-backup ungetc() call discards the ungetc