summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2010-03-09 11:35:25 +0000
committerWerner Koch <wk@gnupg.org>2010-03-09 11:35:25 +0000
commit7aac8e3e0a6c0f1bae22f9a7787cd55deb0a7264 (patch)
tree6a8766bd257819a544321dc93012681779bb1728
parent2811c6e175abb2d881f75673b2d32bd1c968ea73 (diff)
downloadlibgpg-error-7aac8e3e0a6c0f1bae22f9a7787cd55deb0a7264.tar.gz
Add macro to enable gettext macros.
-rw-r--r--ChangeLog5
-rw-r--r--configure.ac2
-rw-r--r--src/gpg-error.h.in8
-rw-r--r--src/w32-add.h20
4 files changed, 25 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 4f08bea..9653e81 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-03-09 Werner Koch <wk@g10code.com>
+
+ * src/w32-add.h [!GPG_ERR_ENABLE_GETTEXT_MACROS]: Do not provide
+ gettext macros.
+
2010-03-08 Werner Koch <wk@g10code.com>
* src/w32-add.h (_GPG_ERR_ATTR_FORMAT_ARG): New.
diff --git a/configure.ac b/configure.ac
index 54c4b35..d8824a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -106,6 +106,8 @@ AH_BOTTOM([
#if defined(HAVE_W32_SYSTEM) && !defined(ENABLE_NLS)
#define ENABLE_NLS 1
#endif
+/* For building we need to define this macro. */
+#define GPG_ERR_ENABLE_GETTEXT_MACROS
])
diff --git a/src/gpg-error.h.in b/src/gpg-error.h.in
index 7068add..8f70ac9 100644
--- a/src/gpg-error.h.in
+++ b/src/gpg-error.h.in
@@ -53,12 +53,16 @@ extern "C" {
another, it preserver the information about the source and nature
of the error.
- A component of the GnuPG project can define the following macro to
+ A component of the GnuPG project can define the following macros to
tune the behaviour of the library:
GPG_ERR_SOURCE_DEFAULT: Define to an error source of type
gpg_err_source_t to make that source the default for gpg_error().
- Otherwise GPG_ERR_SOURCE_UNKNOWN is used as default. */
+ Otherwise GPG_ERR_SOURCE_UNKNOWN is used as default.
+
+ GPG_ERR_ENABLE_GETTEXT_MACROS: Define to provide macros to map the
+ internal gettext API to standard names. This has only an effect on
+ Windows platforms. */
/* The error source type gpg_err_source_t.
diff --git a/src/w32-add.h b/src/w32-add.h
index 54be911..3149af0 100644
--- a/src/w32-add.h
+++ b/src/w32-add.h
@@ -26,11 +26,15 @@ const char *_gpg_w32_dngettext (const char *domainname, const char *msgid1,
const char *_gpg_w32_gettext_localename (void);
int _gpg_w32_gettext_use_utf8 (int value);
-#define bindtextdomain(a,b) _gpg_w32_bindtextdomain ((a), (b))
-#define textdomain(a) _gpg_w32_textdomain ((a))
-#define gettext(a) _gpg_w32_gettext ((a))
-#define dgettext(a,b) _gpg_w32_dgettext ((a), (b))
-#define ngettext(a,b,c) _gpg_w32_dngettext (NULL, (a), (b), (c))
-#define dngettext(a,b,c,d) _gpg_w32_dngettext ((a), (b), (c), (d))
-#define gettext_localname() _gpg_w32_gettext_localename ()
-#define gettext_use_utf8(a) _gpg_w32_gettext_use_utf8 (a)
+#ifdef GPG_ERR_ENABLE_GETTEXT_MACROS
+# define bindtextdomain(a,b) _gpg_w32_bindtextdomain ((a), (b))
+# define textdomain(a) _gpg_w32_textdomain ((a))
+# define gettext(a) _gpg_w32_gettext ((a))
+# define dgettext(a,b) _gpg_w32_dgettext ((a), (b))
+# define ngettext(a,b,c) _gpg_w32_dngettext (NULL, (a), (b), (c))
+# define dngettext(a,b,c,d) _gpg_w32_dngettext ((a), (b), (c), (d))
+# define gettext_localname() _gpg_w32_gettext_localename ()
+# define gettext_use_utf8(a) _gpg_w32_gettext_use_utf8 (a)
+#endif /*GPG_ERR_ENABLE_GETTEXT_MACROS*/
+
+