ソースを参照

libcompat: Disable gettext support in getopt module

We do not carry translations for this module, and it makes it pull
libintl for programs that might not use it otherwise.
Guillem Jover 10 年 前
コミット
322a17a9df
共有2 個のファイルを変更した6 個の追加8 個の削除を含む
  1. 3 0
      debian/changelog
  2. 3 8
      lib/compat/getopt.c

+ 3 - 0
debian/changelog

@@ -59,6 +59,9 @@ dpkg (1.18.11) UNRELEASED; urgency=medium
     - Add <sys/sysmacros.h> on AIX for major() and minor().
     - Add missing <errno.h> in libcompat.
     - Include libcompat getopt module when we need getopt_long.
+    - Disable gettext support in libcompat getopt module. We do not carry
+      translations for this module, and it makes it pull libintl for programs
+      that might not use it otherwise.
   * Perl modules:
     - Obsolete Source-Version substvar in Dpkg::Substvars by emitting errors.
     - Rework keyring hooks in Dpkg::Vendor. Deprecate the keyrings hook, and

+ 3 - 8
lib/compat/getopt.c

@@ -87,15 +87,10 @@ USA.  */
 #define getpid() GetCurrentProcessId()
 #endif
 
+/* XXX: Disable intl support, because we do not carry the translations anyway
+ * and this pulls indirectly libintl, wich we do not want to impose. */
 #ifndef _
-/* This is for other GNU distributions with internationalized messages.
-   When compiling libc, the _ macro is predefined.  */
-#ifdef HAVE_LIBINTL_H
-# include <libintl.h>
-# define _(msgid)	gettext (msgid)
-#else
-# define _(msgid)	(msgid)
-#endif
+#define _(msgid)	(msgid)
 #endif
 
 /* This version of `getopt' appears to the caller like standard Unix `getopt'