summaryrefslogtreecommitdiffstats
path: root/src/portable_c.c
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2009-03-04 21:11:18 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2009-03-04 21:11:18 (GMT)
commitaa9c531961aea00c8d9c139de3c48844f11dc9f1 (patch)
treeade91348b3d7d8806a09659790655b697c1f4eea /src/portable_c.c
parent27b5dd5b526154944bb1997fb7a592343d124595 (diff)
downloadDoxygen-aa9c531961aea00c8d9c139de3c48844f11dc9f1.zip
Doxygen-aa9c531961aea00c8d9c139de3c48844f11dc9f1.tar.gz
Doxygen-aa9c531961aea00c8d9c139de3c48844f11dc9f1.tar.bz2
Release-1.5.8-20090304
Diffstat (limited to 'src/portable_c.c')
-rw-r--r--src/portable_c.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/portable_c.c b/src/portable_c.c
new file mode 100644
index 0000000..ab33639
--- /dev/null
+++ b/src/portable_c.c
@@ -0,0 +1,24 @@
+#include <iconv.h>
+
+// These functions are implemented in a C file, because there are different
+// versions of the iconv() prototype, some with a const pointer and some
+// without. In C this is just a warning, but in C++ breaks the compilation.
+// Looking at the LIBICONV_VERSION is not enough, since for MACOSX the
+// const and non-const version exist with the same version of the file.
+
+void * portable_iconv_open(const char* tocode, const char* fromcode)
+{
+ return iconv_open(tocode,fromcode);
+}
+
+size_t portable_iconv (void *cd, const char** inbuf, size_t *inbytesleft,
+ char** outbuf, size_t *outbytesleft)
+{
+ return iconv((iconv_t)cd,inbuf,inbytesleft,outbuf,outbytesleft);
+}
+
+int portable_iconv_close (void *cd)
+{
+ return iconv_close((iconv_t)cd);
+}
+