1/* $OpenBSD: uchar.h,v 1.2 2023/09/05 23:16:01 schwarze Exp $ */ 2/* 3 * Written by Ingo Schwarze <schwarze@openbsd.org> 4 * and placed in the public domain on March 19, 2022. 5 */ 6 7#ifndef _UCHAR_H_ 8#define _UCHAR_H_ 9 10#include <sys/cdefs.h> 11#include <sys/_types.h> 12 13#ifndef _MBSTATE_T_DEFINED_ 14#define _MBSTATE_T_DEFINED_ 15typedef __mbstate_t mbstate_t; 16#endif 17 18#ifndef _SIZE_T_DEFINED_ 19#define _SIZE_T_DEFINED_ 20typedef __size_t size_t; 21#endif 22 23#define __STDC_UTF_16__ 1 24#define __STDC_UTF_32__ 1 25 26#if !defined(__cplusplus) || __cplusplus < 201103L 27typedef __uint16_t char16_t; 28typedef __uint32_t char32_t; 29#endif 30 31__BEGIN_DECLS 32size_t mbrtoc16(char16_t * __restrict, const char * __restrict, size_t, 33 mbstate_t * __restrict); 34size_t c16rtomb(char * __restrict, char16_t, mbstate_t * __restrict); 35size_t mbrtoc32(char32_t * __restrict, const char * __restrict, size_t, 36 mbstate_t * __restrict); 37size_t c32rtomb(char * __restrict, char32_t, mbstate_t * __restrict); 38__END_DECLS 39 40#endif /* !_UCHAR_H_ */ 41