From: Guillem Jover Date: Sun, 16 Mar 2008 05:08:24 +0000 (+0200) Subject: Allow compilation with --disable-nls on systems without libintl.h X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f8e9d9af75672ae051c2d3c11dd797b666b87b8;p=dpkg Allow compilation with --disable-nls on systems without libintl.h This is being triggered when a non glibc claims to be glibc. Closes: #465420 --- diff --git a/ChangeLog b/ChangeLog index 3e181d72..66103e28 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-03-16 Guillem Jover + + * 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 * utils/start-stop-daemon.c (check): Move 'return' inside preprocessor diff --git a/configure.ac b/configure.ac index 5bd0ea33..1f3972c1 100644 --- a/configure.ac +++ b/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. diff --git a/debian/changelog b/debian/changelog index 4a3e9b3e..442d2a89 100644 --- a/debian/changelog +++ b/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 diff --git a/lib/gettext.h b/lib/gettext.h index 8874d9ba..3e80f7fb 100644 --- a/lib/gettext.h +++ b/lib/gettext.h @@ -54,7 +54,7 @@ it now, to make later inclusions of a NOP. */ #if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) # include -# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H +# if HAVE_LIBINTL_H || _GLIBCXX_HAVE_LIBINTL_H # include # endif #endif