summaryrefslogtreecommitdiff
path: root/modules/mbstowcs
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2023-03-31 00:27:20 +0200
committerBruno Haible <bruno@clisp.org>2023-03-31 00:27:20 +0200
commit7595a8817e03c1366817e69aa74263efa2ca4979 (patch)
tree46d5a26730a36675ee9b9600d86e72f08fa61064 /modules/mbstowcs
parent8906a5101bf62b719ddafa376fd4e0805e35617b (diff)
downloadgnulib-7595a8817e03c1366817e69aa74263efa2ca4979.tar.gz
mbstowcs: New module.
* lib/stdlib.in.h (mbstowcs): New declaration. * lib/mbstowcs.c: New file, based on lib/mbstoc32s.c. * m4/mbstowcs.m4: New file. * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether mbstowcs is declared. (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize GNULIB_MBSTOWCS. (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_MBSTOWCS. * modules/stdlib (Makefile.am): Substitute GNULIB_MBSTOWCS, REPLACE_MBSTOWCS. * modules/mbstowcs: New file. * tests/test-stdlib-c++.cc (mbstowcs): Check signature. * doc/posix-functions/mbstowcs.texi: Mention the C locale behaviour bug and the new module.
Diffstat (limited to 'modules/mbstowcs')
-rw-r--r--modules/mbstowcs33
1 files changed, 33 insertions, 0 deletions
diff --git a/modules/mbstowcs b/modules/mbstowcs
new file mode 100644
index 0000000000..44ba43d977
--- /dev/null
+++ b/modules/mbstowcs
@@ -0,0 +1,33 @@
+Description:
+mbstowcs() function: convert string to wide string.
+
+Files:
+lib/mbstowcs.c
+m4/mbstowcs.m4
+m4/mbrtowc.m4
+
+Depends-on:
+stdlib
+mbsrtowcs [test $REPLACE_MBSTOWCS = 1]
+
+configure.ac:
+gl_FUNC_MBSTOWCS
+gl_CONDITIONAL([GL_COND_OBJ_MBSTOWCS], [test $REPLACE_MBSTOWCS = 1])
+AM_COND_IF([GL_COND_OBJ_MBSTOWCS], [
+ gl_PREREQ_MBSTOWCS
+])
+gl_STDLIB_MODULE_INDICATOR([mbstowcs])
+
+Makefile.am:
+if GL_COND_OBJ_MBSTOWCS
+lib_SOURCES += mbstowcs.c
+endif
+
+Include:
+<stdlib.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+all