1*b819cea2SGordon Ross /*
2*b819cea2SGordon Ross  * CDDL HEADER START
3*b819cea2SGordon Ross  *
4*b819cea2SGordon Ross  * The contents of this file are subject to the terms of the
5*b819cea2SGordon Ross  * Common Development and Distribution License (the "License").
6*b819cea2SGordon Ross  * You may not use this file except in compliance with the License.
7*b819cea2SGordon Ross  *
8*b819cea2SGordon Ross  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*b819cea2SGordon Ross  * or http://www.opensolaris.org/os/licensing.
10*b819cea2SGordon Ross  * See the License for the specific language governing permissions
11*b819cea2SGordon Ross  * and limitations under the License.
12*b819cea2SGordon Ross  *
13*b819cea2SGordon Ross  * When distributing Covered Code, include this CDDL HEADER in each
14*b819cea2SGordon Ross  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*b819cea2SGordon Ross  * If applicable, add the following below this CDDL HEADER, with the
16*b819cea2SGordon Ross  * fields enclosed by brackets "[]" replaced with your own identifying
17*b819cea2SGordon Ross  * information: Portions Copyright [yyyy] [name of copyright owner]
18*b819cea2SGordon Ross  *
19*b819cea2SGordon Ross  * CDDL HEADER END
20*b819cea2SGordon Ross  */
21*b819cea2SGordon Ross /*
22*b819cea2SGordon Ross  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23*b819cea2SGordon Ross  * Use is subject to license terms.
24*b819cea2SGordon Ross  *
25*b819cea2SGordon Ross  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
26*b819cea2SGordon Ross  */
27*b819cea2SGordon Ross 
28*b819cea2SGordon Ross #ifndef _SYS_KICONV_H
29*b819cea2SGordon Ross #define	_SYS_KICONV_H
30*b819cea2SGordon Ross 
31*b819cea2SGordon Ross #ifdef __cplusplus
32*b819cea2SGordon Ross extern "C" {
33*b819cea2SGordon Ross #endif
34*b819cea2SGordon Ross 
35*b819cea2SGordon Ross #include <sys/types.h>
36*b819cea2SGordon Ross 
37*b819cea2SGordon Ross #if defined(_KERNEL) || defined(_FAKE_KERNEL)
38*b819cea2SGordon Ross 
39*b819cea2SGordon Ross /*
40*b819cea2SGordon Ross  * kiconv functions and their macros (from sunddi.h)
41*b819cea2SGordon Ross  */
42*b819cea2SGordon Ross #define	KICONV_IGNORE_NULL	(0x0001)
43*b819cea2SGordon Ross #define	KICONV_REPLACE_INVALID	(0x0002)
44*b819cea2SGordon Ross 
45*b819cea2SGordon Ross struct _iconv_info;
46*b819cea2SGordon Ross typedef struct _iconv_info *kiconv_t;
47*b819cea2SGordon Ross 
48*b819cea2SGordon Ross extern kiconv_t kiconv_open(const char *, const char *);
49*b819cea2SGordon Ross extern size_t kiconv(kiconv_t, char **, size_t *, char **, size_t *, int *);
50*b819cea2SGordon Ross extern int kiconv_close(kiconv_t);
51*b819cea2SGordon Ross extern size_t kiconvstr(const char *, const char *, char *, size_t *, char *,
52*b819cea2SGordon Ross 	size_t *, int, int *);
53*b819cea2SGordon Ross 
54*b819cea2SGordon Ross #endif	/* _KERNEL */
55*b819cea2SGordon Ross 
56*b819cea2SGordon Ross #ifdef __cplusplus
57*b819cea2SGordon Ross }
58*b819cea2SGordon Ross #endif
59*b819cea2SGordon Ross 
60*b819cea2SGordon Ross #endif /* _SYS_KICONV_H */
61