Bläddra i källkod

libdpkg: Move gettext.h header inclusions outside extern blocks

Our local <gettext.h> includes <cstdlib> when included from C++ code,
and this was being done inside an extern "C" block.

Reported-by: Kai Kang <kai.kang@windriver.com>
Guillem Jover 10 år sedan
förälder
incheckning
ecd4baa091
1 ändrade filer med 6 tillägg och 6 borttagningar
  1. 6 6
      lib/dpkg/i18n.h

+ 6 - 6
lib/dpkg/i18n.h

@@ -23,6 +23,12 @@
 
 #include <dpkg/macros.h>
 
+#include <gettext.h>
+
+/* We need to include this because pgettext() uses LC_MESSAGES, but libintl.h
+ * which gets pulled by gettext.h only includes it if building optimized. */
+#include <locale.h>
+
 DPKG_BEGIN_DECLS
 
 /**
@@ -31,12 +37,6 @@ DPKG_BEGIN_DECLS
  * @{
  */
 
-#include <gettext.h>
-
-/* We need to include this because pgettext() uses LC_MESSAGES, but libintl.h
- * which gets pulled by gettext.h only includes it if building optimized. */
-#include <locale.h>
-
 #define _(str) gettext(str)
 #define P_(str, str_plural, n) ngettext(str, str_plural, n)
 #define N_(str) gettext_noop(str)