summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2013-07-07 09:52:35 +0000
committerXavier Roche <xroche@users.noreply.github.com>2013-07-07 09:52:35 +0000
commit0ae8baf47b5d444a84a243dce9ac1d73cd5be733 (patch)
treeaf62e568e88bde4606c21d209be08bf385995d36 /src
parent3ea9e69625a57b5a436a6e22cb252dec57e2a2f6 (diff)
Added DISABLE_ICONV
Diffstat (limited to 'src')
-rw-r--r--src/htscharset.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/htscharset.c b/src/htscharset.c
index 5dd58ad..2cc79f0 100644
--- a/src/htscharset.c
+++ b/src/htscharset.c
@@ -373,7 +373,14 @@ char *hts_convertStringSystemToUTF8(const char *s, size_t size) {
#else
#include <errno.h>
+
+#if ( defined(HTS_USEICONV) && ( HTS_USEICONV == 0 ) )
+#define DISABLE_ICONV
+#endif
+
+#ifndef DISABLE_ICONV
#include <iconv.h>
+#endif
static char *hts_convertStringToUTF8_(const char *s, size_t size,
const char *to, const char *from) {
@@ -385,6 +392,7 @@ static char *hts_convertStringToUTF8_(const char *s, size_t size,
if (strcasecmp(from, to) == 0) {
return strndup(s, size);
}
+#ifndef DISABLE_ICONV
/* Find codepage */
else {
const iconv_t cp = iconv_open(to, from);
@@ -443,6 +451,7 @@ static char *hts_convertStringToUTF8_(const char *s, size_t size,
return outbuf;
}
}
+#endif
/* Error, charset not found! */
return NULL;