1 /* @(#)iconv.h 1.4 08/01/02 Copyright 2007 J. Schilling */ 2 /* 3 * Abstraction from iconv.h 4 * 5 * Copyright (c) 2007 J. Schilling 6 */ 7 /* 8 * The contents of this file are subject to the terms of the 9 * Common Development and Distribution License, Version 1.0 only 10 * (the "License"). You may not use this file except in compliance 11 * with the License. 12 * 13 * See the file CDDL.Schily.txt in this distribution for details. 14 * A copy of the CDDL is also available via the Internet at 15 * http://www.opensource.org/licenses/cddl1.txt 16 * 17 * When distributing Covered Code, include this CDDL HEADER in each 18 * file and include the License file CDDL.Schily.txt from this distribution. 19 */ 20 21 #ifndef _SCHILY_ICONV_H 22 #define _SCHILY_ICONV_H 23 24 #ifndef _SCHILY_MCONFIG_H 25 #include <schily/mconfig.h> 26 #endif 27 28 #ifdef HAVE_ICONV_H 29 #ifndef _INCL_ICONV_H 30 #include <iconv.h> 31 #define _INCL_ICONV_H 32 #endif 33 #else 34 #undef USE_ICONV 35 #endif 36 37 /* 38 * Libiconv on Cygwin is not autoconf-friendly. 39 * iconv.h #defined iconv to libiconv 40 * We would need a AC_CHECK_FUNC() macro that allows to specify includefiles. 41 */ 42 #if defined(HAVE_LIBICONV) && defined(HAVE_LIBICONV_OPEN) && \ 43 defined(HAVE_LIBICONV_CLOSE) && \ 44 defined(iconv) && defined(iconv_open) && defined(iconv_close) 45 # ifndef HAVE_ICONV 46 # define HAVE_ICONV 47 # endif 48 # ifndef HAVE_ICONV_OPEN 49 # define HAVE_ICONV_OPEN 50 # endif 51 # ifndef HAVE_ICONV_CLOSE 52 # define HAVE_ICONV_CLOSE 53 # endif 54 #endif 55 56 #if !defined(HAVE_ICONV_OPEN) || !defined(HAVE_ICONV_CLOSE) 57 # undef HAVE_ICONV 58 #endif 59 60 #ifndef HAVE_ICONV 61 #undef USE_ICONV 62 #endif 63 64 #ifdef NO_ICONV 65 #undef USE_ICONV 66 #endif 67 68 #ifndef USE_ICONV 69 #undef iconv_t 70 #define iconv_t char * 71 #endif 72 73 74 #endif /* _SCHILY_ICONV_H */ 75