]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Include <libintl.h> when using libstdc++ from g++ 3.4.
authorBruno Haible <bruno@clisp.org>
Tue, 23 Nov 2004 14:53:22 +0000 (14:53 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:11:56 +0000 (12:11 +0200)
gettext-tools/lib/ChangeLog
gettext-tools/lib/gettext.h

index 6717c455cc51f94e59cd2e8f929775ee06da4105..2726975504f43ae456cc8186301636550200014b 100644 (file)
@@ -1,3 +1,9 @@
+2004-11-23  Bruno Haible  <bruno@clisp.org>
+
+       * gettext.h [!ENABLE_NLS]: When using GNU libstdc++, include
+       <libintl.h> early.
+       Reported by Peter Breitenlohner <peb@mppmu.mpg.de>.
+
 2004-10-07  Bruno Haible  <bruno@clisp.org>
 
        * gen-lbrkprop.c (output_tables): Emit a GPL copyright notice.
index 8b262f4cfd789f4c367d6427d391ca83cff0c5c2..02b309042fd8077c79c610761093c85100868c8e 100644 (file)
@@ -1,5 +1,5 @@
 /* Convenience header for conditional use of GNU <libintl.h>.
-   Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
+   Copyright (C) 1995-1998, 2000-2002, 2004 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU Library General Public License as published
 # include <locale.h>
 #endif
 
+/* Many header files from the libstdc++ coming with g++ 3.4 or newer include
+   <libintl.h>, which chokes if dcgettext is defined as a macro.  So include
+   it now, to make later inclusions of <libintl.h> a NOP.  */
+#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
+# include <cstdlib>
+# if _GLIBCXX_HAVE_LIBINTL_H
+#  include <libintl.h>
+# endif
+#endif
+
 /* Disabled NLS.
    The casts to 'const char *' serve the purpose of producing warnings
    for invalid uses of the value returned from these functions.