libdpkg: Include <locale.h> from <i18n.h> to fix unoptimized builds
commit58c6486cdf485d03f843b27d1f60e37eed6b77e5
authorGuillem Jover <guillem@debian.org>
Fri, 15 Apr 2011 21:33:35 +0000 (15 23:33 +0200)
committerGuillem Jover <guillem@debian.org>
Sat, 16 Apr 2011 01:45:00 +0000 (16 03:45 +0200)
tree425051fdfd58c85408b8e95a17da3dcea2fb46bd
parent438e5813caa759a1c6dbfa282e68ab451b425e75
libdpkg: Include <locale.h> from <i18n.h> to fix unoptimized builds

The pgettext() macros in gettext.h make use of LC_MESSAGES, which get
normally pulled from <locale.h> through <libintl.h>, but that only
happens on optimized builds. As this is an implementation detail,
pgettext() users (through the local C_() macro) should not need to
know they have to include <locale.h>. Arguably this is a deficiency
in gettext.h which we are working around here.

Reported-by: Steve Langasek <steve.langasek@ubuntu.com>
debian/changelog
lib/dpkg/i18n.h