Tim Rice wrote: > ./gnulib-tool --create-testdir --dir=/var/tmp --with-tests \ > --single-configure --avoid=havelib-tests fseterr freadable fwritable \ > fbufmode freading fwriting freadptr freadseek freadahead fpurge fseeko > ftello fpending fflush
Yes, this is the way to test these modules. > and the attached patch, I am down to 2 failures in the stdio tests. Hmm, there are three things I find suspicious: 1) __freadable is defined in a way that is inconsistent with Gnulib: #define __freadable(p) (__freading(p) && __fpending(p)) [in Gnulib, a stream that is not reading nor writing is considered to be readable] but you don't ensure that freadable doesn't get defined other than __freadable. 2) Likewise for __fwritable, which is defined in a way inconsistent with Gnulib: #define __fwritable(p) (__fwriting(p) && __fpending(p) < __fbufsiz(p)) 3) In freadahead.c you add: return __fpending(fp_); But __fpending looks at the pending output, whereas freadahead shall look at the available input. Should be different things, no? Bruno