bug-gnulib
[Top][All Lists]
Advanced

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

Re: 'fflush' test failure on Cygwin


From: Eric Blake
Subject: Re: 'fflush' test failure on Cygwin
Date: Thu, 12 Apr 2007 15:14:32 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.10) Gecko/20070221 Thunderbird/1.5.0.10 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Bruno Haible on 4/12/2007 2:52 PM:
> Hi Eric,
> 
> On Cygwin 2006 (/usr/bin/cygwin1.dll dated 2006-01-20), the test-fflush test
> fails:
> 
>   File offset is wrong.
>   FAIL: test-fflush.exe
> 
> In test-fflush.c line 70, the return value from lseek() is 10 instead of the
> expected 5.

That is due to a bug in newlib's fflush that I fixed on 2006-12-14.

I personally don't use a cygwin that old, nor do I recommend it to others
(stable cygwin is at 1.5.24, but the version you referred to is 1.5.19;
when dealing with cygwin, the output of uname -a is nicer than .dll dates
for quickly determining feature sets).

But seeing as how the failure symptom is the same as that of MacOSX, I'm
wondering if anyone has better ideas of how to force stdio to reposition
the offset of the underlying fd when fflush (or fpurge) followed by fseek
is not powerful enough to do the same.  I could always do a raw lseek
myself, but that makes me worry that if stdio has read in a buffer, then
stdio will be confused because the fd changed behind its back.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGHqE384KuGfSFAYARAk2lAJ9e2uTqWXhqyzGIOsN2ju6BXmku/ACeMffN
BzfjXy3kqJWDstHs+Ke8o+4=
=mGm9
-----END PGP SIGNATURE-----




reply via email to

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