Re: [RFC PATCH] build: avoid %zu in translated strings

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

 



On 08/18/2010 08:35 AM, Daniel P. Berrange wrote:
> These printf-args/parse files appear to handle long long int & %llu
> combinations correctly. Since mingw32 lacks any vasprintf() at all, 
> we will be using this gnulib replacement. The vasprintf-posix seems
> to only be used where vasprintf() exists but is broken, thus not on
> mingw32

The vasprintf module only uses the full printf parsing when told to do
so by #ifdef; it prefers the much smaller approach of using snprintf to
do all the work when there is no other compelling reason to use full
parsing.

> 
> I find it strange that vasprintf is a more liberal license than the
> vasprintf-posix, since the former is where all the really cool
> code is - the latter just seems to be a few m4 macros that anyone
> could reimplement with ease.

vasprintf-posix is more than just m4 macros; it also drags in LGPLv3+
module dependencies that implement floating point parsing (such as
printf-ldexp and isnand-nolibm), then does the additional checks for
which #defines to enable.  Among other things, it is these additional
#defines that then force the compelling reason for vasnprintf.c to use
full-blown parsing rather than the smaller footprint of wrapping snprintf.

So our dilemma is that %zu and %llu need to be compelling reasons to
turn on a subset of the full-blown parser, since mingw's snprintf lacks
those, but without also dragging in the LGPLv3+ floating-point handling.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]