[uClibc]fread and EOF

Vladimir N. Oleynik dzo at simtreas.ru
Fri Jul 27 09:52:24 UTC 2001


Manuel Novoa III wrote:
> 
> Hi vodz,
> 
> On Thu, Jul 26, 2001 at 03:25:16PM +0400, Vladimir N. Oleynik wrote:
> > > > After testing "my.busybox" witch uclibc I found different or error work
> > > > in fread(). This function not set feof() if file size equivalent
> > > > read buffer size (hmm, or last read). But in (g)libc this test is Ok.
> > > >
> > > I had a minute so I just looked at this.  Definitely a bug in uClibc, but
> > > easy enough to fix.  I'll get it fixed later today.  Thanks.
> >
> > Thanks. loadfont work now.
> 
> Glad it's working, as I didn't have time to test it.  Yesterday was pretty
> busy.  I'm also glad I noticed that my first (and second) fixes were broken...
> 
> It looks like you've been pretty busy with busybox stuff.  I haven't
> contributed any work lately,  but I have been working on stdio stuff again.
> Besides some bug fixes, I'm adding build-time-selectable support for
> wide char and utf-8 multibyte streams, updating printf and scanf to comply
> with the latest ANSI/ISO standard, and in-buffer seeking for streams (at
> least for SEEK_CUR).  I'll probably even add custom-stream support like glibc.
> The work is coming along but there is still a good bit to do.  I have found
> a couple of new ways to save space though... ;-)

Unfortunately now does not work fgets(). Cycle turns out - fgets calls fgec
which calls
_Uclibc_fread which bytes=1 finds out that buffer for example stdin is empty and
calls
recursively(!) _Uclibc_fread with BUFSIZ where certainly about any interruption 
on '\n' does not occur.


--w
vodz





More information about the uClibc mailing list