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 23cc80500c6ef57832d2a1f9c9fb0ac531af1e0b..f3599797a52fce50532ba5554841bcbc8b3ae048 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 4715c9ffaf19a0a4812fc053b12e1306aaf994a2..65777e638d3e6455aa8fa2c2b3678cf1682c0df9 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 c7d39cd28622d90fca04135dd1e1211e315e1548..1f9bafd7a3156dd3c6dce69657bf4b280b30da8b 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));