From: Yonggang Luo <luoyonggang@gmail.com>
To: elfutils-devel@sourceware.org
Cc: Yonggang Luo <luoyonggang@gmail.com>
Subject: [PATCH v2 4/7] lib: Use NOT_HAVE_LIBINTL to guard #include <libintl.h>
Date: Sun, 16 Oct 2022 00:36:22 +0800 [thread overview]
Message-ID: <20221015163622.129-4-luoyonggang@gmail.com> (raw)
In-Reply-To: <20221015163622.129-1-luoyonggang@gmail.com>
Add NOT_HAVE_LIBINTL macro to disable internationalization,
sometimes we have don't want access internationalization such as MSVC,
so the macro NOT_HAVE_LIBINTL can help that.
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
lib/eu-config.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lib/eu-config.h b/lib/eu-config.h
index 78a5c4fe..5e6c3c72 100644
--- a/lib/eu-config.h
+++ b/lib/eu-config.h
@@ -52,10 +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
next prev parent reply other threads:[~2022-10-15 16:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-15 16:36 [PATCH v2 0/7] Enable building libelf of elfutils on win32 Yonggang Luo
2022-10-15 16:36 ` [PATCH v2 2/7] move platform depended include into system.h of libelf Yonggang Luo
2022-10-16 20:47 ` Mark Wielaard
2022-10-15 16:36 ` [PATCH v2 3/7] Move the #include <libintl.h> into eu-config.h Yonggang Luo
2022-10-16 20:49 ` Mark Wielaard
2022-10-15 16:36 ` Yonggang Luo [this message]
2022-10-16 20:55 ` [PATCH v2 4/7] lib: Use NOT_HAVE_LIBINTL to guard #include <libintl.h> Mark Wielaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221015163622.129-4-luoyonggang@gmail.com \
--to=luoyonggang@gmail.com \
--cc=elfutils-devel@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).