Przeglądaj źródła

Allow compilation with --disable-nls on systems without libintl.h

This is being triggered when a non glibc claims to be glibc.
Closes: #465420
Guillem Jover 18 lat temu
rodzic
commit
8f8e9d9af7
4 zmienionych plików z 10 dodań i 2 usunięć
  1. 6 0
      ChangeLog
  2. 1 1
      configure.ac
  3. 2 0
      debian/changelog
  4. 1 1
      lib/gettext.h

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+2008-03-16  Guillem Jover  <guillem@debian.org>
+
+	* configure.ac (AC_CHECK_HEADERS): Add 'libintl.h'.
+	* lib/gettext.h [!ENABLE_NLS]: Use HAVE_LIBINTL_H instead of
+	'(__GLIBC__ >= 2)'.
+
 2008-03-15  Erast Benson  <erast@gnusolaris.org>
 
 	* utils/start-stop-daemon.c (check): Move 'return' inside preprocessor

+ 1 - 1
configure.ac

@@ -72,7 +72,7 @@ fi
 
 # Checks for header files.
 AC_HEADER_STDC
-AC_CHECK_HEADERS([stddef.h error.h locale.h sys/cdefs.h kvm.h])
+AC_CHECK_HEADERS([stddef.h error.h locale.h libintl.h sys/cdefs.h kvm.h])
 DPKG_CHECK_DEFINE(TIOCNOTTY, [sys/ioctl.h])
 
 # Checks for typedefs, structures, and compiler characteristics.

+ 2 - 0
debian/changelog

@@ -25,6 +25,8 @@ dpkg (1.14.17) UNRELEASED; urgency=low
     Thanks to Ian Jackson.
   * Fix erroneous description of Breaks in dselect output.
     Thanks to Ian Jackson.
+  * Allow compilation with --disable-nls on systems without libintl.h where
+    a non glibc claims to be glibc. Closes: #465420
 
   [ Raphael Hertzog ]
   * Add a warning displayed by dpkg-genchanges if the current version is

+ 1 - 1
lib/gettext.h

@@ -54,7 +54,7 @@
    it now, to make later inclusions of <libintl.h> a NOP.  */
 #if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
 # include <cstdlib>
-# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H
+# if HAVE_LIBINTL_H || _GLIBCXX_HAVE_LIBINTL_H
 #  include <libintl.h>
 # endif
 #endif