bug-gnulib
[Top][All Lists]
Advanced

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

Re: gl_MODULE_INDICATOR


From: Bruno Haible
Subject: Re: gl_MODULE_INDICATOR
Date: Thu, 5 May 2011 16:28:31 +0200
User-agent: KMail/1.9.9

Hi Eric,

> I have a condition (namely, test-fclose), where I only want to test
> a particular behavior of fclose if I know that fflush was replaced at
> the same level as fclose.  That is, if fclose is in lib, but fflush is
> only in tests, then the test is likely to fail and so I want to compile
> it out.

It seems an odd wish, and it seems odd to want to test for such a
situation via
    #if GNULIB_FFLUSH == GNULIB_FCLOSE

Rather, we should try to make things work also in situations where
people have invoked gnulib-tool several times within the same
configure.ac.

What is the semantic of fclose() that you want to test?
Basically, you have two possible behaviours of fclose(), one is probably
stricter POSIX compliant than the other. How can a user request the
stricter one? By requiring 'fclose' and 'fflush' together? Why not
introduce 'fclose-strict' (or 'fclose-posix' or whatever is appropriate)?
This module would depend on 'fclose' and 'fflush'. Then, in the tests,
you write

   #if GNULIB_TEST_FCLOSE_STRICT

(using the usual GNULIB_TEST_* macro).

Would that solve your use-case?

Bruno
-- 
In memoriam Peter van Pels <http://en.wikipedia.org/wiki/Peter_van_Pels>



reply via email to

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