Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH] Removed OLD_ICONV in favor of checking _LIBICONV_VERSION directly

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:46

Blake Ramsdell [off-list ref] writes:
quoted hunk
diff --git a/utf8.c b/utf8.c
index 4efef6f..a7feb4f 100644
--- a/utf8.c
+++ b/utf8.c
@@ -300,7 +300,7 @@ int is_encoding_utf8(const char *name)
  * with iconv.  If the conversion fails, returns NULL.
  */
 #ifndef NO_ICONV
-#ifdef OLD_ICONV
+#if _LIBICONV_VERSION <= 0x0109
 	typedef const char * iconv_ibp;
 #else
 	typedef char * iconv_ibp;
Does everybody's iconv use the same _LIBICONV_VERSION scheme?

Compiling this:

        #include <iconv.h>
        int i = _LIBICONV_VERSION;

on a Linux box with GNU C library gives:

	i.c:3: error: '_LIBICONV_VERSION' undeclared here (not in a function)

here.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help