summaryrefslogtreecommitdiff
path: root/lib/locale.in.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2010-03-08 01:08:24 +0100
committerBruno Haible <bruno@clisp.org>2010-03-08 03:11:11 +0100
commitf4aa39b61508a65deafbd6d7fea752d7a989ce24 (patch)
treea47ddb9b87951222b3d15e5a07e3e4b66844c180 /lib/locale.in.h
parente5d49763255b291737ef78a2fd3c446f4e2175b6 (diff)
downloadgnulib-f4aa39b61508a65deafbd6d7fea752d7a989ce24.tar.gz
locale: Avoid #define replacements in C++ mode.
Diffstat (limited to 'lib/locale.in.h')
-rw-r--r--lib/locale.in.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/locale.in.h b/lib/locale.in.h
index 193e9375ec..ad92d8f2b0 100644
--- a/lib/locale.in.h
+++ b/lib/locale.in.h
@@ -34,6 +34,8 @@
# include <xlocale.h>
#endif
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+
/* The definition of _GL_ARG_NONNULL is copied here. */
/* The definition of _GL_WARN_ON_USE is copied here. */
@@ -46,10 +48,18 @@
#if @GNULIB_DUPLOCALE@
# if @REPLACE_DUPLOCALE@
-# undef duplocale
-# define duplocale rpl_duplocale
-extern locale_t duplocale (locale_t locale) _GL_ARG_NONNULL ((1));
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef duplocale
+# define duplocale rpl_duplocale
+# endif
+_GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale));
+# else
+# if @HAVE_DUPLOCALE@
+_GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale));
+# endif
# endif
+_GL_CXXALIASWARN (duplocale);
#elif defined GNULIB_POSIXCHECK
# undef duplocale
# if HAVE_RAW_DECL_DUPLOCALE