From: Bruno Haible Date: Mon, 18 Sep 2000 20:24:33 +0000 (+0000) Subject: Fix a link error when linking statically with glibc. X-Git-Tag: v0.10.36~222 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe80be5455940b3ab25b9f958d02840d256767a4;p=thirdparty%2Fgettext.git Fix a link error when linking statically with glibc. --- diff --git a/intl/ChangeLog b/intl/ChangeLog index 8ab9155fe..d51b5850b 100644 --- a/intl/ChangeLog +++ b/intl/ChangeLog @@ -1,3 +1,10 @@ +2000-09-18 Bruno Haible + + * dcigettext.c: Outside libc, use local variable names that don't + clash with those in libc. + * bindtextdom.c: Likewise. + * textdomain.c: Likewise. + 2000-07-31 Bruno Haible * plural.y: Include config.h. Needed to define 'inline' away for C diff --git a/intl/bindtextdom.c b/intl/bindtextdom.c index 156c8f02b..f92117708 100644 --- a/intl/bindtextdom.c +++ b/intl/bindtextdom.c @@ -56,6 +56,14 @@ void free (); # define __libc_rwlock_unlock(NAME) #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_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/intl/dcigettext.c b/intl/dcigettext.c index 9f38b1b91..d6092461c 100644 --- a/intl/dcigettext.c +++ b/intl/dcigettext.c @@ -117,6 +117,16 @@ void free (); ((int) &((struct { char dummy1; TYPE dummy2; } *) 0)->dummy2) #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__ +# define _nl_default_dirname _nl_default_dirname__ +# define _nl_domain_bindings _nl_domain_bindings__ +#endif + /* @@ end of prolog @@ */ #ifdef _LIBC diff --git a/intl/textdomain.c b/intl/textdomain.c index d84cbd932..da278b946 100644 --- a/intl/textdomain.c +++ b/intl/textdomain.c @@ -50,6 +50,14 @@ # define __libc_rwlock_unlock(NAME) #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. */