Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20120614205409.3935484a@newbook>
Date: Thu, 14 Jun 2012 20:54:09 -0700
From: Isaac Dunham <idunham@...abit.com>
To: musl@...ts.openwall.com
Subject: Re: Fw: [buggnulib]Why require SLOW_BUT_NO_HACKS for stubs?

On Thu, 14 Jun 2012 22:14:44 -0400
Rich Felker <dalias@...ifal.cx> wrote:

> On Wed, Jun 13, 2012 at 10:55:37PM -0700, Isaac Dunham wrote:
> > Here's the latest re: getting gnulib to use something portable...  
> 
> Thanks.
> 
> > > The test as it stands is "error out on unsupported platforms
> > > unless user specifies to use slow method".
> > > My proposal is "On unsupported platforms, use the slow method
> > > instead of erroring out."  
> > 
> > I agree, downgrading to a #warning and removing SLOW_BUT_NO_HACKS
> > should be enough. That would be something like this, but it would
> > fail the tests.  What to do?

> Do you know what he's talking about for failing the tests?
Not a clue. 

> > diff --git a/lib/freadahead.c b/lib/freadahead.c
> > index 2ba8b34..473911f 100644
> > --- a/lib/freadahead.c
> > +++ b/lib/freadahead.c
> > @@ -21,6 +21,7 @@
> >  
> > [...]
> > +  /* This implementation is correct on any ANSI C platform.  It is
> > just
> > +     awfully slow.  */
> > +  return freading(fp) && !feof(fp);  
> 
> This can definitely return 1 when no data is buffered, and when read
> would block, on some platforms. I think that could break some
> applications using the interface.
I ought to mention that over there...

Thanks,
Isaac Dunham

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.