From e0efd58f0f0c853eb7b6b9455b738cf901f1ce1b Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 18 Sep 2000 22:05:52 +0000 Subject: [PATCH] dcgettext.c: Outside libc, use local variable names that don't clash with those in libc. 2000-09-18 Bruno Haible * intl/dcgettext.c: Outside libc, use local variable names that don't clash with those in libc. * intl/bindtextdom.c: Likewise. * intl/textdomain.c: Likewise. From-SVN: r36516 --- gcc/intl/ChangeLog | 7 +++++++ gcc/intl/bindtextdom.c | 8 ++++++++ gcc/intl/dcgettext.c | 10 ++++++++++ gcc/intl/textdomain.c | 8 ++++++++ 4 files changed, 33 insertions(+) diff --git a/gcc/intl/ChangeLog b/gcc/intl/ChangeLog index 1754c116dd3..56efee29c53 100644 --- a/gcc/intl/ChangeLog +++ b/gcc/intl/ChangeLog @@ -1,3 +1,10 @@ +2000-09-18 Bruno Haible + + * intl/dcgettext.c: Outside libc, use local variable names that don't + clash with those in libc. + * intl/bindtextdom.c: Likewise. + * intl/textdomain.c: Likewise. + 2000-09-05 John David Anglin * gettext.h (nls_uint32): Choose via INT_MAX instead of UINT_MAX. diff --git a/gcc/intl/bindtextdom.c b/gcc/intl/bindtextdom.c index d9c3f349e04..c143cbc237b 100644 --- a/gcc/intl/bindtextdom.c +++ b/gcc/intl/bindtextdom.c @@ -46,6 +46,14 @@ void free (); #include "gettext.h" #include "gettextP.h" +/* The internal variables in the standalone libintl.a must have different + names than the internal variables in GNU libc, otherwise programs + using libintl.a cannot be linked statically. */ +#if !defined _LIBC +# define _nl_default_dirname _nl_default_dirname__ +# define _nl_domain_bindings _nl_domain_bindings__ +#endif + /* @@ end of prolog @@ */ /* Contains the default location of the message catalogs. */ diff --git a/gcc/intl/dcgettext.c b/gcc/intl/dcgettext.c index a830f1de124..65de78b9cfb 100644 --- a/gcc/intl/dcgettext.c +++ b/gcc/intl/dcgettext.c @@ -85,6 +85,16 @@ void free (); #endif #include "hash-string.h" +/* The internal variables in the standalone libintl.a must have different + names than the internal variables in GNU libc, otherwise programs + using libintl.a cannot be linked statically. */ +#if !defined _LIBC +# define _nl_default_default_domain _nl_default_default_domain__ +# define _nl_current_default_domain _nl_current_default_domain__ +# define _nl_default_dirname _nl_default_dirname__ +# define _nl_domain_bindings _nl_domain_bindings__ +#endif + /* @@ end of prolog @@ */ #ifdef _LIBC diff --git a/gcc/intl/textdomain.c b/gcc/intl/textdomain.c index 88557460f3b..e25a0866196 100644 --- a/gcc/intl/textdomain.c +++ b/gcc/intl/textdomain.c @@ -39,6 +39,14 @@ # include "libgettext.h" #endif +/* The internal variables in the standalone libintl.a must have different + names than the internal variables in GNU libc, otherwise programs + using libintl.a cannot be linked statically. */ +#if !defined _LIBC +# define _nl_default_default_domain _nl_default_default_domain__ +# define _nl_current_default_domain _nl_current_default_domain__ +#endif + /* @@ end of prolog @@ */ /* Name of the default text domain. */