Buglet in fseek?

Corinna Vinschen vinschen@redhat.com
Mon Feb 20 13:21:00 GMT 2006


On Feb 17 16:35, Jeff Johnston wrote:
> I should haved clarified that the new fflush logic is only for read-only 
> files; writable files do not have the fflush/fseek problem cited. 
> Resetting the saved position is akin to setting it to -1 (an invalid 
> value).  The FILE struct would have to be altered to add the new area to 
> save the offset.

What if we could just skip the fseek buffer optimization entirely using
a compile time flag.

The buffer optimization in fseek results in a non-POSIX behaviour and
in theory, a target should actively choose the optimization in favor
of the POSIX-compliance, shouldn't it?


Corinna

-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat



More information about the Newlib mailing list