[Reproducible-commits] [dpkg] 02/32: libcompat: Define gettext context functions when NLS is disabled

Holger Levsen holger at layer-acht.org
Tue May 3 08:43:12 UTC 2016


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to annotated tag 1.15.10
in repository dpkg.

commit ba4c4690a2bde7b76595a5f48cfdc08dc18ab998
Author: Guillem Jover <guillem at debian.org>
Date:   Wed Feb 2 11:17:23 2011 +0100

    libcompat: Define gettext context functions when NLS is disabled
    
    When the package is configured with NLS disabled (--disable-nls),
    the build will fail due to undefined references to LC_MESSAGES, the
    gettext.h header file does not correctly handle the gettext context
    related function declarations on disabled NLS support, which is known
    to be used by downstreams. This is the minimal change needed to fix
    the build failure. A more complete fix will be deployed on the master
    branch.
---
 debian/changelog     | 3 +++
 lib/compat/gettext.h | 8 ++++++++
 2 files changed, 11 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index e13b312..852be90 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,8 @@
 dpkg (1.15.8.11) UNRELEASED; urgency=low
 
+  [ Guillem Jover ]
+  * Fix build failure when passing --disable-nls to configure.
+
   [ Updated man page translations ]
   * German (Helge Kreutzmann). Minor fixe(s).
 
diff --git a/lib/compat/gettext.h b/lib/compat/gettext.h
index a2e93b2..281e933 100644
--- a/lib/compat/gettext.h
+++ b/lib/compat/gettext.h
@@ -96,6 +96,8 @@
 /* The separator between msgctxt and msgid in a .mo file.  */
 #define GETTEXT_CONTEXT_GLUE "\004"
 
+#if ENABLE_NLS
+
 /* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a
    MSGID.  MSGCTXT and MSGID must be string literals.  MSGCTXT should be
    short and rarely need to change.
@@ -268,4 +270,10 @@ dcnpgettext_expr (const char *domain,
   return (n == 1 ? msgid : msgid_plural);
 }
 
+#else /* ENABLE_NLS */
+
+#define pgettext(Msgctxt, Msgid) ((void) (Msgctxt), gettext (Msgid))
+
+#endif /* ENABLE_NLS */
+
 #endif /* _LIBGETTEXT_H */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list