From: Bruno Haible Date: Sun, 13 Feb 2011 02:39:33 +0000 (+0100) Subject: setlocale: Prefer gnulib's override over libintl's override. X-Git-Tag: v0.1~3184 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=c7db9f5e926ac9ba1f5e18d94bba46e82c3ed593;p=gnulib.git setlocale: Prefer gnulib's override over libintl's override. * lib/locale.in.h (GNULIB_defined_setlocale): New macro. * lib/gettext.h (setlocale): Redefine to rpl_setlocale if GNULIB_defined_setlocale is set. --- diff --git a/ChangeLog b/ChangeLog index 23cc80500..f3599797a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-02-12 Bruno Haible + + setlocale: Prefer gnulib's override over libintl's override. + * lib/locale.in.h (GNULIB_defined_setlocale): New macro. + * lib/gettext.h (setlocale): Redefine to rpl_setlocale if + GNULIB_defined_setlocale is set. + 2011-02-12 Paul Eggert stdlib: support non-GCC __attribute__ diff --git a/lib/gettext.h b/lib/gettext.h index 4715c9ffa..65777e638 100644 --- a/lib/gettext.h +++ b/lib/gettext.h @@ -93,6 +93,12 @@ #endif +/* Prefer gnulib's setlocale override over libintl's setlocale override. */ +#ifdef GNULIB_defined_setlocale +# undef setlocale +# define setlocale rpl_setlocale +#endif + /* A pseudo function call that serves as a marker for the automated extraction of messages, but does not call gettext(). The run-time translation is done at a different place in the code. diff --git a/lib/locale.in.h b/lib/locale.in.h index c7d39cd28..1f9bafd7a 100644 --- a/lib/locale.in.h +++ b/lib/locale.in.h @@ -52,6 +52,7 @@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef setlocale # define setlocale rpl_setlocale +# define GNULIB_defined_setlocale 1 # endif _GL_FUNCDECL_RPL (setlocale, char *, (int category, const char *locale)); _GL_CXXALIAS_RPL (setlocale, char *, (int category, const char *locale));