[PATCH 3/7] lib: Use NOT_HAVE_LIBINTL to guard if need #include <libintl.h>

Yonggang Luo luoyonggang@gmail.com
Tue Sep 20 08:43:03 GMT 2022


Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 lib/eu-config.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/eu-config.h b/lib/eu-config.h
index c7d7cbb2..5e6c3c72 100644
--- a/lib/eu-config.h
+++ b/lib/eu-config.h
@@ -52,9 +52,17 @@
 # define rwlock_unlock(lock) ((void) (lock))
 #endif	/* USE_LOCKS */
 
+#if !defined(NOT_HAVE_LIBINTL)
+#include <libintl.h>
+#endif
+
 /* gettext helper macros.  */
 #define N_(Str) Str
+#if !defined(NOT_HAVE_LIBINTL)
 #define _(Str) dgettext ("elfutils", Str)
+#else
+#define _(Str) N_(Str)
+#endif
 
 /* Compiler-specific definitions.  */
 #define strong_alias(name, aliasname) \
-- 
2.36.1.windows.1



More information about the Elfutils-devel mailing list