1250883Sed/*-
2250883Sed * Copyright (c) 2013 Ed Schouten <ed@FreeBSD.org>
3250883Sed * All rights reserved.
4250883Sed *
5250883Sed * Redistribution and use in source and binary forms, with or without
6250883Sed * modification, are permitted provided that the following conditions
7250883Sed * are met:
8250883Sed * 1. Redistributions of source code must retain the above copyright
9250883Sed *    notice, this list of conditions and the following disclaimer.
10250883Sed * 2. Redistributions in binary form must reproduce the above copyright
11250883Sed *    notice, this list of conditions and the following disclaimer in the
12250883Sed *    documentation and/or other materials provided with the distribution.
13250883Sed *
14250883Sed * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15250883Sed * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16250883Sed * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17250883Sed * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18250883Sed * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19250883Sed * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20250883Sed * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21250883Sed * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22250883Sed * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23250883Sed * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24250883Sed * SUCH DAMAGE.
25250883Sed *
26250883Sed * $FreeBSD$
27250883Sed */
28250883Sed
29250883Sed#ifndef _UCHAR_H_
30250883Sed#define	_UCHAR_H_
31250883Sed
32250883Sed#include <sys/cdefs.h>
33250883Sed#include <sys/_types.h>
34250883Sed
35250985Sed#ifndef _CHAR16_T_DECLARED
36250985Sedtypedef	__char16_t	char16_t;
37250985Sed#define	_CHAR16_T_DECLARED
38250985Sed#endif
39250985Sed
40250985Sed#ifndef _CHAR32_T_DECLARED
41250985Sedtypedef	__char32_t	char32_t;
42250985Sed#define	_CHAR32_T_DECLARED
43250985Sed#endif
44250985Sed
45250883Sed#ifndef _MBSTATE_T_DECLARED
46250883Sedtypedef	__mbstate_t	mbstate_t;
47250883Sed#define	_MBSTATE_T_DECLARED
48250883Sed#endif
49250883Sed
50250883Sed#ifndef _SIZE_T_DECLARED
51250883Sedtypedef	__size_t	size_t;
52250883Sed#define	_SIZE_T_DECLARED
53250883Sed#endif
54250883Sed
55250883Sed__BEGIN_DECLS
56250883Sedsize_t	c16rtomb(char * __restrict, char16_t, mbstate_t * __restrict);
57250883Sedsize_t	c32rtomb(char * __restrict, char32_t, mbstate_t * __restrict);
58250883Sedsize_t	mbrtoc16(char16_t * __restrict, const char * __restrict, size_t,
59250883Sed    mbstate_t * __restrict);
60250883Sedsize_t	mbrtoc32(char32_t * __restrict, const char * __restrict, size_t,
61250883Sed    mbstate_t * __restrict);
62250883Sed#if __BSD_VISIBLE || defined(_XLOCALE_H_)
63250883Sed#include <xlocale/_uchar.h>
64250883Sed#endif
65250883Sed__END_DECLS
66250883Sed
67250883Sed#endif /* !_UCHAR_H_ */
68