+2008-09-06 Bruno Haible <bruno@clisp.org>
+
+ * lib/freadahead.c (freadahead): Add conditional for SLOW_BUT_NO_HACKS.
+ * lib/freadptr.c (freadptr): Likewise.
+ * lib/freadseek.c (freadptrinc): Likewise.
+ Reported by Simon Josefsson.
+
2008-09-06 Bruno Haible <bruno@clisp.org>
* modules/freadptr (License): Change to LGPLv2+.
/* Specification. */
#include "freadahead.h"
+#include <stdlib.h>
#include "stdio-impl.h"
size_t
+ (fp->_Mode & 0x4000 /* _MBYTE */
? (fp->_Back + sizeof (fp->_Back)) - fp->_Rback
: 0);
+#elif defined SLOW_BUT_NO_HACKS /* users can define this */
+ abort ();
+ 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."
#endif
return NULL;
*sizep = size;
return (const char *) fp->_Next;
+#elif defined SLOW_BUT_NO_HACKS /* users can define this */
+ /* This implementation is correct on any ANSI C platform. It is just
+ awfully slow. */
+ return NULL;
#else
#error "Please port gnulib freadptr.c to your platform! Look at the definition of fflush, fread, getc, getc_unlocked on your system, then report this to bug-gnulib."
#endif
# endif
#elif defined __QNX__ /* QNX */
fp->_Next += increment;
+#elif defined SLOW_BUT_NO_HACKS /* users can define this */
#else
#error "Please port gnulib freadseek.c to your platform! Look at the definition of getc, getc_unlocked on your system, then report this to bug-gnulib."
#endif