>From d9b53af8a467d3ac1d8bdbf45e828127d416aa98 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Mon, 13 Feb 2017 13:42:44 -0800 Subject: [PATCH] Internalize more function/variable names ... to avoid the conflict with glibc during a static link. Signed-off-by: Alexey Neyman --- gettext-runtime/intl/gettextP.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gettext-runtime/intl/gettextP.h b/gettext-runtime/intl/gettextP.h index 52be2fc..a94c7e5 100644 --- a/gettext-runtime/intl/gettextP.h +++ b/gettext-runtime/intl/gettextP.h @@ -256,6 +256,15 @@ extern const char *_nl_locale_name_default (void); const char *categoryname); */ #endif +/* The internal functions/variables in the standalone libintl.a must have + different names than the internal functions/variables in GNU libc, + otherwise programs using libintl.a cannot be linked statically. */ +#if !defined _LIBC +# define _nl_find_domain libintl_nl_find_domain +# define _nl_load_domain libintl_nl_load_domain +# define _nl_find_msg libintl_nl_find_msg +# define _nl_state_lock libintl_nl_state_lock +#endif struct loaded_l10nfile *_nl_find_domain (const char *__dirname, char *__locale, const char *__domainname, struct binding *__domainbinding) -- 2.9.3