Paul Eggert wrote:
> > #if USE_UNLOCKED_IO
> > # include "unlocked-io.h"
> > #endif
> >
> > to a simple
> >
> > #include "unlocked-io.h"
> >
> > then --avoid will do the trick as well.
>
> If you make that change to the source code, and then use --avoid, the file
> "unlocked-io.h" be missing.  So you need your own substitute
> unlocked-io.h, which (presumably) does nothing.

Yes, right. The user of --avoid=unlocked-io would have to provide an empty
unlocked-io.h file.

> > Regarding xalloc-die, I propose this patch.
>
> This doesn't look quite right to me.  xalloc-die depends on error,
> gettext-h, and exitfail, because its implementation uses those three
> modules.  But a user who substitutes a specially-built xalloc-die
> implementation may not need those three modules.  It's common to take
> the transitive closure of the dependencies to see which modules your
> app needs.  In that scenario, user would end up with modules like
> "error" that they don't need.

The way it's implemented in gnulib-tool, the --avoid acts _during_ the
computation of the transitive closure, not afterwards. Which means,
--avoid=xalloc-die prevents the xalloc-die module from being included AND
also prevents the error, gettext-h, exitfail modules from being included
if nothing else needs them.

Bruno



_______________________________________________
bug-gnulib mailing list
bug-gnulib@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnulib

Reply via email to