aboutsummaryrefslogtreecommitdiff
path: root/mailinfo.c
diff options
context:
space:
mode:
authorFernando J. Pereda <ferdy@gentoo.org>2006-02-16 09:38:01 +0100
committerJunio C Hamano <junkio@cox.net>2006-02-16 01:42:58 -0800
commitb6e56eca8a4eb74a86e9f2d99aa480c665458aa7 (patch)
treebe7cb47c247021c8c475b7c01fed816467a2a055 /mailinfo.c
parentbe97bd1b88003f4a19e2832ee0cc6ac20fcab674 (diff)
downloadgit-b6e56eca8a4eb74a86e9f2d99aa480c665458aa7.tar.gz
git-b6e56eca8a4eb74a86e9f2d99aa480c665458aa7.tar.xz
Allow building Git in systems without iconv
Systems using some uClibc versions do not properly support iconv stuff. This patch allows Git to be built on those systems by passing NO_ICONV=YesPlease to make. The only drawback is mailinfo won't do charset conversion in those systems. Signed-off-by: Fernando J. Pereda <ferdy@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'mailinfo.c')
-rw-r--r--mailinfo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mailinfo.c b/mailinfo.c
index ff2d4d403..3c56f8c10 100644
--- a/mailinfo.c
+++ b/mailinfo.c
@@ -7,7 +7,9 @@
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
+#ifndef NO_ICONV
#include <iconv.h>
+#endif
#include "git-compat-util.h"
#include "cache.h"
@@ -469,6 +471,7 @@ static int decode_b_segment(char *in, char *ot, char *ep)
static void convert_to_utf8(char *line, char *charset)
{
+#ifndef NO_ICONV
char *in, *out;
size_t insize, outsize, nrc;
char outbuf[4096]; /* cheat */
@@ -501,6 +504,7 @@ static void convert_to_utf8(char *line, char *charset)
return;
*out = 0;
strcpy(line, outbuf);
+#endif
}
static void decode_header_bq(char *it)