On Tue, Nov 16, 2010 at 03:35:16PM -0700, Eric Blake wrote: > Per the gettext developer: > http://lists.gnu.org/archive/html/bug-gnu-utils/2010-10/msg00019.html > http://lists.gnu.org/archive/html/bug-gnu-utils/2010-10/msg00021.html > > gettext() doesn't work correctly on all platforms unless you have > called setlocale(). Furthermore, gnulib's gettext.h has provisions > for setting up a default locale, which is the preferred method for > libraries to use gettext without having to call textdomain() and > override the main program's default domain (virInitialize already > calls bindtextdomain(), but this is insufficient without the > setlocale() added in this patch; and a redundant bindtextdomain() > in this patch doesn't hurt, but serves as a good example for other > packages that need to bind a second translation domain). > > This patch is needed to silence a new gnulib 'make syntax-check' > rule in the next patch. > > * daemon/libvirtd.c (main): Setup locale and gettext. > * src/lxc/lxc_controller.c (main): Likewise. > * src/security/virt-aa-helper.c (main): Likewise. > * src/storage/parthelper.c (main): Likewise. > * tools/virsh.c (main): Fix exit status. > * src/internal.h (DEFAULT_TEXT_DOMAIN): Define, for gettext.h. > (_): Simplify definition accordingly. > * po/POTFILES.in: Add src/storage/parthelper.c. > --- > > daemon/libvirtd.c | 10 +++++++--- > po/POTFILES.in | 1 + > src/internal.h | 11 ++++++++--- > src/lxc/lxc_controller.c | 9 +++++++++ > src/security/security_apparmor.c | 1 + > src/security/virt-aa-helper.c | 7 +++++++ > src/storage/parthelper.c | 15 ++++++++++++--- > tools/virsh.c | 4 ++-- > 8 files changed, 47 insertions(+), 11 deletions(-) ACK Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list