From: Bruno Haible Date: Tue, 23 Nov 2004 14:53:22 +0000 (+0000) Subject: Include when using libstdc++ from g++ 3.4. X-Git-Tag: v0.14.2~215 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85f110db163b66cc7eef26bcae4bc28d3952e124;p=thirdparty%2Fgettext.git Include when using libstdc++ from g++ 3.4. --- diff --git a/gettext-tools/lib/ChangeLog b/gettext-tools/lib/ChangeLog index 6717c455c..272697550 100644 --- a/gettext-tools/lib/ChangeLog +++ b/gettext-tools/lib/ChangeLog @@ -1,3 +1,9 @@ +2004-11-23 Bruno Haible + + * gettext.h [!ENABLE_NLS]: When using GNU libstdc++, include + early. + Reported by Peter Breitenlohner . + 2004-10-07 Bruno Haible * gen-lbrkprop.c (output_tables): Emit a GPL copyright notice. diff --git a/gettext-tools/lib/gettext.h b/gettext-tools/lib/gettext.h index 8b262f4cf..02b309042 100644 --- a/gettext-tools/lib/gettext.h +++ b/gettext-tools/lib/gettext.h @@ -1,5 +1,5 @@ /* Convenience header for conditional use of GNU . - 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 @@ -37,6 +37,16 @@ # include #endif +/* Many header files from the libstdc++ coming with g++ 3.4 or newer include + , which chokes if dcgettext is defined as a macro. So include + it now, to make later inclusions of a NOP. */ +#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) +# include +# if _GLIBCXX_HAVE_LIBINTL_H +# include +# 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.