Paul Eggert wrote:
> > https://www.gnu.org/software/gnulib/manual/html_node/Modules-that-modify-the-way-other-modules-work.html
> > 
> > How would you answer the question
> >    “If my module occurs among the modules of gltests, should it
> >     have an effect on the modules in gllib?”
> > in this case?
> 
> I assume the new module should be like malloc-gnu, so the answer should 
> be "no". Is there a subtle point I'm missing?

Hmm. Let's look at the two main scenarios.

  * A gnulib testdir. Suppose the 'alloc-0-nonnull' module is not present
    in gllib, but is present among the dependencies of a module T among the
    gltests. This module T will call *alloc(), expecting 0-nonnull semantics.
    If it's done as carefully as with the two different AC_LIBOBJs in
    modules/malloc-posix and modules/malloc-gnu, there will be different
    realloc functions in gltests/libtests.a and in gllib/libgnu.a, and
    linking any of the tests that uses module T will use the one from
    gltests/libtests.a. So we're fine.

  * A package with two uses of gnulib-tool, for example, libpoke and poke.
    The same mechanism will work there.

It seems that the documentation section that I pointed to is out-of-date
for these scenarios. The correct pattern to use is the one introduced by
https://lists.gnu.org/archive/html/bug-gnulib/2022-01/msg00020.html .

Bruno




Reply via email to