Pass test-freadseek on cygwin.
authorEric Blake <ebb9@byu.net>
Sat, 29 Mar 2008 13:15:50 +0000 (07:15 -0600)
committerEric Blake <ebb9@byu.net>
Sat, 29 Mar 2008 13:15:50 +0000 (07:15 -0600)
* 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>
ChangeLog
lib/freadseek.c
modules/freadseek
tests/test-fflush2.c

index bee33a2..5b5933c 100644 (file)
--- 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
index b3f2b18..37aeab7 100644 (file)
@@ -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 @@ freadseek (FILE *fp, size_t offset)
     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);
index ce19eda..c9a8555 100644 (file)
@@ -6,7 +6,7 @@ lib/freadseek.h
 lib/freadseek.c
 
 Depends-on:
-freadahead
+freadptr
 lseek
 
 configure.ac:
index 884b555..0b6d6c9 100644 (file)
@@ -54,7 +54,7 @@ main (int argc, char **argv)
      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