Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 14 Jun 2012 22:14:44 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: Fw: [buggnulib]Why require SLOW_BUT_NO_HACKS for stubs?

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?
> 
> Paolo

Do you know what he's talking about for failing the tests?

> 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.

Rich

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.