3 lib iconv_open,iconv_close,iconv iconv.h -liconv
8 #define _undef_hdr_iconv 1
12 #define _undef_lib_iconv_open 1
13 #undef _lib_iconv_open
16 #include <sys/types.h>
25 printf("#include <ast_common.h>\n");
26 printf("#include <ccode.h>\n");
28 printf("#undef _hdr_iconv\n");
30 #if _undef_lib_iconv_open
31 printf("#undef _lib_iconv_open\n");
33 #if _hdr_iconv && defined(_nxt_iconv_str)
34 printf("#include <%s> /* the native iconv.h */\n", _nxt_iconv_str);
37 printf("#define CC_ICONV (-1)\n");
38 printf("#define CC_UCS (-2)\n");
39 printf("#define CC_SCU (-3)\n");
40 printf("#define CC_UTF (-4)\n");
41 printf("#define CC_UME (-5)\n");
45 printf("#ifndef _ICONV_LIST_PRIVATE_\n");
46 printf("#undef iconv_t\n");
47 printf("#define iconv_t %siconv_t\n", lib);
48 printf("#undef iconv_f\n");
49 printf("#define iconv_f %siconv_f\n", lib);
50 printf("#undef iconv_list_t\n");
51 printf("#define iconv_list_t %siconv_list_t\n", lib);
52 printf("#undef iconv_open\n");
53 printf("#define iconv_open %siconv_open\n", lib);
54 printf("#undef iconv\n");
55 printf("#define iconv %siconv\n", lib);
56 printf("#undef iconv_close\n");
57 printf("#define iconv_close %siconv_close\n", lib);
58 printf("#undef iconv_list\n");
59 printf("#define iconv_list %siconv_list\n", lib);
60 printf("#undef iconv_move\n");
61 printf("#define iconv_move %siconv_move\n", lib);
62 printf("#undef iconv_name\n");
63 printf("#define iconv_name %siconv_name\n", lib);
64 printf("#undef iconv_write\n");
65 printf("#define iconv_write %siconv_write\n", lib);
71 printf("typedef Ccmap_t %siconv_list_t;\n", lib);
72 printf("typedef void* %siconv_t;\n", lib);
73 printf("typedef size_t (*%siconv_f)(%siconv_t, char**, size_t*, char**, size_t*);\n", lib, lib);
75 printf("#if _BLD_ast && defined(__EXPORT__)\n");
76 printf("#define extern __EXPORT__\n");
79 printf("extern %siconv_t %siconv_open(const char*, const char*);\n", lib, lib);
80 printf("extern size_t %siconv(%siconv_t, char**, size_t*, char**, size_t*);\n", lib, lib);
81 printf("extern int %siconv_close(%siconv_t);\n", lib, lib);
82 printf("extern %siconv_list_t* %siconv_list(%siconv_list_t*);\n", lib, lib, lib);
83 printf("extern int %siconv_name(const char*, char*, size_t);\n", lib);
84 printf("#if _SFIO_H\n");
85 printf("extern ssize_t %siconv_move(%siconv_t, Sfio_t*, Sfio_t*, size_t, size_t*);\n", lib, lib);
86 printf("extern ssize_t %siconv_write(%siconv_t, Sfio_t*, char**, size_t*, size_t*);\n", lib, lib);
88 printf("#if _SFSTDIO_H\n");
89 printf("extern ssize_t %siconv_move(%siconv_t, FILE*, FILE*, size_t, size_t*);\n", lib, lib);
90 printf("extern ssize_t %siconv_write(%siconv_t, FILE*, char**, size_t*, size_t*);\n", lib, lib);
94 printf("#undef extern\n");