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