[Top][All Lists]

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

vsnprintf unnecessarily configures and builds vasnprintf.o etc.

From: Paul Eggert
Subject: vsnprintf unnecessarily configures and builds vasnprintf.o etc.
Date: Wed, 06 Apr 2011 23:51:28 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20110223 Thunderbird/3.1.8

I recently modified a test version of Emacs to use gnulib's vsnprintf
module, and found that on my RHEL 5.6 host (which has a working
vsnprintf), the gnulib code added quite a bit of of unnecessary work
to configure and build vasnprintf.o, printf-parse.o, printf-args.o,
and asnprintf.o. None of these object files were needed: they were put
into libgnu.a but were not used by anybody.

If an application uses vsnprintf, but does not use vasnprintf
directly, then there's no need to configure and build those .o files
on hosts that have a working vsnprintf. I'd like to fix gnulib to
avoid this work.

One way that comes to mind is to modify modules/vsnprintf so that it
depends on a new module (modules/vasnprintf-if, say), which acts like
modules/vasnprintf but does not put gl_FUNC_VASNPRINTF into
configure.ac. Most of the contents of modules/vasnprintf would be
moved into modules/vasnprintf-if. Then, gl_REPLACE_VSNPRINTF could

Similarly for alloca-opt, float, stdint, xsize, memchr, and wchar: all
of these modules do configure- and make-time work that can be avoided
on hosts like RHEL 5.6, assuming the application needs vsnprintf but
not vasnprintf.

I think this approach would work for Emacs, but it seems clumsy, and
I'm hoping there's a better way.

reply via email to

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