public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Yonggang Luo <luoyonggang@gmail.com>
To: elfutils-devel@sourceware.org
Cc: Yonggang Luo <luoyonggang@gmail.com>
Subject: [PATCH 3/7] lib: Use NOT_HAVE_LIBINTL to guard if need #include <libintl.h>
Date: Tue, 20 Sep 2022 16:43:03 +0800	[thread overview]
Message-ID: <20220920084307.1696-4-luoyonggang@gmail.com> (raw)
In-Reply-To: <20220920084307.1696-1-luoyonggang@gmail.com>

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


  parent reply	other threads:[~2022-09-20  8:43 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-20  8:43 [PATCH 0/7] Enable building libelf of elfutils on win32 Yonggang Luo
2022-09-20  8:43 ` [PATCH 1/7] Rename 'hello2.spec.' -> 'hello2.spec' 'hello3.spec.' -> 'hello3.spec' Yonggang Luo
2022-10-14 20:35   ` Mark Wielaard
     [not found]     ` <CAE2XoE-xfFQNMN1JYSi8Kp+-DUUookRkzwUV+OvKGfnZKDXKEA@mail.gmail.com>
2022-10-19 19:49       ` Frank Ch. Eigler
2022-10-20 16:07         ` Mark Wielaard
2022-10-31 13:29           ` Mark Wielaard
     [not found]         ` <CAE2XoE8KRwOj5EUFS0hAa10_qE_WR0pBbo=Dv3gtzH+5j41ULA@mail.gmail.com>
2022-10-21 15:45           ` Frank Ch. Eigler
2022-09-20  8:43 ` [PATCH 2/7] move platform depended include into system.h Yonggang Luo
2022-10-14 21:16   ` Mark Wielaard
2022-09-20  8:43 ` Yonggang Luo [this message]
2022-09-20  8:43 ` [PATCH 4/7] Remove duplicated #include <libintl.h> Yonggang Luo
2022-09-20  8:43 ` [PATCH 5/7] Strip __ prefix from __BYTE_ORDER __LITTLE_ENDIAN and __BIG_ENDIAN Yonggang Luo
2022-10-16 21:11   ` Mark Wielaard
     [not found]     ` <CAE2XoE_1bah6fxCbEQVN_9jJzLpjz633uTNnnK8XYGtx4VrBUg@mail.gmail.com>
2022-10-17  8:42       ` Mark Wielaard
2022-09-20  8:43 ` [PATCH 6/7] Fixes building with msvc/clang mingw/gcc Yonggang Luo
2022-10-16 21:21   ` Mark Wielaard
2022-09-20  8:43 ` [PATCH 7/7] Add CMake build files Yonggang Luo
2022-10-16 21:23   ` 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=20220920084307.1696-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).