summaryrefslogtreecommitdiffstats
path: root/libdwfl
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2020-12-16 08:00:00 +0000
committerDmitry V. Levin <ldv@altlinux.org>2020-12-16 10:01:52 +0000
commit0a5defb64e94ecb2847b98b2c29155131edeaf97 (patch)
tree2fbbe796e985ad1cefdf4234de8654ce56c14d5e /libdwfl
parentlibebl: consistently use _(Str) instead of gettext(Str) (diff)
downloadelfutils-0a5defb64e94ecb2847b98b2c29155131edeaf97.tar.gz
elfutils-0a5defb64e94ecb2847b98b2c29155131edeaf97.tar.bz2
elfutils-0a5defb64e94ecb2847b98b2c29155131edeaf97.tar.xz
Consistently define _(Str) using dgettext ("elfutils", Str)
Move the definition of _(Str) macro to lib/eu-config.h which already provides a definition of N_(Str) macro. Since lib/eu-config.h is appended to config.h, it is included into every compilation unit and therefore both macros are now universally available. Remove all other definitions of N_(Str) and _(Str) macros from other files to avoid conflicts and redundancies. The next step is to replace all uses of gettext(Str) with _(Str). Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Diffstat (limited to 'libdwfl')
-rw-r--r--libdwfl/ChangeLog5
-rw-r--r--libdwfl/argp-std.c3
-rw-r--r--libdwfl/libdwflP.h3
3 files changed, 5 insertions, 6 deletions
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
index fc64eafd..f9f6f01f 100644
--- a/libdwfl/ChangeLog
+++ b/libdwfl/ChangeLog
@@ -1,3 +1,8 @@
12020-12-16 Dmitry V. Levin <ldv@altlinux.org>
2
3 * argp-std.c (_): Remove.
4 * libdwflP.h (_): Likewise.
5
12020-12-12 Dmitry V. Levin <ldv@altlinux.org> 62020-12-12 Dmitry V. Levin <ldv@altlinux.org>
2 7
3 * libdwfl.h: Fix spelling typos in comments. 8 * libdwfl.h: Fix spelling typos in comments.
diff --git a/libdwfl/argp-std.c b/libdwfl/argp-std.c
index 2aa1b5e0..01ec18e2 100644
--- a/libdwfl/argp-std.c
+++ b/libdwfl/argp-std.c
@@ -38,9 +38,6 @@
38#include <fcntl.h> 38#include <fcntl.h>
39#include <unistd.h> 39#include <unistd.h>
40 40
41/* gettext helper macros. */
42#define _(Str) dgettext ("elfutils", Str)
43
44 41
45#define OPT_DEBUGINFO 0x100 42#define OPT_DEBUGINFO 0x100
46#define OPT_COREFILE 0x101 43#define OPT_COREFILE 0x101
diff --git a/libdwfl/libdwflP.h b/libdwfl/libdwflP.h
index 4c6fcb28..4344e356 100644
--- a/libdwfl/libdwflP.h
+++ b/libdwfl/libdwflP.h
@@ -47,9 +47,6 @@
47 47
48typedef struct Dwfl_Process Dwfl_Process; 48typedef struct Dwfl_Process Dwfl_Process;
49 49
50/* gettext helper macros. */
51#define _(Str) dgettext ("elfutils", Str)
52
53#define DWFL_ERRORS \ 50#define DWFL_ERRORS \
54 DWFL_ERROR (NOERROR, N_("no error")) \ 51 DWFL_ERROR (NOERROR, N_("no error")) \
55 DWFL_ERROR (UNKNOWN_ERROR, N_("unknown error")) \ 52 DWFL_ERROR (UNKNOWN_ERROR, N_("unknown error")) \