summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: be97bd1)
raw | patch | inline | side by side (parent: be97bd1)
author | Fernando J. Pereda <ferdy@gentoo.org> | |
Thu, 16 Feb 2006 08:38:01 +0000 (09:38 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 16 Feb 2006 09:42:58 +0000 (01:42 -0800) |
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>
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>
Makefile | patch | blob | history | |
mailinfo.c | patch | blob | history |
diff --git a/Makefile b/Makefile
index 648469e625bebeea355ff8599499cdb16da99a2f..317be3c373dcfc351ba1f4b0232eb80d88267cfb 100644 (file)
--- a/Makefile
+++ b/Makefile
# Define NO_SOCKADDR_STORAGE if your platform does not have struct
# sockaddr_storage.
#
+# Define NO_ICONV if your libc does not properly support iconv.
+#
# Define COLLISION_CHECK below if you believe that SHA1's
# 1461501637330902918203684832716283019655932542976 hashes do not give you
# sufficient guarantee that no collisions between objects will ever happen.
endif
endif
+ifdef NO_ICONV
+ ALL_CFLAGS += -DNO_ICONV
+endif
+
ifdef PPC_SHA1
SHA1_HEADER = "ppc/sha1.h"
LIB_OBJS += ppc/sha1.o ppc/sha1ppc.o
diff --git a/mailinfo.c b/mailinfo.c
index ff2d4d403826b035a7bb123dc74a50af9a76e353..3c56f8c10801bdc93eaaac6319e477f81c096717 100644 (file)
--- a/mailinfo.c
+++ b/mailinfo.c
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
+#ifndef NO_ICONV
#include <iconv.h>
+#endif
#include "git-compat-util.h"
#include "cache.h"
static void convert_to_utf8(char *line, char *charset)
{
+#ifndef NO_ICONV
char *in, *out;
size_t insize, outsize, nrc;
char outbuf[4096]; /* cheat */
return;
*out = 0;
strcpy(line, outbuf);
+#endif
}
static void decode_header_bq(char *it)