From c7db9f5e926ac9ba1f5e18d94bba46e82c3ed593 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 13 Feb 2011 03:39:33 +0100 Subject: [PATCH] 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. --- ChangeLog | 7 +++++++ lib/gettext.h | 6 ++++++ lib/locale.in.h | 1 + 3 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 23cc80500c..f3599797a5 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 4715c9ffaf..65777e638d 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 c7d39cd286..1f9bafd7a3 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)); -- 2.30.2