summaryrefslogtreecommitdiff
path: root/lib/stdlib.in.h
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2011-03-06 16:22:16 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2011-03-06 16:22:16 -0500
commit0d6459dfb52188481bfd6bb53f1b2f653ecd6a5d (patch)
tree306b87fc2903ad23343f3c84be1cccfa72e5a97e /lib/stdlib.in.h
parent798cb64441228d473f7bdd213183c70fb582595c (diff)
parent892777baa1739fa5f1f2d1c2975488c3e6f57bae (diff)
downloademacs-0d6459dfb52188481bfd6bb53f1b2f653ecd6a5d.tar.gz
emacs-0d6459dfb52188481bfd6bb53f1b2f653ecd6a5d.tar.bz2
emacs-0d6459dfb52188481bfd6bb53f1b2f653ecd6a5d.zip
Merge from trunk
Diffstat (limited to 'lib/stdlib.in.h')
-rw-r--r--lib/stdlib.in.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index 62d18c62811..2697a4bd1db 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -274,6 +274,21 @@ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - "
"use gnulib module malloc-posix for portability");
#endif
+/* Convert a multibyte character to a wide character. */
+#if @GNULIB_MBTOWC@
+# if @REPLACE_MBTOWC@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef mbtowc
+# define mbtowc rpl_mbtowc
+# endif
+_GL_FUNCDECL_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
+_GL_CXXALIAS_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
+# else
+_GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
+# endif
+_GL_CXXALIASWARN (mbtowc);
+#endif
+
#if @GNULIB_MKDTEMP@
/* Create a unique temporary directory from TEMPLATE.
The last six characters of TEMPLATE must be "XXXXXX";
@@ -723,6 +738,21 @@ _GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - "
# endif
#endif
+/* Convert a wide character to a multibyte character. */
+#if @GNULIB_WCTOMB@
+# if @REPLACE_WCTOMB@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef wctomb
+# define wctomb rpl_wctomb
+# endif
+_GL_FUNCDECL_RPL (wctomb, int, (char *s, wchar_t wc));
+_GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc));
+# else
+_GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc));
+# endif
+_GL_CXXALIASWARN (wctomb);
+#endif
+
#endif /* _GL_STDLIB_H */
#endif /* _GL_STDLIB_H */