bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Solaris fpurge bug


From: Bruno Haible
Subject: Re: Solaris fpurge bug
Date: Sat, 1 May 2010 20:45:40 +0200
User-agent: KMail/1.9.9

Eric Blake wrote:
> in the process of testing it, I
> discovered that Solaris 10 __fpurge() is broken - the sequence
> fpurge()/fputc()/ftell() gives the wrong answer.

I'm extending the unit test, like you suggested. Now that we have a working
ftell, this passes on Solaris (as well as on the other platforms).


2010-05-01  Bruno Haible  <address@hidden>

        fpurge: Sharper test.
        * tests/test-fpurge.c (main): Add one more ftell check.
        * modules/fpurge-tests (Depends-on): Add ftell.
        Suggested by Eric Blake.

diff --git a/modules/fpurge-tests b/modules/fpurge-tests
index 74e898d..59c6e7d 100644
--- a/modules/fpurge-tests
+++ b/modules/fpurge-tests
@@ -4,6 +4,7 @@ tests/macros.h
 
 Depends-on:
 fflush
+ftell
 
 configure.ac:
 
diff --git a/tests/test-fpurge.c b/tests/test-fpurge.c
index 89fe8c0..770583f 100644
--- a/tests/test-fpurge.c
+++ b/tests/test-fpurge.c
@@ -108,6 +108,8 @@ main (void)
       if (check_filepos)
         ASSERT (ftell (fp) == 8);
       ASSERT (putc ('!', fp) == '!');
+      if (check_filepos)
+        ASSERT (ftell (fp) == 9);
       ASSERT (fclose (fp) == 0);
       fp = fopen (TESTFILE, "r");
       if (fp == NULL)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]