devel
Threads by month
- ----- 2025 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
December 2016
- 9 participants
- 29 discussions

uClibc-ng - small C library for embedded systems branch master updated. v1.0.20-16-g6cfe578
by wbx@helium.openadk.org 26 Dec '16
by wbx@helium.openadk.org 26 Dec '16
26 Dec '16
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, master has been updated
via 6cfe578d49ab6638be8a7448ccc3b9d8de4a247b (commit)
from cf5bbef923ed50e299295af352692865e48d8eeb (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 6cfe578d49ab6638be8a7448ccc3b9d8de4a247b
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Mon Dec 26 09:11:34 2016 +0100
bump for release
-----------------------------------------------------------------------
Summary of changes:
Rules.mak | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Rules.mak b/Rules.mak
index f3c3d7a..8bd2863 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -127,7 +127,7 @@ export RUNTIME_PREFIX DEVEL_PREFIX KERNEL_HEADERS MULTILIB_DIR
# Now config hard core
MAJOR_VERSION := 1
MINOR_VERSION := 0
-SUBLEVEL := 20
+SUBLEVEL := 21
EXTRAVERSION :=
VERSION := $(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL)
ABI_VERSION := $(MAJOR_VERSION)
hooks/post-receive
--
uClibc-ng - small C library for embedded systems
1
0

uClibc-ng - small C library for embedded systems branch master updated. v1.0.20-15-gcf5bbef
by wbx@helium.openadk.org 26 Dec '16
by wbx@helium.openadk.org 26 Dec '16
26 Dec '16
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, master has been updated
via cf5bbef923ed50e299295af352692865e48d8eeb (commit)
via c7294c98c891e56f6507cbbf9441fce17c92e41a (commit)
from 6d4d6e2cfc6b7ea247adca2d3ae137a68c4e5148 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit cf5bbef923ed50e299295af352692865e48d8eeb
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Mon Dec 26 08:26:50 2016 +0100
mips: use the common dirent.h
commit c7294c98c891e56f6507cbbf9441fce17c92e41a
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Fri Dec 23 07:38:21 2016 +0100
remove UCLIBC_LINUX_MODULE_26
The syscall wrappers are not required and other C libraries
do not provide them. Busybox modutils.c must be patched so
that syscall() is used for uClibc-ng.
Signed-off-by: Waldemar Brodkorb <wbx(a)openadk.org>
-----------------------------------------------------------------------
Summary of changes:
extra/Configs/Config.in | 9 -----
extra/Configs/defconfigs/or1k/defconfig | 2 --
libc/sysdeps/linux/common/Makefile.in | 1 -
libc/sysdeps/linux/common/delete_module.c | 13 -------
libc/sysdeps/linux/common/init_module.c | 20 -----------
libc/sysdeps/linux/common/stubs.c | 8 -----
libc/sysdeps/linux/mips/bits/dirent.h | 60 -------------------------------
7 files changed, 113 deletions(-)
delete mode 100644 libc/sysdeps/linux/common/delete_module.c
delete mode 100644 libc/sysdeps/linux/common/init_module.c
delete mode 100644 libc/sysdeps/linux/mips/bits/dirent.h
diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in
index 64ff513..6b0985e 100644
--- a/extra/Configs/Config.in
+++ b/extra/Configs/Config.in
@@ -950,15 +950,6 @@ config UCLIBC_GRP_BUFFER_SIZE
comment "Support various families of functions"
-config UCLIBC_LINUX_MODULE_26
- bool "Linux kernel module functions (2.6)"
- default y
- help
- delete_module, init_module
- are used in linux for loadable kernel modules.
-
- Say N if you do not use kernel modules.
-
config UCLIBC_LINUX_SPECIFIC
bool "Linux specific functions"
default y
diff --git a/extra/Configs/defconfigs/or1k/defconfig b/extra/Configs/defconfigs/or1k/defconfig
index d976515..a419747 100644
--- a/extra/Configs/defconfigs/or1k/defconfig
+++ b/extra/Configs/defconfigs/or1k/defconfig
@@ -114,8 +114,6 @@ UCLIBC_GRP_BUFFER_SIZE=256
#
# Support various families of functions
#
-UCLIBC_LINUX_MODULE_26=y
-UCLIBC_LINUX_MODULE_24=y
UCLIBC_LINUX_SPECIFIC=y
UCLIBC_HAS_GNU_ERROR=y
UCLIBC_BSD_SPECIFIC=y
diff --git a/libc/sysdeps/linux/common/Makefile.in b/libc/sysdeps/linux/common/Makefile.in
index 257ed72..595074c 100644
--- a/libc/sysdeps/linux/common/Makefile.in
+++ b/libc/sysdeps/linux/common/Makefile.in
@@ -15,7 +15,6 @@ CSRC_LFS := $(notdir $(wildcard $(COMMON_DIR)/*64.c))
CSRC-y := $(filter-out llseek.c $(CSRC_LFS),$(CSRC-y))
CSRC-y += llseek.c $(CSRC_LFS)
CSRC-$(findstring y,$(UCLIBC_HAS_SSP)$(UCLIBC_HAS_FORTIFY)) += ssp.c
-CSRC-$(UCLIBC_LINUX_MODULE_26) += delete_module.c init_module.c
# we need these internally: fstatfs.c statfs.c
CSRC-$(UCLIBC_LINUX_SPECIFIC) += \
bdflush.c \
diff --git a/libc/sysdeps/linux/common/delete_module.c b/libc/sysdeps/linux/common/delete_module.c
deleted file mode 100644
index 05841d4..0000000
--- a/libc/sysdeps/linux/common/delete_module.c
+++ /dev/null
@@ -1,13 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/*
- * delete_module() for uClibc
- * Copyright (C) 2000-2006 Erik Andersen <andersen(a)uclibc.org>
- *
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
-#include <sys/syscall.h>
-#ifdef __NR_delete_module
-int delete_module(const char *name, unsigned int flags);
-_syscall2(int, delete_module, const char *, name, unsigned int, flags)
-#endif
diff --git a/libc/sysdeps/linux/common/init_module.c b/libc/sysdeps/linux/common/init_module.c
deleted file mode 100644
index a2a3e02..0000000
--- a/libc/sysdeps/linux/common/init_module.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/*
- * init_module() for uClibc
- *
- * Copyright (C) 2000-2006 Erik Andersen <andersen(a)uclibc.org>
- *
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
-#include <sys/syscall.h>
-
-#ifdef __NR_init_module
-int init_module(void *first, void *second, void *third, void *fourth, void *fifth);
-/* This may have 5 arguments (for old 2.0 kernels) or 2 arguments
- * (for 2.2 and 2.4 kernels). Use the greatest common denominator,
- * and let the kernel cope with whatever it gets. It's good at that. */
-_syscall5(int, init_module, void *, first, void *, second, void *, third,
- void *, fourth, void *, fifth)
-#endif
-
diff --git a/libc/sysdeps/linux/common/stubs.c b/libc/sysdeps/linux/common/stubs.c
index e7e81da..c17e509 100644
--- a/libc/sysdeps/linux/common/stubs.c
+++ b/libc/sysdeps/linux/common/stubs.c
@@ -86,10 +86,6 @@ make_stub(capset)
make_stub(connect)
#endif
-#if !defined __NR_delete_module && defined __UCLIBC_LINUX_MODULE_26__
-make_stub(delete_module)
-#endif
-
#if !defined __NR_epoll_create && defined __UCLIBC_HAS_EPOLL__ \
&& !defined __NR_epoll_create1
make_stub(epoll_create)
@@ -169,10 +165,6 @@ make_stub(getsockopt)
make_stub(getxattr)
#endif
-#if !defined __NR_init_module && defined __UCLIBC_LINUX_MODULE_26__
-make_stub(init_module)
-#endif
-
#if !defined __NR_inotify_add_watch && defined __UCLIBC_LINUX_SPECIFIC__
make_stub(inotify_add_watch)
#endif
diff --git a/libc/sysdeps/linux/mips/bits/dirent.h b/libc/sysdeps/linux/mips/bits/dirent.h
deleted file mode 100644
index 65c9fc6..0000000
--- a/libc/sysdeps/linux/mips/bits/dirent.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef _DIRENT_H
-# error "Never use <bits/dirent.h> directly; include <dirent.h> instead."
-#endif
-#include <errno.h>
-#include <sys/syscall.h>
-
-struct dirent
- {
-#if defined(__USE_FILE_OFFSET64) && defined(__NR_getdents64)
- __ino64_t d_ino;
- __off64_t d_off;
-#else
- __ino_t d_ino;
- __off_t d_off;
-#endif
- unsigned short int d_reclen;
- unsigned char d_type;
- char d_name[256]; /* We must not include limits.h! */
- };
-
-#ifdef __USE_LARGEFILE64
-struct dirent64
- {
-#ifdef __NR_getdents64
- __ino64_t d_ino;
- __off64_t d_off;
-#else
- /* dirent64 is the same as dirent. */
- __ino_t d_ino;
- __off_t d_off;
-#endif
- unsigned short int d_reclen;
- unsigned char d_type;
- char d_name[256]; /* We must not include limits.h! */
- };
-#endif
-
-#define d_fileno d_ino /* Backwards compatibility. */
-
-#undef _DIRENT_HAVE_D_NAMLEN
-#define _DIRENT_HAVE_D_RECLEN
-#define _DIRENT_HAVE_D_OFF
-#define _DIRENT_HAVE_D_TYPE
hooks/post-receive
--
uClibc-ng - small C library for embedded systems
1
0

uClibc-ng - small C library for embedded systems branch master updated. v1.0.20-13-g6d4d6e2
by wbx@helium.openadk.org 21 Dec '16
by wbx@helium.openadk.org 21 Dec '16
21 Dec '16
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, master has been updated
via 6d4d6e2cfc6b7ea247adca2d3ae137a68c4e5148 (commit)
from 0bd6bfb2b643ea2b4b1440dfd917ba752f0c0d15 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 6d4d6e2cfc6b7ea247adca2d3ae137a68c4e5148
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Wed Dec 21 19:25:07 2016 +0100
remove misc/gnu, cleanup comment
-----------------------------------------------------------------------
Summary of changes:
libc/misc/Makefile.in | 4 ----
1 file changed, 4 deletions(-)
diff --git a/libc/misc/Makefile.in b/libc/misc/Makefile.in
index e01b3dc..e45002e 100644
--- a/libc/misc/Makefile.in
+++ b/libc/misc/Makefile.in
@@ -5,9 +5,6 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-#DIRS:=assert ctype dirent error file fnmatch ftw glob gnu internals intl locale mntent \
-# pthread regex search statfs syslog sysvipc time ttyent utmp wchar wctype wordexp
-
include $(top_srcdir)libc/misc/assert/Makefile.in
include $(top_srcdir)libc/misc/ctype/Makefile.in
include $(top_srcdir)libc/misc/dirent/Makefile.in
@@ -18,7 +15,6 @@ include $(top_srcdir)libc/misc/fnmatch/Makefile.in
include $(top_srcdir)libc/misc/ftw/Makefile.in
include $(top_srcdir)libc/misc/fts/Makefile.in
include $(top_srcdir)libc/misc/glob/Makefile.in
-include $(top_srcdir)libc/misc/gnu/Makefile.in
include $(top_srcdir)libc/misc/internals/Makefile.in
include $(top_srcdir)libc/misc/locale/Makefile.in
include $(top_srcdir)libc/misc/mntent/Makefile.in
hooks/post-receive
--
uClibc-ng - small C library for embedded systems
1
0

uClibc-ng - small C library for embedded systems branch master updated. v1.0.20-12-g0bd6bfb
by wbx@helium.openadk.org 21 Dec '16
by wbx@helium.openadk.org 21 Dec '16
21 Dec '16
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, master has been updated
via 0bd6bfb2b643ea2b4b1440dfd917ba752f0c0d15 (commit)
via 013f366f501c928315cc2893f0f2348c8956d09e (commit)
via 9ff01fc11a5d10108a10655b1751aa406aedae0a (commit)
via b39b5151b937c4d36ff293b62cee988378245fac (commit)
from 4fa7ed9388f3ca81d97cad2099a6f9fa9f8098de (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0bd6bfb2b643ea2b4b1440dfd917ba752f0c0d15
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Tue Dec 20 20:56:32 2016 +0100
remove obstack support
Remove __UCLIBC_HAS_OBSTACK__ as it isn't very uptodate and
maintained part. It shouldn't be required for any software and
mostly shipped with stuff which use it. (f.e. binutils-gdb)
commit 013f366f501c928315cc2893f0f2348c8956d09e
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Tue Dec 20 20:51:59 2016 +0100
remove __MALLOC_GLIBC_COMPAT__ option
This option is enabled for a long time and I see no
useful case where we should be incompatible to glibc here.
commit 9ff01fc11a5d10108a10655b1751aa406aedae0a
Author: Thomas Petazzoni <thomas.petazzoni(a)free-electrons.com>
Date: Mon Dec 19 23:26:23 2016 +0100
sys/cdefs.h: add definition of __attribute_alloc_size__
Commit cee0b058fa0b4501b289a2da365182d60314d746 ("add aligned_alloc
required for latest gcc libstdc++") added the prototype of
aligned_alloc() to <stdlib.h>. This prototype contains
'__attribute_alloc_size__ ((2))', but this is not defined anywhere in
uClibc-ng.
This commit addresses that by adding the relevant definition in
<sys/cdefs.h>, borrowed from glibc.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni(a)free-electrons.com>
commit b39b5151b937c4d36ff293b62cee988378245fac
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Tue Dec 20 19:57:05 2016 +0100
add stub implementation for libintl/gettext
These adds the stubs from gettext-tiny 0.0.5
from here:
https://github.com/sabotage-linux/gettext-tiny
-----------------------------------------------------------------------
Summary of changes:
Makefile.in | 6 +-
Makerules | 8 +-
extra/Configs/Config.in | 32 +--
include/gnu-versions.h | 3 -
include/libintl.h | 61 +++++
include/obstack.h | 509 -----------------------------------
include/stdio.h | 16 --
include/sys/cdefs.h | 9 +
libc/Makefile.in | 2 +
libc/misc/gnu/Makefile | 13 -
libc/misc/gnu/Makefile.in | 24 --
libc/misc/gnu/obprintf.c | 29 --
libc/misc/gnu/obstack.c | 433 -----------------------------
libc/stdlib/malloc-simple/alloc.c | 6 -
libc/stdlib/malloc-standard/malloc.c | 7 -
libc/stdlib/malloc/malloc.c | 6 -
{libiconv => libintl}/Makefile | 0
libintl/Makefile.in | 30 +++
libintl/libintl.c | 82 ++++++
19 files changed, 200 insertions(+), 1076 deletions(-)
create mode 100644 include/libintl.h
delete mode 100644 include/obstack.h
delete mode 100644 libc/misc/gnu/Makefile
delete mode 100644 libc/misc/gnu/Makefile.in
delete mode 100644 libc/misc/gnu/obprintf.c
delete mode 100644 libc/misc/gnu/obstack.c
copy {libiconv => libintl}/Makefile (100%)
create mode 100644 libintl/Makefile.in
create mode 100644 libintl/libintl.c
diff --git a/Makefile.in b/Makefile.in
index 7542804..9acf76c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -39,6 +39,7 @@ include $(top_srcdir)librt/Makefile.in
include $(top_srcdir)libuargp/Makefile.in
include $(top_srcdir)libubacktrace/Makefile.in
include $(top_srcdir)libiconv/Makefile.in
+include $(top_srcdir)libintl/Makefile.in
# last included to catch all the objects added by others (locales/threads)
include $(top_srcdir)libc/Makefile.in
@@ -280,6 +281,7 @@ HEADERS_RM-$(UCLIBC_HAS_GETOPT_LONG) += getopt.h
HEADERS_RM-$(UCLIBC_HAS_IPV6) += netinet/ip6.h netinet/icmp6.h
HEADERS_RM-$(UCLIBC_HAS_BACKTRACE) += execinfo.h
HEADERS_RM-$(UCLIBC_HAS_LIBICONV) += iconv.h
+HEADERS_RM-$(UCLIBC_HAS_LIBINTL) += intl.h
HEADERS_RM-$(UCLIBC_HAS_LOCALE) += iconv.h bits/uClibc_ctype.h
HEADERS_RM-$(UCLIBC_HAS_PTY) += pty.h
HEADERS_RM-$(UCLIBC_HAS_REALTIME) += mqueue.h bits/mqueue.h sched.h \
@@ -294,7 +296,6 @@ HEADERS_RM-$(UCLIBC_HAS_THREADS) += *thread*.h semaphore.h \
bits/*thread*.h \
bits/initspin.h
HEADERS_RM-$(UCLIBC_HAS_THREADS_NATIVE) += atomic.h bits/atomic.h
-HEADERS_RM-$(UCLIBC_HAS_OBSTACK) += obstack.h
HEADERS_RM-$(UCLIBC_HAS_UTMP) += bits/utmp.h utmp.h
HEADERS_RM-$(UCLIBC_HAS_UTMPX) += bits/utmpx.h utmpx.h
HEADERS_RM-$(UCLIBC_HAS_WCHAR) += wchar.h wctype.h
@@ -380,6 +381,9 @@ endif
ifeq ($(UCLIBC_HAS_LIBICONV),y)
EMPTY_LIB_NAMES += iconv
endif
+ifeq ($(UCLIBC_HAS_LIBINTL),y)
+EMPTY_LIB_NAMES += intl
+endif
EMPTY_LIBS = $(EMPTY_LIB_NAMES:%=lib/lib%.a)
$(EMPTY_LIBS):
diff --git a/Makerules b/Makerules
index b5dc4b4..fd40e6c 100644
--- a/Makerules
+++ b/Makerules
@@ -47,17 +47,18 @@ $(eval $(call add_IS_IN_lib,libutil,$(libutil-a-y) $(libutil-so-y)))
$(eval $(call add_IS_IN_lib,libubacktrace,$(libubacktrace-a-y) $(libubacktrace-so-y)))
$(eval $(call add_IS_IN_lib,libuargp,$(libuargp-a-y) $(libuargp-so-y)))
$(eval $(call add_IS_IN_lib,libiconv,$(libiconv-a-y) $(libiconv-so-y)))
+$(eval $(call add_IS_IN_lib,libintl,$(libintl-a-y) $(libintl-so-y)))
shared_objs = $(libc-y:.o=.os) $(libc-shared-y) $(libc-nonshared-y) \
$(libcrypt-so-y) $(libdl-so-y) $(libm-so-y) \
$(libpthread-so-y) $(libpthread-nonshared-y) $(libthread_db-so-y) \
$(librt-so-y) $(ldso-y) $(libutil-so-y) $(libubacktrace-so-y) \
- $(libuargp-so-y) $(libiconv-so-y)
+ $(libuargp-so-y) $(libiconv-so-y) $(libintl-so-y)
ar_objs = $(libc-y) $(libc-static-y) $(libcrypt-a-y) \
$(libdl-a-y) $(libm-a-y) $(libpthread-a-y) $(libthread_db-a-y) \
$(librt-a-y) $(libutil-a-y) $(libubacktrace-a-y) $(libuargp-a-y) \
- $(libiconv-a-y)
+ $(libiconv-a-y) $(libintl-a-y)
ifeq ($(DOPIC),y)
ar_objs := $(ar_objs:.o=.os)
endif
@@ -480,7 +481,8 @@ files.dep := $(libc-a-y) $(libc-so-y) $(libc-nonshared-y) \
$(ldso-y) $(libdl-a-y) $(libdl-so-y) \
$(libubacktrace-a-y) $(libubacktrace-so-y) \
$(libuargp-so-y) $(libuargp-a-y) \
- $(libiconv-so-y) $(libiconv-a-y)
+ $(libiconv-so-y) $(libiconv-a-y) \
+ $(libintl-so-y) $(libintl-a-y)
.depends.dep := \
$(patsubst %.s,%.s.dep,$(filter %.s,$(files.dep))) \
$(patsubst %.o,%.o.dep,$(filter %.o,$(files.dep))) \
diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in
index 7c83d30..64ff513 100644
--- a/extra/Configs/Config.in
+++ b/extra/Configs/Config.in
@@ -610,32 +610,6 @@ config MALLOC_STANDARD
endchoice
-config MALLOC_GLIBC_COMPAT
- bool "Malloc returns live pointer for malloc(0)"
- help
- The behavior of malloc(0) is listed as implementation-defined by
- SuSv3. Glibc returns a valid pointer to something, while uClibc
- normally returns NULL. I personally feel glibc's behavior is
- not particularly safe, and allows buggy applications to hide very
- serious problems.
-
- When this option is enabled, uClibc will act just like glibc, and
- return a live pointer when someone calls malloc(0). This pointer
- provides a malloc'ed area with a size of 1 byte. This feature is
- mostly useful when dealing with applications using autoconf's broken
- AC_FUNC_MALLOC macro (which redefines malloc as rpl_malloc if it
- does not detect glibc style returning-a-valid-pointer-for-malloc(0)
- behavior). Most people can safely answer N.
-
-config UCLIBC_HAS_OBSTACK
- bool "Obstack Support (gnu extension)"
- help
- When this option is enabled, uClibc will provide support for obstacks.
- An obstack is a structure in which memory can be dynamically allocated
- as a 'stack of objects'. Many programs need this GNU extention and
- you should say Y if you are using any. Otherwise, say N to save some
- space.
-
config UCLIBC_DYNAMIC_ATEXIT
bool "Dynamic atexit() Support"
default y
@@ -1467,6 +1441,12 @@ config UCLIBC_HAS_LIBICONV
help
Add tiny iconv support for charset conversion from and to UTF-8.
+config UCLIBC_HAS_LIBINTL
+ bool "Intl stubs support"
+ help
+ If you enable this option you get stubs for the gettext family of
+ functions.
+
config UCLIBC_HAS_LOCALE
bool "Locale Support"
select UCLIBC_HAS_WCHAR
diff --git a/include/gnu-versions.h b/include/gnu-versions.h
index 6678c9b..0dd415e 100644
--- a/include/gnu-versions.h
+++ b/include/gnu-versions.h
@@ -43,9 +43,6 @@
remember, if any of these versions change, the libc.so major version
number must change too (so avoid it)! */
-#ifdef __UCLIBC_HAS_OBSTACK__
-#define _GNU_OBSTACK_INTERFACE_VERSION 1 /* vs malloc/obstack.c */
-#endif
#define _GNU_REGEX_INTERFACE_VERSION 1 /* vs posix/regex.c */
#ifdef __UCLIBC_HAS_GNU_GLOB__
#define _GNU_GLOB_INTERFACE_VERSION 1 /* vs posix/glob.c */
diff --git a/include/libintl.h b/include/libintl.h
new file mode 100644
index 0000000..b7123a9
--- /dev/null
+++ b/include/libintl.h
@@ -0,0 +1,61 @@
+#ifndef LIBINTL_H
+#define LIBINTL_H
+
+char *gettext(const char *msgid);
+char *dgettext(const char *domainname, const char *msgid);
+char *dcgettext(const char *domainname, const char *msgid, int category);
+char *ngettext(const char *msgid1, const char *msgid2, unsigned long n);
+char *dngettext(const char *domainname, const char *msgid1, const char *msgid2, unsigned long n);
+char *dcngettext(const char *domainname, const char *msgid1, const char *msgid2, unsigned long n, int category);
+
+char *textdomain(const char *domainname);
+char *bind_textdomain_codeset(const char *domainname, const char *codeset);
+char *bindtextdomain(const char *domainname, const char *dirname);
+
+#undef gettext_noop
+#define gettext_noop(X) X
+
+#ifndef LIBINTL_NO_MACROS
+/* if these macros are defined, configure checks will detect libintl as
+ * built into the libc because test programs will work without -lintl.
+ * for example:
+ * checking for ngettext in libc ... yes
+ * the consequence is that -lintl will not be added to the LDFLAGS.
+ * so if for some reason you want that libintl.a gets linked,
+ * add -DLIBINTL_NO_MACROS=1 to your CPPFLAGS. */
+
+#define gettext(X) ((char*) (X))
+#define dgettext(dom, X) ((void)(dom), (char*) (X))
+#define dcgettext(dom, X, cat) ((void)(dom), (void)(cat), (char*) (X))
+#define ngettext(X, Y, N) \
+ ((char*) (((N) == 1) ? ((void)(Y), (X)) : ((void)(X), (Y))))
+#define dngettext(dom, X, Y, N) \
+ ((dom), (char*) (((N) == 1) ? ((void)(Y), (X)) : ((void)(X), (Y))))
+#define dcngettext(dom, X, Y, N, cat) \
+ ((dom), (cat), (char*) (((N) == 1) ? ((void)(Y), (X)) : ((void)(X), (Y))))
+#define bindtextdomain(X, Y) ((void)(X), (void)(Y), (char*) "/")
+#define bind_textdomain_codeset(dom, codeset) \
+ ((void)(dom), (void)(codeset), (char*) 0)
+#define textdomain(X) ((void)(X), (char*) "messages")
+
+#undef ENABLE_NLS
+#undef DISABLE_NLS
+#define DISABLE_NLS 1
+
+#if __GNUC__ +0 > 3
+/* most ppl call bindtextdomain() without using its return value
+ thus we get tons of warnings about "statement with no effect" */
+#pragma GCC diagnostic ignored "-Wunused-value"
+#endif
+
+#endif
+
+#include <stdio.h>
+#define gettext_printf(args...) printf(args)
+
+/* to supply LC_MESSAGES and other stuff GNU expects to be exported when
+ including libintl.h */
+#include <locale.h>
+
+#endif
+
diff --git a/include/obstack.h b/include/obstack.h
deleted file mode 100644
index 8ef0b7a..0000000
--- a/include/obstack.h
+++ /dev/null
@@ -1,509 +0,0 @@
-/* obstack.h - object stack macros
- Copyright (C) 1988-1994,1996-1999,2003,2004,2005
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-/* Summary:
-
-All the apparent functions defined here are macros. The idea
-is that you would use these pre-tested macros to solve a
-very specific set of problems, and they would run fast.
-Caution: no side-effects in arguments please!! They may be
-evaluated MANY times!!
-
-These macros operate a stack of objects. Each object starts life
-small, and may grow to maturity. (Consider building a word syllable
-by syllable.) An object can move while it is growing. Once it has
-been "finished" it never changes address again. So the "top of the
-stack" is typically an immature growing object, while the rest of the
-stack is of mature, fixed size and fixed address objects.
-
-These routines grab large chunks of memory, using a function you
-supply, called `obstack_chunk_alloc'. On occasion, they free chunks,
-by calling `obstack_chunk_free'. You must define them and declare
-them before using any obstack macros.
-
-Each independent stack is represented by a `struct obstack'.
-Each of the obstack macros expects a pointer to such a structure
-as the first argument.
-
-One motivation for this package is the problem of growing char strings
-in symbol tables. Unless you are "fascist pig with a read-only mind"
---Gosper's immortal quote from HAKMEM item 154, out of context--you
-would not like to put any arbitrary upper limit on the length of your
-symbols.
-
-In practice this often means you will build many short symbols and a
-few long symbols. At the time you are reading a symbol you don't know
-how long it is. One traditional method is to read a symbol into a
-buffer, realloc()ating the buffer every time you try to read a symbol
-that is longer than the buffer. This is beaut, but you still will
-want to copy the symbol from the buffer to a more permanent
-symbol-table entry say about half the time.
-
-With obstacks, you can work differently. Use one obstack for all symbol
-names. As you read a symbol, grow the name in the obstack gradually.
-When the name is complete, finalize it. Then, if the symbol exists already,
-free the newly read name.
-
-The way we do this is to take a large chunk, allocating memory from
-low addresses. When you want to build a symbol in the chunk you just
-add chars above the current "high water mark" in the chunk. When you
-have finished adding chars, because you got to the end of the symbol,
-you know how long the chars are, and you can create a new object.
-Mostly the chars will not burst over the highest address of the chunk,
-because you would typically expect a chunk to be (say) 100 times as
-long as an average object.
-
-In case that isn't clear, when we have enough chars to make up
-the object, THEY ARE ALREADY CONTIGUOUS IN THE CHUNK (guaranteed)
-so we just point to it where it lies. No moving of chars is
-needed and this is the second win: potentially long strings need
-never be explicitly shuffled. Once an object is formed, it does not
-change its address during its lifetime.
-
-When the chars burst over a chunk boundary, we allocate a larger
-chunk, and then copy the partly formed object from the end of the old
-chunk to the beginning of the new larger chunk. We then carry on
-accreting characters to the end of the object as we normally would.
-
-A special macro is provided to add a single char at a time to a
-growing object. This allows the use of register variables, which
-break the ordinary 'growth' macro.
-
-Summary:
- We allocate large chunks.
- We carve out one object at a time from the current chunk.
- Once carved, an object never moves.
- We are free to append data of any size to the currently
- growing object.
- Exactly one object is growing in an obstack at any one time.
- You can run one obstack per control block.
- You may have as many control blocks as you dare.
- Because of the way we do it, you can `unwind' an obstack
- back to a previous state. (You may remove objects much
- as you would with a stack.)
-*/
-
-
-/* Don't do the contents of this file more than once. */
-
-#ifndef _OBSTACK_H
-#define _OBSTACK_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* We need the type of a pointer subtraction. If __PTRDIFF_TYPE__ is
- defined, as with GNU C, use that; that way we don't pollute the
- namespace with <stddef.h>'s symbols. Otherwise, include <stddef.h>
- and use ptrdiff_t. */
-
-#ifdef __PTRDIFF_TYPE__
-# define PTR_INT_TYPE __PTRDIFF_TYPE__
-#else
-# include <stddef.h>
-# define PTR_INT_TYPE ptrdiff_t
-#endif
-
-/* If B is the base of an object addressed by P, return the result of
- aligning P to the next multiple of A + 1. B and P must be of type
- char *. A + 1 must be a power of 2. */
-
-#define __BPTR_ALIGN(B, P, A) ((B) + (((P) - (B) + (A)) & ~(A)))
-
-/* Similiar to _BPTR_ALIGN (B, P, A), except optimize the common case
- where pointers can be converted to integers, aligned as integers,
- and converted back again. If PTR_INT_TYPE is narrower than a
- pointer (e.g., the AS/400), play it safe and compute the alignment
- relative to B. Otherwise, use the faster strategy of computing the
- alignment relative to 0. */
-
-#define __PTR_ALIGN(B, P, A) \
- __BPTR_ALIGN (sizeof (PTR_INT_TYPE) < sizeof (void *) ? (B) : (char *) 0, \
- P, A)
-
-#include <string.h>
-
-struct _obstack_chunk /* Lives at front of each chunk. */
-{
- char *limit; /* 1 past end of this chunk */
- struct _obstack_chunk *prev; /* address of prior chunk or NULL */
- char contents[4]; /* objects begin here */
-};
-
-struct obstack /* control current object in current chunk */
-{
- long chunk_size; /* preferred size to allocate chunks in */
- struct _obstack_chunk *chunk; /* address of current struct obstack_chunk */
- char *object_base; /* address of object we are building */
- char *next_free; /* where to add next char to current object */
- char *chunk_limit; /* address of char after current chunk */
- union
- {
- PTR_INT_TYPE tempint;
- void *tempptr;
- } temp; /* Temporary for some macros. */
- int alignment_mask; /* Mask of alignment for each object. */
- /* These prototypes vary based on `use_extra_arg', and we use
- casts to the prototypeless function type in all assignments,
- but having prototypes here quiets -Wstrict-prototypes. */
- struct _obstack_chunk *(*chunkfun) (void *, long);
- void (*freefun) (void *, struct _obstack_chunk *);
- void *extra_arg; /* first arg for chunk alloc/dealloc funcs */
- unsigned use_extra_arg:1; /* chunk alloc/dealloc funcs take extra arg */
- unsigned maybe_empty_object:1;/* There is a possibility that the current
- chunk contains a zero-length object. This
- prevents freeing the chunk if we allocate
- a bigger chunk to replace it. */
- unsigned alloc_failed:1; /* No longer used, as we now call the failed
- handler on error, but retained for binary
- compatibility. */
-};
-
-/* Declare the external functions we use; they are in obstack.c. */
-
-extern void _obstack_newchunk (struct obstack *, int);
-libc_hidden_proto(_obstack_newchunk)
-extern int _obstack_begin (struct obstack *, int, int,
- void *(*) (long), void (*) (void *));
-extern int _obstack_begin_1 (struct obstack *, int, int,
- void *(*) (void *, long),
- void (*) (void *, void *), void *);
-extern int _obstack_memory_used (struct obstack *);
-
-void obstack_free (struct obstack *obstack, void *block);
-
-
-/* Error handler called when `obstack_chunk_alloc' failed to allocate
- more memory. This can be set to a user defined function which
- should either abort gracefully or use longjump - but shouldn't
- return. The default action is to print a message and abort. */
-extern void (*obstack_alloc_failed_handler) (void);
-
-/* Exit value used when `print_and_abort' is used. */
-extern int obstack_exit_failure;
-
-/* Pointer to beginning of object being allocated or to be allocated next.
- Note that this might not be the final address of the object
- because a new chunk might be needed to hold the final size. */
-
-#define obstack_base(h) ((void *) (h)->object_base)
-
-/* Size for allocating ordinary chunks. */
-
-#define obstack_chunk_size(h) ((h)->chunk_size)
-
-/* Pointer to next byte not yet allocated in current chunk. */
-
-#define obstack_next_free(h) ((h)->next_free)
-
-/* Mask specifying low bits that should be clear in address of an object. */
-
-#define obstack_alignment_mask(h) ((h)->alignment_mask)
-
-/* To prevent prototype warnings provide complete argument list. */
-#define obstack_init(h) \
- _obstack_begin ((h), 0, 0, \
- (void *(*) (long)) obstack_chunk_alloc, \
- (void (*) (void *)) obstack_chunk_free)
-
-#define obstack_begin(h, size) \
- _obstack_begin ((h), (size), 0, \
- (void *(*) (long)) obstack_chunk_alloc, \
- (void (*) (void *)) obstack_chunk_free)
-
-#define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
- _obstack_begin ((h), (size), (alignment), \
- (void *(*) (long)) (chunkfun), \
- (void (*) (void *)) (freefun))
-
-#define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
- _obstack_begin_1 ((h), (size), (alignment), \
- (void *(*) (void *, long)) (chunkfun), \
- (void (*) (void *, void *)) (freefun), (arg))
-
-#define obstack_chunkfun(h, newchunkfun) \
- ((h) -> chunkfun = (struct _obstack_chunk *(*)(void *, long)) (newchunkfun))
-
-#define obstack_freefun(h, newfreefun) \
- ((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun))
-
-#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = (achar))
-
-#define obstack_blank_fast(h,n) ((h)->next_free += (n))
-
-#define obstack_memory_used(h) _obstack_memory_used (h)
-
-#if defined __GNUC__ && defined __STDC__ && __STDC__
-/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
- does not implement __extension__. But that compiler doesn't define
- __GNUC_MINOR__. */
-# if __GNUC__ < 2 || (defined __NeXT__ && __NeXT__ && !__GNUC_MINOR__)
-# define __extension__
-# endif
-
-/* For GNU C, if not -traditional,
- we can define these macros to compute all args only once
- without using a global variable.
- Also, we can avoid using the `temp' slot, to make faster code. */
-
-# define obstack_object_size(OBSTACK) \
- __extension__ \
- ({ struct obstack const *__o = (OBSTACK); \
- (unsigned) (__o->next_free - __o->object_base); })
-
-# define obstack_room(OBSTACK) \
- __extension__ \
- ({ struct obstack const *__o = (OBSTACK); \
- (unsigned) (__o->chunk_limit - __o->next_free); })
-
-# define obstack_make_room(OBSTACK,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->chunk_limit - __o->next_free < __len) \
- _obstack_newchunk (__o, __len); \
- (void) 0; })
-
-# define obstack_empty_p(OBSTACK) \
- __extension__ \
- ({ struct obstack const *__o = (OBSTACK); \
- (__o->chunk->prev == 0 \
- && __o->next_free == __PTR_ALIGN ((char *) __o->chunk, \
- __o->chunk->contents, \
- __o->alignment_mask)); })
-
-# define obstack_grow(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->next_free + __len > __o->chunk_limit) \
- _obstack_newchunk (__o, __len); \
- memcpy (__o->next_free, where, __len); \
- __o->next_free += __len; \
- (void) 0; })
-
-# define obstack_grow0(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->next_free + __len + 1 > __o->chunk_limit) \
- _obstack_newchunk (__o, __len + 1); \
- memcpy (__o->next_free, where, __len); \
- __o->next_free += __len; \
- *(__o->next_free)++ = 0; \
- (void) 0; })
-
-# define obstack_1grow(OBSTACK,datum) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- if (__o->next_free + 1 > __o->chunk_limit) \
- _obstack_newchunk (__o, 1); \
- obstack_1grow_fast (__o, datum); \
- (void) 0; })
-
-/* These assume that the obstack alignment is good enough for pointers
- or ints, and that the data added so far to the current object
- shares that much alignment. */
-
-# define obstack_ptr_grow(OBSTACK,datum) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- if (__o->next_free + sizeof (void *) > __o->chunk_limit) \
- _obstack_newchunk (__o, sizeof (void *)); \
- obstack_ptr_grow_fast (__o, datum); }) \
-
-# define obstack_int_grow(OBSTACK,datum) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- if (__o->next_free + sizeof (int) > __o->chunk_limit) \
- _obstack_newchunk (__o, sizeof (int)); \
- obstack_int_grow_fast (__o, datum); })
-
-# define obstack_ptr_grow_fast(OBSTACK,aptr) \
-__extension__ \
-({ struct obstack *__o1 = (OBSTACK); \
- *(const void **) __o1->next_free = (aptr); \
- __o1->next_free += sizeof (const void *); \
- (void) 0; })
-
-# define obstack_int_grow_fast(OBSTACK,aint) \
-__extension__ \
-({ struct obstack *__o1 = (OBSTACK); \
- *(int *) __o1->next_free = (aint); \
- __o1->next_free += sizeof (int); \
- (void) 0; })
-
-# define obstack_blank(OBSTACK,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->chunk_limit - __o->next_free < __len) \
- _obstack_newchunk (__o, __len); \
- obstack_blank_fast (__o, __len); \
- (void) 0; })
-
-# define obstack_alloc(OBSTACK,length) \
-__extension__ \
-({ struct obstack *__h = (OBSTACK); \
- obstack_blank (__h, (length)); \
- obstack_finish (__h); })
-
-# define obstack_copy(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__h = (OBSTACK); \
- obstack_grow (__h, (where), (length)); \
- obstack_finish (__h); })
-
-# define obstack_copy0(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__h = (OBSTACK); \
- obstack_grow0 (__h, (where), (length)); \
- obstack_finish (__h); })
-
-/* The local variable is named __o1 to avoid a name conflict
- when obstack_blank is called. */
-# define obstack_finish(OBSTACK) \
-__extension__ \
-({ struct obstack *__o1 = (OBSTACK); \
- void *__value = (void *) __o1->object_base; \
- if (__o1->next_free == __value) \
- __o1->maybe_empty_object = 1; \
- __o1->next_free \
- = __PTR_ALIGN (__o1->object_base, __o1->next_free, \
- __o1->alignment_mask); \
- if (__o1->next_free - (char *)__o1->chunk \
- > __o1->chunk_limit - (char *)__o1->chunk) \
- __o1->next_free = __o1->chunk_limit; \
- __o1->object_base = __o1->next_free; \
- __value; })
-
-# define obstack_free(OBSTACK, OBJ) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- void *__obj = (OBJ); \
- if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \
- __o->next_free = __o->object_base = (char *)__obj; \
- else (obstack_free) (__o, __obj); })
-
-#else /* not __GNUC__ or not __STDC__ */
-
-# define obstack_object_size(h) \
- (unsigned) ((h)->next_free - (h)->object_base)
-
-# define obstack_room(h) \
- (unsigned) ((h)->chunk_limit - (h)->next_free)
-
-# define obstack_empty_p(h) \
- ((h)->chunk->prev == 0 \
- && (h)->next_free == __PTR_ALIGN ((char *) (h)->chunk, \
- (h)->chunk->contents, \
- (h)->alignment_mask))
-
-/* Note that the call to _obstack_newchunk is enclosed in (..., 0)
- so that we can avoid having void expressions
- in the arms of the conditional expression.
- Casting the third operand to void was tried before,
- but some compilers won't accept it. */
-
-# define obstack_make_room(h,length) \
-( (h)->temp.tempint = (length), \
- (((h)->next_free + (h)->temp.tempint > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0))
-
-# define obstack_grow(h,where,length) \
-( (h)->temp.tempint = (length), \
- (((h)->next_free + (h)->temp.tempint > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0), \
- memcpy ((h)->next_free, where, (h)->temp.tempint), \
- (h)->next_free += (h)->temp.tempint)
-
-# define obstack_grow0(h,where,length) \
-( (h)->temp.tempint = (length), \
- (((h)->next_free + (h)->temp.tempint + 1 > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), (h)->temp.tempint + 1), 0) : 0), \
- memcpy ((h)->next_free, where, (h)->temp.tempint), \
- (h)->next_free += (h)->temp.tempint, \
- *((h)->next_free)++ = 0)
-
-# define obstack_1grow(h,datum) \
-( (((h)->next_free + 1 > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), 1), 0) : 0), \
- obstack_1grow_fast (h, datum))
-
-# define obstack_ptr_grow(h,datum) \
-( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \
- obstack_ptr_grow_fast (h, datum))
-
-# define obstack_int_grow(h,datum) \
-( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \
- obstack_int_grow_fast (h, datum))
-
-# define obstack_ptr_grow_fast(h,aptr) \
- (((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr))
-
-# define obstack_int_grow_fast(h,aint) \
- (((int *) ((h)->next_free += sizeof (int)))[-1] = (aint))
-
-# define obstack_blank(h,length) \
-( (h)->temp.tempint = (length), \
- (((h)->chunk_limit - (h)->next_free < (h)->temp.tempint) \
- ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0), \
- obstack_blank_fast (h, (h)->temp.tempint))
-
-# define obstack_alloc(h,length) \
- (obstack_blank ((h), (length)), obstack_finish ((h)))
-
-# define obstack_copy(h,where,length) \
- (obstack_grow ((h), (where), (length)), obstack_finish ((h)))
-
-# define obstack_copy0(h,where,length) \
- (obstack_grow0 ((h), (where), (length)), obstack_finish ((h)))
-
-# define obstack_finish(h) \
-( ((h)->next_free == (h)->object_base \
- ? (((h)->maybe_empty_object = 1), 0) \
- : 0), \
- (h)->temp.tempptr = (h)->object_base, \
- (h)->next_free \
- = __PTR_ALIGN ((h)->object_base, (h)->next_free, \
- (h)->alignment_mask), \
- (((h)->next_free - (char *) (h)->chunk \
- > (h)->chunk_limit - (char *) (h)->chunk) \
- ? ((h)->next_free = (h)->chunk_limit) : 0), \
- (h)->object_base = (h)->next_free, \
- (h)->temp.tempptr)
-
-# define obstack_free(h,obj) \
-( (h)->temp.tempint = (char *) (obj) - (char *) (h)->chunk, \
- ((((h)->temp.tempint > 0 \
- && (h)->temp.tempint < (h)->chunk_limit - (char *) (h)->chunk)) \
- ? (int) ((h)->next_free = (h)->object_base \
- = (h)->temp.tempint + (char *) (h)->chunk) \
- : (((obstack_free) ((h), (h)->temp.tempint + (char *) (h)->chunk), 0), 0)))
-
-#endif /* not __GNUC__ or not __STDC__ */
-
-#ifdef __cplusplus
-} /* C++ */
-#endif
-
-#endif /* obstack.h */
diff --git a/include/stdio.h b/include/stdio.h
index 9aae5ab..0915da9 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -860,22 +860,6 @@ extern char *ctermid (char *__s) __THROW;
extern char *cuserid (char *__s);
#endif /* Use X/Open, but not issue 6. */
-
-#if defined __USE_GNU && defined __UCLIBC_HAS_OBSTACK__
-struct obstack; /* See <obstack.h>. */
-
-/* Write formatted output to an obstack. */
-extern int obstack_printf (struct obstack *__restrict __obstack,
- const char *__restrict __format, ...)
- __THROWNL __attribute__ ((__format__ (__printf__, 2, 3)));
-extern int obstack_vprintf (struct obstack *__restrict __obstack,
- const char *__restrict __format,
- __gnuc_va_list __args)
- __THROWNL __attribute__ ((__format__ (__printf__, 2, 0)));
-libc_hidden_proto(obstack_vprintf)
-#endif /* USE_GNU && UCLIBC_HAS_OBSTACK. */
-
-
#if defined __USE_POSIX || defined __USE_MISC
/* These are defined in POSIX.1:1996. */
diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h
index f725ce9..6cd3811 100644
--- a/include/sys/cdefs.h
+++ b/include/sys/cdefs.h
@@ -222,6 +222,15 @@
# define __attribute_malloc__ /* Ignore */
#endif
+/* Tell the compiler which arguments to an allocation function
+ indicate the size of the allocation. */
+#if __GNUC_PREREQ (4, 3)
+# define __attribute_alloc_size__(params) \
+ __attribute__ ((__alloc_size__ params))
+#else
+# define __attribute_alloc_size__(params) /* Ignore. */
+#endif
+
/* At some point during the gcc 2.96 development the `pure' attribute
for functions was introduced. We don't want to use it unconditionally
(although this would be possible) since it generates warnings. */
diff --git a/libc/Makefile.in b/libc/Makefile.in
index 97added..31d0673 100644
--- a/libc/Makefile.in
+++ b/libc/Makefile.in
@@ -51,6 +51,7 @@ libc-a-$(UCLIBC_HAS_THREADS) += $(libpthread-a-y)
libc-a-$(UCLIBC_HAS_REALTIME) += $(librt-a-y)
libc-a-$(UCLIBC_HAS_BACKTRACE) += $(libubacktrace-a-y)
libc-a-$(UCLIBC_HAS_LIBICONV) += $(libiconv-a-y)
+libc-a-$(UCLIBC_HAS_LIBINTL) += $(libintl-a-y)
libc-so-y = $(libc-y:.o=.os) $(libc-shared-y)
@@ -63,6 +64,7 @@ libc-so-$(UCLIBC_HAS_THREADS) += $(libpthread-so-y)
libc-so-$(UCLIBC_HAS_REALTIME) += $(librt-so-y)
libc-so-$(UCLIBC_HAS_BACKTRACE) += $(libubacktrace-so-y)
libc-so-$(UCLIBC_HAS_LIBICONV) += $(libiconv-so-y)
+libc-so-$(UCLIBC_HAS_LIBINTL) += $(libintl-so-y)
lib-a-y += $(top_builddir)lib/libc.a
lib-gdb-y += $(top_builddir)lib/libc.gdb
diff --git a/libc/misc/gnu/Makefile b/libc/misc/gnu/Makefile
deleted file mode 100644
index 4a8f4a0..0000000
--- a/libc/misc/gnu/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-# Makefile for uClibc
-#
-# Copyright (C) 2000-2005 Erik Andersen <andersen(a)uclibc.org>
-#
-# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-#
-
-top_srcdir=../../../
-top_builddir=../../../
-all: objs
-include $(top_builddir)Rules.mak
-include Makefile.in
-include $(top_srcdir)Makerules
diff --git a/libc/misc/gnu/Makefile.in b/libc/misc/gnu/Makefile.in
deleted file mode 100644
index 99bf814..0000000
--- a/libc/misc/gnu/Makefile.in
+++ /dev/null
@@ -1,24 +0,0 @@
-# Makefile for uClibc
-#
-# Copyright (C) 2000-2008 Erik Andersen <andersen(a)uclibc.org>
-#
-# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-#
-
-subdirs += libc/misc/gnu
-
-CSRC-y :=
-CSRC-$(UCLIBC_HAS_OBSTACK) := obstack.c obprintf.c
-
-MISC_GNU_DIR := $(top_srcdir)libc/misc/gnu
-MISC_GNU_OUT := $(top_builddir)libc/misc/gnu
-
-MISC_GNU_SRC := $(patsubst %.c,$(MISC_GNU_DIR)/%.c,$(CSRC-y))
-MISC_GNU_OBJ := $(patsubst %.c,$(MISC_GNU_OUT)/%.o,$(CSRC-y))
-
-libc-y += $(MISC_GNU_OBJ)
-
-objclean-y += CLEAN_libc/misc/gnu
-
-CLEAN_libc/misc/gnu:
- $(do_rm) $(addprefix $(MISC_GNU_OUT)/*., o os)
diff --git a/libc/misc/gnu/obprintf.c b/libc/misc/gnu/obprintf.c
deleted file mode 100644
index 3f8eda8..0000000
--- a/libc/misc/gnu/obprintf.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright (C) 2013 Gentoo Foundation
- * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- */
-
-#include <stdio.h>
-#include <stdarg.h>
-#include <obstack.h>
-
-int
-obstack_vprintf (struct obstack *obstack, const char *format, va_list args)
-{
- int n;
- char *s;
- n = vasprintf(&s, format, args);
- obstack_grow(obstack, s, n);
- return n;
-}
-libc_hidden_def(obstack_vprintf)
-
-int
-obstack_printf (struct obstack *obstack, const char *format, ...)
-{
- int n;
- va_list ap;
- va_start (ap, format);
- n = obstack_vprintf (obstack, format, ap);
- va_end (ap);
- return n;
-}
diff --git a/libc/misc/gnu/obstack.c b/libc/misc/gnu/obstack.c
deleted file mode 100644
index 75f6d0b..0000000
--- a/libc/misc/gnu/obstack.c
+++ /dev/null
@@ -1,433 +0,0 @@
-/* obstack.c - subroutines used implicitly by object stack macros
- Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifdef _LIBC
-# include <obstack.h>
-#ifndef __UCLIBC__
-# include <shlib-compat.h>
-#else
-# define HAVE_INTTYPES_H 1
-# define HAVE_STDINT_H 1
-#endif
-#else
-# include "obstack.h"
-#endif
-
-/* NOTE BEFORE MODIFYING THIS FILE: This version number must be
- incremented whenever callers compiled using an old obstack.h can no
- longer properly call the functions in this obstack.c. */
-#define OBSTACK_INTERFACE_VERSION 1
-
-/* Comment out all this code if we are using the GNU C Library, and are not
- actually compiling the library itself, and the installed library
- supports the same library interface we do. This code is part of the GNU
- C Library, but also included in many other GNU distributions. Compiling
- and linking in this code is a waste when using the GNU C library
- (especially if it is a shared library). Rather than having every GNU
- program understand `configure --with-gnu-libc' and omit the object
- files, it is simpler to just do this in the source for each such file. */
-
-#include <stdio.h> /* Random thing to get __GNU_LIBRARY__. */
-#if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
-# include <gnu-versions.h>
-# if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
-# define ELIDE_CODE
-# endif
-#endif
-
-#include <stddef.h>
-
-#ifndef ELIDE_CODE
-
-
-# if HAVE_INTTYPES_H
-# include <inttypes.h>
-# endif
-# if HAVE_STDINT_H || defined _LIBC
-# include <stdint.h>
-# endif
-
-/* Determine default alignment. */
-union fooround
-{
- uintmax_t i;
- long double d;
- void *p;
-};
-struct fooalign
-{
- char c;
- union fooround u;
-};
-/* If malloc were really smart, it would round addresses to DEFAULT_ALIGNMENT.
- But in fact it might be less smart and round addresses to as much as
- DEFAULT_ROUNDING. So we prepare for it to do that. */
-enum
- {
- DEFAULT_ALIGNMENT = offsetof (struct fooalign, u),
- DEFAULT_ROUNDING = sizeof (union fooround)
- };
-
-/* When we copy a long block of data, this is the unit to do it with.
- On some machines, copying successive ints does not work;
- in such a case, redefine COPYING_UNIT to `long' (if that works)
- or `char' as a last resort. */
-# ifndef COPYING_UNIT
-# define COPYING_UNIT int
-# endif
-
-
-/* The functions allocating more room by calling `obstack_chunk_alloc'
- jump to the handler pointed to by `obstack_alloc_failed_handler'.
- This can be set to a user defined function which should either
- abort gracefully or use longjump - but shouldn't return. This
- variable by default points to the internal function
- `print_and_abort'. */
-static void print_and_abort (void);
-static void (*__obstack_alloc_failed_handler) (void) = print_and_abort;
-strong_alias(__obstack_alloc_failed_handler,obstack_alloc_failed_handler)
-
-/* Exit value used when `print_and_abort' is used. */
-# include <stdlib.h>
-# ifdef _LIBC
-static int __obstack_exit_failure = EXIT_FAILURE;
-strong_alias(__obstack_exit_failure,obstack_exit_failure)
-# else
-# include "exitfail.h"
-# define __obstack_exit_failure exit_failure
-# endif
-
-# if 0
-# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4)
-/* A looong time ago (before 1994, anyway; we're not sure) this global variable
- was used by non-GNU-C macros to avoid multiple evaluation. The GNU C
- library still exports it because somebody might use it. */
-struct obstack *_obstack_compat;
-compat_symbol (libc, _obstack_compat, _obstack, GLIBC_2_0);
-# endif
-# endif
-
-/* Define a macro that either calls functions with the traditional malloc/free
- calling interface, or calls functions with the mmalloc/mfree interface
- (that adds an extra first argument), based on the state of use_extra_arg.
- For free, do not use ?:, since some compilers, like the MIPS compilers,
- do not allow (expr) ? void : void. */
-
-# define CALL_CHUNKFUN(h, size) \
- (((h) -> use_extra_arg) \
- ? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
- : (*(struct _obstack_chunk *(*) (long)) (h)->chunkfun) ((size)))
-
-# define CALL_FREEFUN(h, old_chunk) \
- do { \
- if ((h) -> use_extra_arg) \
- (*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
- else \
- (*(void (*) (void *)) (h)->freefun) ((old_chunk)); \
- } while (0)
-
-
-/* Initialize an obstack H for use. Specify chunk size SIZE (0 means default).
- Objects start on multiples of ALIGNMENT (0 means use default).
- CHUNKFUN is the function to use to allocate chunks,
- and FREEFUN the function to free them.
-
- Return nonzero if successful, calls obstack_alloc_failed_handler if
- allocation fails. */
-
-int
-_obstack_begin (struct obstack *h,
- int size, int alignment,
- void *(*chunkfun) (long),
- void (*freefun) (void *))
-{
- register struct _obstack_chunk *chunk; /* points to new chunk */
-
- if (alignment == 0)
- alignment = DEFAULT_ALIGNMENT;
- if (size == 0)
- /* Default size is what GNU malloc can fit in a 4096-byte block. */
- {
- /* 12 is sizeof (mhead) and 4 is EXTRA from GNU malloc.
- Use the values for range checking, because if range checking is off,
- the extra bytes won't be missed terribly, but if range checking is on
- and we used a larger request, a whole extra 4096 bytes would be
- allocated.
-
- These number are irrelevant to the new GNU malloc. I suspect it is
- less sensitive to the size of the request. */
- int extra = ((((12 + DEFAULT_ROUNDING - 1) & ~(DEFAULT_ROUNDING - 1))
- + 4 + DEFAULT_ROUNDING - 1)
- & ~(DEFAULT_ROUNDING - 1));
- size = 4096 - extra;
- }
-
- h->chunkfun = (struct _obstack_chunk * (*)(void *, long)) chunkfun;
- h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
- h->chunk_size = size;
- h->alignment_mask = alignment - 1;
- h->use_extra_arg = 0;
-
- chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size);
- if (!chunk)
- (*__obstack_alloc_failed_handler) ();
- h->next_free = h->object_base = __PTR_ALIGN ((char *) chunk, chunk->contents,
- alignment - 1);
- h->chunk_limit = chunk->limit
- = (char *) chunk + h->chunk_size;
- chunk->prev = 0;
- /* The initial chunk now contains no empty object. */
- h->maybe_empty_object = 0;
- h->alloc_failed = 0;
- return 1;
-}
-
-int
-_obstack_begin_1 (struct obstack *h, int size, int alignment,
- void *(*chunkfun) (void *, long),
- void (*freefun) (void *, void *),
- void *arg)
-{
- register struct _obstack_chunk *chunk; /* points to new chunk */
-
- if (alignment == 0)
- alignment = DEFAULT_ALIGNMENT;
- if (size == 0)
- /* Default size is what GNU malloc can fit in a 4096-byte block. */
- {
- /* 12 is sizeof (mhead) and 4 is EXTRA from GNU malloc.
- Use the values for range checking, because if range checking is off,
- the extra bytes won't be missed terribly, but if range checking is on
- and we used a larger request, a whole extra 4096 bytes would be
- allocated.
-
- These number are irrelevant to the new GNU malloc. I suspect it is
- less sensitive to the size of the request. */
- int extra = ((((12 + DEFAULT_ROUNDING - 1) & ~(DEFAULT_ROUNDING - 1))
- + 4 + DEFAULT_ROUNDING - 1)
- & ~(DEFAULT_ROUNDING - 1));
- size = 4096 - extra;
- }
-
- h->chunkfun = (struct _obstack_chunk * (*)(void *,long)) chunkfun;
- h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
- h->chunk_size = size;
- h->alignment_mask = alignment - 1;
- h->extra_arg = arg;
- h->use_extra_arg = 1;
-
- chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size);
- if (!chunk)
- (*__obstack_alloc_failed_handler) ();
- h->next_free = h->object_base = __PTR_ALIGN ((char *) chunk, chunk->contents,
- alignment - 1);
- h->chunk_limit = chunk->limit
- = (char *) chunk + h->chunk_size;
- chunk->prev = 0;
- /* The initial chunk now contains no empty object. */
- h->maybe_empty_object = 0;
- h->alloc_failed = 0;
- return 1;
-}
-
-/* Allocate a new current chunk for the obstack *H
- on the assumption that LENGTH bytes need to be added
- to the current object, or a new object of length LENGTH allocated.
- Copies any partial object from the end of the old chunk
- to the beginning of the new one. */
-
-void
-_obstack_newchunk (struct obstack *h, int length)
-{
- register struct _obstack_chunk *old_chunk = h->chunk;
- register struct _obstack_chunk *new_chunk;
- register long new_size;
- register long obj_size = h->next_free - h->object_base;
- register long i;
- long already;
- char *object_base;
-
- /* Compute size for new chunk. */
- new_size = (obj_size + length) + (obj_size >> 3) + h->alignment_mask + 100;
- if (new_size < h->chunk_size)
- new_size = h->chunk_size;
-
- /* Allocate and initialize the new chunk. */
- new_chunk = CALL_CHUNKFUN (h, new_size);
- if (!new_chunk)
- (*__obstack_alloc_failed_handler) ();
- h->chunk = new_chunk;
- new_chunk->prev = old_chunk;
- new_chunk->limit = h->chunk_limit = (char *) new_chunk + new_size;
-
- /* Compute an aligned object_base in the new chunk */
- object_base =
- __PTR_ALIGN ((char *) new_chunk, new_chunk->contents, h->alignment_mask);
-
- /* Move the existing object to the new chunk.
- Word at a time is fast and is safe if the object
- is sufficiently aligned. */
- if (h->alignment_mask + 1 >= DEFAULT_ALIGNMENT)
- {
- for (i = obj_size / sizeof (COPYING_UNIT) - 1;
- i >= 0; i--)
- ((COPYING_UNIT *)object_base)[i]
- = ((COPYING_UNIT *)h->object_base)[i];
- /* We used to copy the odd few remaining bytes as one extra COPYING_UNIT,
- but that can cross a page boundary on a machine
- which does not do strict alignment for COPYING_UNITS. */
- already = obj_size / sizeof (COPYING_UNIT) * sizeof (COPYING_UNIT);
- }
- else
- already = 0;
- /* Copy remaining bytes one by one. */
- for (i = already; i < obj_size; i++)
- object_base[i] = h->object_base[i];
-
- /* If the object just copied was the only data in OLD_CHUNK,
- free that chunk and remove it from the chain.
- But not if that chunk might contain an empty object. */
- if (! h->maybe_empty_object
- && (h->object_base
- == __PTR_ALIGN ((char *) old_chunk, old_chunk->contents,
- h->alignment_mask)))
- {
- new_chunk->prev = old_chunk->prev;
- CALL_FREEFUN (h, old_chunk);
- }
-
- h->object_base = object_base;
- h->next_free = h->object_base + obj_size;
- /* The new chunk certainly contains no empty object yet. */
- h->maybe_empty_object = 0;
-}
-libc_hidden_def(_obstack_newchunk)
-
-/* Return nonzero if object OBJ has been allocated from obstack H.
- This is here for debugging.
- If you use it in a program, you are probably losing. */
-
-/* Suppress -Wmissing-prototypes warning. We don't want to declare this in
- obstack.h because it is just for debugging. */
-int _obstack_allocated_p (struct obstack *h, void *obj);
-
-int
-_obstack_allocated_p (struct obstack *h, void *obj)
-{
- register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
- register struct _obstack_chunk *plp; /* point to previous chunk if any */
-
- lp = (h)->chunk;
- /* We use >= rather than > since the object cannot be exactly at
- the beginning of the chunk but might be an empty object exactly
- at the end of an adjacent chunk. */
- while (lp != 0 && ((void *) lp >= obj || (void *) (lp)->limit < obj))
- {
- plp = lp->prev;
- lp = plp;
- }
- return lp != 0;
-}
-
-/* Free objects in obstack H, including OBJ and everything allocate
- more recently than OBJ. If OBJ is zero, free everything in H. */
-
-# undef obstack_free
-
-void
-obstack_free (struct obstack *h, void *obj)
-{
- register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
- register struct _obstack_chunk *plp; /* point to previous chunk if any */
-
- lp = h->chunk;
- /* We use >= because there cannot be an object at the beginning of a chunk.
- But there can be an empty object at that address
- at the end of another chunk. */
- while (lp != 0 && ((void *) lp >= obj || (void *) (lp)->limit < obj))
- {
- plp = lp->prev;
- CALL_FREEFUN (h, lp);
- lp = plp;
- /* If we switch chunks, we can't tell whether the new current
- chunk contains an empty object, so assume that it may. */
- h->maybe_empty_object = 1;
- }
- if (lp)
- {
- h->object_base = h->next_free = (char *) (obj);
- h->chunk_limit = lp->limit;
- h->chunk = lp;
- }
- else if (obj != 0)
- /* obj is not in any of the chunks! */
- abort ();
-}
-
-/* Older versions of libc used a function _obstack_free intended to be
- called by non-GCC compilers. */
-strong_alias (obstack_free, _obstack_free)
-
-int
-_obstack_memory_used (struct obstack *h)
-{
- register struct _obstack_chunk* lp;
- register int nbytes = 0;
-
- for (lp = h->chunk; lp != 0; lp = lp->prev)
- {
- nbytes += lp->limit - (char *) lp;
- }
- return nbytes;
-}
-
-# if defined _LIBC && !defined __UCLIBC__
-# include <libio/iolibio.h>
-# endif
-
-# ifndef __attribute__
-/* This feature is available in gcc versions 2.5 and later. */
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
-# define __attribute__(Spec) /* empty */
-# endif
-# endif
-
-static void
-attribute_noreturn
-print_and_abort (void)
-{
- /* Don't change any of these strings. Yes, it would be possible to add
- the newline to the string and use fputs or so. But this must not
- happen because the "memory exhausted" message appears in other places
- like this and the translation should be reused instead of creating
- a very similar string which requires a separate translation. */
-# if defined _LIBC && !defined __UCLIBC__
- (void) __fxprintf (NULL, "%s\n", "memory exhausted");
-# else
- fprintf (stderr, "%s\n", "memory exhausted");
-# endif
- exit (__obstack_exit_failure);
-}
-
-#endif /* !ELIDE_CODE */
diff --git a/libc/stdlib/malloc-simple/alloc.c b/libc/stdlib/malloc-simple/alloc.c
index a3c068a..3baf75f 100644
--- a/libc/stdlib/malloc-simple/alloc.c
+++ b/libc/stdlib/malloc-simple/alloc.c
@@ -25,13 +25,7 @@ void *malloc(size_t size)
void *result;
if (unlikely(size == 0)) {
-#if defined(__MALLOC_GLIBC_COMPAT__)
size++;
-#else
- /* Some programs will call malloc (0). Lets be strict and return NULL */
- __set_errno(ENOMEM);
- return NULL;
-#endif
}
#ifdef __ARCH_USE_MMU__
diff --git a/libc/stdlib/malloc-standard/malloc.c b/libc/stdlib/malloc-standard/malloc.c
index fd33b50..309f528 100644
--- a/libc/stdlib/malloc-standard/malloc.c
+++ b/libc/stdlib/malloc-standard/malloc.c
@@ -825,13 +825,6 @@ void* malloc(size_t bytes)
void * sysmem;
void * retval;
-#if !defined(__MALLOC_GLIBC_COMPAT__)
- if (!bytes) {
- __set_errno(ENOMEM);
- return NULL;
- }
-#endif
-
/*
Convert request size to internal form by adding (sizeof(size_t)) bytes
overhead plus possibly more to obtain necessary alignment and/or
diff --git a/libc/stdlib/malloc/malloc.c b/libc/stdlib/malloc/malloc.c
index f6bf10a..8d8ac7f 100644
--- a/libc/stdlib/malloc/malloc.c
+++ b/libc/stdlib/malloc/malloc.c
@@ -208,14 +208,8 @@ malloc (size_t size)
__heap_check (__malloc_heap, "malloc");
#endif
-#ifdef __MALLOC_GLIBC_COMPAT__
if (unlikely (size == 0))
size++;
-#else
- /* Some programs will call malloc (0). Lets be strict and return NULL */
- if (unlikely (size == 0))
- goto oom;
-#endif
/* Check if they are doing something dumb like malloc(-1) */
if (unlikely(((unsigned long)size > (unsigned long)(MALLOC_HEADER_SIZE*-2))))
diff --git a/libiconv/Makefile b/libintl/Makefile
similarity index 100%
copy from libiconv/Makefile
copy to libintl/Makefile
diff --git a/libintl/Makefile.in b/libintl/Makefile.in
new file mode 100644
index 0000000..445a758
--- /dev/null
+++ b/libintl/Makefile.in
@@ -0,0 +1,30 @@
+# Makefile for uClibc-ng
+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+
+subdirs += libintl
+
+CFLAGS-libintl := -DNOT_IN_libc -DIS_IN_libintl $(SSP_ALL_CFLAGS)
+
+libintl_DIR := $(top_srcdir)libintl
+libintl_OUT := $(top_builddir)libintl
+
+libintl_SRC-$(UCLIBC_HAS_LIBINTL) := libintl.c
+
+libintl_SRC := $(addprefix $(libintl_DIR)/,$(libintl_SRC-y))
+libintl_OBJ := $(patsubst $(libintl_DIR)/%.c,$(libintl_OUT)/%.o,$(libintl_SRC))
+
+ifeq ($(DOPIC),y)
+libintl-a-y := $(libintl_OBJ:.o=.os)
+else
+libintl-a-y := $(libintl_OBJ)
+endif
+libintl-so-y := $(libintl_OBJ:.o=.os)
+
+objclean-y += CLEAN_libintl
+
+$(libintl_OUT)/libintl.oS: $(libintl_SRC)
+ $(Q)$(RM) $@
+ $(compile-m)
+
+CLEAN_libintl:
+ $(do_rm) $(addprefix $(libintl_OUT)/*., o os oS a)
diff --git a/libintl/libintl.c b/libintl/libintl.c
new file mode 100644
index 0000000..0851fac
--- /dev/null
+++ b/libintl/libintl.c
@@ -0,0 +1,82 @@
+/* Copyright (C) 2003 Manuel Novoa III
+ * Copyright (C) 2000-2006 Erik Andersen <andersen(a)uclibc.org>
+ *
+ * Trivial Stubs, Public Domain.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+
+char *gettext(const char *msgid)
+{
+ return (char *) msgid;
+}
+
+char *dgettext(const char *domainname, const char *msgid)
+{
+ (void) domainname;
+ return (char *) msgid;
+}
+
+char *dcgettext(const char *domainname, const char *msgid, int category)
+{
+ (void) domainname;
+ (void) category;
+ return (char *) msgid;
+}
+
+char *ngettext(const char *msgid1, const char *msgid2, unsigned long n)
+{
+ return (char *) ((n == 1) ? msgid1 : msgid2);
+}
+
+char *dngettext(const char *domainname, const char *msgid1, const char *msgid2, unsigned long n)
+{
+ (void) domainname;
+ return (char *) ((n == 1) ? msgid1 : msgid2);
+}
+
+char *dcngettext(const char *domainname, const char *msgid1, const char *msgid2, unsigned long n, int category)
+{
+ (void) domainname;
+ (void) category;
+ return (char *) ((n == 1) ? msgid1 : msgid2);
+}
+
+char *textdomain(const char *domainname)
+{
+ static const char default_str[] = "messages";
+
+ if (domainname && *domainname && strcmp(domainname, default_str)) {
+ errno = EINVAL;
+ return NULL;
+ }
+ return (char *) default_str;
+}
+
+char *bindtextdomain(const char *domainname, const char *dirname)
+{
+ static const char dir[] = "/";
+
+ if (!domainname || !*domainname
+ || (dirname && ((dirname[0] != '/') || dirname[1]))
+ ) {
+ errno = EINVAL;
+ return NULL;
+ }
+
+ return (char *) dir;
+}
+
+char *bind_textdomain_codeset(const char *domainname, const char *codeset)
+{
+ if (!domainname || !*domainname || (codeset && strcasecmp(codeset, "UTF-8"))) {
+ errno = EINVAL;
+ }
+ return NULL;
+}
+
+/* trick configure tests checking for gnu libintl, as in the copy included in gdb */
+const char *_nl_expand_alias () { return NULL; }
+int _nl_msg_cat_cntr = 0;
hooks/post-receive
--
uClibc-ng - small C library for embedded systems
1
0

19 Dec '16
Commit cee0b058fa0b4501b289a2da365182d60314d746 ("add aligned_alloc
required for latest gcc libstdc++") added the prototype of
aligned_alloc() to <stdlib.h>. This prototype contains
'__attribute_alloc_size__ ((2))', but this is not defined anywhere in
uClibc-ng.
This commit addresses that by adding the relevant definition in
<sys/cdefs.h>, borrowed from glibc.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni(a)free-electrons.com>
---
include/sys/cdefs.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h
index f725ce9..6cd3811 100644
--- a/include/sys/cdefs.h
+++ b/include/sys/cdefs.h
@@ -222,6 +222,15 @@
# define __attribute_malloc__ /* Ignore */
#endif
+/* Tell the compiler which arguments to an allocation function
+ indicate the size of the allocation. */
+#if __GNUC_PREREQ (4, 3)
+# define __attribute_alloc_size__(params) \
+ __attribute__ ((__alloc_size__ params))
+#else
+# define __attribute_alloc_size__(params) /* Ignore. */
+#endif
+
/* At some point during the gcc 2.96 development the `pure' attribute
for functions was introduced. We don't want to use it unconditionally
(although this would be possible) since it generates warnings. */
--
2.7.4
1
0

uClibc-ng - small C library for embedded systems branch master updated. v1.0.20-8-g4fa7ed9
by wbx@helium.openadk.org 18 Dec '16
by wbx@helium.openadk.org 18 Dec '16
18 Dec '16
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, master has been updated
via 4fa7ed9388f3ca81d97cad2099a6f9fa9f8098de (commit)
from 5ca03df6978345c297225212cc0ca33d476b0272 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 4fa7ed9388f3ca81d97cad2099a6f9fa9f8098de
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Sun Dec 11 16:56:19 2016 +0100
add libiconv-tiny implementation
To use it enable UCLIBC_HAS_LIBICONV, then iconv_open/iconv_close
should be available.
-----------------------------------------------------------------------
Summary of changes:
Makefile.in | 5 +
Makerules | 14 +-
extra/Configs/Config.in | 5 +
include/iconv.h | 65 ++---
libc/Makefile.in | 2 +
libiconv/COPYRIGHT | 19 ++
{libm => libiconv}/Makefile | 6 +-
libiconv/Makefile.in | 31 +++
libiconv/iconv.c | 440 +++++++++++++++++++++++++++++++
libiconv/include/charmaps.h | 80 ++++++
libiconv/include/charmaps/iso-8859-10.h | 24 ++
libiconv/include/charmaps/iso-8859-13.h | 24 ++
libiconv/include/charmaps/iso-8859-14.h | 25 ++
libiconv/include/charmaps/iso-8859-16.h | 24 ++
libiconv/include/charmaps/iso-8859-2.h | 24 ++
libiconv/include/charmaps/iso-8859-3.h | 24 ++
libiconv/include/charmaps/iso-8859-4.h | 24 ++
libiconv/include/charmaps/iso-8859-5.h | 24 ++
libiconv/include/charmaps/iso-8859-6.h | 24 ++
libiconv/include/charmaps/iso-8859-7.h | 24 ++
libiconv/include/charmaps/iso-8859-8.h | 24 ++
libiconv/include/charmaps/iso-8859-9.h | 24 ++
libiconv/include/charmaps/koi8-r.h | 24 ++
libiconv/include/charmaps/windows-1250.h | 24 ++
libiconv/include/charmaps/windows-1251.h | 24 ++
libiconv/include/charmaps/windows-1252.h | 25 ++
libiconv/include/charmaps/windows-1253.h | 24 ++
libiconv/include/charmaps/windows-1254.h | 24 ++
libiconv/include/charmaps/windows-1255.h | 24 ++
libiconv/include/charmaps/windows-1256.h | 24 ++
libiconv/include/charmaps/windows-1257.h | 24 ++
libiconv/include/charmaps/windows-1258.h | 24 ++
libiconv/include/charmaps/windows-874.h | 24 ++
libiconv/m4/iconv.m4 | 214 +++++++++++++++
34 files changed, 1380 insertions(+), 55 deletions(-)
create mode 100644 libiconv/COPYRIGHT
copy {libm => libiconv}/Makefile (69%)
create mode 100644 libiconv/Makefile.in
create mode 100644 libiconv/iconv.c
create mode 100644 libiconv/include/charmaps.h
create mode 100644 libiconv/include/charmaps/iso-8859-10.h
create mode 100644 libiconv/include/charmaps/iso-8859-13.h
create mode 100644 libiconv/include/charmaps/iso-8859-14.h
create mode 100644 libiconv/include/charmaps/iso-8859-16.h
create mode 100644 libiconv/include/charmaps/iso-8859-2.h
create mode 100644 libiconv/include/charmaps/iso-8859-3.h
create mode 100644 libiconv/include/charmaps/iso-8859-4.h
create mode 100644 libiconv/include/charmaps/iso-8859-5.h
create mode 100644 libiconv/include/charmaps/iso-8859-6.h
create mode 100644 libiconv/include/charmaps/iso-8859-7.h
create mode 100644 libiconv/include/charmaps/iso-8859-8.h
create mode 100644 libiconv/include/charmaps/iso-8859-9.h
create mode 100644 libiconv/include/charmaps/koi8-r.h
create mode 100644 libiconv/include/charmaps/windows-1250.h
create mode 100644 libiconv/include/charmaps/windows-1251.h
create mode 100644 libiconv/include/charmaps/windows-1252.h
create mode 100644 libiconv/include/charmaps/windows-1253.h
create mode 100644 libiconv/include/charmaps/windows-1254.h
create mode 100644 libiconv/include/charmaps/windows-1255.h
create mode 100644 libiconv/include/charmaps/windows-1256.h
create mode 100644 libiconv/include/charmaps/windows-1257.h
create mode 100644 libiconv/include/charmaps/windows-1258.h
create mode 100644 libiconv/include/charmaps/windows-874.h
create mode 100644 libiconv/m4/iconv.m4
diff --git a/Makefile.in b/Makefile.in
index c590979..7542804 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -38,6 +38,7 @@ include $(top_srcdir)libpthread/Makefile.in
include $(top_srcdir)librt/Makefile.in
include $(top_srcdir)libuargp/Makefile.in
include $(top_srcdir)libubacktrace/Makefile.in
+include $(top_srcdir)libiconv/Makefile.in
# last included to catch all the objects added by others (locales/threads)
include $(top_srcdir)libc/Makefile.in
@@ -278,6 +279,7 @@ HEADERS_RM-$(UCLIBC_HAS_GNU_ERROR) += error.h
HEADERS_RM-$(UCLIBC_HAS_GETOPT_LONG) += getopt.h
HEADERS_RM-$(UCLIBC_HAS_IPV6) += netinet/ip6.h netinet/icmp6.h
HEADERS_RM-$(UCLIBC_HAS_BACKTRACE) += execinfo.h
+HEADERS_RM-$(UCLIBC_HAS_LIBICONV) += iconv.h
HEADERS_RM-$(UCLIBC_HAS_LOCALE) += iconv.h bits/uClibc_ctype.h
HEADERS_RM-$(UCLIBC_HAS_PTY) += pty.h
HEADERS_RM-$(UCLIBC_HAS_REALTIME) += mqueue.h bits/mqueue.h sched.h \
@@ -375,6 +377,9 @@ endif
ifeq ($(UCLIBC_HAS_LIBUTIL),y)
EMPTY_LIB_NAMES += util
endif
+ifeq ($(UCLIBC_HAS_LIBICONV),y)
+EMPTY_LIB_NAMES += iconv
+endif
EMPTY_LIBS = $(EMPTY_LIB_NAMES:%=lib/lib%.a)
$(EMPTY_LIBS):
diff --git a/Makerules b/Makerules
index d708600..b5dc4b4 100644
--- a/Makerules
+++ b/Makerules
@@ -46,15 +46,18 @@ $(eval $(call add_IS_IN_lib,librt,$(librt-a-y) $(librt-so-y)))
$(eval $(call add_IS_IN_lib,libutil,$(libutil-a-y) $(libutil-so-y)))
$(eval $(call add_IS_IN_lib,libubacktrace,$(libubacktrace-a-y) $(libubacktrace-so-y)))
$(eval $(call add_IS_IN_lib,libuargp,$(libuargp-a-y) $(libuargp-so-y)))
+$(eval $(call add_IS_IN_lib,libiconv,$(libiconv-a-y) $(libiconv-so-y)))
shared_objs = $(libc-y:.o=.os) $(libc-shared-y) $(libc-nonshared-y) \
$(libcrypt-so-y) $(libdl-so-y) $(libm-so-y) \
$(libpthread-so-y) $(libpthread-nonshared-y) $(libthread_db-so-y) \
- $(librt-so-y) $(ldso-y) $(libutil-so-y) $(libubacktrace-so-y) $(libuargp-so-y)
+ $(librt-so-y) $(ldso-y) $(libutil-so-y) $(libubacktrace-so-y) \
+ $(libuargp-so-y) $(libiconv-so-y)
ar_objs = $(libc-y) $(libc-static-y) $(libcrypt-a-y) \
$(libdl-a-y) $(libm-a-y) $(libpthread-a-y) $(libthread_db-a-y) \
- $(librt-a-y) $(libutil-a-y) $(libubacktrace-a-y) $(libuargp-a-y)
+ $(librt-a-y) $(libutil-a-y) $(libubacktrace-a-y) $(libuargp-a-y) \
+ $(libiconv-a-y)
ifeq ($(DOPIC),y)
ar_objs := $(ar_objs:.o=.os)
endif
@@ -472,9 +475,12 @@ files.dep := $(libc-a-y) $(libc-so-y) $(libc-nonshared-y) \
$(START_FILE-libpthread.so) $(END_FILE-libpthread.so) \
$(PTHREAD_INITFINI:.c=.s) \
$(librt-a-y) $(librt-so-y) \
- $(libcrypt-a-y) $(libcrypt-so-y) $(libutil-a-y) $(libutil-so-y) \
+ $(libcrypt-a-y) $(libcrypt-so-y) \
+ $(libutil-a-y) $(libutil-so-y) \
$(ldso-y) $(libdl-a-y) $(libdl-so-y) \
- $(libubacktrace-a-y) $(libubacktrace-so-y) $(libuargp-so-y) $(libuargp-a-y)
+ $(libubacktrace-a-y) $(libubacktrace-so-y) \
+ $(libuargp-so-y) $(libuargp-a-y) \
+ $(libiconv-so-y) $(libiconv-a-y)
.depends.dep := \
$(patsubst %.s,%.s.dep,$(filter %.s,$(files.dep))) \
$(patsubst %.o,%.o.dep,$(filter %.o,$(files.dep))) \
diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in
index b1ca3fa..7c83d30 100644
--- a/extra/Configs/Config.in
+++ b/extra/Configs/Config.in
@@ -1462,6 +1462,11 @@ config UCLIBC_HAS_WCHAR
Most people will answer N.
+config UCLIBC_HAS_LIBICONV
+ bool "Iconv Support"
+ help
+ Add tiny iconv support for charset conversion from and to UTF-8.
+
config UCLIBC_HAS_LOCALE
bool "Locale Support"
select UCLIBC_HAS_WCHAR
diff --git a/include/iconv.h b/include/iconv.h
index 5ab4c6c..dfab27f 100644
--- a/include/iconv.h
+++ b/include/iconv.h
@@ -1,59 +1,32 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
#ifndef _ICONV_H
-#define _ICONV_H 1
+#define _ICONV_H 1
+
+#define _LIBICONV_VERSION 0x010B /* version number: (major<<8) + minor */
-#include <features.h>
-#define __need_size_t
#include <stddef.h>
-#ifndef __UCLIBC_HAS_LOCALE__
-#error Attempted to include iconv.h when uClibc was built without locale support.
+#ifdef __cplusplus
+extern "C" {
#endif
+extern int _libiconv_version; /* Likewise */
-__BEGIN_DECLS
+typedef long iconv_t;
-/* Identifier for conversion method from one codeset to another. */
-typedef void *iconv_t;
+extern iconv_t
+iconv_open(const char *tocode, const char *fromcode);
+extern size_t
+iconv(iconv_t cd, char **inbuf, size_t *inbytesleft,
+ char **outbuf, size_t *outbytesleft);
-/* Allocate descriptor for code conversion from codeset FROMCODE to
- codeset TOCODE.
+extern int
+iconv_close(iconv_t cd);
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern iconv_t iconv_open (const char *__tocode, const char *__fromcode);
+#define libiconv_set_relocation_prefix(...) do {} while(0)
-/* Convert at most *INBYTESLEFT bytes from *INBUF according to the
- code conversion algorithm specified by CD and place up to
- *OUTBYTESLEFT bytes in buffer at *OUTBUF. */
-extern size_t iconv (iconv_t __cd, char **__restrict __inbuf,
- size_t *__restrict __inbytesleft,
- char **__restrict __outbuf,
- size_t *__restrict __outbytesleft);
-
-/* Free resources allocated for descriptor CD for code conversion.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern int iconv_close (iconv_t __cd);
-
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
-#endif /* iconv.h */
+#endif /* _ICONV_H */
diff --git a/libc/Makefile.in b/libc/Makefile.in
index 3cff9fd..97added 100644
--- a/libc/Makefile.in
+++ b/libc/Makefile.in
@@ -50,6 +50,7 @@ libc-a-$(UCLIBC_HAS_ARGP) += $(libuargp-a-y)
libc-a-$(UCLIBC_HAS_THREADS) += $(libpthread-a-y)
libc-a-$(UCLIBC_HAS_REALTIME) += $(librt-a-y)
libc-a-$(UCLIBC_HAS_BACKTRACE) += $(libubacktrace-a-y)
+libc-a-$(UCLIBC_HAS_LIBICONV) += $(libiconv-a-y)
libc-so-y = $(libc-y:.o=.os) $(libc-shared-y)
@@ -61,6 +62,7 @@ libc-so-$(UCLIBC_HAS_ARGP) += $(libuargp-so-y)
libc-so-$(UCLIBC_HAS_THREADS) += $(libpthread-so-y)
libc-so-$(UCLIBC_HAS_REALTIME) += $(librt-so-y)
libc-so-$(UCLIBC_HAS_BACKTRACE) += $(libubacktrace-so-y)
+libc-so-$(UCLIBC_HAS_LIBICONV) += $(libiconv-so-y)
lib-a-y += $(top_builddir)lib/libc.a
lib-gdb-y += $(top_builddir)lib/libc.gdb
diff --git a/libiconv/COPYRIGHT b/libiconv/COPYRIGHT
new file mode 100644
index 0000000..338241e
--- /dev/null
+++ b/libiconv/COPYRIGHT
@@ -0,0 +1,19 @@
+Copyright status on all included code:
+
+All files which have no copyright comments are original works
+Copyright (C) 2005-2006 Rich Felker. The decision to exclude such
+comments is intentional, as it should be possible to carry around the
+complete source code on tiny storage media. All public header files
+(include/*) should be treated as Public Domain as they intentionally
+contain no content which can be covered by copyright. Some source
+modules may fall in this category as well. If you believe that a file
+is so trivial that it should be in the Public Domain, please contact
+me and, if I agree, I will explicitly release it from copyright.
+
+Some code has been modified by the OpenWrt project, this includes
+the conversion from char map files to C arrays and the iconv.h header
+file in particular.
+
+The library as a whole is licensed under the GNU LGPL version 2.1.
+
+The original source can be accessed at svn://svn.mplayerhq.hu/libc/trunk
diff --git a/libm/Makefile b/libiconv/Makefile
similarity index 69%
copy from libm/Makefile
copy to libiconv/Makefile
index c8dc9b4..1ffc16e 100644
--- a/libm/Makefile
+++ b/libiconv/Makefile
@@ -1,9 +1,5 @@
-# Makefile for uClibc
-#
-# Copyright (C) 2000-2005 Erik Andersen <andersen(a)uclibc.org>
-#
+# Makefile for uClibc-ng
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-#
top_srcdir=../
top_builddir=../
diff --git a/libiconv/Makefile.in b/libiconv/Makefile.in
new file mode 100644
index 0000000..3636aa6
--- /dev/null
+++ b/libiconv/Makefile.in
@@ -0,0 +1,31 @@
+# Makefile for uClibc-ng
+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+
+subdirs += libiconv
+
+CFLAGS-libiconv := -DNOT_IN_libc -DIS_IN_libiconv $(SSP_ALL_CFLAGS) \
+ -I$(top_srcdir)libiconv/include
+
+libiconv_DIR := $(top_srcdir)libiconv
+libiconv_OUT := $(top_builddir)libiconv
+
+libiconv_SRC-$(UCLIBC_HAS_LIBICONV) := iconv.c
+
+libiconv_SRC := $(addprefix $(libiconv_DIR)/,$(libiconv_SRC-y))
+libiconv_OBJ := $(patsubst $(libiconv_DIR)/%.c,$(libiconv_OUT)/%.o,$(libiconv_SRC))
+
+ifeq ($(DOPIC),y)
+libiconv-a-y := $(libiconv_OBJ:.o=.os)
+else
+libiconv-a-y := $(libiconv_OBJ)
+endif
+libiconv-so-y := $(libiconv_OBJ:.o=.os)
+
+objclean-y += CLEAN_libiconv
+
+$(libiconv_OUT)/libiconv.oS: $(libiconv_SRC)
+ $(Q)$(RM) $@
+ $(compile-m)
+
+CLEAN_libiconv:
+ $(do_rm) $(addprefix $(libiconv_OUT)/*., o os oS a)
diff --git a/libiconv/iconv.c b/libiconv/iconv.c
new file mode 100644
index 0000000..cb4e947
--- /dev/null
+++ b/libiconv/iconv.c
@@ -0,0 +1,440 @@
+#include <iconv.h>
+#include <errno.h>
+#include <wchar.h>
+#include <string.h>
+#include <strings.h>
+#include <stdlib.h>
+#include <limits.h>
+
+#include <dirent.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <stdint.h>
+
+/* builtin charmaps */
+#include "charmaps.h"
+
+/* only 0-7 are valid as dest charset */
+#define UTF_16BE 000
+#define UTF_16LE 001
+#define UTF_32BE 002
+#define UTF_32LE 003
+#define WCHAR_T 004
+#define UTF_8 005
+#define US_ASCII 006
+#define LATIN_1 007
+
+/* additional charsets with algorithmic conversion */
+#define LATIN_9 010
+#define TIS_620 011
+#define JIS_0201 012
+
+/* some programs like php need this */
+int _libiconv_version = _LIBICONV_VERSION;
+
+/* these must match the constants above */
+static const unsigned char charsets[] =
+ "\005" "UTF-8" "\0"
+ "\004" "WCHAR_T" "\0"
+ "\000" "UTF-16BE" "\0"
+ "\001" "UTF-16LE" "\0"
+ "\002" "UTF-32BE" "\0"
+ "\003" "UTF-32LE" "\0"
+ "\006" "ASCII" "\0"
+ "\006" "US-ASCII" "\0"
+ "\007" "ISO-8859-1" "\0"
+ "\007" "LATIN1" "\0"
+ "\010" "ISO-8859-15""\0"
+ "\010" "LATIN9" "\0"
+ "\011" "ISO-8859-11""\0"
+ "\011" "TIS-620" "\0"
+ "\012" "JIS-0201" "\0"
+ "\377";
+
+/* separate identifiers for sbcs/dbcs/etc map type */
+#define UCS2_8BIT 000
+#define UCS3_8BIT 001
+#define EUC 002
+#define EUC_TW 003
+#define SHIFT_JIS 004
+#define BIG5 005
+#define GBK 006
+
+/* FIXME: these are not implemented yet
+// EUC: A1-FE A1-FE
+// GBK: 81-FE 40-7E,80-FE
+// Big5: A1-FE 40-7E,A1-FE
+*/
+
+static const unsigned short maplen[] = {
+ [UCS2_8BIT] = 4+ 2* 128,
+ [UCS3_8BIT] = 4+ 3* 128,
+ [EUC] = 4+ 2* 94*94,
+ [SHIFT_JIS] = 4+ 2* 94*94,
+ [BIG5] = 4+ 2* 94*157,
+ [GBK] = 4+ 2* 126*190,
+ [EUC_TW] = 4+ 2* 2*94*94,
+};
+
+static int find_charmap(const char *name)
+{
+ int i;
+ for (i = 0; i < (sizeof(charmaps) / sizeof(charmaps[0])); i++)
+ if (!strcasecmp(charmaps[i].name, name))
+ return i;
+ return -1;
+}
+
+static int find_charset(const char *name)
+{
+ const unsigned char *s;
+ for (s=charsets; *s<0xff && strcasecmp(s+1, name); s+=strlen(s)+1);
+ return *s;
+}
+
+iconv_t iconv_open(const char *to, const char *from)
+{
+ unsigned f, t;
+ int m;
+
+ if ((t = find_charset(to)) > 8)
+ return -1;
+
+ if ((f = find_charset(from)) < 255)
+ return 0 | (t<<1) | (f<<8);
+
+ if ((m = find_charmap(from)) > -1)
+ return 1 | (t<<1) | (m<<8);
+
+ return -1;
+}
+
+int iconv_close(iconv_t cd)
+{
+ return 0;
+}
+
+static inline wchar_t get_16(const unsigned char *s, int endian)
+{
+ endian &= 1;
+ return s[endian]<<8 | s[endian^1];
+}
+
+static inline void put_16(unsigned char *s, wchar_t c, int endian)
+{
+ endian &= 1;
+ s[endian] = c>>8;
+ s[endian^1] = c;
+}
+
+static inline int utf8enc_wchar(char *outb, wchar_t c)
+{
+ if (c <= 0x7F) {
+ *outb = c;
+ return 1;
+ }
+ else if (c <= 0x7FF) {
+ *outb++ = ((c >> 6) & 0x1F) | 0xC0;
+ *outb++ = ( c & 0x3F) | 0x80;
+ return 2;
+ }
+ else if (c <= 0xFFFF) {
+ *outb++ = ((c >> 12) & 0x0F) | 0xE0;
+ *outb++ = ((c >> 6) & 0x3F) | 0x80;
+ *outb++ = ( c & 0x3F) | 0x80;
+ return 3;
+ }
+ else if (c <= 0x10FFFF) {
+ *outb++ = ((c >> 18) & 0x07) | 0xF0;
+ *outb++ = ((c >> 12) & 0x3F) | 0x80;
+ *outb++ = ((c >> 6) & 0x3F) | 0x80;
+ *outb++ = ( c & 0x3F) | 0x80;
+ return 4;
+ }
+ else {
+ *outb++ = '?';
+ return 1;
+ }
+}
+
+static inline int utf8seq_is_overlong(char *s, int n)
+{
+ switch (n)
+ {
+ case 2:
+ /* 1100000x (10xxxxxx) */
+ return (((*s >> 1) == 0x60) &&
+ ((*(s+1) >> 6) == 0x02));
+
+ case 3:
+ /* 11100000 100xxxxx (10xxxxxx) */
+ return ((*s == 0xE0) &&
+ ((*(s+1) >> 5) == 0x04) &&
+ ((*(s+2) >> 6) == 0x02));
+
+ case 4:
+ /* 11110000 1000xxxx (10xxxxxx 10xxxxxx) */
+ return ((*s == 0xF0) &&
+ ((*(s+1) >> 4) == 0x08) &&
+ ((*(s+2) >> 6) == 0x02) &&
+ ((*(s+3) >> 6) == 0x02));
+ }
+
+ return 0;
+}
+
+static inline int utf8seq_is_surrogate(char *s, int n)
+{
+ return ((n == 3) && (*s == 0xED) && (*(s+1) >= 0xA0) && (*(s+1) <= 0xBF));
+}
+
+static inline int utf8seq_is_illegal(char *s, int n)
+{
+ return ((n == 3) && (*s == 0xEF) && (*(s+1) == 0xBF) &&
+ (*(s+2) >= 0xBE) && (*(s+2) <= 0xBF));
+}
+
+static inline int utf8dec_wchar(wchar_t *c, unsigned char *in, size_t inb)
+{
+ int i;
+ int n = -1;
+
+ /* trivial char */
+ if (*in <= 0x7F) {
+ *c = *in;
+ return 1;
+ }
+
+ /* find utf8 sequence length */
+ if ((*in & 0xE0) == 0xC0) n = 2;
+ else if ((*in & 0xF0) == 0xE0) n = 3;
+ else if ((*in & 0xF8) == 0xF0) n = 4;
+ else if ((*in & 0xFC) == 0xF8) n = 5;
+ else if ((*in & 0xFE) == 0xFC) n = 6;
+
+ /* starved? */
+ if (n > inb)
+ return -2;
+
+ /* decode ... */
+ if (n > 1 && n < 5) {
+ /* reject invalid sequences */
+ if (utf8seq_is_overlong(in, n) ||
+ utf8seq_is_surrogate(in, n) ||
+ utf8seq_is_illegal(in, n))
+ return -1;
+
+ /* decode ... */
+ *c = (char)(*in++ & (0x7F >> n));
+
+ for (i = 1; i < n; i++) {
+ /* illegal continuation byte */
+ if (*in < 0x80 || *in > 0xBF)
+ return -1;
+
+ *c = (*c << 6) | (*in++ & 0x3F);
+ }
+
+ return n;
+ }
+
+ /* unmapped sequence (> 4) */
+ return -1;
+}
+
+static inline char latin9_translit(wchar_t c)
+{
+ /* a number of trivial iso-8859-15 <> utf-8 transliterations */
+ switch (c) {
+ case 0x20AC: return 0xA4; /* Euro */
+ case 0x0160: return 0xA6; /* S caron */
+ case 0x0161: return 0xA8; /* s caron */
+ case 0x017D: return 0xB4; /* Z caron */
+ case 0x017E: return 0xB8; /* z caron */
+ case 0x0152: return 0xBC; /* OE */
+ case 0x0153: return 0xBD; /* oe */
+ case 0x0178: return 0xBE; /* Y diaeresis */
+ default: return '?';
+ }
+}
+
+size_t iconv(iconv_t cd, char **in, size_t *inb, char **out, size_t *outb)
+{
+ size_t x=0;
+ unsigned char to = (cd>>1)&127;
+ unsigned char from = 255;
+ const unsigned char *map = 0;
+ char tmp[MB_LEN_MAX];
+ wchar_t c, d;
+ size_t k, l;
+ int err;
+
+ if (!in || !*in || !*inb) return 0;
+
+ if (cd & 1)
+ map = charmaps[cd>>8].map;
+ else
+ from = cd>>8;
+
+ for (; *inb; *in+=l, *inb-=l) {
+ c = *(unsigned char *)*in;
+ l = 1;
+ if (from >= UTF_8 && c < 0x80) goto charok;
+ switch (from) {
+ case WCHAR_T:
+ l = sizeof(wchar_t);
+ if (*inb < l) goto starved;
+ c = *(wchar_t *)*in;
+ break;
+ case UTF_8:
+ l = utf8dec_wchar(&c, *in, *inb);
+ if (!l) l++;
+ else if (l == (size_t)-1) goto ilseq;
+ else if (l == (size_t)-2) goto starved;
+ break;
+ case US_ASCII:
+ goto ilseq;
+ case LATIN_9:
+ if ((unsigned)c - 0xa4 <= 0xbe - 0xa4) {
+ static const unsigned char map[] = {
+ 0, 0x60, 0, 0x61, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0x7d, 0, 0, 0, 0x7e, 0, 0, 0,
+ 0x52, 0x53, 0x78
+ };
+ if (c == 0xa4) c = 0x20ac;
+ else if (map[c-0xa5]) c = 0x100 | map[c-0xa5];
+ }
+ case LATIN_1:
+ goto charok;
+ case TIS_620:
+ if (c >= 0xa1) c += 0x0e01-0xa1;
+ goto charok;
+ case JIS_0201:
+ if (c >= 0xa1) {
+ if (c <= 0xdf) c += 0xff61-0xa1;
+ else goto ilseq;
+ }
+ goto charok;
+ case UTF_16BE:
+ case UTF_16LE:
+ l = 2;
+ if (*inb < 2) goto starved;
+ c = get_16(*in, from);
+ if ((unsigned)(c-0xdc00) < 0x400) goto ilseq;
+ if ((unsigned)(c-0xd800) < 0x400) {
+ l = 4;
+ if (*inb < 4) goto starved;
+ d = get_16(*in + 2, from);
+ if ((unsigned)(c-0xdc00) >= 0x400) goto ilseq;
+ c = ((c-0xd800)<<10) | (d-0xdc00);
+ }
+ break;
+ case UTF_32BE:
+ case UTF_32LE:
+ l = 4;
+ if (*inb < 4) goto starved;
+ // FIXME
+ // c = get_32(*in, from);
+ break;
+ default:
+ /* only support ascii supersets */
+ if (c < 0x80) break;
+ switch (map[0]) {
+ case UCS2_8BIT:
+ c -= 0x80;
+ break;
+ case EUC:
+ if ((unsigned)c - 0xa1 >= 94) goto ilseq;
+ if ((unsigned)in[0][1] - 0xa1 >= 94) goto ilseq;
+ c = (c-0xa1)*94 + (in[0][1]-0xa1);
+ l = 2;
+ break;
+ case SHIFT_JIS:
+ if ((unsigned)c - 0xa1 <= 0xdf-0xa1) {
+ c += 0xff61-0xa1;
+ goto charok;
+ }
+ // FIXME...
+ l = 2;
+ break;
+ default:
+ goto badf;
+ }
+ c = get_16(map + 4 + 2*c, 0);
+ if (c == 0xffff) goto ilseq;
+ goto charok;
+ }
+
+ if ((unsigned)c - 0xd800 < 0x800 || (unsigned)c >= 0x110000)
+ goto ilseq;
+charok:
+ switch (to) {
+ case WCHAR_T:
+ if (*outb < sizeof(wchar_t)) goto toobig;
+ *(wchar_t *)*out = c;
+ *out += sizeof(wchar_t);
+ *outb -= sizeof(wchar_t);
+ break;
+ case UTF_8:
+ if (*outb < 4) {
+ k = utf8enc_wchar(tmp, c);
+ if (*outb < k) goto toobig;
+ memcpy(*out, tmp, k);
+ } else k = utf8enc_wchar(*out, c);
+ *out += k;
+ *outb -= k;
+ break;
+ case US_ASCII:
+ if (c > 0x7f) c = 0xfffd;
+ /* fall thru and count replacement in latin1 case */
+ case LATIN_9:
+ if (c >= 0x100 && c != 0xfffd)
+ c = latin9_translit(c);
+ /* fall through */
+ case LATIN_1:
+ if (!*outb) goto toobig;
+ if (c < 0x100) **out = c;
+ else x++, **out = '*'; //FIXME: translit?
+ ++*out;
+ --*outb;
+ break;
+ case UTF_16BE:
+ case UTF_16LE:
+ if (c < 0x10000) {
+ if (*outb < 2) goto toobig;
+ put_16(*out, c, to);
+ *out += 2;
+ *outb -= 2;
+ break;
+ }
+ if (*outb < 4) goto toobig;
+ put_16(*out, (c>>10)|0xd800, to);
+ put_16(*out + 2, (c&0x3ff)|0xdc00, to);
+ *out += 4;
+ *outb -= 4;
+ break;
+ default:
+ goto badf;
+ }
+ }
+ return x;
+ilseq:
+ err = EILSEQ;
+ x = -1;
+ goto end;
+badf:
+ err = EBADF;
+ x = -1;
+ goto end;
+toobig:
+ err = E2BIG;
+ x = -1;
+ goto end;
+starved:
+ err = EINVAL;
+end:
+ errno = err;
+ return x;
+}
diff --git a/libiconv/include/charmaps.h b/libiconv/include/charmaps.h
new file mode 100644
index 0000000..083cd69
--- /dev/null
+++ b/libiconv/include/charmaps.h
@@ -0,0 +1,80 @@
+#include "charmaps/iso-8859-2.h"
+#include "charmaps/iso-8859-10.h"
+#include "charmaps/windows-874.h"
+#include "charmaps/windows-1250.h"
+#include "charmaps/koi8-r.h"
+
+#ifdef ALL_CHARSETS
+#include "charmaps/iso-8859-3.h"
+#include "charmaps/iso-8859-4.h"
+#include "charmaps/iso-8859-5.h"
+#include "charmaps/iso-8859-6.h"
+#include "charmaps/iso-8859-7.h"
+#include "charmaps/iso-8859-8.h"
+#include "charmaps/iso-8859-9.h"
+#include "charmaps/iso-8859-13.h"
+#include "charmaps/iso-8859-14.h"
+#include "charmaps/iso-8859-16.h"
+#include "charmaps/windows-1251.h"
+#include "charmaps/windows-1252.h"
+#include "charmaps/windows-1253.h"
+#include "charmaps/windows-1254.h"
+#include "charmaps/windows-1255.h"
+#include "charmaps/windows-1256.h"
+#include "charmaps/windows-1257.h"
+#include "charmaps/windows-1258.h"
+#endif
+
+
+struct charmap {
+ const char name[13];
+ const unsigned char *map;
+};
+
+static struct charmap charmaps[] = {
+ { "ISO-8859-2", map_iso_8859_2 },
+ { "ISO-8859-10", map_iso_8859_10 },
+
+#ifdef ALL_CHARSETS
+ { "ISO-8859-3", map_iso_8859_3 },
+ { "ISO-8859-4", map_iso_8859_4 },
+ { "ISO-8859-5", map_iso_8859_5 },
+ { "ISO-8859-6", map_iso_8859_6 },
+ { "ISO-8859-7", map_iso_8859_7 },
+ { "ISO-8859-8", map_iso_8859_8 },
+ { "ISO-8859-9", map_iso_8859_9 },
+ { "ISO-8859-13", map_iso_8859_13 },
+ { "ISO-8859-14", map_iso_8859_14 },
+ { "ISO-8859-16", map_iso_8859_16 },
+#endif
+
+ { "WINDOWS-874", map_windows_874 },
+ { "WINDOWS-1250", map_windows_1250 },
+
+#ifdef ALL_CHARSETS
+ { "WINDOWS-1251", map_windows_1251 },
+ { "WINDOWS-1252", map_windows_1252 },
+ { "WINDOWS-1253", map_windows_1253 },
+ { "WINDOWS-1254", map_windows_1254 },
+ { "WINDOWS-1255", map_windows_1255 },
+ { "WINDOWS-1256", map_windows_1256 },
+ { "WINDOWS-1257", map_windows_1257 },
+ { "WINDOWS-1258", map_windows_1258 },
+#endif
+
+ { "KOI8-R", map_koi8_r },
+
+ /* Aliases */
+ { "LATIN2", map_iso_8859_2 },
+ { "LATIN6", map_iso_8859_10 },
+
+#ifdef ALL_CHARSETS
+ { "ARABIC", map_iso_8859_6 },
+ { "CYRILLIC", map_iso_8859_5 },
+ { "GREEK", map_iso_8859_7 },
+ { "HEBREW", map_iso_8859_8 },
+ { "LATIN3", map_iso_8859_3 },
+ { "LATIN4", map_iso_8859_4 },
+ { "LATIN5", map_iso_8859_9 },
+#endif
+};
diff --git a/libiconv/include/charmaps/iso-8859-10.h b/libiconv/include/charmaps/iso-8859-10.h
new file mode 100644
index 0000000..cb93d02
--- /dev/null
+++ b/libiconv/include/charmaps/iso-8859-10.h
@@ -0,0 +1,24 @@
+static const unsigned char map_iso_8859_10[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
+ 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
+ 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
+ 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
+ 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
+ 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x01, 0x04,
+ 0x01, 0x12, 0x01, 0x22, 0x01, 0x2a, 0x01, 0x28, 0x01, 0x36, 0x00, 0xa7,
+ 0x01, 0x3b, 0x01, 0x10, 0x01, 0x60, 0x01, 0x66, 0x01, 0x7d, 0x00, 0xad,
+ 0x01, 0x6a, 0x01, 0x4a, 0x00, 0xb0, 0x01, 0x05, 0x01, 0x13, 0x01, 0x23,
+ 0x01, 0x2b, 0x01, 0x29, 0x01, 0x37, 0x00, 0xb7, 0x01, 0x3c, 0x01, 0x11,
+ 0x01, 0x61, 0x01, 0x67, 0x01, 0x7e, 0x20, 0x15, 0x01, 0x6b, 0x01, 0x4b,
+ 0x01, 0x00, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5,
+ 0x00, 0xc6, 0x01, 0x2e, 0x01, 0x0c, 0x00, 0xc9, 0x01, 0x18, 0x00, 0xcb,
+ 0x01, 0x16, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x00, 0xd0, 0x01, 0x45,
+ 0x01, 0x4c, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x01, 0x68,
+ 0x00, 0xd8, 0x01, 0x72, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x00, 0xdd,
+ 0x00, 0xde, 0x00, 0xdf, 0x01, 0x01, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3,
+ 0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x01, 0x2f, 0x01, 0x0d, 0x00, 0xe9,
+ 0x01, 0x19, 0x00, 0xeb, 0x01, 0x17, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef,
+ 0x00, 0xf0, 0x01, 0x46, 0x01, 0x4d, 0x00, 0xf3, 0x00, 0xf4, 0x00, 0xf5,
+ 0x00, 0xf6, 0x01, 0x69, 0x00, 0xf8, 0x01, 0x73, 0x00, 0xfa, 0x00, 0xfb,
+ 0x00, 0xfc, 0x00, 0xfd, 0x00, 0xfe, 0x01, 0x38
+};
diff --git a/libiconv/include/charmaps/iso-8859-13.h b/libiconv/include/charmaps/iso-8859-13.h
new file mode 100644
index 0000000..b44d1b4
--- /dev/null
+++ b/libiconv/include/charmaps/iso-8859-13.h
@@ -0,0 +1,24 @@
+static const unsigned char map_iso_8859_13[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
+ 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
+ 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
+ 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
+ 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
+ 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x20, 0x1d,
+ 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x20, 0x1e, 0x00, 0xa6, 0x00, 0xa7,
+ 0x00, 0xd8, 0x00, 0xa9, 0x01, 0x56, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
+ 0x00, 0xae, 0x00, 0xc6, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
+ 0x20, 0x1c, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xf8, 0x00, 0xb9,
+ 0x01, 0x57, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xe6,
+ 0x01, 0x04, 0x01, 0x2e, 0x01, 0x00, 0x01, 0x06, 0x00, 0xc4, 0x00, 0xc5,
+ 0x01, 0x18, 0x01, 0x12, 0x01, 0x0c, 0x00, 0xc9, 0x01, 0x79, 0x01, 0x16,
+ 0x01, 0x22, 0x01, 0x36, 0x01, 0x2a, 0x01, 0x3b, 0x01, 0x60, 0x01, 0x43,
+ 0x01, 0x45, 0x00, 0xd3, 0x01, 0x4c, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7,
+ 0x01, 0x72, 0x01, 0x41, 0x01, 0x5a, 0x01, 0x6a, 0x00, 0xdc, 0x01, 0x7b,
+ 0x01, 0x7d, 0x00, 0xdf, 0x01, 0x05, 0x01, 0x2f, 0x01, 0x01, 0x01, 0x07,
+ 0x00, 0xe4, 0x00, 0xe5, 0x01, 0x19, 0x01, 0x13, 0x01, 0x0d, 0x00, 0xe9,
+ 0x01, 0x7a, 0x01, 0x17, 0x01, 0x23, 0x01, 0x37, 0x01, 0x2b, 0x01, 0x3c,
+ 0x01, 0x61, 0x01, 0x44, 0x01, 0x46, 0x00, 0xf3, 0x01, 0x4d, 0x00, 0xf5,
+ 0x00, 0xf6, 0x00, 0xf7, 0x01, 0x73, 0x01, 0x42, 0x01, 0x5b, 0x01, 0x6b,
+ 0x00, 0xfc, 0x01, 0x7c, 0x01, 0x7e, 0x20, 0x19
+};
diff --git a/libiconv/include/charmaps/iso-8859-14.h b/libiconv/include/charmaps/iso-8859-14.h
new file mode 100644
index 0000000..76cead9
--- /dev/null
+++ b/libiconv/include/charmaps/iso-8859-14.h
@@ -0,0 +1,25 @@
+static const unsigned char map_iso_8859_14[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
+ 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
+ 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
+ 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
+ 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
+ 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x1e, 0x02,
+ 0x1e, 0x03, 0x00, 0xa3, 0x01, 0x0a, 0x01, 0x0b, 0x1e, 0x0a, 0x00, 0xa7,
+ 0x1e, 0x80, 0x00, 0xa9, 0x1e, 0x82, 0x1e, 0x0b, 0x1e, 0xf2, 0x00, 0xad,
+ 0x00, 0xae, 0x01, 0x78, 0x1e, 0x1e, 0x1e, 0x1f, 0x01, 0x20, 0x01, 0x21,
+ 0x1e, 0x40, 0x1e, 0x41, 0x00, 0xb6, 0x1e, 0x56, 0x1e, 0x81, 0x1e, 0x57,
+ 0x1e, 0x83, 0x1e, 0x60, 0x1e, 0xf3, 0x1e, 0x84, 0x1e, 0x85, 0x1e, 0x61,
+ 0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5,
+ 0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb,
+ 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x01, 0x74, 0x00, 0xd1,
+ 0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x1e, 0x6a,
+ 0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x00, 0xdd,
+ 0x01, 0x76, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3,
+ 0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9,
+ 0x00, 0xea, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef,
+ 0x01, 0x75, 0x00, 0xf1, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x00, 0xf5,
+ 0x00, 0xf6, 0x1e, 0x6b, 0x00, 0xf8, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb,
+ 0x00, 0xfc, 0x00, 0xfd, 0x01, 0x77, 0x00, 0xff
+};
+
diff --git a/libiconv/include/charmaps/iso-8859-16.h b/libiconv/include/charmaps/iso-8859-16.h
new file mode 100644
index 0000000..4437a41
--- /dev/null
+++ b/libiconv/include/charmaps/iso-8859-16.h
@@ -0,0 +1,24 @@
+static const unsigned char map_iso_8859_16[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
+ 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
+ 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
+ 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
+ 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
+ 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x01, 0x04,
+ 0x01, 0x05, 0x01, 0x41, 0x20, 0xac, 0x20, 0x1e, 0x01, 0x60, 0x00, 0xa7,
+ 0x01, 0x61, 0x00, 0xa9, 0x02, 0x18, 0x00, 0xab, 0x01, 0x79, 0x00, 0xad,
+ 0x01, 0x7a, 0x01, 0x7b, 0x00, 0xb0, 0x00, 0xb1, 0x01, 0x0c, 0x01, 0x42,
+ 0x01, 0x7d, 0x20, 0x1d, 0x00, 0xb6, 0x00, 0xb7, 0x01, 0x7e, 0x01, 0x0d,
+ 0x02, 0x19, 0x00, 0xbb, 0x01, 0x52, 0x01, 0x53, 0x01, 0x78, 0x01, 0x7c,
+ 0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x01, 0x02, 0x00, 0xc4, 0x01, 0x06,
+ 0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb,
+ 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x01, 0x10, 0x01, 0x43,
+ 0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x01, 0x50, 0x00, 0xd6, 0x01, 0x5a,
+ 0x01, 0x70, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x01, 0x18,
+ 0x02, 0x1a, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0x01, 0x03,
+ 0x00, 0xe4, 0x01, 0x07, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9,
+ 0x00, 0xea, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef,
+ 0x01, 0x11, 0x01, 0x44, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x01, 0x51,
+ 0x00, 0xf6, 0x01, 0x5b, 0x01, 0x71, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb,
+ 0x00, 0xfc, 0x01, 0x19, 0x02, 0x1b, 0x00, 0xff
+};
diff --git a/libiconv/include/charmaps/iso-8859-2.h b/libiconv/include/charmaps/iso-8859-2.h
new file mode 100644
index 0000000..631610e
--- /dev/null
+++ b/libiconv/include/charmaps/iso-8859-2.h
@@ -0,0 +1,24 @@
+static const unsigned char map_iso_8859_2[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
+ 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
+ 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
+ 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
+ 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
+ 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x01, 0x04,
+ 0x02, 0xd8, 0x01, 0x41, 0x00, 0xa4, 0x01, 0x3d, 0x01, 0x5a, 0x00, 0xa7,
+ 0x00, 0xa8, 0x01, 0x60, 0x01, 0x5e, 0x01, 0x64, 0x01, 0x79, 0x00, 0xad,
+ 0x01, 0x7d, 0x01, 0x7b, 0x00, 0xb0, 0x01, 0x05, 0x02, 0xdb, 0x01, 0x42,
+ 0x00, 0xb4, 0x01, 0x3e, 0x01, 0x5b, 0x02, 0xc7, 0x00, 0xb8, 0x01, 0x61,
+ 0x01, 0x5f, 0x01, 0x65, 0x01, 0x7a, 0x02, 0xdd, 0x01, 0x7e, 0x01, 0x7c,
+ 0x01, 0x54, 0x00, 0xc1, 0x00, 0xc2, 0x01, 0x02, 0x00, 0xc4, 0x01, 0x39,
+ 0x01, 0x06, 0x00, 0xc7, 0x01, 0x0c, 0x00, 0xc9, 0x01, 0x18, 0x00, 0xcb,
+ 0x01, 0x1a, 0x00, 0xcd, 0x00, 0xce, 0x01, 0x0e, 0x01, 0x10, 0x01, 0x43,
+ 0x01, 0x47, 0x00, 0xd3, 0x00, 0xd4, 0x01, 0x50, 0x00, 0xd6, 0x00, 0xd7,
+ 0x01, 0x58, 0x01, 0x6e, 0x00, 0xda, 0x01, 0x70, 0x00, 0xdc, 0x00, 0xdd,
+ 0x01, 0x62, 0x00, 0xdf, 0x01, 0x55, 0x00, 0xe1, 0x00, 0xe2, 0x01, 0x03,
+ 0x00, 0xe4, 0x01, 0x3a, 0x01, 0x07, 0x00, 0xe7, 0x01, 0x0d, 0x00, 0xe9,
+ 0x01, 0x19, 0x00, 0xeb, 0x01, 0x1b, 0x00, 0xed, 0x00, 0xee, 0x01, 0x0f,
+ 0x01, 0x11, 0x01, 0x44, 0x01, 0x48, 0x00, 0xf3, 0x00, 0xf4, 0x01, 0x51,
+ 0x00, 0xf6, 0x00, 0xf7, 0x01, 0x59, 0x01, 0x6f, 0x00, 0xfa, 0x01, 0x71,
+ 0x00, 0xfc, 0x00, 0xfd, 0x01, 0x63, 0x02, 0xd9
+};
diff --git a/libiconv/include/charmaps/iso-8859-3.h b/libiconv/include/charmaps/iso-8859-3.h
new file mode 100644
index 0000000..cd76d59
--- /dev/null
+++ b/libiconv/include/charmaps/iso-8859-3.h
@@ -0,0 +1,24 @@
+static const unsigned char map_iso_8859_3[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
+ 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
+ 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
+ 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
+ 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
+ 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x01, 0x26,
+ 0x02, 0xd8, 0x00, 0xa3, 0x00, 0xa4, 0xff, 0xff, 0x01, 0x24, 0x00, 0xa7,
+ 0x00, 0xa8, 0x01, 0x30, 0x01, 0x5e, 0x01, 0x1e, 0x01, 0x34, 0x00, 0xad,
+ 0xff, 0xff, 0x01, 0x7b, 0x00, 0xb0, 0x01, 0x27, 0x00, 0xb2, 0x00, 0xb3,
+ 0x00, 0xb4, 0x00, 0xb5, 0x01, 0x25, 0x00, 0xb7, 0x00, 0xb8, 0x01, 0x31,
+ 0x01, 0x5f, 0x01, 0x1f, 0x01, 0x35, 0x00, 0xbd, 0xff, 0xff, 0x01, 0x7c,
+ 0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc4, 0x01, 0x0a,
+ 0x01, 0x08, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb,
+ 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd1,
+ 0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x01, 0x20, 0x00, 0xd6, 0x00, 0xd7,
+ 0x01, 0x1c, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x01, 0x6c,
+ 0x01, 0x5c, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0xff, 0xff,
+ 0x00, 0xe4, 0x01, 0x0b, 0x01, 0x09, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9,
+ 0x00, 0xea, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef,
+ 0xff, 0xff, 0x00, 0xf1, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x01, 0x21,
+ 0x00, 0xf6, 0x00, 0xf7, 0x01, 0x1d, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb,
+ 0x00, 0xfc, 0x01, 0x6d, 0x01, 0x5d, 0x02, 0xd9
+};
diff --git a/libiconv/include/charmaps/iso-8859-4.h b/libiconv/include/charmaps/iso-8859-4.h
new file mode 100644
index 0000000..5db2f77
--- /dev/null
+++ b/libiconv/include/charmaps/iso-8859-4.h
@@ -0,0 +1,24 @@
+static const unsigned char map_iso_8859_4[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
+ 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
+ 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
+ 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
+ 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
+ 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x01, 0x04,
+ 0x01, 0x38, 0x01, 0x56, 0x00, 0xa4, 0x01, 0x28, 0x01, 0x3b, 0x00, 0xa7,
+ 0x00, 0xa8, 0x01, 0x60, 0x01, 0x12, 0x01, 0x22, 0x01, 0x66, 0x00, 0xad,
+ 0x01, 0x7d, 0x00, 0xaf, 0x00, 0xb0, 0x01, 0x05, 0x02, 0xdb, 0x01, 0x57,
+ 0x00, 0xb4, 0x01, 0x29, 0x01, 0x3c, 0x02, 0xc7, 0x00, 0xb8, 0x01, 0x61,
+ 0x01, 0x13, 0x01, 0x23, 0x01, 0x67, 0x01, 0x4a, 0x01, 0x7e, 0x01, 0x4b,
+ 0x01, 0x00, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5,
+ 0x00, 0xc6, 0x01, 0x2e, 0x01, 0x0c, 0x00, 0xc9, 0x01, 0x18, 0x00, 0xcb,
+ 0x01, 0x16, 0x00, 0xcd, 0x00, 0xce, 0x01, 0x2a, 0x01, 0x10, 0x01, 0x45,
+ 0x01, 0x4c, 0x01, 0x36, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7,
+ 0x00, 0xd8, 0x01, 0x72, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x01, 0x68,
+ 0x01, 0x6a, 0x00, 0xdf, 0x01, 0x01, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3,
+ 0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x01, 0x2f, 0x01, 0x0d, 0x00, 0xe9,
+ 0x01, 0x19, 0x00, 0xeb, 0x01, 0x17, 0x00, 0xed, 0x00, 0xee, 0x01, 0x2b,
+ 0x01, 0x11, 0x01, 0x46, 0x01, 0x4d, 0x01, 0x37, 0x00, 0xf4, 0x00, 0xf5,
+ 0x00, 0xf6, 0x00, 0xf7, 0x00, 0xf8, 0x01, 0x73, 0x00, 0xfa, 0x00, 0xfb,
+ 0x00, 0xfc, 0x01, 0x69, 0x01, 0x6b, 0x02, 0xd9
+};
diff --git a/libiconv/include/charmaps/iso-8859-5.h b/libiconv/include/charmaps/iso-8859-5.h
new file mode 100644
index 0000000..d9fe684
--- /dev/null
+++ b/libiconv/include/charmaps/iso-8859-5.h
@@ -0,0 +1,24 @@
+static const unsigned char map_iso_8859_5[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
+ 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
+ 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
+ 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
+ 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
+ 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x04, 0x01,
+ 0x04, 0x02, 0x04, 0x03, 0x04, 0x04, 0x04, 0x05, 0x04, 0x06, 0x04, 0x07,
+ 0x04, 0x08, 0x04, 0x09, 0x04, 0x0a, 0x04, 0x0b, 0x04, 0x0c, 0x00, 0xad,
+ 0x04, 0x0e, 0x04, 0x0f, 0x04, 0x10, 0x04, 0x11, 0x04, 0x12, 0x04, 0x13,
+ 0x04, 0x14, 0x04, 0x15, 0x04, 0x16, 0x04, 0x17, 0x04, 0x18, 0x04, 0x19,
+ 0x04, 0x1a, 0x04, 0x1b, 0x04, 0x1c, 0x04, 0x1d, 0x04, 0x1e, 0x04, 0x1f,
+ 0x04, 0x20, 0x04, 0x21, 0x04, 0x22, 0x04, 0x23, 0x04, 0x24, 0x04, 0x25,
+ 0x04, 0x26, 0x04, 0x27, 0x04, 0x28, 0x04, 0x29, 0x04, 0x2a, 0x04, 0x2b,
+ 0x04, 0x2c, 0x04, 0x2d, 0x04, 0x2e, 0x04, 0x2f, 0x04, 0x30, 0x04, 0x31,
+ 0x04, 0x32, 0x04, 0x33, 0x04, 0x34, 0x04, 0x35, 0x04, 0x36, 0x04, 0x37,
+ 0x04, 0x38, 0x04, 0x39, 0x04, 0x3a, 0x04, 0x3b, 0x04, 0x3c, 0x04, 0x3d,
+ 0x04, 0x3e, 0x04, 0x3f, 0x04, 0x40, 0x04, 0x41, 0x04, 0x42, 0x04, 0x43,
+ 0x04, 0x44, 0x04, 0x45, 0x04, 0x46, 0x04, 0x47, 0x04, 0x48, 0x04, 0x49,
+ 0x04, 0x4a, 0x04, 0x4b, 0x04, 0x4c, 0x04, 0x4d, 0x04, 0x4e, 0x04, 0x4f,
+ 0x21, 0x16, 0x04, 0x51, 0x04, 0x52, 0x04, 0x53, 0x04, 0x54, 0x04, 0x55,
+ 0x04, 0x56, 0x04, 0x57, 0x04, 0x58, 0x04, 0x59, 0x04, 0x5a, 0x04, 0x5b,
+ 0x04, 0x5c, 0x00, 0xa7, 0x04, 0x5e, 0x04, 0x5f
+};
diff --git a/libiconv/include/charmaps/iso-8859-6.h b/libiconv/include/charmaps/iso-8859-6.h
new file mode 100644
index 0000000..820020f
--- /dev/null
+++ b/libiconv/include/charmaps/iso-8859-6.h
@@ -0,0 +1,24 @@
+static const unsigned char map_iso_8859_6[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
+ 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
+ 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
+ 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
+ 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
+ 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0x00, 0xa4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x06, 0x0c, 0x00, 0xad,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0x06, 0x1b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x06, 0x1f,
+ 0xff, 0xff, 0x06, 0x21, 0x06, 0x22, 0x06, 0x23, 0x06, 0x24, 0x06, 0x25,
+ 0x06, 0x26, 0x06, 0x27, 0x06, 0x28, 0x06, 0x29, 0x06, 0x2a, 0x06, 0x2b,
+ 0x06, 0x2c, 0x06, 0x2d, 0x06, 0x2e, 0x06, 0x2f, 0x06, 0x30, 0x06, 0x31,
+ 0x06, 0x32, 0x06, 0x33, 0x06, 0x34, 0x06, 0x35, 0x06, 0x36, 0x06, 0x37,
+ 0x06, 0x38, 0x06, 0x39, 0x06, 0x3a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0x06, 0x40, 0x06, 0x41, 0x06, 0x42, 0x06, 0x43,
+ 0x06, 0x44, 0x06, 0x45, 0x06, 0x46, 0x06, 0x47, 0x06, 0x48, 0x06, 0x49,
+ 0x06, 0x4a, 0x06, 0x4b, 0x06, 0x4c, 0x06, 0x4d, 0x06, 0x4e, 0x06, 0x4f,
+ 0x06, 0x50, 0x06, 0x51, 0x06, 0x52, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
+};
diff --git a/libiconv/include/charmaps/iso-8859-7.h b/libiconv/include/charmaps/iso-8859-7.h
new file mode 100644
index 0000000..174f9d3
--- /dev/null
+++ b/libiconv/include/charmaps/iso-8859-7.h
@@ -0,0 +1,24 @@
+static const unsigned char map_iso_8859_7[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
+ 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
+ 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
+ 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
+ 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
+ 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x20, 0x18,
+ 0x20, 0x19, 0x00, 0xa3, 0x20, 0xac, 0x20, 0xaf, 0x00, 0xa6, 0x00, 0xa7,
+ 0x00, 0xa8, 0x00, 0xa9, 0x03, 0x7a, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
+ 0xff, 0xff, 0x20, 0x15, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
+ 0x03, 0x84, 0x03, 0x85, 0x03, 0x86, 0x00, 0xb7, 0x03, 0x88, 0x03, 0x89,
+ 0x03, 0x8a, 0x00, 0xbb, 0x03, 0x8c, 0x00, 0xbd, 0x03, 0x8e, 0x03, 0x8f,
+ 0x03, 0x90, 0x03, 0x91, 0x03, 0x92, 0x03, 0x93, 0x03, 0x94, 0x03, 0x95,
+ 0x03, 0x96, 0x03, 0x97, 0x03, 0x98, 0x03, 0x99, 0x03, 0x9a, 0x03, 0x9b,
+ 0x03, 0x9c, 0x03, 0x9d, 0x03, 0x9e, 0x03, 0x9f, 0x03, 0xa0, 0x03, 0xa1,
+ 0xff, 0xff, 0x03, 0xa3, 0x03, 0xa4, 0x03, 0xa5, 0x03, 0xa6, 0x03, 0xa7,
+ 0x03, 0xa8, 0x03, 0xa9, 0x03, 0xaa, 0x03, 0xab, 0x03, 0xac, 0x03, 0xad,
+ 0x03, 0xae, 0x03, 0xaf, 0x03, 0xb0, 0x03, 0xb1, 0x03, 0xb2, 0x03, 0xb3,
+ 0x03, 0xb4, 0x03, 0xb5, 0x03, 0xb6, 0x03, 0xb7, 0x03, 0xb8, 0x03, 0xb9,
+ 0x03, 0xba, 0x03, 0xbb, 0x03, 0xbc, 0x03, 0xbd, 0x03, 0xbe, 0x03, 0xbf,
+ 0x03, 0xc0, 0x03, 0xc1, 0x03, 0xc2, 0x03, 0xc3, 0x03, 0xc4, 0x03, 0xc5,
+ 0x03, 0xc6, 0x03, 0xc7, 0x03, 0xc8, 0x03, 0xc9, 0x03, 0xca, 0x03, 0xcb,
+ 0x03, 0xcc, 0x03, 0xcd, 0x03, 0xce, 0xff, 0xff
+};
diff --git a/libiconv/include/charmaps/iso-8859-8.h b/libiconv/include/charmaps/iso-8859-8.h
new file mode 100644
index 0000000..66d4a5e
--- /dev/null
+++ b/libiconv/include/charmaps/iso-8859-8.h
@@ -0,0 +1,24 @@
+static const unsigned char map_iso_8859_8[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
+ 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
+ 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
+ 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
+ 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
+ 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0xff, 0xff,
+ 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7,
+ 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xd7, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
+ 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
+ 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9,
+ 0x00, 0xf7, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0x20, 0x17, 0x05, 0xd0, 0x05, 0xd1, 0x05, 0xd2, 0x05, 0xd3,
+ 0x05, 0xd4, 0x05, 0xd5, 0x05, 0xd6, 0x05, 0xd7, 0x05, 0xd8, 0x05, 0xd9,
+ 0x05, 0xda, 0x05, 0xdb, 0x05, 0xdc, 0x05, 0xdd, 0x05, 0xde, 0x05, 0xdf,
+ 0x05, 0xe0, 0x05, 0xe1, 0x05, 0xe2, 0x05, 0xe3, 0x05, 0xe4, 0x05, 0xe5,
+ 0x05, 0xe6, 0x05, 0xe7, 0x05, 0xe8, 0x05, 0xe9, 0x05, 0xea, 0xff, 0xff,
+ 0xff, 0xff, 0x20, 0x0e, 0x20, 0x0f, 0xff, 0xff
+};
diff --git a/libiconv/include/charmaps/iso-8859-9.h b/libiconv/include/charmaps/iso-8859-9.h
new file mode 100644
index 0000000..f1a8646
--- /dev/null
+++ b/libiconv/include/charmaps/iso-8859-9.h
@@ -0,0 +1,24 @@
+static const unsigned char map_iso_8859_9[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
+ 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
+ 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
+ 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
+ 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
+ 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x00, 0xa1,
+ 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7,
+ 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
+ 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
+ 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9,
+ 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xbf,
+ 0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5,
+ 0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb,
+ 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x01, 0x1e, 0x00, 0xd1,
+ 0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7,
+ 0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x01, 0x30,
+ 0x01, 0x5e, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3,
+ 0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9,
+ 0x00, 0xea, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef,
+ 0x01, 0x1f, 0x00, 0xf1, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x00, 0xf5,
+ 0x00, 0xf6, 0x00, 0xf7, 0x00, 0xf8, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb,
+ 0x00, 0xfc, 0x01, 0x31, 0x01, 0x5f, 0x00, 0xff
+};
diff --git a/libiconv/include/charmaps/koi8-r.h b/libiconv/include/charmaps/koi8-r.h
new file mode 100644
index 0000000..c2453a5
--- /dev/null
+++ b/libiconv/include/charmaps/koi8-r.h
@@ -0,0 +1,24 @@
+static const unsigned char map_koi8_r[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x25, 0x02, 0x25, 0x0c, 0x25, 0x10,
+ 0x25, 0x14, 0x25, 0x18, 0x25, 0x1c, 0x25, 0x24, 0x25, 0x2c, 0x25, 0x34,
+ 0x25, 0x3c, 0x25, 0x80, 0x25, 0x84, 0x25, 0x88, 0x25, 0x8c, 0x25, 0x90,
+ 0x25, 0x91, 0x25, 0x92, 0x25, 0x93, 0x23, 0x20, 0x25, 0xa0, 0x22, 0x19,
+ 0x22, 0x1a, 0x22, 0x48, 0x22, 0x64, 0x22, 0x65, 0x00, 0xa0, 0x23, 0x21,
+ 0x00, 0xb0, 0x00, 0xb2, 0x00, 0xb7, 0x00, 0xf7, 0x25, 0x50, 0x25, 0x51,
+ 0x25, 0x52, 0x04, 0x51, 0x25, 0x53, 0x25, 0x54, 0x25, 0x55, 0x25, 0x56,
+ 0x25, 0x57, 0x25, 0x58, 0x25, 0x59, 0x25, 0x5a, 0x25, 0x5b, 0x25, 0x5c,
+ 0x25, 0x5d, 0x25, 0x5e, 0x25, 0x5f, 0x25, 0x60, 0x25, 0x61, 0x04, 0x01,
+ 0x25, 0x62, 0x25, 0x63, 0x25, 0x64, 0x25, 0x65, 0x25, 0x66, 0x25, 0x67,
+ 0x25, 0x68, 0x25, 0x69, 0x25, 0x6a, 0x25, 0x6b, 0x25, 0x6c, 0x00, 0xa9,
+ 0x04, 0x4e, 0x04, 0x30, 0x04, 0x31, 0x04, 0x46, 0x04, 0x34, 0x04, 0x35,
+ 0x04, 0x44, 0x04, 0x33, 0x04, 0x45, 0x04, 0x38, 0x04, 0x39, 0x04, 0x3a,
+ 0x04, 0x3b, 0x04, 0x3c, 0x04, 0x3d, 0x04, 0x3e, 0x04, 0x3f, 0x04, 0x4f,
+ 0x04, 0x40, 0x04, 0x41, 0x04, 0x42, 0x04, 0x43, 0x04, 0x36, 0x04, 0x32,
+ 0x04, 0x4c, 0x04, 0x4b, 0x04, 0x37, 0x04, 0x48, 0x04, 0x4d, 0x04, 0x49,
+ 0x04, 0x47, 0x04, 0x4a, 0x04, 0x2e, 0x04, 0x10, 0x04, 0x11, 0x04, 0x26,
+ 0x04, 0x14, 0x04, 0x15, 0x04, 0x24, 0x04, 0x13, 0x04, 0x25, 0x04, 0x18,
+ 0x04, 0x19, 0x04, 0x1a, 0x04, 0x1b, 0x04, 0x1c, 0x04, 0x1d, 0x04, 0x1e,
+ 0x04, 0x1f, 0x04, 0x2f, 0x04, 0x20, 0x04, 0x21, 0x04, 0x22, 0x04, 0x23,
+ 0x04, 0x16, 0x04, 0x12, 0x04, 0x2c, 0x04, 0x2b, 0x04, 0x17, 0x04, 0x28,
+ 0x04, 0x2d, 0x04, 0x29, 0x04, 0x27, 0x04, 0x2a
+};
diff --git a/libiconv/include/charmaps/windows-1250.h b/libiconv/include/charmaps/windows-1250.h
new file mode 100644
index 0000000..8e4723e
--- /dev/null
+++ b/libiconv/include/charmaps/windows-1250.h
@@ -0,0 +1,24 @@
+static const unsigned char map_windows_1250[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0x20, 0x1a, 0xff, 0xff,
+ 0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0xff, 0xff, 0x20, 0x30,
+ 0x01, 0x60, 0x20, 0x39, 0x01, 0x5a, 0x01, 0x64, 0x01, 0x7d, 0x01, 0x79,
+ 0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
+ 0x20, 0x13, 0x20, 0x14, 0xff, 0xff, 0x21, 0x22, 0x01, 0x61, 0x20, 0x3a,
+ 0x01, 0x5b, 0x01, 0x65, 0x01, 0x7e, 0x01, 0x7a, 0x00, 0xa0, 0x02, 0xc7,
+ 0x02, 0xd8, 0x01, 0x41, 0x00, 0xa4, 0x01, 0x04, 0x00, 0xa6, 0x00, 0xa7,
+ 0x00, 0xa8, 0x00, 0xa9, 0x01, 0x5e, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
+ 0x00, 0xae, 0x01, 0x7b, 0x00, 0xb0, 0x00, 0xb1, 0x02, 0xdb, 0x01, 0x42,
+ 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x01, 0x05,
+ 0x01, 0x5f, 0x00, 0xbb, 0x01, 0x3d, 0x02, 0xdd, 0x01, 0x3e, 0x01, 0x7c,
+ 0x01, 0x54, 0x00, 0xc1, 0x00, 0xc2, 0x01, 0x02, 0x00, 0xc4, 0x01, 0x39,
+ 0x01, 0x06, 0x00, 0xc7, 0x01, 0x0c, 0x00, 0xc9, 0x01, 0x18, 0x00, 0xcb,
+ 0x01, 0x1a, 0x00, 0xcd, 0x00, 0xce, 0x01, 0x0e, 0x01, 0x10, 0x01, 0x43,
+ 0x01, 0x47, 0x00, 0xd3, 0x00, 0xd4, 0x01, 0x50, 0x00, 0xd6, 0x00, 0xd7,
+ 0x01, 0x58, 0x01, 0x6e, 0x00, 0xda, 0x01, 0x70, 0x00, 0xdc, 0x00, 0xdd,
+ 0x01, 0x62, 0x00, 0xdf, 0x01, 0x55, 0x00, 0xe1, 0x00, 0xe2, 0x01, 0x03,
+ 0x00, 0xe4, 0x01, 0x3a, 0x01, 0x07, 0x00, 0xe7, 0x01, 0x0d, 0x00, 0xe9,
+ 0x01, 0x19, 0x00, 0xeb, 0x01, 0x1b, 0x00, 0xed, 0x00, 0xee, 0x01, 0x0f,
+ 0x01, 0x11, 0x01, 0x44, 0x01, 0x48, 0x00, 0xf3, 0x00, 0xf4, 0x01, 0x51,
+ 0x00, 0xf6, 0x00, 0xf7, 0x01, 0x59, 0x01, 0x6f, 0x00, 0xfa, 0x01, 0x71,
+ 0x00, 0xfc, 0x00, 0xfd, 0x01, 0x63, 0x02, 0xd9
+};
diff --git a/libiconv/include/charmaps/windows-1251.h b/libiconv/include/charmaps/windows-1251.h
new file mode 100644
index 0000000..e278850
--- /dev/null
+++ b/libiconv/include/charmaps/windows-1251.h
@@ -0,0 +1,24 @@
+static const unsigned char map_windows_1251[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x04, 0x03, 0x20, 0x1a, 0x04, 0x53,
+ 0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0x20, 0xac, 0x20, 0x30,
+ 0x04, 0x09, 0x20, 0x39, 0x04, 0x0a, 0x04, 0x0c, 0x04, 0x0b, 0x04, 0x0f,
+ 0x04, 0x52, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
+ 0x20, 0x13, 0x20, 0x14, 0xff, 0xff, 0x21, 0x22, 0x04, 0x59, 0x20, 0x3a,
+ 0x04, 0x5a, 0x04, 0x5c, 0x04, 0x5b, 0x04, 0x5f, 0x00, 0xa0, 0x04, 0x0e,
+ 0x04, 0x5e, 0x04, 0x08, 0x00, 0xa4, 0x04, 0x90, 0x00, 0xa6, 0x00, 0xa7,
+ 0x04, 0x01, 0x00, 0xa9, 0x04, 0x04, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
+ 0x00, 0xae, 0x04, 0x07, 0x00, 0xb0, 0x00, 0xb1, 0x04, 0x06, 0x04, 0x56,
+ 0x04, 0x91, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x04, 0x51, 0x21, 0x16,
+ 0x04, 0x54, 0x00, 0xbb, 0x04, 0x58, 0x04, 0x05, 0x04, 0x55, 0x04, 0x57,
+ 0x04, 0x10, 0x04, 0x11, 0x04, 0x12, 0x04, 0x13, 0x04, 0x14, 0x04, 0x15,
+ 0x04, 0x16, 0x04, 0x17, 0x04, 0x18, 0x04, 0x19, 0x04, 0x1a, 0x04, 0x1b,
+ 0x04, 0x1c, 0x04, 0x1d, 0x04, 0x1e, 0x04, 0x1f, 0x04, 0x20, 0x04, 0x21,
+ 0x04, 0x22, 0x04, 0x23, 0x04, 0x24, 0x04, 0x25, 0x04, 0x26, 0x04, 0x27,
+ 0x04, 0x28, 0x04, 0x29, 0x04, 0x2a, 0x04, 0x2b, 0x04, 0x2c, 0x04, 0x2d,
+ 0x04, 0x2e, 0x04, 0x2f, 0x04, 0x30, 0x04, 0x31, 0x04, 0x32, 0x04, 0x33,
+ 0x04, 0x34, 0x04, 0x35, 0x04, 0x36, 0x04, 0x37, 0x04, 0x38, 0x04, 0x39,
+ 0x04, 0x3a, 0x04, 0x3b, 0x04, 0x3c, 0x04, 0x3d, 0x04, 0x3e, 0x04, 0x3f,
+ 0x04, 0x40, 0x04, 0x41, 0x04, 0x42, 0x04, 0x43, 0x04, 0x44, 0x04, 0x45,
+ 0x04, 0x46, 0x04, 0x47, 0x04, 0x48, 0x04, 0x49, 0x04, 0x4a, 0x04, 0x4b,
+ 0x04, 0x4c, 0x04, 0x4d, 0x04, 0x4e, 0x04, 0x4f
+};
diff --git a/libiconv/include/charmaps/windows-1252.h b/libiconv/include/charmaps/windows-1252.h
new file mode 100644
index 0000000..a6dad8a
--- /dev/null
+++ b/libiconv/include/charmaps/windows-1252.h
@@ -0,0 +1,25 @@
+static const unsigned char map_windows_1252[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0x20, 0x1a, 0x01, 0x92,
+ 0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0x02, 0xc6, 0x20, 0x30,
+ 0x01, 0x60, 0x20, 0x39, 0x01, 0x52, 0xff, 0xff, 0x01, 0x7d, 0xff, 0xff,
+ 0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
+ 0x20, 0x13, 0x20, 0x14, 0x02, 0xdc, 0x21, 0x22, 0x01, 0x61, 0x20, 0x3a,
+ 0x01, 0x53, 0xff, 0xff, 0x01, 0x7e, 0x01, 0x78, 0x00, 0xa0, 0x00, 0xa1,
+ 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7,
+ 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
+ 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
+ 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9,
+ 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xbf,
+ 0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5,
+ 0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb,
+ 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x00, 0xd0, 0x00, 0xd1,
+ 0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7,
+ 0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x00, 0xdd,
+ 0x00, 0xde, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3,
+ 0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9,
+ 0x00, 0xea, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef,
+ 0x00, 0xf0, 0x00, 0xf1, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x00, 0xf5,
+ 0x00, 0xf6, 0x00, 0xf7, 0x00, 0xf8, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb,
+ 0x00, 0xfc, 0x00, 0xfd, 0x00, 0xfe, 0x00, 0xff
+};
+
diff --git a/libiconv/include/charmaps/windows-1253.h b/libiconv/include/charmaps/windows-1253.h
new file mode 100644
index 0000000..b0bdf1e
--- /dev/null
+++ b/libiconv/include/charmaps/windows-1253.h
@@ -0,0 +1,24 @@
+static const unsigned char map_windows_1253[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0x20, 0x1a, 0x01, 0x92,
+ 0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0xff, 0xff, 0x20, 0x30,
+ 0xff, 0xff, 0x20, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
+ 0x20, 0x13, 0x20, 0x14, 0xff, 0xff, 0x21, 0x22, 0xff, 0xff, 0x20, 0x3a,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xa0, 0x03, 0x85,
+ 0x03, 0x86, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7,
+ 0x00, 0xa8, 0x00, 0xa9, 0xff, 0xff, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
+ 0x00, 0xae, 0x20, 0x15, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
+ 0x03, 0x84, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x03, 0x88, 0x03, 0x89,
+ 0x03, 0x8a, 0x00, 0xbb, 0x03, 0x8c, 0x00, 0xbd, 0x03, 0x8e, 0x03, 0x8f,
+ 0x03, 0x90, 0x03, 0x91, 0x03, 0x92, 0x03, 0x93, 0x03, 0x94, 0x03, 0x95,
+ 0x03, 0x96, 0x03, 0x97, 0x03, 0x98, 0x03, 0x99, 0x03, 0x9a, 0x03, 0x9b,
+ 0x03, 0x9c, 0x03, 0x9d, 0x03, 0x9e, 0x03, 0x9f, 0x03, 0xa0, 0x03, 0xa1,
+ 0xff, 0xff, 0x03, 0xa3, 0x03, 0xa4, 0x03, 0xa5, 0x03, 0xa6, 0x03, 0xa7,
+ 0x03, 0xa8, 0x03, 0xa9, 0x03, 0xaa, 0x03, 0xab, 0x03, 0xac, 0x03, 0xad,
+ 0x03, 0xae, 0x03, 0xaf, 0x03, 0xb0, 0x03, 0xb1, 0x03, 0xb2, 0x03, 0xb3,
+ 0x03, 0xb4, 0x03, 0xb5, 0x03, 0xb6, 0x03, 0xb7, 0x03, 0xb8, 0x03, 0xb9,
+ 0x03, 0xba, 0x03, 0xbb, 0x03, 0xbc, 0x03, 0xbd, 0x03, 0xbe, 0x03, 0xbf,
+ 0x03, 0xc0, 0x03, 0xc1, 0x03, 0xc2, 0x03, 0xc3, 0x03, 0xc4, 0x03, 0xc5,
+ 0x03, 0xc6, 0x03, 0xc7, 0x03, 0xc8, 0x03, 0xc9, 0x03, 0xca, 0x03, 0xcb,
+ 0x03, 0xcc, 0x03, 0xcd, 0x03, 0xce, 0xff, 0xff
+};
diff --git a/libiconv/include/charmaps/windows-1254.h b/libiconv/include/charmaps/windows-1254.h
new file mode 100644
index 0000000..be22600
--- /dev/null
+++ b/libiconv/include/charmaps/windows-1254.h
@@ -0,0 +1,24 @@
+static const unsigned char map_windows_1254[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0x20, 0x1a, 0x01, 0x92,
+ 0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0x02, 0xc6, 0x20, 0x30,
+ 0x01, 0x60, 0x20, 0x39, 0x01, 0x52, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
+ 0x20, 0x13, 0x20, 0x14, 0x02, 0xdc, 0x21, 0x22, 0x01, 0x61, 0x20, 0x3a,
+ 0x01, 0x53, 0xff, 0xff, 0xff, 0xff, 0x01, 0x78, 0x00, 0xa0, 0x00, 0xa1,
+ 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7,
+ 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
+ 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
+ 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9,
+ 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xbf,
+ 0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5,
+ 0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb,
+ 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x01, 0x1e, 0x00, 0xd1,
+ 0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7,
+ 0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x01, 0x30,
+ 0x01, 0x5e, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3,
+ 0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9,
+ 0x00, 0xea, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef,
+ 0x01, 0x1f, 0x00, 0xf1, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x00, 0xf5,
+ 0x00, 0xf6, 0x00, 0xf7, 0x00, 0xf8, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb,
+ 0x00, 0xfc, 0x01, 0x31, 0x01, 0x5f, 0x00, 0xff
+};
diff --git a/libiconv/include/charmaps/windows-1255.h b/libiconv/include/charmaps/windows-1255.h
new file mode 100644
index 0000000..28bf513
--- /dev/null
+++ b/libiconv/include/charmaps/windows-1255.h
@@ -0,0 +1,24 @@
+static const unsigned char map_windows_1255[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0x20, 0x1a, 0x01, 0x92,
+ 0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0x02, 0xc6, 0x20, 0x30,
+ 0xff, 0xff, 0x20, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
+ 0x20, 0x13, 0x20, 0x14, 0x02, 0xdc, 0x21, 0x22, 0xff, 0xff, 0x20, 0x3a,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xa0, 0x00, 0xa1,
+ 0x00, 0xa2, 0x00, 0xa3, 0x20, 0xaa, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7,
+ 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xd7, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
+ 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
+ 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9,
+ 0x00, 0xf7, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xbf,
+ 0x05, 0xb0, 0x05, 0xb1, 0x05, 0xb2, 0x05, 0xb3, 0x05, 0xb4, 0x05, 0xb5,
+ 0x05, 0xb6, 0x05, 0xb7, 0x05, 0xb8, 0x05, 0xb9, 0xff, 0xff, 0x05, 0xbb,
+ 0x05, 0xbc, 0x05, 0xbd, 0x05, 0xbe, 0x05, 0xbf, 0x05, 0xc0, 0x05, 0xc1,
+ 0x05, 0xc2, 0x05, 0xc3, 0x05, 0xf0, 0x05, 0xf1, 0x05, 0xf2, 0x05, 0xf3,
+ 0x05, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0x05, 0xd0, 0x05, 0xd1, 0x05, 0xd2, 0x05, 0xd3,
+ 0x05, 0xd4, 0x05, 0xd5, 0x05, 0xd6, 0x05, 0xd7, 0x05, 0xd8, 0x05, 0xd9,
+ 0x05, 0xda, 0x05, 0xdb, 0x05, 0xdc, 0x05, 0xdd, 0x05, 0xde, 0x05, 0xdf,
+ 0x05, 0xe0, 0x05, 0xe1, 0x05, 0xe2, 0x05, 0xe3, 0x05, 0xe4, 0x05, 0xe5,
+ 0x05, 0xe6, 0x05, 0xe7, 0x05, 0xe8, 0x05, 0xe9, 0x05, 0xea, 0xff, 0xff,
+ 0xff, 0xff, 0x20, 0x0e, 0x20, 0x0f, 0xff, 0xff
+};
diff --git a/libiconv/include/charmaps/windows-1256.h b/libiconv/include/charmaps/windows-1256.h
new file mode 100644
index 0000000..fbca315
--- /dev/null
+++ b/libiconv/include/charmaps/windows-1256.h
@@ -0,0 +1,24 @@
+static const unsigned char map_windows_1256[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0x06, 0x7e, 0x20, 0x1a, 0x01, 0x92,
+ 0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0x02, 0xc6, 0x20, 0x30,
+ 0x06, 0x79, 0x20, 0x39, 0x01, 0x52, 0x06, 0x86, 0x06, 0x98, 0x06, 0x88,
+ 0x06, 0xaf, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
+ 0x20, 0x13, 0x20, 0x14, 0x06, 0xa9, 0x21, 0x22, 0x06, 0x91, 0x20, 0x3a,
+ 0x01, 0x53, 0x20, 0x0c, 0x20, 0x0d, 0x06, 0xba, 0x00, 0xa0, 0x06, 0x0c,
+ 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7,
+ 0x00, 0xa8, 0x00, 0xa9, 0x06, 0xbe, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
+ 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
+ 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9,
+ 0x06, 0x1b, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x06, 0x1f,
+ 0x06, 0xc1, 0x06, 0x21, 0x06, 0x22, 0x06, 0x23, 0x06, 0x24, 0x06, 0x25,
+ 0x06, 0x26, 0x06, 0x27, 0x06, 0x28, 0x06, 0x29, 0x06, 0x2a, 0x06, 0x2b,
+ 0x06, 0x2c, 0x06, 0x2d, 0x06, 0x2e, 0x06, 0x2f, 0x06, 0x30, 0x06, 0x31,
+ 0x06, 0x32, 0x06, 0x33, 0x06, 0x34, 0x06, 0x35, 0x06, 0x36, 0x00, 0xd7,
+ 0x06, 0x37, 0x06, 0x38, 0x06, 0x39, 0x06, 0x3a, 0x06, 0x40, 0x06, 0x41,
+ 0x06, 0x42, 0x06, 0x43, 0x00, 0xe0, 0x06, 0x44, 0x00, 0xe2, 0x06, 0x45,
+ 0x06, 0x46, 0x06, 0x47, 0x06, 0x48, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9,
+ 0x00, 0xea, 0x00, 0xeb, 0x06, 0x49, 0x06, 0x4a, 0x00, 0xee, 0x00, 0xef,
+ 0x06, 0x4b, 0x06, 0x4c, 0x06, 0x4d, 0x06, 0x4e, 0x00, 0xf4, 0x06, 0x4f,
+ 0x06, 0x50, 0x00, 0xf7, 0x06, 0x51, 0x00, 0xf9, 0x06, 0x52, 0x00, 0xfb,
+ 0x00, 0xfc, 0x20, 0x0e, 0x20, 0x0f, 0x06, 0xd2
+};
diff --git a/libiconv/include/charmaps/windows-1257.h b/libiconv/include/charmaps/windows-1257.h
new file mode 100644
index 0000000..69d4474
--- /dev/null
+++ b/libiconv/include/charmaps/windows-1257.h
@@ -0,0 +1,24 @@
+static const unsigned char map_windows_1257[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0x20, 0x1a, 0xff, 0xff,
+ 0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0xff, 0xff, 0x20, 0x30,
+ 0xff, 0xff, 0x20, 0x39, 0xff, 0xff, 0x00, 0xa8, 0x02, 0xc7, 0x00, 0xb8,
+ 0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
+ 0x20, 0x13, 0x20, 0x14, 0xff, 0xff, 0x21, 0x22, 0xff, 0xff, 0x20, 0x3a,
+ 0xff, 0xff, 0x00, 0xaf, 0x02, 0xdb, 0xff, 0xff, 0x00, 0xa0, 0xff, 0xff,
+ 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0xff, 0xff, 0x00, 0xa6, 0x00, 0xa7,
+ 0x00, 0xd8, 0x00, 0xa9, 0x01, 0x56, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
+ 0x00, 0xae, 0x00, 0xc6, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
+ 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xf8, 0x00, 0xb9,
+ 0x01, 0x57, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xe6,
+ 0x01, 0x04, 0x01, 0x2e, 0x01, 0x00, 0x01, 0x06, 0x00, 0xc4, 0x00, 0xc5,
+ 0x01, 0x18, 0x01, 0x12, 0x01, 0x0c, 0x00, 0xc9, 0x01, 0x79, 0x01, 0x16,
+ 0x01, 0x22, 0x01, 0x36, 0x01, 0x2a, 0x01, 0x3b, 0x01, 0x60, 0x01, 0x43,
+ 0x01, 0x45, 0x00, 0xd3, 0x01, 0x4c, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7,
+ 0x01, 0x72, 0x01, 0x41, 0x01, 0x5a, 0x01, 0x6a, 0x00, 0xdc, 0x01, 0x7b,
+ 0x01, 0x7d, 0x00, 0xdf, 0x01, 0x05, 0x01, 0x2f, 0x01, 0x01, 0x01, 0x07,
+ 0x00, 0xe4, 0x00, 0xe5, 0x01, 0x19, 0x01, 0x13, 0x01, 0x0d, 0x00, 0xe9,
+ 0x01, 0x7a, 0x01, 0x17, 0x01, 0x23, 0x01, 0x37, 0x01, 0x2b, 0x01, 0x3c,
+ 0x01, 0x61, 0x01, 0x44, 0x01, 0x46, 0x00, 0xf3, 0x01, 0x4d, 0x00, 0xf5,
+ 0x00, 0xf6, 0x00, 0xf7, 0x01, 0x73, 0x01, 0x42, 0x01, 0x5b, 0x01, 0x6b,
+ 0x00, 0xfc, 0x01, 0x7c, 0x01, 0x7e, 0x02, 0xd9
+};
diff --git a/libiconv/include/charmaps/windows-1258.h b/libiconv/include/charmaps/windows-1258.h
new file mode 100644
index 0000000..5bbd737
--- /dev/null
+++ b/libiconv/include/charmaps/windows-1258.h
@@ -0,0 +1,24 @@
+static const unsigned char map_windows_1258[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0x20, 0x1a, 0x01, 0x92,
+ 0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0x02, 0xc6, 0x20, 0x30,
+ 0xff, 0xff, 0x20, 0x39, 0x01, 0x52, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
+ 0x20, 0x13, 0x20, 0x14, 0x02, 0xdc, 0x21, 0x22, 0xff, 0xff, 0x20, 0x3a,
+ 0x01, 0x53, 0xff, 0xff, 0xff, 0xff, 0x01, 0x78, 0x00, 0xa0, 0x00, 0xa1,
+ 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7,
+ 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
+ 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
+ 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9,
+ 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xbf,
+ 0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x01, 0x02, 0x00, 0xc4, 0x00, 0xc5,
+ 0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb,
+ 0x03, 0x00, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x01, 0x10, 0x00, 0xd1,
+ 0x03, 0x09, 0x00, 0xd3, 0x00, 0xd4, 0x01, 0xa0, 0x00, 0xd6, 0x00, 0xd7,
+ 0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x01, 0xaf,
+ 0x03, 0x03, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0x01, 0x03,
+ 0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9,
+ 0x00, 0xea, 0x00, 0xeb, 0x03, 0x01, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef,
+ 0x01, 0x11, 0x00, 0xf1, 0x03, 0x23, 0x00, 0xf3, 0x00, 0xf4, 0x01, 0xa1,
+ 0x00, 0xf6, 0x00, 0xf7, 0x00, 0xf8, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb,
+ 0x00, 0xfc, 0x01, 0xb0, 0x20, 0xab, 0x00, 0xff
+};
diff --git a/libiconv/include/charmaps/windows-874.h b/libiconv/include/charmaps/windows-874.h
new file mode 100644
index 0000000..5749280
--- /dev/null
+++ b/libiconv/include/charmaps/windows-874.h
@@ -0,0 +1,24 @@
+static const unsigned char map_windows_874[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0x20, 0x26, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
+ 0x20, 0x13, 0x20, 0x14, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xa0, 0x0e, 0x01,
+ 0x0e, 0x02, 0x0e, 0x03, 0x0e, 0x04, 0x0e, 0x05, 0x0e, 0x06, 0x0e, 0x07,
+ 0x0e, 0x08, 0x0e, 0x09, 0x0e, 0x0a, 0x0e, 0x0b, 0x0e, 0x0c, 0x0e, 0x0d,
+ 0x0e, 0x0e, 0x0e, 0x0f, 0x0e, 0x10, 0x0e, 0x11, 0x0e, 0x12, 0x0e, 0x13,
+ 0x0e, 0x14, 0x0e, 0x15, 0x0e, 0x16, 0x0e, 0x17, 0x0e, 0x18, 0x0e, 0x19,
+ 0x0e, 0x1a, 0x0e, 0x1b, 0x0e, 0x1c, 0x0e, 0x1d, 0x0e, 0x1e, 0x0e, 0x1f,
+ 0x0e, 0x20, 0x0e, 0x21, 0x0e, 0x22, 0x0e, 0x23, 0x0e, 0x24, 0x0e, 0x25,
+ 0x0e, 0x26, 0x0e, 0x27, 0x0e, 0x28, 0x0e, 0x29, 0x0e, 0x2a, 0x0e, 0x2b,
+ 0x0e, 0x2c, 0x0e, 0x2d, 0x0e, 0x2e, 0x0e, 0x2f, 0x0e, 0x30, 0x0e, 0x31,
+ 0x0e, 0x32, 0x0e, 0x33, 0x0e, 0x34, 0x0e, 0x35, 0x0e, 0x36, 0x0e, 0x37,
+ 0x0e, 0x38, 0x0e, 0x39, 0x0e, 0x3a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0x0e, 0x3f, 0x0e, 0x40, 0x0e, 0x41, 0x0e, 0x42, 0x0e, 0x43,
+ 0x0e, 0x44, 0x0e, 0x45, 0x0e, 0x46, 0x0e, 0x47, 0x0e, 0x48, 0x0e, 0x49,
+ 0x0e, 0x4a, 0x0e, 0x4b, 0x0e, 0x4c, 0x0e, 0x4d, 0x0e, 0x4e, 0x0e, 0x4f,
+ 0x0e, 0x50, 0x0e, 0x51, 0x0e, 0x52, 0x0e, 0x53, 0x0e, 0x54, 0x0e, 0x55,
+ 0x0e, 0x56, 0x0e, 0x57, 0x0e, 0x58, 0x0e, 0x59, 0x0e, 0x5a, 0x0e, 0x5b,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
+};
diff --git a/libiconv/m4/iconv.m4 b/libiconv/m4/iconv.m4
new file mode 100644
index 0000000..e2041b9
--- /dev/null
+++ b/libiconv/m4/iconv.m4
@@ -0,0 +1,214 @@
+# iconv.m4 serial 11 (gettext-0.18.1)
+dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
+[
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([iconv])
+])
+
+AC_DEFUN([AM_ICONV_LINK],
+[
+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+ dnl those with the standalone portable GNU libiconv installed).
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+
+ dnl Add $INCICONV to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed libiconv and not disabled its use
+ dnl via --without-libiconv-prefix, he wants to use it. The first
+ dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+ am_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+
+ AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ [am_cv_func_iconv=yes])
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ [am_cv_lib_iconv=yes]
+ [am_cv_func_iconv=yes])
+ LIBS="$am_save_LIBS"
+ fi
+ ])
+ if test "$am_cv_func_iconv" = yes; then
+ AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
+ dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
+ am_save_LIBS="$LIBS"
+ if test $am_cv_lib_iconv = yes; then
+ LIBS="$LIBS $LIBICONV"
+ fi
+ AC_TRY_RUN([
+#include <iconv.h>
+#include <string.h>
+int main ()
+{
+ /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+ returns. */
+ {
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+ if (cd_utf8_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\342\202\254"; /* EURO SIGN */
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_utf8_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+ /* Test against Solaris 10 bug: Failures are not distinguishable from
+ successful returns. */
+ {
+ iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
+ if (cd_ascii_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\263";
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_ascii_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+#if 0 /* This bug could be worked around by the caller. */
+ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ char buf[50];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_88591_to_utf8,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if ((int)res > 0)
+ return 1;
+ }
+ }
+#endif
+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+ provided. */
+ if (/* Try standardized names. */
+ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+ /* Try IRIX, OSF/1 names. */
+ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+ /* Try AIX names. */
+ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+ /* Try HP-UX names. */
+ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+ return 1;
+ return 0;
+}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
+ [case "$host_os" in
+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+ *) am_cv_func_iconv_works="guessing yes" ;;
+ esac])
+ LIBS="$am_save_LIBS"
+ ])
+ case "$am_cv_func_iconv_works" in
+ *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+ *) am_func_iconv=yes ;;
+ esac
+ else
+ am_func_iconv=no am_cv_lib_iconv=no
+ fi
+ if test "$am_func_iconv" = yes; then
+ AC_DEFINE([HAVE_ICONV], [1],
+ [Define if you have the iconv() function and it works.])
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ AC_MSG_CHECKING([how to link with libiconv])
+ AC_MSG_RESULT([$LIBICONV])
+ else
+ dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+ dnl either.
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+ AC_SUBST([LIBICONV])
+ AC_SUBST([LTLIBICONV])
+])
+
+dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
+dnl avoid warnings like
+dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
+dnl This is tricky because of the way 'aclocal' is implemented:
+dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
+dnl Otherwise aclocal's initial scan pass would miss the macro definition.
+dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
+dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
+dnl warnings.
+m4_define([gl_iconv_AC_DEFUN],
+ m4_version_prereq([2.64],
+ [[AC_DEFUN_ONCE(
+ [$1], [$2])]],
+ [[AC_DEFUN(
+ [$1], [$2])]]))
+gl_iconv_AC_DEFUN([AM_ICONV],
+[
+ AM_ICONV_LINK
+ if test "$am_cv_func_iconv" = yes; then
+ AC_MSG_CHECKING([for iconv declaration])
+ AC_CACHE_VAL([am_cv_proto_iconv], [
+ AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ AC_MSG_RESULT([
+ $am_cv_proto_iconv])
+ AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
+ [Define as const if the declaration of iconv() needs const.])
+ fi
+])
hooks/post-receive
--
uClibc-ng - small C library for embedded systems
1
0
Hello,
Since commit 52b50c15fa3b319bb162f0d47fbeb6582842c020, madvise() advice
macros are no longer available on noMMU architectures. However, the
madvise() function call is still available. Therefore the following
piece of code from madplay causes a build failure:
# if defined(HAVE_MADVISE)
madvise(fdm, length, MADV_SEQUENTIAL);
# endif
Indeed, because madvise() exists in uClibc, HAVE_MADVISE is defined.
But MADV_SEQUENTIAL is no longer defined, causing a build failure.
Shouldn't madvise() be handled like posix_madvise(), i.e made not
available on noMMU systems?
Also, I see in <sys/mman.h> that the posix_madvise() prototype is still
visible on noMMU platforms. Is still really correct?
See the two attached patches (completely untested, not even build
tested) for what I mean.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
2
1

10 Dec '16
Signed-off-by: Max Filippov <jcmvbkbc(a)gmail.com>
---
utils/Makefile.in | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/utils/Makefile.in b/utils/Makefile.in
index 8666f89..5378973 100644
--- a/utils/Makefile.in
+++ b/utils/Makefile.in
@@ -25,6 +25,10 @@ else
CFLAGS-utils-shared :=
endif
+ifneq ($(HAVE_SHARED),y)
+CFLAGS-utils += -static
+endif
+
CFLAGS-ldconfig := -DBUILDING_LINKAGE
ifeq ($(UCLIBC_STATIC_LDCONFIG),y)
CFLAGS-ldconfig += -static
--
2.1.4
2
1

uClibc-ng - small C library for embedded systems branch master updated. v1.0.20-7-g5ca03df
by wbx@helium.openadk.org 10 Dec '16
by wbx@helium.openadk.org 10 Dec '16
10 Dec '16
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, master has been updated
via 5ca03df6978345c297225212cc0ca33d476b0272 (commit)
via 6579597083e608f5a66fe8a898d113c2588e2c8f (commit)
via 569914be2e968a1bda8b4982ca97c1524635174e (commit)
via 1f79f41508d0f9c30be812bea9b84fd7900a273e (commit)
via 25a60624713990c637f125e094e968ff4655307c (commit)
via bf7a84dc1fd8c9c340222260cb3e53019715088c (commit)
from b5bd012fab8560a78c70edef7e921e2b950dd02f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 5ca03df6978345c297225212cc0ca33d476b0272
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Wed Dec 7 07:56:44 2016 +0100
threads: optimize single threaded applications
Revert the removal of the weak pthread functions and
guarantee a link order so that single threaded applications
doesn't link in all the pthread functions they don't use.
Signed-off-by: Max Filippov <jcmvbkbc(a)gmail.com>
Tested-by: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
commit 6579597083e608f5a66fe8a898d113c2588e2c8f
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Wed Dec 7 07:59:34 2016 +0100
xtensa: fix static linking
uClibc-ng 1.0.20 fixed static linking with "libdl" by adding all libdl functions
into the libc. On xtensa, though, libdl contains an unresolved reference that is
satisfied by the ld.so - which is not a part of the linking in a static case.
Signed-off-by: Alexey Neyman <stilor(a)att.net>
Acked-by: Max Filippov <jcmvbkbc(a)gmail.com>
commit 569914be2e968a1bda8b4982ca97c1524635174e
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Thu Dec 8 04:36:10 2016 +0100
fix static linking for FDPIC toolchains
Fixes following problem, when trying to compile a simple
C application statically with a FDPIC toolchain (for example
with Blackfin architecture):
lib/libc.a(libdl.os): In function `do_dlclose':
(.text+0x6be): undefined reference to `_dl_free'
..
commit 1f79f41508d0f9c30be812bea9b84fd7900a273e
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Thu Dec 8 04:07:47 2016 +0100
bfin: fix a gcc warning
commit 25a60624713990c637f125e094e968ff4655307c
Author: Thomas Petazzoni <thomas.petazzoni(a)free-electrons.com>
Date: Wed Dec 7 23:20:18 2016 +0100
include/sys/mman.h: remove madvise/posix_madvise prototypes on noMMU
Signed-off-by: Thomas Petazzoni <thomas.petazzoni(a)free-electrons.com>
commit bf7a84dc1fd8c9c340222260cb3e53019715088c
Author: Thomas Petazzoni <thomas.petazzoni(a)free-electrons.com>
Date: Wed Dec 7 23:18:49 2016 +0100
libc/sysdeps/linux/common/madvise.c: disable on noMMU architectures
Similar to what was done in commit
9945c6d21797553e78cbef8034f6dd16b3824df5 for posix_madvise().
Signed-off-by: Thomas Petazzoni <thomas.petazzoni(a)free-electrons.com>
-----------------------------------------------------------------------
Summary of changes:
include/sys/mman.h | 3 ++
ldso/ldso/bfin/dl-sysdep.h | 2 +-
ldso/libdl/libdl.c | 11 +++++--
libc/misc/internals/Makefile.in | 4 ++-
libc/misc/internals/__uClibc_main.c | 37 ++++++++++++++++++++++++
libc/sysdeps/linux/common/madvise.c | 2 ++
libpthread/nptl/sysdeps/Makefile.commonarch | 5 ++--
libpthread/nptl/sysdeps/xtensa/Makefile.arch | 2 +-
libpthread/nptl/sysdeps/xtensa/libc-dl-tlsdesc.S | 1 +
9 files changed, 59 insertions(+), 8 deletions(-)
create mode 100644 libpthread/nptl/sysdeps/xtensa/libc-dl-tlsdesc.S
diff --git a/include/sys/mman.h b/include/sys/mman.h
index 71d553a..fc8fce5 100644
--- a/include/sys/mman.h
+++ b/include/sys/mman.h
@@ -99,6 +99,7 @@ static __inline__ int msync (void *__addr, size_t __len, int __flags) { return 0
#endif
+#ifdef __ARCH_USE_MMU__
#if defined __USE_BSD && (defined __UCLIBC_LINUX_SPECIFIC__ || defined __UCLIBC_HAS_THREADS_NATIVE__)
/* Advise the system about particular usage patterns the program follows
for the region starting at ADDR and extending LEN bytes. */
@@ -108,6 +109,8 @@ extern int madvise (void *__addr, size_t __len, int __advice) __THROW;
/* This is the POSIX name for this function. */
extern int posix_madvise (void *__addr, size_t __len, int __advice) __THROW;
#endif
+#endif /* __ARCH_USE_MMU__ */
+
#if defined __UCLIBC_HAS_REALTIME__
# ifdef __ARCH_USE_MMU__
diff --git a/ldso/ldso/bfin/dl-sysdep.h b/ldso/ldso/bfin/dl-sysdep.h
index 5758117..4262a26 100644
--- a/ldso/ldso/bfin/dl-sysdep.h
+++ b/ldso/ldso/bfin/dl-sysdep.h
@@ -93,6 +93,6 @@ static __always_inline void
elf_machine_relative (DL_LOADADDR_TYPE load_off, const Elf32_Addr rel_addr,
Elf32_Word relative_count)
{
- return 0;
+ return;
}
#endif
diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c
index 0cf3b70..04d7c43 100644
--- a/ldso/libdl/libdl.c
+++ b/ldso/libdl/libdl.c
@@ -30,6 +30,14 @@
*/
+/* When libdl is linked in statically into libc.a, we need to replace
+ * these symbols that otherwise would have been loaded in from ldso.
+ * This must be before including ldso.h */
+#ifndef SHARED
+#define _dl_malloc malloc
+#define _dl_free free
+#endif
+
#include <ldso.h>
#include <stdio.h>
#include <string.h>
@@ -86,9 +94,6 @@ extern char *_dl_debug;
#else /* !SHARED */
-#define _dl_malloc malloc
-#define _dl_free free
-
/* When libdl is linked as a static library, we need to replace all
* the symbols that otherwise would have been loaded in from ldso... */
diff --git a/libc/misc/internals/Makefile.in b/libc/misc/internals/Makefile.in
index ae094ee..ce7f75a 100644
--- a/libc/misc/internals/Makefile.in
+++ b/libc/misc/internals/Makefile.in
@@ -25,7 +25,9 @@ libc-shared-y += $(MISC_INTERNALS_OUT)/__uClibc_main.oS
else
libc-shared-y += $(MISC_INTERNALS_OUT)/__uClibc_main.os
endif
-libc-static-y += $(MISC_INTERNALS_OUT)/__uClibc_main.o
+# link order is important to not pull in pthread functions, when
+# a single threaded application is statically linked
+libc-static-y := $(MISC_INTERNALS_OUT)/__uClibc_main.o $(libc-static-y)
libc-static-$(UCLIBC_FORMAT_FLAT_SEP_DATA) += \
$(MISC_INTERNALS_OUT)/shared_flat_initfini.o \
$(MISC_INTERNALS_OUT)/shared_flat_add_library.o
diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c
index 46e24d8..d80565e 100644
--- a/libc/misc/internals/__uClibc_main.c
+++ b/libc/misc/internals/__uClibc_main.c
@@ -68,6 +68,43 @@ uintptr_t __stack_chk_guard attribute_relro;
void internal_function _dl_aux_init (ElfW(auxv_t) *av);
+#ifdef __UCLIBC_HAS_THREADS__
+/*
+ * uClibc internal locking requires that we have weak aliases
+ * for dummy functions in case a single threaded application is linked.
+ * This needs to be in compilation unit that is pulled always
+ * in or linker will disregard these weaks.
+ */
+
+static int __pthread_return_0 (pthread_mutex_t *unused) { return 0; }
+weak_alias (__pthread_return_0, __pthread_mutex_lock)
+weak_alias (__pthread_return_0, __pthread_mutex_trylock)
+weak_alias (__pthread_return_0, __pthread_mutex_unlock)
+
+int weak_function
+__pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *attr)
+{
+ return 0;
+}
+
+void weak_function
+_pthread_cleanup_push_defer(struct _pthread_cleanup_buffer *__buffer,
+ void (*__routine) (void *), void *__arg)
+{
+ __buffer->__routine = __routine;
+ __buffer->__arg = __arg;
+}
+
+void weak_function
+_pthread_cleanup_pop_restore(struct _pthread_cleanup_buffer *__buffer,
+ int __execute)
+{
+ if (__execute)
+ __buffer->__routine(__buffer->__arg);
+}
+
+#endif /* __UCLIBC_HAS_THREADS__ */
+
#endif /* !SHARED */
/* Defeat compiler optimization which assumes function addresses are never NULL */
diff --git a/libc/sysdeps/linux/common/madvise.c b/libc/sysdeps/linux/common/madvise.c
index e953d7b..bb486d2 100644
--- a/libc/sysdeps/linux/common/madvise.c
+++ b/libc/sysdeps/linux/common/madvise.c
@@ -9,6 +9,8 @@
#include <sys/syscall.h>
#include <sys/mman.h>
+#ifdef __ARCH_USE_MMU__
#if defined __NR_madvise && defined __USE_BSD
_syscall3(int, madvise, void *, __addr, size_t, __len, int, __advice)
+#endif /* __ARCH_USE_MMU__ */
#endif
diff --git a/libpthread/nptl/sysdeps/Makefile.commonarch b/libpthread/nptl/sysdeps/Makefile.commonarch
index c206ac9..134eade 100644
--- a/libpthread/nptl/sysdeps/Makefile.commonarch
+++ b/libpthread/nptl/sysdeps/Makefile.commonarch
@@ -32,10 +32,11 @@ libpthread_arch_SOBJ = $(patsubst %.S,$(libpthread_arch_OUT)/%.o,$(libpthread_ar
libpthread_arch_OBJS = $(libpthread_subarch_OBJS) $(libpthread_arch_COBJ) $(libpthread_arch_SOBJ)
libc_arch_COBJ = $(patsubst %.c,$(libpthread_arch_OUT)/%.o,$(libc_arch_CSRC))
-libc_arch_SOBJ = $(patsubst %.c,$(libpthread_arch_OUT)/%.o,$(libc_arch_SSRC))
+libc_arch_SOBJ = $(patsubst %.S,$(libpthread_arch_OUT)/%.o,$(libc_arch_SSRC))
libc_arch_OBJS = $(libc_arch_COBJ) $(libc_arch_SOBJ)
libc_arch_a_COBJ = $(patsubst %.c,$(libpthread_arch_OUT)/%.o,$(libc_arch_a_CSRC))
-libc_arch_a_OBJS = $(libc_arch_a_COBJ)
+libc_arch_a_SOBJ = $(patsubst %.S,$(libpthread_arch_OUT)/%.o,$(libc_arch_a_SSRC))
+libc_arch_a_OBJS = $(libc_arch_a_COBJ) $(libc_arch_a_SOBJ)
librt_arch_COBJ = $(patsubst %.c,$(libpthread_arch_OUT)/%.o,$(librt_arch_CSRC))
librt_arch_SOBJ = $(patsubst %.S,$(libpthread_arch_OUT)/%.o,$(librt_arch_SSRC))
diff --git a/libpthread/nptl/sysdeps/xtensa/Makefile.arch b/libpthread/nptl/sysdeps/xtensa/Makefile.arch
index 9e63b19..642e4ba 100644
--- a/libpthread/nptl/sysdeps/xtensa/Makefile.arch
+++ b/libpthread/nptl/sysdeps/xtensa/Makefile.arch
@@ -20,7 +20,7 @@ ASFLAGS-pthread_spin_lock.S = -DNOT_IN_libc -DIS_IN_libpthread
ASFLAGS-pthread_spin_trylock.S = -DNOT_IN_libc -DIS_IN_libpthread
libc_arch_a_CSRC = libc-tls.c
-librt_arch_a_SSRC = dl-tlsdesc.S
+libc_arch_a_SSRC = libc-dl-tlsdesc.S
CFLAGS-gen_tlsdesc.c = -S
$(libpthread_arch_OUT)/gen_tlsdesc.c: $(libpthread_arch_DIR)/tlsdesc.sym | $(libpthread_arch_OUT)
diff --git a/libpthread/nptl/sysdeps/xtensa/libc-dl-tlsdesc.S b/libpthread/nptl/sysdeps/xtensa/libc-dl-tlsdesc.S
new file mode 100644
index 0000000..39da7c2
--- /dev/null
+++ b/libpthread/nptl/sysdeps/xtensa/libc-dl-tlsdesc.S
@@ -0,0 +1 @@
+#include <ldso/ldso/xtensa/dl-tlsdesc.S>
hooks/post-receive
--
uClibc-ng - small C library for embedded systems
1
0
Hi Max,
following patch was developed by crosstool-ng developer.
Okay to commit?
best regards
Waldemar
3
3