1 /* $MirOS: src/include/iconv.h,v 1.6 2014/02/09 22:35:50 tg Exp $ */ 2 3 /*- 4 * Copyright (c) 2006 5 * Thorsten Glaser <tg@mirbsd.de> 6 * 7 * Provided that these terms and disclaimer and all copyright notices 8 * are retained or reproduced in an accompanying document, permission 9 * is granted to deal in this work without restriction, including un- 10 * limited rights to use, publicly perform, distribute, sell, modify, 11 * merge, give away, or sublicence. 12 * 13 * This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to 14 * the utmost extent permitted by applicable law, neither express nor 15 * implied; without malicious intent or gross negligence. In no event 16 * may a licensor, author or contributor be held liable for indirect, 17 * direct, other damage, loss, or other issues arising in any way out 18 * of dealing in the work, even if advised of the possibility of such 19 * damage or existence of a defect, except proven that it results out 20 * of said person's immediate fault when using the work as intended. 21 *- 22 * Expose standardised iconv(3) interface, implementation-independent 23 */ 24 25 #ifndef _ICONV_H_ 26 #define _ICONV_H_ 27 28 #include <sys/cdefs.h> 29 #include <machine/ansi.h> 30 31 #if !defined(_GCC_SIZE_T) 32 #define _GCC_SIZE_T 33 typedef __SIZE_TYPE__ size_t; 34 #endif 35 36 #ifndef _ICONV_HAVE_ICONV_T 37 typedef void *iconv_t; 38 #endif 39 40 __BEGIN_DECLS 41 iconv_t iconv_open(const char *, const char *); 42 size_t iconv(iconv_t, char **, size_t *, char **, size_t *); 43 int iconv_close(iconv_t); 44 __END_DECLS 45 46 #ifdef _ALL_SOURCE 47 /* non-portable NetBSD(R) interface */ 48 __BEGIN_DECLS 49 int __iconv_get_list(char ***, size_t *); 50 void __iconv_free_list(char **, size_t); 51 size_t __iconv(iconv_t, const char **, size_t *, char **, size_t *, 52 u_int32_t, size_t *); 53 __END_DECLS 54 #endif /* _ALL_SOURCE */ 55 56 #endif 57