1.3.3-2: fseek fails on multiples of 1024 (binary mode)

Pavel Tsekov ptsekov@syntrex.com
Wed Oct 24 08:49:00 GMT 2001

Christopher Faylor wrote:
> On Wed, Oct 24, 2001 at 05:06:38PM +0200, Pavel Tsekov wrote:
> >Christopher Faylor wrote:
> >>
> >> On Wed, Oct 24, 2001 at 12:37:48PM +0200, Pavel Tsekov wrote:
> >> >Again the question is does this optimization actually do something which
> >> >is worth to have it in the source three ?  :)
> >>
> >> IMO, it makes sense for the sources to be as close to the original
> >> version as possible.  So, if the optimization exists in FreeBSD, I think
> >> it should remain in newlib.  It just makes things easier to decipher the
> >> next time we have to compare the two.
> >
> >:) It'd be good to put the comment from the FreeBSD CVS so one can know
> >in which case the optimisation work (does not work).
> Yes.  That would actually bring the sources back into alignment.
> Do you want to submit a comprehensive patch to do this?
> I noticed that there are more changes to this file, also.  I wasn't sure
> if they were new functionality which would require changes elsewhere or
> if they were actually bug fixes.

It looks like the newlib's stdio is stuck some 6 years back in time :)
in the *BSD source repositories, FreeBSD's stdio seems to have been
most recently - active development has started some 7 month ago (at
as it comes to fseek*). NetBSD fseek.c hasn't been touched for 2 years.
In OpenBSD source, imported from NetBSD source somewhere in the 1996,
has been touched only once since the initial import. So we'll have to go
with FreeBSD's implementation. However there were changes made
the stream functions - so this wont be a small patch :) It would be
for me however and I'm willing to incorporate the changes to newlib's

However, I dont know exactly how much time will this take to be done :(

More information about the Newlib mailing list