bug-gnulib
[Top][All Lists]
Advanced

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

Re: another stdio patch for UnixWare


From: Bruno Haible
Subject: Re: another stdio patch for UnixWare
Date: Sun, 11 Oct 2020 17:24:03 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-189-generic; KDE/5.18.0; x86_64; ; )

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




reply via email to

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