From bcfeb4075a584d75f3fe0f7a6b28ddb6c79bc528 Mon Sep 17 00:00:00 2001
From: Peter S. Mazinger <ps.m@gmx.net>
Date: Thu, 24 Mar 2011 01:07:30 +0100
Subject: [PATCH 175/396] Revert "wchar.c, iconv.c: do not include __iconv_codesets into iconv utility"

This reverts commit ad7a3878c789a15dd50e74799a02af7eef37a723.
---
 libc/misc/wchar/wchar.c |    4 ++++
 utils/iconv.c           |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/libc/misc/wchar/wchar.c b/libc/misc/wchar/wchar.c
index c0c9331..ab6c617 100644
--- a/libc/misc/wchar/wchar.c
+++ b/libc/misc/wchar/wchar.c
@@ -1193,7 +1193,9 @@ typedef struct {
 /* Used externally only by iconv utility */
 extern const unsigned char __iconv_codesets[];
 libc_hidden_proto(__iconv_codesets)
+#endif
 
+#if defined L_iconv || defined L_iconv_main
 const unsigned char __iconv_codesets[] =
 	"\x0a\xe0""WCHAR_T\x00"		/* superset of UCS-4 but platform-endian */
 #if __BYTE_ORDER == __BIG_ENDIAN
@@ -1226,6 +1228,8 @@ const unsigned char __iconv_codesets[] =
 	"\x08\x02""UTF-8\x00"
 	"\x0b\x01""US-ASCII\x00"
 	"\x07\x01""ASCII";			/* Must be last! (special case to save a nul) */
+#endif
+#if defined L_iconv && defined _LIBC
 libc_hidden_data_def(__iconv_codesets)
 #endif
 
diff --git a/utils/iconv.c b/utils/iconv.c
index 1ee0dd5..04e2c32 100644
--- a/utils/iconv.c
+++ b/utils/iconv.c
@@ -106,7 +106,7 @@
 #include <iconv.h>
 #include <stdarg.h>
 #include <wchar.h>
-#include "wchar.c" /* for _UC_iconv_t and __LOCALE_DATA_CODESET_LIST */
+#include "wchar.c" /* for _UC_iconv_t and __iconv_codesets */
 
 extern const unsigned char __iconv_codesets[];
 
-- 
1.7.0.4

