This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


Christopher Faylor wrote:
> 
> On Tue, Oct 23, 2001 at 11:07:03PM -0400, Christopher Faylor wrote:
> >Is this fixed in more recent BSD code, perhaps?  Or has the code diverged too far
> >for this to be useful?
> 
> Answering my own question: No, the code hasn't changed that much and
> there seems to be one minor change in it, which is below.
> 
> Is it my imagination or does this actually fix the problem?  I haven't
> studied the code that much but, from context, the patch makes sense.
> 
> cgf
> 

Thanks Chris.  Yes, it makes sense.  Your patch has been checked in.

-- Jeff J.

> Index: libc/stdio/fseek.c
> ===================================================================
> RCS file: /cvs/uberbaum/newlib/libc/stdio/fseek.c,v
> retrieving revision 1.1.1.1
> diff -p -r1.1.1.1 fseek.c
> *** fseek.c     2000/02/17 19:39:47     1.1.1.1
> --- fseek.c     2001/10/24 03:20:13
> *************** fseek (fp, offset, whence)
> *** 278,283 ****
> --- 278,284 ----
>     if ((*seekfn) (fp->_cookie, curoff, SEEK_SET) == POS_ERR)
>       goto dumb;
>     fp->_r = 0;
> +   fp->_p = fp->_bf._base;
>     if (HASUB (fp))
>       FREEUB (fp);
>     fp->_flags &= ~__SEOF;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]