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

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

 



On 08/17/2010 04:05 PM, Eric Blake wrote:
> Mingw64 lacks %zu, and has the unfortunate setup where
> sizeof(long)==4 but sizeof(size_t)==8.  Since gnulib's
> printf-posix module is not LGPLv2+, the best we can do
> is manually cast to the only portable int type known to
> hold size_t, and rely on gnulib's inttypes.h.
> 

> -                                 _("Failed to write %zu bytes to "
> +                                 _("Failed to write %" PRIuMAX " bytes to "

Hmmm.  Use of PRIuMAX in a translated string produces a .pot file that
refers to the special string <PRIuMAX>, and which requires the
need-formatstring-macros option passed to AM_GNU_GETTEXT in configure.ac
to be universally supported.  If I'm reading gettext.git history
correctly, need-formatstring-macros was added in gettext 0.11.4 (commit
8b45c5df), but had bugs until 0.17 (commit 4e34b2ac); which is newer
than the oldest version of gettext that libvirt is currently willing to
support.  I'm not sure if you get a fixed gettext.m4 by using just using
gnulib's gettext-h module, but using gnulib's gettext module is out of
the question since it would force the use of gettext 0.18.

Bruno, am I missing any details about how to properly use the gettext
formatstring-macros option, and which gettext versions are supported, if
I missed something in my sleuthing through gettext.git?

-- 
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]