a7299799d1d0c1803c55296a4324d6b364f0d0ef
[abartlet/samba.git/.git] / source4 / lib / replace / system / iconv.h
1 #ifndef _system_iconv_h
2 #define _system_iconv_h
3 /* 
4    Unix SMB/CIFS implementation.
5
6    iconv memory system include wrappers
7
8    Copyright (C) Andrew Tridgell 2004
9    
10      ** NOTE! The following LGPL license applies to the replace
11      ** library. This does NOT imply that all of Samba is released
12      ** under the LGPL
13    
14    This library is free software; you can redistribute it and/or
15    modify it under the terms of the GNU Lesser General Public
16    License as published by the Free Software Foundation; either
17    version 3 of the License, or (at your option) any later version.
18
19    This library is distributed in the hope that it will be useful,
20    but WITHOUT ANY WARRANTY; without even the implied warranty of
21    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22    Lesser General Public License for more details.
23
24    You should have received a copy of the GNU Lesser General Public
25    License along with this library; if not, write to the Free Software
26    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
27
28 */
29
30 #if !defined(HAVE_ICONV) && defined(HAVE_ICONV_H)
31 #define HAVE_ICONV
32 #endif
33
34 #if !defined(HAVE_GICONV) && defined(HAVE_GICONV_H)
35 #define HAVE_GICONV
36 #endif
37
38 #if !defined(HAVE_BICONV) && defined(HAVE_BICONV_H)
39 #define HAVE_BICONV
40 #endif
41
42 #ifdef HAVE_NATIVE_ICONV
43 #if defined(HAVE_ICONV)
44 #include <iconv.h>
45 #elif defined(HAVE_GICONV)
46 #include <giconv.h>
47 #elif defined(HAVE_BICONV)
48 #include <biconv.h>
49 #endif
50 #endif /* HAVE_NATIVE_ICONV */
51
52 /* needed for some systems without iconv. Doesn't really matter
53    what error code we use */
54 #ifndef EILSEQ
55 #define EILSEQ EIO
56 #endif
57
58 #endif