aboutsummaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-01-17 22:00:26 -0500
committerMike Frysinger <vapier@gentoo.org>2022-01-19 19:59:16 -0500
commitb86dc2dab4981ba92d683b866badc0b32be39120 (patch)
tree73fb7b2142531a24018626c464a584d183a48dd1 /newlib
parent15c091ad7326129a3a4ddf04c67fffbc62d002ae (diff)
downloadnewlib-b86dc2dab4981ba92d683b866badc0b32be39120.zip
newlib-b86dc2dab4981ba92d683b866badc0b32be39120.tar.gz
newlib-b86dc2dab4981ba92d683b866badc0b32be39120.tar.bz2
newlib: iconv: autogenerate iconv define list
The list of iconv to/from defines is hand maintained in newlib.hin. Lets leverage mkdeps.pl to generate this list automatically from the list of known encodings. The newlib.hin list is up-to-date, so the list in iconv.m4 matches the list already generated.
Diffstat (limited to 'newlib')
-rw-r--r--newlib/Makefile.in4
-rw-r--r--newlib/aclocal.m41
-rwxr-xr-xnewlib/configure521
-rw-r--r--newlib/configure.ac9
-rw-r--r--newlib/iconv.m4305
-rwxr-xr-xnewlib/libc/iconv/ces/mkdeps.pl39
-rw-r--r--newlib/newlib.hin204
7 files changed, 1055 insertions, 28 deletions
diff --git a/newlib/Makefile.in b/newlib/Makefile.in
index 267db90..a662b4e 100644
--- a/newlib/Makefile.in
+++ b/newlib/Makefile.in
@@ -103,8 +103,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/../config/override.m4 \
$(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
$(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
- $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/iconv.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
diff --git a/newlib/aclocal.m4 b/newlib/aclocal.m4
index 57720fd..abf45db 100644
--- a/newlib/aclocal.m4
+++ b/newlib/aclocal.m4
@@ -1175,4 +1175,5 @@ m4_include([../ltoptions.m4])
m4_include([../ltsugar.m4])
m4_include([../ltversion.m4])
m4_include([../lt~obsolete.m4])
+m4_include([iconv.m4])
m4_include([acinclude.m4])
diff --git a/newlib/configure b/newlib/configure
index 2be0a6c..5a0993c 100755
--- a/newlib/configure
+++ b/newlib/configure
@@ -12700,15 +12700,9 @@ if test "x${iconv_encodings}" != "x" \
done
for encoding in ${iconv_encodings}; do
opt=_ICONV_TO_ENCODING_`echo "${encoding}" | sed -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >>confdefs.h <<_ACEOF
-#define $opt 1
-_ACEOF
-
+ eval "$opt=1"
opt=_ICONV_FROM_ENCODING_`echo "${encoding}" | sed -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >>confdefs.h <<_ACEOF
-#define $opt 1
-_ACEOF
-
+ eval "$opt=1"
done
iconv_encodings1="${iconv_to_encodings}"
@@ -12723,10 +12717,7 @@ _ACEOF
done
for encoding in ${iconv_to_encodings}; do
opt=_ICONV_TO_ENCODING_`echo "${encoding}" | sed -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >>confdefs.h <<_ACEOF
-#define $opt 1
-_ACEOF
-
+ eval "$opt=1"
done
iconv_encodings1="${iconv_from_encodings}"
@@ -12741,12 +12732,510 @@ _ACEOF
done
for encoding in ${iconv_from_encodings}; do
opt=_ICONV_FROM_ENCODING_`echo "${encoding}" | sed -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >>confdefs.h <<_ACEOF
-#define $opt 1
-_ACEOF
-
+ eval "$opt=1"
done
fi;
+ if test "$_ICONV_TO_ENCODING_BIG5" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_BIG5 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_BIG5" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_BIG5 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_CP775" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_CP775 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_CP775" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_CP775 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_CP850" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_CP850 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_CP850" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_CP850 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_CP852" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_CP852 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_CP852" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_CP852 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_CP855" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_CP855 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_CP855" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_CP855 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_CP866" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_CP866 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_CP866" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_CP866 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_EUC_JP" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_EUC_JP 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_EUC_JP" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_EUC_JP 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_EUC_KR" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_EUC_KR 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_EUC_KR" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_EUC_KR 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_EUC_TW" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_EUC_TW 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_EUC_TW" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_EUC_TW 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_8859_1" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_ISO_8859_1 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_8859_1" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_ISO_8859_1 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_8859_10" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_ISO_8859_10 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_8859_10" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_ISO_8859_10 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_8859_11" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_ISO_8859_11 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_8859_11" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_ISO_8859_11 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_8859_13" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_ISO_8859_13 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_8859_13" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_ISO_8859_13 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_8859_14" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_ISO_8859_14 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_8859_14" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_ISO_8859_14 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_8859_15" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_ISO_8859_15 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_8859_15" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_ISO_8859_15 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_8859_2" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_ISO_8859_2 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_8859_2" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_ISO_8859_2 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_8859_3" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_ISO_8859_3 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_8859_3" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_ISO_8859_3 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_8859_4" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_ISO_8859_4 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_8859_4" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_ISO_8859_4 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_8859_5" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_ISO_8859_5 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_8859_5" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_ISO_8859_5 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_8859_6" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_ISO_8859_6 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_8859_6" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_ISO_8859_6 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_8859_7" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_ISO_8859_7 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_8859_7" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_ISO_8859_7 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_8859_8" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_ISO_8859_8 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_8859_8" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_ISO_8859_8 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_8859_9" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_ISO_8859_9 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_8859_9" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_ISO_8859_9 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_IR_111" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_ISO_IR_111 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_IR_111" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_ISO_IR_111 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_KOI8_R" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_KOI8_R 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_KOI8_R" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_KOI8_R 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_KOI8_RU" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_KOI8_RU 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_KOI8_RU" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_KOI8_RU 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_KOI8_U" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_KOI8_U 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_KOI8_U" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_KOI8_U 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_KOI8_UNI" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_KOI8_UNI 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_KOI8_UNI" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_KOI8_UNI 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_UCS_2" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_UCS_2 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_UCS_2" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_UCS_2 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_UCS_2_INTERNAL" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_UCS_2_INTERNAL 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_UCS_2_INTERNAL" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_UCS_2_INTERNAL 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_UCS_2BE" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_UCS_2BE 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_UCS_2BE" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_UCS_2BE 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_UCS_2LE" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_UCS_2LE 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_UCS_2LE" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_UCS_2LE 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_UCS_4" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_UCS_4 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_UCS_4" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_UCS_4 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_UCS_4_INTERNAL" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_UCS_4_INTERNAL 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_UCS_4_INTERNAL" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_UCS_4_INTERNAL 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_UCS_4BE" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_UCS_4BE 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_UCS_4BE" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_UCS_4BE 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_UCS_4LE" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_UCS_4LE 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_UCS_4LE" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_UCS_4LE 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_US_ASCII" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_US_ASCII 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_US_ASCII" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_US_ASCII 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_UTF_16" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_UTF_16 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_UTF_16" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_UTF_16 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_UTF_16BE" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_UTF_16BE 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_UTF_16BE" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_UTF_16BE 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_UTF_16LE" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_UTF_16LE 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_UTF_16LE" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_UTF_16LE 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_UTF_8" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_UTF_8 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_UTF_8" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_UTF_8 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_WIN_1250" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_WIN_1250 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_WIN_1250" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_WIN_1250 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_WIN_1251" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_WIN_1251 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_WIN_1251" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_WIN_1251 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_WIN_1252" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_WIN_1252 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_WIN_1252" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_WIN_1252 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_WIN_1253" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_WIN_1253 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_WIN_1253" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_WIN_1253 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_WIN_1254" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_WIN_1254 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_WIN_1254" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_WIN_1254 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_WIN_1255" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_WIN_1255 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_WIN_1255" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_WIN_1255 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_WIN_1256" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_WIN_1256 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_WIN_1256" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_WIN_1256 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_WIN_1257" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_WIN_1257 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_WIN_1257" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_WIN_1257 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_TO_ENCODING_WIN_1258" = 1; then
+
+$as_echo "#define _ICONV_TO_ENCODING_WIN_1258 1" >>confdefs.h
+
+ fi
+ if test "$_ICONV_FROM_ENCODING_WIN_1258" = 1; then
+
+$as_echo "#define _ICONV_FROM_ENCODING_WIN_1258 1" >>confdefs.h
+
+ fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for .preinit_array/.init_array/.fini_array support" >&5
$as_echo_n "checking for .preinit_array/.init_array/.fini_array support... " >&6; }
diff --git a/newlib/configure.ac b/newlib/configure.ac
index e1fb2ad..d95000d 100644
--- a/newlib/configure.ac
+++ b/newlib/configure.ac
@@ -586,9 +586,9 @@ if test "x${iconv_encodings}" != "x" \
dnl Enable appropriate option in newlib.h
for encoding in ${iconv_encodings}; do
opt=_ICONV_TO_ENCODING_`echo "${encoding}" | sed -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- AC_DEFINE_UNQUOTED($opt,1)
+ eval "$opt=1"
opt=_ICONV_FROM_ENCODING_`echo "${encoding}" | sed -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- AC_DEFINE_UNQUOTED($opt,1)
+ eval "$opt=1"
done
dnl iconv_to_encodings
@@ -605,7 +605,7 @@ if test "x${iconv_encodings}" != "x" \
dnl Enable appropriate option in newlib.h
for encoding in ${iconv_to_encodings}; do
opt=_ICONV_TO_ENCODING_`echo "${encoding}" | sed -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- AC_DEFINE_UNQUOTED($opt,1)
+ eval "$opt=1"
done
dnl iconv_from_encodings
@@ -622,9 +622,10 @@ if test "x${iconv_encodings}" != "x" \
dnl Enable appropriate option in newlib.h
for encoding in ${iconv_from_encodings}; do
opt=_ICONV_FROM_ENCODING_`echo "${encoding}" | sed -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- AC_DEFINE_UNQUOTED($opt,1)
+ eval "$opt=1"
done
fi;
+NEWLIB_ICONV_DEFINES
AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support,
libc_cv_initfinit_array, [dnl
diff --git a/newlib/iconv.m4 b/newlib/iconv.m4
new file mode 100644
index 0000000..696b93a
--- /dev/null
+++ b/newlib/iconv.m4
@@ -0,0 +1,305 @@
+/*
+ * This file was automatically generated mkdeps.pl script. Don't edit.
+ */
+AC_DEFUN([NEWLIB_ICONV_DEFINES],[dnl
+ if test "$_ICONV_TO_ENCODING_BIG5" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_BIG5, 1, [Support big5 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_BIG5" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_BIG5, 1, [Support big5 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_CP775" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_CP775, 1, [Support cp775 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_CP775" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_CP775, 1, [Support cp775 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_CP850" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_CP850, 1, [Support cp850 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_CP850" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_CP850, 1, [Support cp850 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_CP852" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_CP852, 1, [Support cp852 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_CP852" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_CP852, 1, [Support cp852 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_CP855" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_CP855, 1, [Support cp855 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_CP855" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_CP855, 1, [Support cp855 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_CP866" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_CP866, 1, [Support cp866 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_CP866" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_CP866, 1, [Support cp866 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_EUC_JP" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_EUC_JP, 1, [Support euc_jp output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_EUC_JP" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_EUC_JP, 1, [Support euc_jp input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_EUC_KR" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_EUC_KR, 1, [Support euc_kr output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_EUC_KR" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_EUC_KR, 1, [Support euc_kr input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_EUC_TW" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_EUC_TW, 1, [Support euc_tw output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_EUC_TW" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_EUC_TW, 1, [Support euc_tw input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_8859_1" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_ISO_8859_1, 1, [Support iso_8859_1 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_8859_1" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_ISO_8859_1, 1, [Support iso_8859_1 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_8859_10" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_ISO_8859_10, 1, [Support iso_8859_10 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_8859_10" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_ISO_8859_10, 1, [Support iso_8859_10 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_8859_11" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_ISO_8859_11, 1, [Support iso_8859_11 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_8859_11" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_ISO_8859_11, 1, [Support iso_8859_11 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_8859_13" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_ISO_8859_13, 1, [Support iso_8859_13 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_8859_13" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_ISO_8859_13, 1, [Support iso_8859_13 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_8859_14" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_ISO_8859_14, 1, [Support iso_8859_14 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_8859_14" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_ISO_8859_14, 1, [Support iso_8859_14 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_8859_15" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_ISO_8859_15, 1, [Support iso_8859_15 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_8859_15" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_ISO_8859_15, 1, [Support iso_8859_15 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_8859_2" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_ISO_8859_2, 1, [Support iso_8859_2 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_8859_2" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_ISO_8859_2, 1, [Support iso_8859_2 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_8859_3" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_ISO_8859_3, 1, [Support iso_8859_3 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_8859_3" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_ISO_8859_3, 1, [Support iso_8859_3 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_8859_4" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_ISO_8859_4, 1, [Support iso_8859_4 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_8859_4" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_ISO_8859_4, 1, [Support iso_8859_4 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_8859_5" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_ISO_8859_5, 1, [Support iso_8859_5 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_8859_5" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_ISO_8859_5, 1, [Support iso_8859_5 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_8859_6" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_ISO_8859_6, 1, [Support iso_8859_6 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_8859_6" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_ISO_8859_6, 1, [Support iso_8859_6 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_8859_7" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_ISO_8859_7, 1, [Support iso_8859_7 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_8859_7" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_ISO_8859_7, 1, [Support iso_8859_7 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_8859_8" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_ISO_8859_8, 1, [Support iso_8859_8 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_8859_8" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_ISO_8859_8, 1, [Support iso_8859_8 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_8859_9" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_ISO_8859_9, 1, [Support iso_8859_9 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_8859_9" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_ISO_8859_9, 1, [Support iso_8859_9 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_ISO_IR_111" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_ISO_IR_111, 1, [Support iso_ir_111 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_ISO_IR_111" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_ISO_IR_111, 1, [Support iso_ir_111 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_KOI8_R" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_KOI8_R, 1, [Support koi8_r output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_KOI8_R" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_KOI8_R, 1, [Support koi8_r input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_KOI8_RU" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_KOI8_RU, 1, [Support koi8_ru output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_KOI8_RU" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_KOI8_RU, 1, [Support koi8_ru input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_KOI8_U" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_KOI8_U, 1, [Support koi8_u output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_KOI8_U" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_KOI8_U, 1, [Support koi8_u input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_KOI8_UNI" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_KOI8_UNI, 1, [Support koi8_uni output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_KOI8_UNI" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_KOI8_UNI, 1, [Support koi8_uni input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_UCS_2" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_UCS_2, 1, [Support ucs_2 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_UCS_2" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_UCS_2, 1, [Support ucs_2 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_UCS_2_INTERNAL" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_UCS_2_INTERNAL, 1, [Support ucs_2_internal output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_UCS_2_INTERNAL" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_UCS_2_INTERNAL, 1, [Support ucs_2_internal input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_UCS_2BE" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_UCS_2BE, 1, [Support ucs_2be output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_UCS_2BE" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_UCS_2BE, 1, [Support ucs_2be input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_UCS_2LE" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_UCS_2LE, 1, [Support ucs_2le output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_UCS_2LE" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_UCS_2LE, 1, [Support ucs_2le input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_UCS_4" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_UCS_4, 1, [Support ucs_4 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_UCS_4" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_UCS_4, 1, [Support ucs_4 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_UCS_4_INTERNAL" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_UCS_4_INTERNAL, 1, [Support ucs_4_internal output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_UCS_4_INTERNAL" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_UCS_4_INTERNAL, 1, [Support ucs_4_internal input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_UCS_4BE" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_UCS_4BE, 1, [Support ucs_4be output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_UCS_4BE" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_UCS_4BE, 1, [Support ucs_4be input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_UCS_4LE" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_UCS_4LE, 1, [Support ucs_4le output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_UCS_4LE" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_UCS_4LE, 1, [Support ucs_4le input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_US_ASCII" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_US_ASCII, 1, [Support us_ascii output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_US_ASCII" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_US_ASCII, 1, [Support us_ascii input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_UTF_16" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_UTF_16, 1, [Support utf_16 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_UTF_16" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_UTF_16, 1, [Support utf_16 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_UTF_16BE" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_UTF_16BE, 1, [Support utf_16be output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_UTF_16BE" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_UTF_16BE, 1, [Support utf_16be input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_UTF_16LE" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_UTF_16LE, 1, [Support utf_16le output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_UTF_16LE" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_UTF_16LE, 1, [Support utf_16le input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_UTF_8" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_UTF_8, 1, [Support utf_8 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_UTF_8" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_UTF_8, 1, [Support utf_8 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_WIN_1250" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_WIN_1250, 1, [Support win_1250 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_WIN_1250" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_WIN_1250, 1, [Support win_1250 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_WIN_1251" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_WIN_1251, 1, [Support win_1251 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_WIN_1251" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_WIN_1251, 1, [Support win_1251 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_WIN_1252" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_WIN_1252, 1, [Support win_1252 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_WIN_1252" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_WIN_1252, 1, [Support win_1252 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_WIN_1253" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_WIN_1253, 1, [Support win_1253 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_WIN_1253" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_WIN_1253, 1, [Support win_1253 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_WIN_1254" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_WIN_1254, 1, [Support win_1254 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_WIN_1254" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_WIN_1254, 1, [Support win_1254 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_WIN_1255" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_WIN_1255, 1, [Support win_1255 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_WIN_1255" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_WIN_1255, 1, [Support win_1255 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_WIN_1256" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_WIN_1256, 1, [Support win_1256 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_WIN_1256" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_WIN_1256, 1, [Support win_1256 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_WIN_1257" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_WIN_1257, 1, [Support win_1257 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_WIN_1257" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_WIN_1257, 1, [Support win_1257 input encoding.])
+ fi
+ if test "$_ICONV_TO_ENCODING_WIN_1258" = 1; then
+ AC_DEFINE(_ICONV_TO_ENCODING_WIN_1258, 1, [Support win_1258 output encoding.])
+ fi
+ if test "$_ICONV_FROM_ENCODING_WIN_1258" = 1; then
+ AC_DEFINE(_ICONV_FROM_ENCODING_WIN_1258, 1, [Support win_1258 input encoding.])
+ fi
+])
diff --git a/newlib/libc/iconv/ces/mkdeps.pl b/newlib/libc/iconv/ces/mkdeps.pl
index 4e64869..b279fd4 100755
--- a/newlib/libc/iconv/ces/mkdeps.pl
+++ b/newlib/libc/iconv/ces/mkdeps.pl
@@ -334,6 +334,9 @@ sub process_section_encodings($)
# Generate ccsnames.h header file
generate_ccsnames_h (\%ccsenc);
+ # Generate iconv.m4 file
+ my @encodings = sort keys %encalias;
+ generate_iconv_m4 (\@encodings);
}
# ==============================================================================
@@ -928,3 +931,39 @@ sub generate_ccsnames_h($)
print CCSNAMES_H "\n#endif /* !__CCSNAMES_H__ */\n\n";
close CCSNAMES_H or err "Error while closing ../ccs/ccsnames.h file.";
}
+
+# ==============================================================================
+#
+# Generate iconv.m4 file.
+#
+# Parameter 1 (input): array reference with encoding names
+#
+# ==============================================================================
+sub generate_iconv_m4($)
+{
+ my @encodings = @{$_[0]};
+
+ print "Debug: create \"../../../iconv.m4\" file.\n" if $verbose;
+ open (ICONV_M4, '>', "../../../iconv.m4")
+ or err "Can't create \"../../../iconv.m4\" file for writing.\nSystem error message: $!.\n";
+
+ print ICONV_M4 "$comment_automatic\n";
+ print ICONV_M4 "AC_DEFUN([NEWLIB_ICONV_DEFINES],[dnl\n";
+ foreach my $encoding (@encodings)
+ {
+ my $ucencoding = uc $encoding;
+
+ my $tovar = "_ICONV_TO_ENCODING_$ucencoding";
+ print ICONV_M4 " if test \"\$$tovar\" = 1; then\n";
+ print ICONV_M4 " AC_DEFINE($tovar, 1, [Support $encoding output encoding.])\n";
+ print ICONV_M4 " fi\n";
+
+ my $fromvar = "_ICONV_FROM_ENCODING_$ucencoding";
+ print ICONV_M4 " if test \"\$$fromvar\" = 1; then\n";
+ print ICONV_M4 " AC_DEFINE($fromvar, 1, [Support $encoding input encoding.])\n";
+ print ICONV_M4 " fi\n";
+ }
+ print ICONV_M4 "])\n";
+
+ close ICONV_M4 or err "Error while closing ../../../iconv.m4 file.";
+}
diff --git a/newlib/newlib.hin b/newlib/newlib.hin
index 2b7b8d0..15543f4 100644
--- a/newlib/newlib.hin
+++ b/newlib/newlib.hin
@@ -36,112 +36,304 @@
/* Enable ICONV external CCS files loading capabilities. */
#undef _ICONV_ENABLE_EXTERNAL_CCS
-/*
- * Iconv encodings enabled ("from" direction)
- */
+/* Support big5 input encoding. */
#undef _ICONV_FROM_ENCODING_BIG5
+
+/* Support cp775 input encoding. */
#undef _ICONV_FROM_ENCODING_CP775
+
+/* Support cp850 input encoding. */
#undef _ICONV_FROM_ENCODING_CP850
+
+/* Support cp852 input encoding. */
#undef _ICONV_FROM_ENCODING_CP852
+
+/* Support cp855 input encoding. */
#undef _ICONV_FROM_ENCODING_CP855
+
+/* Support cp866 input encoding. */
#undef _ICONV_FROM_ENCODING_CP866
+
+/* Support euc_jp input encoding. */
#undef _ICONV_FROM_ENCODING_EUC_JP
+
+/* Support euc_kr input encoding. */
#undef _ICONV_FROM_ENCODING_EUC_KR
+
+/* Support euc_tw input encoding. */
#undef _ICONV_FROM_ENCODING_EUC_TW
+
+/* Support iso_8859_1 input encoding. */
#undef _ICONV_FROM_ENCODING_ISO_8859_1
+
+/* Support iso_8859_10 input encoding. */
#undef _ICONV_FROM_ENCODING_ISO_8859_10
+
+/* Support iso_8859_11 input encoding. */
#undef _ICONV_FROM_ENCODING_ISO_8859_11
+
+/* Support iso_8859_13 input encoding. */
#undef _ICONV_FROM_ENCODING_ISO_8859_13
+
+/* Support iso_8859_14 input encoding. */
#undef _ICONV_FROM_ENCODING_ISO_8859_14
+
+/* Support iso_8859_15 input encoding. */
#undef _ICONV_FROM_ENCODING_ISO_8859_15
+
+/* Support iso_8859_2 input encoding. */
#undef _ICONV_FROM_ENCODING_ISO_8859_2
+
+/* Support iso_8859_3 input encoding. */
#undef _ICONV_FROM_ENCODING_ISO_8859_3
+
+/* Support iso_8859_4 input encoding. */
#undef _ICONV_FROM_ENCODING_ISO_8859_4
+
+/* Support iso_8859_5 input encoding. */
#undef _ICONV_FROM_ENCODING_ISO_8859_5
+
+/* Support iso_8859_6 input encoding. */
#undef _ICONV_FROM_ENCODING_ISO_8859_6
+
+/* Support iso_8859_7 input encoding. */
#undef _ICONV_FROM_ENCODING_ISO_8859_7
+
+/* Support iso_8859_8 input encoding. */
#undef _ICONV_FROM_ENCODING_ISO_8859_8
+
+/* Support iso_8859_9 input encoding. */
#undef _ICONV_FROM_ENCODING_ISO_8859_9
+
+/* Support iso_ir_111 input encoding. */
#undef _ICONV_FROM_ENCODING_ISO_IR_111
+
+/* Support koi8_r input encoding. */
#undef _ICONV_FROM_ENCODING_KOI8_R
+
+/* Support koi8_ru input encoding. */
#undef _ICONV_FROM_ENCODING_KOI8_RU
+
+/* Support koi8_u input encoding. */
#undef _ICONV_FROM_ENCODING_KOI8_U
+
+/* Support koi8_uni input encoding. */
#undef _ICONV_FROM_ENCODING_KOI8_UNI
+
+/* Support ucs_2 input encoding. */
#undef _ICONV_FROM_ENCODING_UCS_2
+
+/* Support ucs_2be input encoding. */
#undef _ICONV_FROM_ENCODING_UCS_2BE
+
+/* Support ucs_2le input encoding. */
#undef _ICONV_FROM_ENCODING_UCS_2LE
+
+/* Support ucs_2_internal input encoding. */
#undef _ICONV_FROM_ENCODING_UCS_2_INTERNAL
+
+/* Support ucs_4 input encoding. */
#undef _ICONV_FROM_ENCODING_UCS_4
+
+/* Support ucs_4be input encoding. */
#undef _ICONV_FROM_ENCODING_UCS_4BE
+
+/* Support ucs_4le input encoding. */
#undef _ICONV_FROM_ENCODING_UCS_4LE
+
+/* Support ucs_4_internal input encoding. */
#undef _ICONV_FROM_ENCODING_UCS_4_INTERNAL
+
+/* Support us_ascii input encoding. */
#undef _ICONV_FROM_ENCODING_US_ASCII
+
+/* Support utf_16 input encoding. */
#undef _ICONV_FROM_ENCODING_UTF_16
+
+/* Support utf_16be input encoding. */
#undef _ICONV_FROM_ENCODING_UTF_16BE
+
+/* Support utf_16le input encoding. */
#undef _ICONV_FROM_ENCODING_UTF_16LE
+
+/* Support utf_8 input encoding. */
#undef _ICONV_FROM_ENCODING_UTF_8
+
+/* Support win_1250 input encoding. */
#undef _ICONV_FROM_ENCODING_WIN_1250
+
+/* Support win_1251 input encoding. */
#undef _ICONV_FROM_ENCODING_WIN_1251
+
+/* Support win_1252 input encoding. */
#undef _ICONV_FROM_ENCODING_WIN_1252
+
+/* Support win_1253 input encoding. */
#undef _ICONV_FROM_ENCODING_WIN_1253
+
+/* Support win_1254 input encoding. */
#undef _ICONV_FROM_ENCODING_WIN_1254
+
+/* Support win_1255 input encoding. */
#undef _ICONV_FROM_ENCODING_WIN_1255
+
+/* Support win_1256 input encoding. */
#undef _ICONV_FROM_ENCODING_WIN_1256
+
+/* Support win_1257 input encoding. */
#undef _ICONV_FROM_ENCODING_WIN_1257
+
+/* Support win_1258 input encoding. */
#undef _ICONV_FROM_ENCODING_WIN_1258
-/*
- * Iconv encodings enabled ("to" direction)
- */
+/* Support big5 output encoding. */
#undef _ICONV_TO_ENCODING_BIG5
+
+/* Support cp775 output encoding. */
#undef _ICONV_TO_ENCODING_CP775
+
+/* Support cp850 output encoding. */
#undef _ICONV_TO_ENCODING_CP850
+
+/* Support cp852 output encoding. */
#undef _ICONV_TO_ENCODING_CP852
+
+/* Support cp855 output encoding. */
#undef _ICONV_TO_ENCODING_CP855
+
+/* Support cp866 output encoding. */
#undef _ICONV_TO_ENCODING_CP866
+
+/* Support euc_jp output encoding. */
#undef _ICONV_TO_ENCODING_EUC_JP
+
+/* Support euc_kr output encoding. */
#undef _ICONV_TO_ENCODING_EUC_KR
+
+/* Support euc_tw output encoding. */
#undef _ICONV_TO_ENCODING_EUC_TW
+
+/* Support iso_8859_1 output encoding. */
#undef _ICONV_TO_ENCODING_ISO_8859_1
+
+/* Support iso_8859_10 output encoding. */
#undef _ICONV_TO_ENCODING_ISO_8859_10
+
+/* Support iso_8859_11 output encoding. */
#undef _ICONV_TO_ENCODING_ISO_8859_11
+
+/* Support iso_8859_13 output encoding. */
#undef _ICONV_TO_ENCODING_ISO_8859_13
+
+/* Support iso_8859_14 output encoding. */
#undef _ICONV_TO_ENCODING_ISO_8859_14
+
+/* Support iso_8859_15 output encoding. */
#undef _ICONV_TO_ENCODING_ISO_8859_15
+
+/* Support iso_8859_2 output encoding. */
#undef _ICONV_TO_ENCODING_ISO_8859_2
+
+/* Support iso_8859_3 output encoding. */
#undef _ICONV_TO_ENCODING_ISO_8859_3
+
+/* Support iso_8859_4 output encoding. */
#undef _ICONV_TO_ENCODING_ISO_8859_4
+
+/* Support iso_8859_5 output encoding. */
#undef _ICONV_TO_ENCODING_ISO_8859_5
+
+/* Support iso_8859_6 output encoding. */
#undef _ICONV_TO_ENCODING_ISO_8859_6
+
+/* Support iso_8859_7 output encoding. */
#undef _ICONV_TO_ENCODING_ISO_8859_7
+
+/* Support iso_8859_8 output encoding. */
#undef _ICONV_TO_ENCODING_ISO_8859_8
+
+/* Support iso_8859_9 output encoding. */
#undef _ICONV_TO_ENCODING_ISO_8859_9
+
+/* Support iso_ir_111 output encoding. */
#undef _ICONV_TO_ENCODING_ISO_IR_111
+
+/* Support koi8_r output encoding. */
#undef _ICONV_TO_ENCODING_KOI8_R
+
+/* Support koi8_ru output encoding. */
#undef _ICONV_TO_ENCODING_KOI8_RU
+
+/* Support koi8_u output encoding. */
#undef _ICONV_TO_ENCODING_KOI8_U
+
+/* Support koi8_uni output encoding. */
#undef _ICONV_TO_ENCODING_KOI8_UNI
+
+/* Support ucs_2 output encoding. */
#undef _ICONV_TO_ENCODING_UCS_2
+
+/* Support ucs_2be output encoding. */
#undef _ICONV_TO_ENCODING_UCS_2BE
+
+/* Support ucs_2le output encoding. */
#undef _ICONV_TO_ENCODING_UCS_2LE
+
+/* Support ucs_2_internal output encoding. */
#undef _ICONV_TO_ENCODING_UCS_2_INTERNAL
+
+/* Support ucs_4 output encoding. */
#undef _ICONV_TO_ENCODING_UCS_4
+
+/* Support ucs_4be output encoding. */
#undef _ICONV_TO_ENCODING_UCS_4BE
+
+/* Support ucs_4le output encoding. */
#undef _ICONV_TO_ENCODING_UCS_4LE
+
+/* Support ucs_4_internal output encoding. */
#undef _ICONV_TO_ENCODING_UCS_4_INTERNAL
+
+/* Support us_ascii output encoding. */
#undef _ICONV_TO_ENCODING_US_ASCII
+
+/* Support utf_16 output encoding. */
#undef _ICONV_TO_ENCODING_UTF_16
+
+/* Support utf_16be output encoding. */
#undef _ICONV_TO_ENCODING_UTF_16BE
+
+/* Support utf_16le output encoding. */
#undef _ICONV_TO_ENCODING_UTF_16LE
+
+/* Support utf_8 output encoding. */
#undef _ICONV_TO_ENCODING_UTF_8
+
+/* Support win_1250 output encoding. */
#undef _ICONV_TO_ENCODING_WIN_1250
+
+/* Support win_1251 output encoding. */
#undef _ICONV_TO_ENCODING_WIN_1251
+
+/* Support win_1252 output encoding. */
#undef _ICONV_TO_ENCODING_WIN_1252
+
+/* Support win_1253 output encoding. */
#undef _ICONV_TO_ENCODING_WIN_1253
+
+/* Support win_1254 output encoding. */
#undef _ICONV_TO_ENCODING_WIN_1254
+
+/* Support win_1255 output encoding. */
#undef _ICONV_TO_ENCODING_WIN_1255
+
+/* Support win_1256 output encoding. */
#undef _ICONV_TO_ENCODING_WIN_1256
+
+/* Support win_1257 output encoding. */
#undef _ICONV_TO_ENCODING_WIN_1257
+
+/* Support win_1258 output encoding. */
#undef _ICONV_TO_ENCODING_WIN_1258
/* Define if the platform long double type is equal to double. */