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 bee33a2cd3fa1de1875fb24070f131f5bfb35c46..5b5933c0e30d9d7dabeb7673ce9a34a2ecd81e30 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 b3f2b181c4a79428c10ecdef40b987c6376410bc..37aeab706e4b70961f4a122fa52bfa814ccfb682 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 ce19edade322b6dc7c44868738125bc557ed38e1..c9a8555ea92e421d2e64ef7ccebfda9d4ae1a74a 100644 (file)
@@ -6,7 +6,7 @@ lib/freadseek.h
 lib/freadseek.c
 
 Depends-on:
-freadahead
+freadptr
 lseek
 
 configure.ac:
index 884b5558bb42579213c58c49cc350ae6c1f41ec9..0b6d6c9b20ee5f7012e23056476e3146f79ab35f 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