ReactOS 0.4.15-dev-7942-gd23573b
iconv.h
Go to the documentation of this file.
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 *
15 * When distributing Covered Code, include this CDDL HEADER in each
16 * file and include the License file CDDL.Schily.txt from this distribution.
17 */
18
19#ifndef _SCHILY_ICONV_H
20#define _SCHILY_ICONV_H
21
22#ifndef _SCHILY_MCONFIG_H
23#include <schily/mconfig.h>
24#endif
25
26#ifdef HAVE_ICONV_H
27#ifndef _INCL_ICONV_H
28#include <iconv.h>
29#define _INCL_ICONV_H
30#endif
31#else
32#undef USE_ICONV
33#endif
34
35/*
36 * Libiconv on Cygwin is not autoconf-friendly.
37 * iconv.h #defined iconv to libiconv
38 * We would need a AC_CHECK_FUNC() macro that allows to specify includefiles.
39 */
40#if defined(HAVE_LIBICONV) && defined(HAVE_LIBICONV_OPEN) && \
41 defined(HAVE_LIBICONV_CLOSE) && \
42 defined(iconv) && defined(iconv_open) && defined(iconv_close)
43# ifndef HAVE_ICONV
44# define HAVE_ICONV
45# endif
46# ifndef HAVE_ICONV_OPEN
47# define HAVE_ICONV_OPEN
48# endif
49# ifndef HAVE_ICONV_CLOSE
50# define HAVE_ICONV_CLOSE
51# endif
52#endif
53
54#if !defined(HAVE_ICONV_OPEN) || !defined(HAVE_ICONV_CLOSE)
55# undef HAVE_ICONV
56#endif
57
58#ifndef HAVE_ICONV
59#undef USE_ICONV
60#endif
61
62#ifdef NO_ICONV
63#undef USE_ICONV
64#endif
65
66#ifndef USE_ICONV
67#undef iconv_t
68#define iconv_t char *
69#endif
70
71
72#endif /* _SCHILY_ICONV_H */