The build system checks for gettext and if it doesn't find it, it uses
empty definitions for _(). However, localedef.c uses gettext() directly
on some places and calls textdomain(). Add two empty definitions in
libintl.h so that no liker errors are generated when linking gettext.

This patch is useful for systems without gettext in the default
installation like Darwin.

Signed-off-by: Bernhard Walle <bernh...@bwalle.de>
---
 include/libintl.h |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/include/libintl.h b/include/libintl.h
index 096aa8c..a8d33dd 100644
--- a/include/libintl.h
+++ b/include/libintl.h
@@ -13,3 +13,11 @@
 #ifndef _libc_intl_domainname
 #define _libc_intl_domainname "libc"
 #endif
+
+#ifndef gettext
+#define gettext(X) (X)
+#endif
+
+#ifndef textdomain
+#define textdomain(X)
+#endif
-- 
1.7.9


-- 
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to