Mercurial > hg > octave-kai > gnulib-hg
changeset 10404:4611578c5669
Add conditional code for SLOW_BUT_NO_HACKS.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sat, 06 Sep 2008 13:58:21 +0200 |
parents | d80561fed06e |
children | b1a4eae36771 |
files | ChangeLog lib/freadahead.c lib/freadptr.c lib/freadseek.c |
diffstat | 4 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +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+.
--- a/lib/freadahead.c +++ b/lib/freadahead.c @@ -19,6 +19,7 @@ /* Specification. */ #include "freadahead.h" +#include <stdlib.h> #include "stdio-impl.h" size_t @@ -69,6 +70,9 @@ + (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
--- a/lib/freadptr.c +++ b/lib/freadptr.c @@ -85,6 +85,10 @@ 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
--- a/lib/freadseek.c +++ b/lib/freadseek.c @@ -53,6 +53,7 @@ # 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