Patches for any of these problems would be welcome.
As freadahead seems to be most pressing, it sounds
like that's the best one to work on first.
> 1. freadahead is inherently non-portable
That sounds like a challenge! How about using
the following patch? Does it work for you, if
you define SLOW_BUT_NO_HACKS? If so, perhaps
we should just make SLOW_BUT_NO_HACKS the default.
diff --git a/lib/freadahead.c b/lib/freadahead.c
index 2ba8b34..ad6eb13 100644
--- a/lib/freadahead.c
+++ b/lib/freadahead.c
@@ -85,7 +85,7 @@ freadahead (FILE *fp)
return 0;
return fp->wp - fp->rp;
#elif defined SLOW_BUT_NO_HACKS /* users can define this */
- abort ();
+ fflush (fp);
return 0;
#else
#error "Please port gnulib freadahead.c to your platform! Look at the
definition of fflush, fread, ungetc on your system, then report this to
bug-gnulib."