setlocale: Prefer gnulib's override over libintl's override.
authorBruno Haible <bruno@clisp.org>
Sun, 13 Feb 2011 02:39:33 +0000 (03:39 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 13 Feb 2011 02:39:33 +0000 (03:39 +0100)
* lib/locale.in.h (GNULIB_defined_setlocale): New macro.
* lib/gettext.h (setlocale): Redefine to rpl_setlocale if
GNULIB_defined_setlocale is set.

ChangeLog
lib/gettext.h
lib/locale.in.h

index 23cc805..f359979 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-02-12  Bruno Haible  <bruno@clisp.org>
+
+       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  <eggert@cs.ucla.edu>
 
        stdlib: support non-GCC __attribute__
index 4715c9f..65777e6 100644 (file)
 
 #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.
index c7d39cd..1f9bafd 100644 (file)
@@ -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));