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

[Libguestfs] [PATCH 1/3] Mac OS X: Detect bindtextdomain



In the style of libguestfs commit:
7581672c7893fd392ca10b47f044af327011f502

Signed-off-by: Alex Nelson <ajnelson cs ucsc edu>
---
 configure.ac  |    3 +++
 sh/hivexsh.c  |    2 ++
 xml/hivexml.c |    2 ++
 3 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index 58bb80b..a4e55b4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -133,6 +133,9 @@ AC_CHECK_SIZEOF([long])
 dnl Headers.
 AC_CHECK_HEADERS([endian.h byteswap.h])
 
+dnl Functions.
+AC_CHECK_FUNCS([bindtextdomain])
+
 dnl Check for pod2man and pod2text.
 AC_CHECK_PROG([POD2MAN],[pod2man],[pod2man],[no])
 test "x$POD2MAN" = "xno" &&
diff --git a/sh/hivexsh.c b/sh/hivexsh.c
index a9b738e..410851b 100644
--- a/sh/hivexsh.c
+++ b/sh/hivexsh.c
@@ -100,8 +100,10 @@ int
 main (int argc, char *argv[])
 {
   setlocale (LC_ALL, "");
+#ifdef HAVE_BINDTEXTDOMAIN
   bindtextdomain (PACKAGE, LOCALEBASEDIR);
   textdomain (PACKAGE);
+#endif
 
   int c;
   const char *filename = NULL;
diff --git a/xml/hivexml.c b/xml/hivexml.c
index f29c80c..804e503 100644
--- a/xml/hivexml.c
+++ b/xml/hivexml.c
@@ -79,8 +79,10 @@ int
 main (int argc, char *argv[])
 {
   setlocale (LC_ALL, "");
+#ifdef HAVE_BINDTEXTDOMAIN
   bindtextdomain (PACKAGE, LOCALEBASEDIR);
   textdomain (PACKAGE);
+#endif
 
   int c;
   int open_flags = 0;
-- 
1.7.4.4



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