aboutsummaryrefslogtreecommitdiff
path: root/lib/mlibc/options/ansi/include/uchar.h
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-03-07 17:28:00 -0500
committerIan Moffett <ian@osmora.org>2024-03-07 17:28:32 -0500
commitbd5969fc876a10b18613302db7087ef3c40f18e1 (patch)
tree7c2b8619afe902abf99570df2873fbdf40a4d1a1 /lib/mlibc/options/ansi/include/uchar.h
parenta95b38b1b92b172e6cc4e8e56a88a30cc65907b0 (diff)
lib: Add mlibc
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'lib/mlibc/options/ansi/include/uchar.h')
-rw-r--r--lib/mlibc/options/ansi/include/uchar.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/mlibc/options/ansi/include/uchar.h b/lib/mlibc/options/ansi/include/uchar.h
new file mode 100644
index 0000000..3651a60
--- /dev/null
+++ b/lib/mlibc/options/ansi/include/uchar.h
@@ -0,0 +1,29 @@
+#ifndef _UCHAR_H
+#define _UCHAR_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <bits/mbstate.h>
+#include <bits/size_t.h>
+
+#ifndef __cplusplus
+typedef __CHAR16_TYPE__ char16_t;
+typedef __CHAR32_TYPE__ char32_t;
+#endif /* __cplusplus */
+
+typedef struct __mlibc_mbstate mbstate_t;
+
+#ifndef __MLIBC_ABI_ONLY
+
+size_t c32rtomb(char *pmb, char32_t c32, mbstate_t *ps);
+size_t mbrtoc32(char32_t *pc32, const char *pmb, size_t max, mbstate_t *ps);
+
+#endif /* !__MLIBC_ABI_ONLY */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _UCHAR_H */