bug-gnulib
[Top][All Lists]
Advanced

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

Re: gnulib portability issues


From: Paul Eggert
Subject: Re: gnulib portability issues
Date: Sat, 09 Jun 2012 21:06:21 -0700
User-agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

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



reply via email to

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