bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnulib portability issues


From: Rich Felker
Subject: Re: gnulib portability issues
Date: Sun, 10 Jun 2012 09:10:30 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On Sat, Jun 09, 2012 at 10:01:38PM -0700, Paul Eggert wrote:
> > it might be better to make sense of WHY it's needed/wanted
> 
> Yes, quite true, but that information wasn't communicated to the
> gnulib mailing list.

For GNU m4, it seems freadahead is not used directly. Instead, it's
pulled in by closein.c. The close_stdin function uses it only to
determine if the buffer is non-empty, and I can't even figure out why
this test is needed. The code inside the conditional will work just
fine (as a no-op) in the case where nothing is buffered, and also in
the case where stdin is non-seekable.

Originally I had received a report that some other function in m4 was
using freadahead either directly or indirectly, but I can't find any
other references to it now, so I think that may have been a false
report.

As such, the first fix I would recommend is simply removing the check
for freadahead(stdin)>0 from closein.c, and whatever build system
dependency information causes closein.c to pull in freadahead.c.

Rich



reply via email to

[Prev in Thread] Current Thread [Next in Thread]