[Pkg-libvirt-commits] [libguestfs] 218/233: Use bindtextdomain in some programs where it was missing.
Hilko Bengen
bengen at moszumanska.debian.org
Wed Feb 19 21:12:29 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch experimental
in repository libguestfs.
commit 9018356a67eb644126814e4ef41555c56e884a79
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Thu Feb 13 21:39:50 2014 +0000
Use bindtextdomain in some programs where it was missing.
Found by make syntax-check.
---
builder/Makefile.am | 3 +++
builder/index-validate.c | 4 ++++
src/Makefile.am | 3 +++
src/libvirt-is-version.c | 5 +++++
4 files changed, 15 insertions(+)
diff --git a/builder/Makefile.am b/builder/Makefile.am
index 9d2dbc5..3087ac4 100644
--- a/builder/Makefile.am
+++ b/builder/Makefile.am
@@ -224,6 +224,9 @@ virt_index_validate_SOURCES = \
index-struct.c \
index-validate.c
+virt_index_validate_CPPFLAGS = \
+ -DLOCALEBASEDIR=\""$(datadir)/locale"\"
+
man_MANS += virt-index-validate.1
noinst_DATA += $(top_builddir)/html/virt-index-validate.1.html
diff --git a/builder/index-validate.c b/builder/index-validate.c
index d156c43..26abaa8 100644
--- a/builder/index-validate.c
+++ b/builder/index-validate.c
@@ -61,6 +61,10 @@ main (int argc, char *argv[])
const char *input;
struct section *sections;
+ setlocale (LC_ALL, "");
+ bindtextdomain (PACKAGE, LOCALEBASEDIR);
+ textdomain (PACKAGE);
+
for (;;) {
c = getopt_long (argc, argv, options, long_options, &option_index);
if (c == -1) break;
diff --git a/src/Makefile.am b/src/Makefile.am
index 4475281..10f5203 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -239,6 +239,9 @@ libvirt_is_version_SOURCES = libvirt-is-version.c
libvirt_is_version_LDADD = \
$(LIBVIRT_LIBS)
+libvirt_is_version_CPPFLAGS = \
+ -DLOCALEBASEDIR=\""$(datadir)/locale"\"
+
libvirt_is_version_CFLAGS = \
$(WARN_CFLAGS) $(WERROR_CFLAGS) \
$(LIBVIRT_CFLAGS)
diff --git a/src/libvirt-is-version.c b/src/libvirt-is-version.c
index 3617d5b..9edd169 100644
--- a/src/libvirt-is-version.c
+++ b/src/libvirt-is-version.c
@@ -23,6 +23,7 @@
#include <string.h>
#include <unistd.h>
#include <errno.h>
+#include <libintl.h>
#include <libvirt/libvirt.h>
@@ -34,6 +35,10 @@ main (int argc, char *argv[])
unsigned long ver;
unsigned int major = 0, minor = 0, release = 0;
+ setlocale (LC_ALL, "");
+ bindtextdomain (PACKAGE, LOCALEBASEDIR);
+ textdomain (PACKAGE);
+
switch (argc) {
case 4:
release = argtoint (argv[0], argv[3]);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list