summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <awilcox@wilcox-tech.com>2021-12-19 22:33:48 +0000
committerA. Wilcox <awilcox@wilcox-tech.com>2021-12-19 22:33:48 +0000
commit2b502554bad0871b71e41d03a870771fe9257fce (patch)
treef68222a1e2faf36898a789bfd6dc7281c9ad8d2b
parent5bd1f89a69d906844aa6b28e672a5c5a44e88480 (diff)
parentcca99e842ebff24d4993dcda1831aaa81d229119 (diff)
downloadgcompat-2b502554bad0871b71e41d03a870771fe9257fce.tar.gz
gcompat-2b502554bad0871b71e41d03a870771fe9257fce.tar.bz2
gcompat-2b502554bad0871b71e41d03a870771fe9257fce.tar.xz
gcompat-2b502554bad0871b71e41d03a870771fe9257fce.zip
Merge branch 'mbrlen' into 'current'
wchar: add __mbrlen See merge request adelie/gcompat!13
-rw-r--r--libgcompat/wchar.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libgcompat/wchar.c b/libgcompat/wchar.c
index 930cc7c..78f7e02 100644
--- a/libgcompat/wchar.c
+++ b/libgcompat/wchar.c
@@ -1,7 +1,7 @@
#include <assert.h> /* assert */
#include <stdarg.h> /* va_list, va_start, va_end */
#include <stddef.h> /* size_t */
-#include <wchar.h> /* wchar_t, *wprintf */
+#include <wchar.h> /* wchar_t, *wprintf, mbstate_t */
int __vswprintf_chk(wchar_t *s, size_t n, int flag, size_t slen,
const wchar_t *format, va_list ap);
@@ -135,3 +135,8 @@ double wcstod_l(const wchar_t *nptr, wchar_t **endptr, locale_t loc)
{
return wcstod(nptr, endptr);
}
+
+
+size_t __mbrlen(const char *restrict s, size_t n, mbstate_t *restrict st) {
+ return mbrlen(s, n, st);
+}