[PATCH 01/12] Fake reencoding success under NO_ICONV instead of returning NULL.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Johannes Sixt <johannes.sixt@xxxxxxxxxx>

git-am when invoked from git-rebase seems to rely on successful conversion.

Signed-off-by: Steffen Prohaska <prohaska@xxxxxx>
---
 utf8.c |    7 +++++++
 utf8.h |    4 ----
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/utf8.c b/utf8.c
index dc37353..b07d43e 100644
--- a/utf8.c
+++ b/utf8.c
@@ -388,4 +388,11 @@ char *reencode_string(const char *in, const char *out_encoding, const char *in_e
 	iconv_close(conv);
 	return out;
 }
+#else
+char *reencode_string(const char *in, const char *out_encoding, const char *in_encoding)
+{
+	if (!in_encoding)
+		return NULL;
+	return xstrdup(in);
+}
 #endif
diff --git a/utf8.h b/utf8.h
index 98cce1b..f22ef31 100644
--- a/utf8.h
+++ b/utf8.h
@@ -10,10 +10,6 @@ int is_encoding_utf8(const char *name);
 
 int print_wrapped_text(const char *text, int indent, int indent2, int len);
 
-#ifndef NO_ICONV
 char *reencode_string(const char *in, const char *out_encoding, const char *in_encoding);
-#else
-#define reencode_string(a,b,c) NULL
-#endif
 
 #endif
-- 
1.5.6.1.255.g32571

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux