meta-openembedded: subtree update:ea8604a0e3..d0748372d2
Adrian Bunk (1):
libnih: Remove
Alexander Kanavin (3):
sysprof: add a recipe from oe-core
sysprof: update to 3.34.1
sysprof: fix ARM builds
Andreas Müller (2):
evolution-data-server: remove pythonnative from inherit
fontforge: rework for python3
Diego Rondini (2):
cups-filters: use libexecdir and cleanup
cups-filters: upgrade 1.26.0 -> 1.26.2
Gianfranco Costamagna (2):
websocketpp: refresh clang patch
vboxguestdrivers: update to new version 6.1.2
Khem Raj (14):
sysprof: avoid namesapace conflict with glibc headers
jack: Use c++ compiler for programs which use c++ source files
iozone3: Do not define prototype for pread64()
libhugetlbfs: Fix missing file mode in create() API
rdma-core: Use overloadable attribute with clang
sysprof: Correct systemdunitdir location
opencv: Tend for the compiler --param option rename in gcc10
grpc: Link with libatomic on powerpc
ssiapi: Needs boost/ppc support
fluentbit: Fix build on powerpc
mozjs: extend --with-intl-api=build to ppc
mpv: Disable lua support on powerpc
packagegroup-meta-oe: Remove unbuildable recipes for ppc64le from rdeps
opensc: Upgrade to 0.20.0
Mingde (Matthew) Zeng (2):
byacc: upgrade 20191103 -> 20191125
keyutils: upgrade 1.6 -> 1.6.1
Peter Kjellerstedt (1):
gitpkgv.bbclass: Add support for extending the supported tag formats
S. Lockwood-Childs (1):
lcov: geninfo needs another perl module
Wang Mingyu (15):
python3-cheetah: upgrade 3.2.3 -> 3.2.4
python3-coverage: 4.4.2 -> 5.0.2
python3-keras-applications: upgrade 1.0.6 -> 1.0.8
python3-keras-preprocessing: upgrade 1.0.5 -> 1.1.0
python3-more-itertools: 7.2.0 -> 8.1.0
python3-multidict: 4.5.2 -> 4.7.4
python3-ordered-set: 3.0.1 -> 3.1.1
python3-pulsectl: upgrade 18.12.5 -> 20.1.2
python-cmd2: upgrade 0.9.22 -> 0.9.23
python-engineio: upgrade 3.11.1 -> 3.11.2
python-javaobj-py3: upgrade 0.3.0 -> 0.4.0.1
python-kconfiglib: upgrade 10.42.0 -> 13.7.0
python-packaging: 19.2 -> 20.0
python-periphery: 2.0.0 -> 2.0.1
python-pyrsistent: upgrade 0.15.5 -> 0.15.7
William A. Kennington III via Openembedded-devel (1):
cppzmq: bump to version 4.6.0
Yi Zhao (3):
crda: fix UDEV_RULE_DIR
open-vm-tools: fix build error with usrmerge feature
multipath-tools: fix libudevdir
Zang Ruochen (14):
dhcpcd: upgrade 8.1.1 -> 8.1.5
fio: upgrade 3.16 -> 3.17
libencode-perl: upgrade 3.01 -> 3.02
zabbix: modify service file
libmicrohttpd: upgrade 0.9.68 -> 0.9.69
libsass: upgrade 3.6.1 -> 3.6.3
pcsc-lite: upgrade 1.8.25 -> 1.8.26
python3-yarl: upgrade 1.3.0 -> 1.4.2
python3-wheel: upgrade 0.32.3 -> 0.33.6
python3-websockets: upgrade 8.0.2 -> 8.1
python-wcwidth: upgrade 0.1.7 -> 0.1.8
python-waitress: upgrade 1.4.1 -> 1.4.2
python-tqdm: upgrade 4.38.0 -> 4.41.1
python-supervisor: upgrade 4.0.2 -> 4.1.0
Change-Id: I2c394941fc3140bfeadcec3542cd72892fdcda6e
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/evolution-data-server/evolution-data-server.bb b/meta-openembedded/meta-gnome/recipes-gnome/evolution-data-server/evolution-data-server.bb
index 08bd778..7f267b4 100644
--- a/meta-openembedded/meta-gnome/recipes-gnome/evolution-data-server/evolution-data-server.bb
+++ b/meta-openembedded/meta-gnome/recipes-gnome/evolution-data-server/evolution-data-server.bb
@@ -6,7 +6,7 @@
dbus db virtual/libiconv zlib libsoup-2.4 libical nss libsecret \
"
-inherit gsettings gobject-introspection features_check cmake gtk-doc gettext perlnative pythonnative
+inherit gsettings gobject-introspection features_check cmake gtk-doc gettext perlnative
REQUIRED_DISTRO_FEATURES = "x11"
diff --git a/meta-openembedded/meta-gnome/recipes-kernel/sysprof/files/0001-libsysprof-ui-Rename-environ-to-sys_environ.patch b/meta-openembedded/meta-gnome/recipes-kernel/sysprof/files/0001-libsysprof-ui-Rename-environ-to-sys_environ.patch
new file mode 100644
index 0000000..1e2b3c9
--- /dev/null
+++ b/meta-openembedded/meta-gnome/recipes-kernel/sysprof/files/0001-libsysprof-ui-Rename-environ-to-sys_environ.patch
@@ -0,0 +1,63 @@
+From 4bd0d5d5dd6841fbac8385527617d18e7731244d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 15 Jan 2020 13:17:58 -0800
+Subject: [PATCH] libsysprof-ui: Rename environ to sys_environ
+
+This helps avoid namesapace conflict with glibc headers
+
+Fixes
+/usr/include/unistd.h:545:15: note: previous declaration is here
+
+extern char **environ;
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/libsysprof-ui/sysprof-profiler-assistant.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/libsysprof-ui/sysprof-profiler-assistant.c b/src/libsysprof-ui/sysprof-profiler-assistant.c
+index 22e3e24..c55d551 100644
+--- a/src/libsysprof-ui/sysprof-profiler-assistant.c
++++ b/src/libsysprof-ui/sysprof-profiler-assistant.c
+@@ -235,7 +235,7 @@ sysprof_profiler_assistant_record_clicked_cb (SysprofProfilerAssistant *self,
+ {
+ g_auto(GStrv) argv = NULL;
+ g_auto(GStrv) env = NULL;
+- SysprofEnviron *environ;
++ SysprofEnviron *sys_environ;
+ const gchar *command;
+ gint argc;
+
+@@ -245,8 +245,8 @@ sysprof_profiler_assistant_record_clicked_cb (SysprofProfilerAssistant *self,
+ sysprof_profiler_set_spawn (profiler, TRUE);
+ sysprof_profiler_set_spawn_argv (profiler, (const gchar * const *)argv);
+
+- environ = sysprof_environ_editor_get_environ (self->environ_editor);
+- env = sysprof_environ_get_environ (environ);
++ sys_environ = sysprof_environ_editor_get_environ (self->environ_editor);
++ env = sysprof_environ_get_environ (sys_environ);
+ sysprof_profiler_set_spawn_env (profiler, (const gchar * const *)env);
+
+ sysprof_profiler_set_spawn_inherit_environ (profiler,
+@@ -405,7 +405,7 @@ sysprof_profiler_assistant_class_init (SysprofProfilerAssistantClass *klass)
+ static void
+ sysprof_profiler_assistant_init (SysprofProfilerAssistant *self)
+ {
+- g_autoptr(SysprofEnviron) environ = sysprof_environ_new ();
++ g_autoptr(SysprofEnviron) sys_environ = sysprof_environ_new ();
+
+ gtk_widget_init_template (GTK_WIDGET (self));
+
+@@ -445,7 +445,7 @@ sysprof_profiler_assistant_init (SysprofProfilerAssistant *self)
+ self,
+ G_CONNECT_SWAPPED);
+
+- sysprof_environ_editor_set_environ (self->environ_editor, environ);
++ sysprof_environ_editor_set_environ (self->environ_editor, sys_environ);
+ }
+
+ void
+--
+2.25.0
+
diff --git a/meta-openembedded/meta-gnome/recipes-kernel/sysprof/files/0001-meson.build-do-not-hardcode-linux-as-host_machine-.s.patch b/meta-openembedded/meta-gnome/recipes-kernel/sysprof/files/0001-meson.build-do-not-hardcode-linux-as-host_machine-.s.patch
new file mode 100644
index 0000000..2354892
--- /dev/null
+++ b/meta-openembedded/meta-gnome/recipes-kernel/sysprof/files/0001-meson.build-do-not-hardcode-linux-as-host_machine-.s.patch
@@ -0,0 +1,42 @@
+From 43c39b5685445242d071b3706af2903efa508b4a Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 14 Jan 2020 12:58:27 +0100
+Subject: [PATCH] meson.build: do not hardcode 'linux' as
+ host_machine().system() value
+
+In some build environmets such as OpenEmbedded this can be 'linux-gnueabi'
+or otherwise not exactly 'linux'.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ src/libsysprof/meson.build | 2 +-
+ src/tools/meson.build | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/libsysprof/meson.build b/src/libsysprof/meson.build
+index 3449961..3c2d186 100644
+--- a/src/libsysprof/meson.build
++++ b/src/libsysprof/meson.build
+@@ -84,7 +84,7 @@ libsysprof_deps = [
+ polkit_dep,
+ ]
+
+-if host_machine.system() == 'linux'
++if host_machine.system().contains('linux')
+ libsysprof_public_sources += [
+ 'sysprof-memory-source.c',
+ 'sysprof-perf-counter.c',
+diff --git a/src/tools/meson.build b/src/tools/meson.build
+index 670052a..3fb7f0c 100644
+--- a/src/tools/meson.build
++++ b/src/tools/meson.build
+@@ -2,7 +2,7 @@ tools_deps = [
+ libsysprof_capture_dep,
+ ]
+
+-if get_option('libsysprof') and host_machine.system() == 'linux'
++if get_option('libsysprof') and host_machine.system().contains('linux')
+ polkit_agent_dep = dependency('polkit-agent-1')
+ sysprof_cli = executable('sysprof-cli', 'sysprof-cli.c',
+ dependencies: tools_deps + [libsysprof_dep, polkit_dep, polkit_agent_dep],
diff --git a/meta-openembedded/meta-gnome/recipes-kernel/sysprof/files/0001-sysprof-Define-NT_GNU_BUILD_ID-if-undefined.patch b/meta-openembedded/meta-gnome/recipes-kernel/sysprof/files/0001-sysprof-Define-NT_GNU_BUILD_ID-if-undefined.patch
new file mode 100644
index 0000000..75aa86c
--- /dev/null
+++ b/meta-openembedded/meta-gnome/recipes-kernel/sysprof/files/0001-sysprof-Define-NT_GNU_BUILD_ID-if-undefined.patch
@@ -0,0 +1,35 @@
+From 3025d80aaacc5f67aa9eb1e6fde30f71d9c5b04b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 18 Jul 2011 16:00:17 -0700
+Subject: [PATCH 1/2] sysprof: Define NT_GNU_BUILD_ID if undefined
+
+On uclibc elf.h does not have GNU extentions but we need this define
+so we define it locally if its not getting it from elf.h
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+
+%% original patch: define-NT_GNU_BUILD_ID.patch
+---
+ src/libsysprof/elfparser.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/libsysprof/elfparser.h b/src/libsysprof/elfparser.h
+index 160e4c9..94fa5c0 100644
+--- a/src/libsysprof/elfparser.h
++++ b/src/libsysprof/elfparser.h
+@@ -18,6 +18,10 @@
+
+ #include <glib.h>
+
++#ifndef NT_GNU_BUILD_ID
++#define NT_GNU_BUILD_ID 3
++#endif
++
+ typedef struct ElfSym ElfSym;
+ typedef struct ElfParser ElfParser;
+
+--
+2.17.1
+
diff --git a/meta-openembedded/meta-gnome/recipes-kernel/sysprof/sysprof_3.34.1.bb b/meta-openembedded/meta-gnome/recipes-kernel/sysprof/sysprof_3.34.1.bb
new file mode 100644
index 0000000..1e530ef
--- /dev/null
+++ b/meta-openembedded/meta-gnome/recipes-kernel/sysprof/sysprof_3.34.1.bb
@@ -0,0 +1,37 @@
+SUMMARY = "System-wide Performance Profiler for Linux"
+HOMEPAGE = "http://www.sysprof.com"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://src/sysprof/sysprof-application.c;endline=17;md5=a3de8df3b0f8876dd01e1388d2d4b607"
+
+GNOMEBASEBUILDCLASS = "meson"
+inherit gnomebase gettext systemd upstream-version-is-even gsettings
+
+DEPENDS = "glib-2.0 libxml2-native glib-2.0-native"
+
+SRC_URI[archive.md5sum] = "cc32455277b31afb1965d627ae3e3629"
+SRC_URI[archive.sha256sum] = "844bbb8d8b65071b3bca96f8e921319ceef81f2d2c51fcc9da63a4b355c893d0"
+SRC_URI += "file://0001-sysprof-Define-NT_GNU_BUILD_ID-if-undefined.patch \
+ file://0001-meson.build-do-not-hardcode-linux-as-host_machine-.s.patch \
+ file://0001-libsysprof-ui-Rename-environ-to-sys_environ.patch \
+ "
+
+PACKAGECONFIG ?= "sysprofd libsysprof ${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'gtk', '', d)}"
+PACKAGECONFIG[gtk] = "-Denable_gtk=true,-Denable_gtk=false,gtk+3 libdazzle"
+PACKAGECONFIG[sysprofd] = "-Dwith_sysprofd=bundled,-Dwith_sysprofd=none,polkit"
+PACKAGECONFIG[libsysprof] = "-Dlibsysprof=true,-Dlibsysprof=false,polkit"
+
+# Enablig this requries yelp
+EXTRA_OEMESON += "-Dhelp=false -Dsystemdunitdir=${systemd_unitdir}/system"
+
+SOLIBS = ".so"
+FILES_SOLIBSDEV = ""
+
+SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'sysprofd', 'sysprof2.service sysprof3.service', '', d)}"
+
+FILES_${PN} += " \
+ ${datadir}/dbus-1/system-services \
+ ${datadir}/dbus-1/system.d \
+ ${datadir}/dbus-1/interfaces \
+ ${datadir}/metainfo \
+ "
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/crda/crda_3.18.bb b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda_3.18.bb
index c93905e..7c925b2 100644
--- a/meta-openembedded/meta-networking/recipes-connectivity/crda/crda_3.18.bb
+++ b/meta-openembedded/meta-networking/recipes-connectivity/crda/crda_3.18.bb
@@ -22,7 +22,7 @@
# Recursive make problem
EXTRA_OEMAKE = "MAKEFLAGS= DESTDIR=${D} LIBDIR=${libdir}/crda LDLIBREG='-Wl,-rpath,${libdir}/crda -lreg' \
- UDEV_RULE_DIR=${nonarch_libdir}/udev/rules.d/"
+ UDEV_RULE_DIR=${nonarch_base_libdir}/udev/rules.d/"
TARGET_BITS = "${SITEINFO_BITS}"
export TARGET_BITS
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_8.1.1.bb b/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_8.1.5.bb
similarity index 80%
rename from meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_8.1.1.bb
rename to meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_8.1.5.bb
index a5aa584..3349ca1 100644
--- a/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_8.1.1.bb
+++ b/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_8.1.5.bb
@@ -10,11 +10,10 @@
UPSTREAM_CHECK_URI = "https://roy.marples.name/downloads/dhcpcd/"
SRC_URI = "http://roy.marples.name/downloads/${BPN}/${BPN}-${PV}.tar.xz \
- file://0001-remove-INCLUDEDIR-to-prevent-build-issues.patch \
- file://0001-dhcpcd-Fix-build-error-with-musl.patch"
+ file://0001-remove-INCLUDEDIR-to-prevent-build-issues.patch"
-SRC_URI[md5sum] = "dc4f29a62afc53cdac311e925cfd1bc7"
-SRC_URI[sha256sum] = "485d308fe10febd36b6f936e4260e4ab34a146e4f00a9f7a5509c4377ad5ea82"
+SRC_URI[md5sum] = "57fd5dd4ff9722773ec67239db34d3b5"
+SRC_URI[sha256sum] = "c5cbe15069cef347e72d0bf7a19b0255571ee0c184c6705859a09588a50a8ebd"
inherit pkgconfig autotools-brokensep
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/files/0001-dhcpcd-Fix-build-error-with-musl.patch b/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/files/0001-dhcpcd-Fix-build-error-with-musl.patch
deleted file mode 100644
index b48b467..0000000
--- a/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/files/0001-dhcpcd-Fix-build-error-with-musl.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Subject: [PATCH] dhcpcd: Fix build error with musl.
-
-Re-organize the header includes in if-linux.c to fix error as follows:
-In file included from if-linux.c:49:
-path/usr/include/netinet/if_ether.h:112:8: error: redefinition of 'struct ethhdr'
-
-Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
----
- src/if-linux.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/if-linux.c b/src/if-linux.c
-index fd47278..bfa878b 100644
---- a/src/if-linux.c
-+++ b/src/if-linux.c
-@@ -37,6 +37,7 @@
- #include <linux/if_addr.h>
- #include <linux/if_link.h>
- #include <linux/if_packet.h>
-+#include <netinet/if_ether.h>
- #include <linux/if_tun.h>
- #include <linux/if_vlan.h>
- #include <linux/filter.h>
-@@ -46,7 +47,6 @@
-
- #include <arpa/inet.h>
- #include <net/if.h>
--#include <netinet/if_ether.h>
- #include <netinet/in_systm.h>
- #include <netinet/in.h>
- #include <net/route.h>
---
-2.7.4
-
diff --git a/meta-openembedded/meta-networking/recipes-devtools/grpc/grpc_1.24.3.bb b/meta-openembedded/meta-networking/recipes-devtools/grpc/grpc_1.24.3.bb
index 3cde6f7..6ab15da 100644
--- a/meta-openembedded/meta-networking/recipes-devtools/grpc/grpc_1.24.3.bb
+++ b/meta-openembedded/meta-networking/recipes-devtools/grpc/grpc_1.24.3.bb
@@ -44,6 +44,10 @@
sed -i -e "s/set(_gRPC_ALLTARGETS_LIBRARIES \${CMAKE_DL_LIBS} rt m pthread)/set(_gRPC_ALLTARGETS_LIBRARIES \${CMAKE_DL_LIBS} atomic rt m pthread)/g" ${S}/CMakeLists.txt
}
+do_configure_prepend_powerpc() {
+ sed -i -e "s/set(_gRPC_ALLTARGETS_LIBRARIES \${CMAKE_DL_LIBS} rt m pthread)/set(_gRPC_ALLTARGETS_LIBRARIES \${CMAKE_DL_LIBS} atomic rt m pthread)/g" ${S}/CMakeLists.txt
+}
+
do_configure_prepend_toolchain-clang_x86() {
sed -i -e "s/set(_gRPC_ALLTARGETS_LIBRARIES \${CMAKE_DL_LIBS} rt m pthread)/set(_gRPC_ALLTARGETS_LIBRARIES \${CMAKE_DL_LIBS} atomic rt m pthread)/g" ${S}/CMakeLists.txt
}
diff --git a/meta-openembedded/meta-networking/recipes-support/rdma-core/rdma-core/0001-Use-overloadable-attribute-with-clang.patch b/meta-openembedded/meta-networking/recipes-support/rdma-core/rdma-core/0001-Use-overloadable-attribute-with-clang.patch
new file mode 100644
index 0000000..1ba6847
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/rdma-core/rdma-core/0001-Use-overloadable-attribute-with-clang.patch
@@ -0,0 +1,42 @@
+From 42976ed0a0160864b41680604ea9cdb3c175cb94 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 15 Jan 2020 17:48:28 -0800
+Subject: [PATCH] Use overloadable attribute with clang
+
+This is overriding the libc implementation
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ librdmacm/preload.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/librdmacm/preload.c b/librdmacm/preload.c
+index d46beb1b..b451de50 100644
+--- a/librdmacm/preload.c
++++ b/librdmacm/preload.c
+@@ -59,6 +59,12 @@
+ #include "cma.h"
+ #include "indexer.h"
+
++#ifdef __clang__
++#define OVERLOAD __attribute__((overloadable))
++#else
++#define OVERLOAD
++#endif
++
+ struct socket_calls {
+ int (*socket)(int domain, int type, int protocol);
+ int (*bind)(int socket, const struct sockaddr *addr, socklen_t addrlen);
+@@ -793,7 +799,7 @@ ssize_t recv(int socket, void *buf, size_t len, int flags)
+ rrecv(fd, buf, len, flags) : real.recv(fd, buf, len, flags);
+ }
+
+-ssize_t recvfrom(int socket, void *buf, size_t len, int flags,
++ssize_t OVERLOAD recvfrom(int socket, void *buf, size_t len, int flags,
+ struct sockaddr *src_addr, socklen_t *addrlen)
+ {
+ int fd;
+--
+2.25.0
+
diff --git a/meta-openembedded/meta-networking/recipes-support/rdma-core/rdma-core_27.0.bb b/meta-openembedded/meta-networking/recipes-support/rdma-core/rdma-core_27.0.bb
index 361d69b..417979d 100644
--- a/meta-openembedded/meta-networking/recipes-support/rdma-core/rdma-core_27.0.bb
+++ b/meta-openembedded/meta-networking/recipes-support/rdma-core/rdma-core_27.0.bb
@@ -9,6 +9,7 @@
SRC_URI = "git://github.com/linux-rdma/rdma-core.git;branch=${BRANCH} \
file://0001-Remove-man-files-which-cant-be-built.patch \
file://0001-librdmacm-Use-sched_yield-instead-of-pthread_yield.patch \
+ file://0001-Use-overloadable-attribute-with-clang.patch \
"
SRCREV = "84caf035ae6123e2296b72006cd2cf698c65eb46"
S = "${WORKDIR}/git"
diff --git a/meta-openembedded/meta-oe/classes/gitpkgv.bbclass b/meta-openembedded/meta-oe/classes/gitpkgv.bbclass
index ab591bd..180421e 100644
--- a/meta-openembedded/meta-oe/classes/gitpkgv.bbclass
+++ b/meta-openembedded/meta-oe/classes/gitpkgv.bbclass
@@ -40,10 +40,16 @@
GITPKGV = "${@get_git_pkgv(d, False)}"
GITPKGVTAG = "${@get_git_pkgv(d, True)}"
-def gitpkgv_drop_tag_prefix(version):
+# This regexp is used to drop unwanted parts of the found tags. Any matching
+# groups will be concatenated to yield the final version.
+GITPKGV_TAG_REGEXP ??= "v(\d.*)"
+
+def gitpkgv_drop_tag_prefix(d, version):
import re
- if re.match("v\d", version):
- return version[1:]
+
+ m = re.match(d.getVar('GITPKGV_TAG_REGEXP'), version)
+ if m:
+ return ''.join(group for group in m.groups() if group)
else:
return version
@@ -105,7 +111,7 @@
output = bb.fetch2.runfetchcmd(
"git --git-dir=%(repodir)s describe %(rev)s --tags --exact-match 2>/dev/null"
% vars, d, quiet=True).strip()
- ver = gitpkgv_drop_tag_prefix(output)
+ ver = gitpkgv_drop_tag_prefix(d, output)
except Exception:
ver = "0.0-%s-g%s" % (commits, vars['rev'][:7])
else:
diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/files/0001-arch-arm-Consider-armv7ve-arch-as-well.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/files/0001-arch-arm-Consider-armv7ve-arch-as-well.patch
deleted file mode 100644
index 983a76f..0000000
--- a/meta-openembedded/meta-oe/recipes-benchmark/fio/files/0001-arch-arm-Consider-armv7ve-arch-as-well.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 2af58909cd9f2862d1dc07836e201361a2cd8d5d Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 5 Oct 2019 08:53:22 -0700
-Subject: [PATCH] arch-arm: Consider armv7ve arch as well
-
-Upstream-Status: Submitted []
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- arch/arch-arm.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arch-arm.h b/arch/arch-arm.h
-index 78cb2ebe..4f722967 100644
---- a/arch/arch-arm.h
-+++ b/arch/arch-arm.h
-@@ -11,7 +11,7 @@
- #define nop __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t")
- #define read_barrier() __asm__ __volatile__ ("" : : : "memory")
- #define write_barrier() __asm__ __volatile__ ("" : : : "memory")
--#elif defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_8A__)
-+#elif defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_8A__) || defined(__ARM_ARCH_7VE__)
- #define nop __asm__ __volatile__ ("nop")
- #define read_barrier() __sync_synchronize()
- #define write_barrier() __sync_synchronize()
---
-2.23.0
-
diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/files/0001-update-the-interpreter-paths.patch b/meta-openembedded/meta-oe/recipes-benchmark/fio/files/0001-update-the-interpreter-paths.patch
index 327b9f5..c9c3a08 100644
--- a/meta-openembedded/meta-oe/recipes-benchmark/fio/files/0001-update-the-interpreter-paths.patch
+++ b/meta-openembedded/meta-oe/recipes-benchmark/fio/files/0001-update-the-interpreter-paths.patch
@@ -16,8 +16,7 @@
tools/hist/fiologparser_hist.py | 2 +-
tools/hist/half-bins.py | 2 +-
tools/plot/fio2gnuplot | 2 +-
- t/steadystate_tests.py | 2 +-
- 7 files changed, 7 insertions(+), 7 deletions(-)
+ 6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/tools/fio_jsonplus_clat2csv b/tools/fio_jsonplus_clat2csv
index 78a007e5..0524b6e6 100755
@@ -79,16 +78,6 @@
# Note: this script is python2 and python3 compatible.
#
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
-diff --git a/t/steadystate_tests.py b/t/steadystate_tests.py
-index 50254dcc..95e7dfde 100755
---- a/t/steadystate_tests.py
-+++ b/t/steadystate_tests.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/python2.7
-+#!/usr/bin/env python
- # Note: this script is python2 and python 3 compatible.
- #
- # steadystate_tests.py
--
2.17.1
diff --git a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio_3.16.bb b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio_3.17.bb
similarity index 92%
rename from meta-openembedded/meta-oe/recipes-benchmark/fio/fio_3.16.bb
rename to meta-openembedded/meta-oe/recipes-benchmark/fio/fio_3.17.bb
index adab618..e41c21d 100644
--- a/meta-openembedded/meta-oe/recipes-benchmark/fio/fio_3.16.bb
+++ b/meta-openembedded/meta-oe/recipes-benchmark/fio/fio_3.17.bb
@@ -21,10 +21,9 @@
PACKAGECONFIG ??= "${PACKAGECONFIG_NUMA}"
PACKAGECONFIG[numa] = ",--disable-numa,numactl"
-SRCREV = "92f75708b530989fdb13b50be6604f44b80d038d"
+SRCREV = "08ce9dc20b8a4e55db7af6d869ddfa49b4a02d03"
SRC_URI = "git://git.kernel.dk/fio.git \
file://0001-update-the-interpreter-paths.patch \
- file://0001-arch-arm-Consider-armv7ve-arch-as-well.patch \
"
S = "${WORKDIR}/git"
diff --git a/meta-openembedded/meta-oe/recipes-benchmark/iozone3/iozone3/0001-let-system-headers-provide-pread64.patch b/meta-openembedded/meta-oe/recipes-benchmark/iozone3/iozone3/0001-let-system-headers-provide-pread64.patch
new file mode 100644
index 0000000..a61a56a
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-benchmark/iozone3/iozone3/0001-let-system-headers-provide-pread64.patch
@@ -0,0 +1,34 @@
+From 64389a67b93a53b9fb7e9e20e905a5ee4613606b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 15 Jan 2020 17:10:42 -0800
+Subject: [PATCH] let system headers provide pread64()
+
+The signature does not match with system headers anyway
+
+Fixes
+
+iozone.c:1270:9: error: redeclaration of 'pread64' must have the 'overloadable' attribute ssize_t pread64(); ^ /mnt/b/yoe/build/tmp/work/core2-64-yoe-linux/iozone3/488-r0/recipe-sysroot/usr/include/bits/unistd.h:83:1: note: previous overload of function is here pread64 (int __fd, void *const __clang_pass_object_size0 __buf, ^
+1 error generated.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ iozone.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/iozone.c b/iozone.c
+index 090dd5f..fdea400 100644
+--- a/iozone.c
++++ b/iozone.c
+@@ -1267,7 +1267,6 @@ int pit_gettimeofday();
+ #ifdef HAVE_ANSIC_C
+ #if defined (HAVE_PREAD) && defined(_LARGEFILE64_SOURCE)
+ ssize_t pwrite64();
+-ssize_t pread64();
+ #endif
+ #if !defined(linux)
+ char *getenv();
+--
+2.25.0
+
diff --git a/meta-openembedded/meta-oe/recipes-benchmark/iozone3/iozone3_488.bb b/meta-openembedded/meta-oe/recipes-benchmark/iozone3/iozone3_488.bb
index 5885b14..4d9e077 100644
--- a/meta-openembedded/meta-oe/recipes-benchmark/iozone3/iozone3_488.bb
+++ b/meta-openembedded/meta-oe/recipes-benchmark/iozone3/iozone3_488.bb
@@ -8,6 +8,7 @@
"
SRC_URI = "http://www.iozone.org/src/current/${BPN}_${PV}.tar \
file://parallelism.patch \
+ file://0001-let-system-headers-provide-pread64.patch \
file://copyright.txt \
"
SRC_URI[md5sum] = "d60a69e44cda8436f4f94d860958efc2"
diff --git a/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-tests-add-explicit-permissions-to-open-call.patch b/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-tests-add-explicit-permissions-to-open-call.patch
new file mode 100644
index 0000000..9d52b90
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-tests-add-explicit-permissions-to-open-call.patch
@@ -0,0 +1,41 @@
+From d07d2f9601b49bb72cd4b36838f0c238bd1b0fc1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 15 Jan 2020 18:45:09 -0800
+Subject: [PATCH] tests: add explicit permissions to open() call
+
+Fixes
+gethugepagesizes.c:227:35: error: open with O_CREAT in second argument needs 3 arguments
+| fd = open(fname, O_WRONLY|O_CREAT);
+| ^
+
+Upstream-Status: Submitted [https://groups.google.com/forum/#!topic/libhugetlbfs/anNtDXbQKro]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ tests/gethugepagesizes.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/gethugepagesizes.c b/tests/gethugepagesizes.c
+index 9551b38..5777265 100644
+--- a/tests/gethugepagesizes.c
++++ b/tests/gethugepagesizes.c
+@@ -223,7 +223,7 @@ void setup_fake_data(long sizes[], int n_elem)
+ FAIL("mkdtemp: %s", strerror(errno));
+
+ sprintf(fname, "%s/meminfo-none", fake_meminfo);
+- fd = open(fname, O_WRONLY|O_CREAT);
++ fd = open(fname, O_WRONLY|O_CREAT, 0600);
+ if (fd < 0)
+ FAIL("open: %s", strerror(errno));
+ if (write(fd, meminfo_base,
+@@ -233,7 +233,7 @@ void setup_fake_data(long sizes[], int n_elem)
+ FAIL("close: %s", strerror(errno));
+
+ sprintf(fname, "%s/meminfo-hugepages", fake_meminfo);
+- fd = open(fname, O_WRONLY|O_CREAT);
++ fd = open(fname, O_WRONLY|O_CREAT, 0600);
+ if (fd < 0)
+ FAIL("open: %s", strerror(errno));
+ if (write(fd, meminfo_base,
+--
+2.25.0
+
diff --git a/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb b/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb
index f258122..e66db1a 100644
--- a/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb
+++ b/meta-openembedded/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb
@@ -24,6 +24,7 @@
file://0004-shm.c-Mark-glibc-specific-changes-so.patch \
file://0005-Include-dirent.h-for-ino_t.patch \
file://0006-include-limits.h-for-PATH_MAX.patch \
+ file://0001-tests-add-explicit-permissions-to-open-call.patch \
"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
diff --git a/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix/zabbix-agent.service b/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix/zabbix-agent.service
index b18a96f..56e5064 100644
--- a/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix/zabbix-agent.service
+++ b/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix/zabbix-agent.service
@@ -3,9 +3,8 @@
After=syslog.target network.target
[Service]
-Type=oneshot
-ExecStart=@SBINDIR@/zabbix_agentd
-RemainAfterExit=yes
+Type=simple
+ExecStart=@SBINDIR@/zabbix_agentd -f
User=zabbix
[Install]
diff --git a/meta-openembedded/meta-oe/recipes-connectivity/zeromq/cppzmq_git.bb b/meta-openembedded/meta-oe/recipes-connectivity/zeromq/cppzmq_git.bb
index 3697129..0b66970 100644
--- a/meta-openembedded/meta-oe/recipes-connectivity/zeromq/cppzmq_git.bb
+++ b/meta-openembedded/meta-oe/recipes-connectivity/zeromq/cppzmq_git.bb
@@ -4,8 +4,8 @@
LIC_FILES_CHKSUM = "file://LICENSE;md5=db174eaf7b55a34a7c89551197f66e94"
DEPENDS = "zeromq"
-SRCREV = "e67fa0e16d7964876228952f60693f5c03ea0cc1"
-PV = "4.5.0"
+SRCREV = "8d5c9a88988dcbebb72939ca0939d432230ffde1"
+PV = "4.6.0"
SRC_URI = "git://github.com/zeromq/cppzmq.git"
diff --git a/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb b/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
index 31c3f4e..59f1703 100644
--- a/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
+++ b/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
@@ -94,6 +94,7 @@
RDEPENDS_packagegroup-meta-oe-bsp_remove_mipsarch = "efivar efibootmgr"
RDEPENDS_packagegroup-meta-oe-bsp_remove_powerpc = "efivar efibootmgr"
RDEPENDS_packagegroup-meta-oe-bsp_remove_powerpc64 = "efivar efibootmgr"
+RDEPENDS_packagegroup-meta-oe-bsp_remove_powerpc64le = "efivar efibootmgr"
RDEPENDS_packagegroup-meta-oe-bsp_remove_riscv64 = "efivar efibootmgr"
RDEPENDS_packagegroup-meta-oe-bsp_remove_riscv32 = "efivar efibootmgr"
@@ -125,6 +126,7 @@
RDEPENDS_packagegroup-meta-oe-devtools_remove_mips64el = "nodejs"
RDEPENDS_packagegroup-meta-oe-devtools_remove_powerpc = "android-tools breakpad uftrace lshw"
RDEPENDS_packagegroup-meta-oe-devtools_remove_powerpc64 = "android-tools uftrace lshw"
+RDEPENDS_packagegroup-meta-oe-devtools_remove_powerpc64le = "android-tools uftrace lshw"
RDEPENDS_packagegroup-meta-oe-devtools_remove_riscv64 = "nodejs uftrace lshw"
RDEPENDS_packagegroup-meta-oe-devtools_remove_riscv32 = "nodejs uftrace lshw"
@@ -156,6 +158,7 @@
RDEPENDS_packagegroup-meta-oe-extended_remove_mipsarch = "upm mraa tiptop"
RDEPENDS_packagegroup-meta-oe-extended_remove_powerpc = "upm mraa"
RDEPENDS_packagegroup-meta-oe-extended_remove_powerpc64 = "upm mraa"
+RDEPENDS_packagegroup-meta-oe-extended_remove_powerpc64le = "upm mraa"
RDEPENDS_packagegroup-meta-oe-extended_remove_riscv64 = "upm mraa tiptop"
RDEPENDS_packagegroup-meta-oe-extended_remove_riscv32 = "upm mraa tiptop"
RDEPENDS_packagegroup-meta-oe-extended_remove_libc-musl = "lcdproc"
@@ -236,7 +239,7 @@
libinih inotify-tools joe lcms lcov libatasmart libbytesize \
libcereal libcyusbserial libee libeigen libestr libftdi libgit2 \
libgpiod libiio libjs-jquery libjs-sizzle liblinebreak libmicrohttpd \
- libmxml libnih liboauth libol liboop libp11 libraw1394 libsmi libsoc libssh2 \
+ libmxml liboauth libol liboop libp11 libraw1394 libsmi libsoc libssh2 \
libssh libtar libteam libtinyxml2 libtinyxml libusbg libusb-compat libutempter \
links lio-utils lockdev log4c log4cpp logwarn libdevmapper lvm2 \
mailcap mbuffer mg minini \
@@ -263,6 +266,7 @@
RDEPENDS_packagegroup-meta-oe-support_remove_mipsarch = "gperftools"
RDEPENDS_packagegroup-meta-oe-support_remove_riscv64 = "uim"
RDEPENDS_packagegroup-meta-oe-support_remove_riscv32 = "uim"
+RDEPENDS_packagegroup-meta-oe-support_remove_powerpc = "ssiapi"
RDEPENDS_packagegroup-meta-oe-support-egl ="\
freerdp libnice opencv \
diff --git a/meta-openembedded/meta-oe/recipes-extended/byacc/byacc_20191103.bb b/meta-openembedded/meta-oe/recipes-extended/byacc/byacc_20191125.bb
similarity index 74%
rename from meta-openembedded/meta-oe/recipes-extended/byacc/byacc_20191103.bb
rename to meta-openembedded/meta-oe/recipes-extended/byacc/byacc_20191125.bb
index eae4618..a4e57f5 100644
--- a/meta-openembedded/meta-oe/recipes-extended/byacc/byacc_20191103.bb
+++ b/meta-openembedded/meta-oe/recipes-extended/byacc/byacc_20191125.bb
@@ -7,6 +7,5 @@
LIC_FILES_CHKSUM = "file://package/debian/copyright;md5=3eb7c635434fafe23ef30fc263e63b2f"
require byacc.inc
-SRC_URI[md5sum] = "84ffe59166f67bbe147a6f502c7af309"
-SRC_URI[sha256sum] = "d291fb34816f45079067366b7f7300ffbf9f7e3f1aaf6d509b84442d065d11b9"
-
+SRC_URI[md5sum] = "6745a4fbf0723c4c9280fc3e568b3d1b"
+SRC_URI[sha256sum] = "071c2ebe36afaa8448b80e893473a681e63a3b8a4ed636c0d675780a02411cde"
diff --git a/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/0001-ppc-Fix-signature-for-co_create-API.patch b/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/0001-ppc-Fix-signature-for-co_create-API.patch
new file mode 100644
index 0000000..1f36c65
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/0001-ppc-Fix-signature-for-co_create-API.patch
@@ -0,0 +1,38 @@
+From be4032079c931704f52e29f5da5c01cde24ac842 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 16 Jan 2020 10:44:58 -0800
+Subject: [PATCH] ppc: Fix signature for co_create API
+
+Upstream-Status: Submitted [https://github.com/fluent/fluent-bit/pull/1886]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/flb_libco/ppc.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/lib/flb_libco/ppc.c b/lib/flb_libco/ppc.c
+index e6536d56..533256b3 100644
+--- a/lib/flb_libco/ppc.c
++++ b/lib/flb_libco/ppc.c
+@@ -279,7 +279,9 @@ static uint32_t* co_create_(unsigned size, uintptr_t entry) {
+ return t;
+ }
+
+-cothread_t co_create(unsigned int size, void (*entry_)(void)) {
++cothread_t co_create(unsigned int size, void (*entry_)(void),
++ size_t *out_size) {
++
+ uintptr_t entry = (uintptr_t)entry_;
+ uint32_t* t = 0;
+
+@@ -325,7 +327,7 @@ cothread_t co_create(unsigned int size, void (*entry_)(void)) {
+ t[10] = (uint32_t)(sp >> shift >> shift);
+ t[11] = (uint32_t)sp;
+ }
+-
++ *out_size = size;
+ return t;
+ }
+
+--
+2.25.0
+
diff --git a/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit_1.3.5.bb b/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit_1.3.5.bb
index aad1499..d8cb8b5 100644
--- a/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit_1.3.5.bb
+++ b/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit_1.3.5.bb
@@ -15,6 +15,7 @@
file://jemalloc.patch \
file://cross-build-init-system-detection.patch \
file://builtin-nan.patch \
+ file://0001-ppc-Fix-signature-for-co_create-API.patch \
"
SRC_URI[md5sum] = "6eae6dfd0a874e5dd270c36e9c68f747"
SRC_URI[sha256sum] = "e037c76c89269c8dc4027a08e442fefd2751b0f1e0f9c38f9a4b12d781a9c789"
diff --git a/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs_60.5.2.bb b/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs_60.5.2.bb
index f52bcca..389bcac 100644
--- a/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs_60.5.2.bb
+++ b/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs_60.5.2.bb
@@ -57,6 +57,7 @@
# Without this, JS_Init() will fail for mips64.
EXTRA_OECONF_append_mipsarch = " --with-intl-api=build"
+EXTRA_OECONF_append_powerpc = " --with-intl-api=build"
EXTRA_OECONF_append_mipsarch = " --disable-ion"
EXTRA_OECONF_append_riscv64 = " --disable-ion"
diff --git a/meta-openembedded/meta-oe/recipes-graphics/fontforge/fontforge_20190801.bb b/meta-openembedded/meta-oe/recipes-graphics/fontforge/fontforge_20190801.bb
index 99c108d..b84806f 100644
--- a/meta-openembedded/meta-oe/recipes-graphics/fontforge/fontforge_20190801.bb
+++ b/meta-openembedded/meta-oe/recipes-graphics/fontforge/fontforge_20190801.bb
@@ -6,10 +6,10 @@
file://LICENSE;md5=d042f3d2a8fd7208b704a499168e3c89 \
"
-DEPENDS = "glib-2.0 pango giflib tiff libxml2 jpeg python libtool uthash gettext-native"
+DEPENDS = "glib-2.0 pango giflib tiff libxml2 jpeg libtool uthash gettext-native"
DEPENDS_append_class-target = " libxi"
-inherit autotools pkgconfig pythonnative features_check gettext gtk-icon-cache mime
+inherit autotools pkgconfig python3native features_check gettext gtk-icon-cache mime
REQUIRED_DISTRO_FEATURES_append_class-target = " x11"
@@ -31,8 +31,6 @@
PACKAGES =+ "${PN}-python"
-RPROVIDES_${PN}-dbg += "${PN}-python-dbg"
-
FILES_${PN} += " \
${datadir}/appdata \
${datadir}/metainfo \
@@ -40,7 +38,7 @@
"
FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR} ${datadir}/${BPN}/python"
-RDEPENDS_${PN}-python = "python"
+RDEPENDS_${PN}-python = "python3"
# for e.g kde's oxygen-fonts
BBCLASSEXTEND = "native"
diff --git a/meta-openembedded/meta-oe/recipes-multimedia/jack/jack/0001-example-clients-Use-c-compiler-for-jack_simdtests.patch b/meta-openembedded/meta-oe/recipes-multimedia/jack/jack/0001-example-clients-Use-c-compiler-for-jack_simdtests.patch
new file mode 100644
index 0000000..dda21a3
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-multimedia/jack/jack/0001-example-clients-Use-c-compiler-for-jack_simdtests.patch
@@ -0,0 +1,33 @@
+From 76b8a389268275cc13f3b4e61394d40b24ec56f1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 15 Jan 2020 20:21:58 -0800
+Subject: [PATCH] example-clients: Use c++ compiler for jack_simdtests
+
+It uses c++ sources and runtime therefore its best to use c++ compiler
+to build it so it can find the correct runtime, cross compiling with
+clang fails
+
+x86_64-yoe-linux-ld: example-clients/simdtests.cpp.28.o: undefined reference to symbol '__cxa_call_unexpected@@CXXABI_1.3'
+
+Upstream-Status: Submitted [https://github.com/jackaudio/jack2/pull/536]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ example-clients/wscript | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/example-clients/wscript b/example-clients/wscript
+index a8857aa7..df9435aa 100644
+--- a/example-clients/wscript
++++ b/example-clients/wscript
+@@ -69,6 +69,8 @@ def build(bld):
+
+ if bld.env['IS_MACOSX']:
+ prog = bld(features='c cprogram', framework = ['Foundation'])
++ elif example_program == 'jack_simdtests':
++ prog = bld(features='cxx cxxprogram')
+ else:
+ prog = bld(features='c cprogram')
+ prog.includes = os_incdir + ['../common/jack', '../common']
+--
+2.25.0
+
diff --git a/meta-openembedded/meta-oe/recipes-multimedia/jack/jack_1.19.14.bb b/meta-openembedded/meta-oe/recipes-multimedia/jack/jack_1.19.14.bb
index cebc952..e954341 100644
--- a/meta-openembedded/meta-oe/recipes-multimedia/jack/jack_1.19.14.bb
+++ b/meta-openembedded/meta-oe/recipes-multimedia/jack/jack_1.19.14.bb
@@ -14,7 +14,9 @@
DEPENDS = "libsamplerate0 libsndfile1 readline"
-SRC_URI = "git://github.com/jackaudio/jack2.git"
+SRC_URI = "git://github.com/jackaudio/jack2.git \
+ file://0001-example-clients-Use-c-compiler-for-jack_simdtests.patch \
+ "
SRCREV = "b54a09bf7ef760d81fdb8544ad10e45575394624"
S = "${WORKDIR}/git"
diff --git a/meta-openembedded/meta-oe/recipes-multimedia/mplayer/mpv_0.26.0.bb b/meta-openembedded/meta-oe/recipes-multimedia/mplayer/mpv_0.26.0.bb
index 29bcfe4..c327c45 100644
--- a/meta-openembedded/meta-oe/recipes-multimedia/mplayer/mpv_0.26.0.bb
+++ b/meta-openembedded/meta-oe/recipes-multimedia/mplayer/mpv_0.26.0.bb
@@ -30,6 +30,7 @@
LUA_mips64 = ""
LUA_aarch64 = ""
LUA_powerpc64 = ""
+LUA_powerpc = ""
# Note: both lua and libass are required to get on-screen-display (controls)
PACKAGECONFIG ??= " \
diff --git a/meta-openembedded/meta-oe/recipes-printing/cups/cups-filters.inc b/meta-openembedded/meta-oe/recipes-printing/cups/cups-filters.inc
index 45bdab3..589bb90 100644
--- a/meta-openembedded/meta-oe/recipes-printing/cups/cups-filters.inc
+++ b/meta-openembedded/meta-oe/recipes-printing/cups/cups-filters.inc
@@ -47,8 +47,7 @@
"
FILES_${PN}-gst = "\
- ${libdir}/cups/filter/gstopxl \
- ${libdir}/cups/filter/gstoraster \
+ ${libexecdir}/cups/filter/gsto* \
"
FILES_${PN}-data = "\
@@ -56,37 +55,24 @@
"
FILES_${PN}-dbg += "\
- ${libdir}/cups/filter/.debug \
- ${libdir}/cups/backend/.debug \
+ ${libexecdir}/cups/backend/.debug \
+ ${libexecdir}/cups/driver/.debug \
+ ${libexecdir}/cups/filter/.debug \
"
FILES_${PN} += "\
- ${libdir}/cups/filter \
- ${libdir}/cups/backend \
- ${libdir}/cups/driver \
+ ${libexecdir}/cups \
+ ${datadir}/ppd/ \
${datadir}/cups/charsets \
${datadir}/cups/drv \
${datadir}/cups/mime \
${datadir}/cups/ppdc \
- ${datadir}/ppd/cupsfilters \
- ${datadir}/cups/braille \
${datadir}/cups/banners \
- ${datadir}/cups/braille/index.sh \
- ${datadir}/cups/braille/cups-braille.sh \
- ${datadir}/cups/braille/indexv3.sh \
- ${datadir}/cups/braille/indexv4.sh \
- ${datadir}/cups/banners/topsecret \
- ${datadir}/cups/banners/secret \
- ${datadir}/cups/banners/confidential \
- ${datadir}/cups/banners/unclassified \
- ${datadir}/cups/banners/form \
- ${datadir}/cups/banners/classified \
- ${datadir}/cups/banners/standard \
"
do_install_append() {
- # remove banners, braille dirs
- rm -rf ${D}${datadir}/cups/{banners,braille}
+ # remove braille dir
+ rm -rf ${D}${datadir}/cups/braille
# remove sysroot path contamination from pkgconfig file
sed -i -e 's:${STAGING_DIR_TARGET}::' ${D}/${libdir}/pkgconfig/libcupsfilters.pc
diff --git a/meta-openembedded/meta-oe/recipes-printing/cups/cups-filters_1.26.0.bb b/meta-openembedded/meta-oe/recipes-printing/cups/cups-filters_1.26.0.bb
deleted file mode 100644
index 619602a..0000000
--- a/meta-openembedded/meta-oe/recipes-printing/cups/cups-filters_1.26.0.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-include cups-filters.inc
-
-SRC_URI[md5sum] = "afb278c77bb195c2a32fc64e5c8378fb"
-SRC_URI[sha256sum] = "ff8679fcd0c31c25d229262c7ad100ba161ef6b2aa455a2df673dd74ef93f488"
diff --git a/meta-openembedded/meta-oe/recipes-printing/cups/cups-filters_1.26.2.bb b/meta-openembedded/meta-oe/recipes-printing/cups/cups-filters_1.26.2.bb
new file mode 100644
index 0000000..d76ef09
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-printing/cups/cups-filters_1.26.2.bb
@@ -0,0 +1,4 @@
+include cups-filters.inc
+
+SRC_URI[md5sum] = "970095596bf2b8cfe91ac91c0b51297a"
+SRC_URI[sha256sum] = "0069aef1358522f1901a64749ec753d28a2d6a832758bce58ffcd722b28c0e66"
diff --git a/meta-openembedded/meta-oe/recipes-security/keyutils/keyutils_1.6.bb b/meta-openembedded/meta-oe/recipes-security/keyutils/keyutils_1.6.1.bb
similarity index 92%
rename from meta-openembedded/meta-oe/recipes-security/keyutils/keyutils_1.6.bb
rename to meta-openembedded/meta-oe/recipes-security/keyutils/keyutils_1.6.1.bb
index 572143a..0a8c2e4 100644
--- a/meta-openembedded/meta-oe/recipes-security/keyutils/keyutils_1.6.bb
+++ b/meta-openembedded/meta-oe/recipes-security/keyutils/keyutils_1.6.1.bb
@@ -21,8 +21,8 @@
file://fix_library_install_path.patch \
"
-SRC_URI[md5sum] = "191987b0ab46bb5b50efd70a6e6ce808"
-SRC_URI[sha256sum] = "d3aef20cec0005c0fa6b4be40079885567473185b1a57b629b030e67942c7115"
+SRC_URI[md5sum] = "919af7f33576816b423d537f8a8692e8"
+SRC_URI[sha256sum] = "c8b15722ae51d95b9ad76cc6d49a4c2cc19b0c60f72f61fb9bf43eea7cbd64ce"
EXTRA_OEMAKE = "'CFLAGS=${CFLAGS} -Wall' \
NO_ARLIB=1 \
diff --git a/meta-openembedded/meta-oe/recipes-support/lcov/lcov_1.14.bb b/meta-openembedded/meta-oe/recipes-support/lcov/lcov_1.14.bb
index fd02f4a..26e797a 100755
--- a/meta-openembedded/meta-oe/recipes-support/lcov/lcov_1.14.bb
+++ b/meta-openembedded/meta-oe/recipes-support/lcov/lcov_1.14.bb
@@ -13,6 +13,7 @@
perl \
perl-module-filehandle \
perl-module-getopt-std \
+ perl-module-digest-md5 \
perl-module-digest-sha \
perl-module-constant \
perl-module-cwd \
diff --git a/meta-openembedded/meta-oe/recipes-support/libmicrohttpd/libmicrohttpd_0.9.68.bb b/meta-openembedded/meta-oe/recipes-support/libmicrohttpd/libmicrohttpd_0.9.69.bb
similarity index 86%
rename from meta-openembedded/meta-oe/recipes-support/libmicrohttpd/libmicrohttpd_0.9.68.bb
rename to meta-openembedded/meta-oe/recipes-support/libmicrohttpd/libmicrohttpd_0.9.69.bb
index f5569de..4daeaf7 100644
--- a/meta-openembedded/meta-oe/recipes-support/libmicrohttpd/libmicrohttpd_0.9.68.bb
+++ b/meta-openembedded/meta-oe/recipes-support/libmicrohttpd/libmicrohttpd_0.9.69.bb
@@ -8,8 +8,8 @@
SRC_URI = "${GNU_MIRROR}/libmicrohttpd/${BPN}-${PV}.tar.gz \
"
-SRC_URI[md5sum] = "1c3ca3bf92dfc680538b4186c58a9bd0"
-SRC_URI[sha256sum] = "c5716e2a2899abc9e16c8fa7a1a58da88f81aca96a0b7e68a5d4d89e21610b61"
+SRC_URI[md5sum] = "3ce03db1f10007517cecf05e040069af"
+SRC_URI[sha256sum] = "fb9b6b148b787493e637d3083588711e65cbcb726fa02cee2cd543c5de27e37e"
inherit autotools lib_package pkgconfig gettext
diff --git a/meta-openembedded/meta-oe/recipes-support/libnih/libnih-1.0.3/0001-Update-autotool-files-also-make-it-work-with-latest-.patch b/meta-openembedded/meta-oe/recipes-support/libnih/libnih-1.0.3/0001-Update-autotool-files-also-make-it-work-with-latest-.patch
deleted file mode 100644
index 2c857c2..0000000
--- a/meta-openembedded/meta-oe/recipes-support/libnih/libnih-1.0.3/0001-Update-autotool-files-also-make-it-work-with-latest-.patch
+++ /dev/null
@@ -1,24310 +0,0 @@
-From 0f1cc1bc615807e81fd2709d4177ca41168446c0 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 7 Dec 2019 00:45:23 -0800
-Subject: [PATCH] Update autotool files, also make it work with latest gettext
-
-Upstream-Status: Inappropriate [Dead upstream]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- ABOUT-NLS | 1069 +--
- ChangeLog | 7 +
- Makefile.am | 2 +-
- configure.ac | 6 +-
- intl/ChangeLog | 4 -
- intl/Makefile.in | 587 --
- intl/VERSION | 1 -
- intl/bindtextdom.c | 340 -
- intl/config.charset | 640 --
- intl/dcgettext.c | 56 -
- intl/dcigettext.c | 1689 -----
- intl/dcngettext.c | 57 -
- intl/dgettext.c | 58 -
- intl/dngettext.c | 59 -
- intl/eval-plural.h | 108 -
- intl/explodename.c | 135 -
- intl/export.h | 6 -
- intl/finddomain.c | 212 -
- intl/gettext.c | 63 -
- intl/gettextP.h | 297 -
- intl/gmo.h | 152 -
- intl/hash-string.c | 51 -
- intl/hash-string.h | 36 -
- intl/intl-compat.c | 133 -
- intl/intl-exports.c | 36 -
- intl/l10nflist.c | 400 --
- intl/langprefs.c | 130 -
- intl/libgnuintl.h.in | 419 --
- intl/libintl.rc | 38 -
- intl/loadinfo.h | 132 -
- intl/loadmsgcat.c | 1336 ----
- intl/localcharset.c | 461 --
- intl/localcharset.h | 42 -
- intl/locale.alias | 77 -
- intl/localealias.c | 439 --
- intl/localename.c | 1507 ----
- intl/lock.c | 922 ---
- intl/lock.h | 1105 ---
- intl/log.c | 116 -
- intl/ngettext.c | 65 -
- intl/os2compat.c | 98 -
- intl/os2compat.h | 46 -
- intl/osdep.c | 26 -
- intl/plural-exp.c | 155 -
- intl/plural-exp.h | 129 -
- intl/plural.c | 1981 ------
- intl/plural.y | 385 --
- intl/printf-args.c | 188 -
- intl/printf-args.h | 155 -
- intl/printf-parse.c | 590 --
- intl/printf-parse.h | 75 -
- intl/printf.c | 427 --
- intl/ref-add.sin | 31 -
- intl/ref-del.sin | 26 -
- intl/relocatable.c | 468 --
- intl/relocatable.h | 79 -
- intl/textdomain.c | 127 -
- intl/tsearch.c | 684 --
- intl/tsearch.h | 83 -
- intl/vasnprintf.c | 4677 -------------
- intl/vasnprintf.h | 78 -
- intl/vasnwprintf.h | 46 -
- intl/version.c | 26 -
- intl/wprintf-parse.h | 75 -
- intl/xsize.h | 109 -
- m4/intlmacosx.m4 | 55 +-
- po/ChangeLog | 8 +
- po/Rules-quot | 19 +-
- po/en@boldquot.header | 2 +-
- po/en@quot.header | 2 +-
- po/insert-header.sin | 5 +
- po/remove-potcdate.sin | 8 +-
- 74 files changed, 1335 insertions(+), 38646 deletions(-)
- delete mode 100644 intl/ChangeLog
- delete mode 100644 intl/Makefile.in
- delete mode 100644 intl/VERSION
- delete mode 100644 intl/bindtextdom.c
- delete mode 100755 intl/config.charset
- delete mode 100644 intl/dcgettext.c
- delete mode 100644 intl/dcigettext.c
- delete mode 100644 intl/dcngettext.c
- delete mode 100644 intl/dgettext.c
- delete mode 100644 intl/dngettext.c
- delete mode 100644 intl/eval-plural.h
- delete mode 100644 intl/explodename.c
- delete mode 100644 intl/export.h
- delete mode 100644 intl/finddomain.c
- delete mode 100644 intl/gettext.c
- delete mode 100644 intl/gettextP.h
- delete mode 100644 intl/gmo.h
- delete mode 100644 intl/hash-string.c
- delete mode 100644 intl/hash-string.h
- delete mode 100644 intl/intl-compat.c
- delete mode 100644 intl/intl-exports.c
- delete mode 100644 intl/l10nflist.c
- delete mode 100644 intl/langprefs.c
- delete mode 100644 intl/libgnuintl.h.in
- delete mode 100644 intl/libintl.rc
- delete mode 100644 intl/loadinfo.h
- delete mode 100644 intl/loadmsgcat.c
- delete mode 100644 intl/localcharset.c
- delete mode 100644 intl/localcharset.h
- delete mode 100644 intl/locale.alias
- delete mode 100644 intl/localealias.c
- delete mode 100644 intl/localename.c
- delete mode 100644 intl/lock.c
- delete mode 100644 intl/lock.h
- delete mode 100644 intl/log.c
- delete mode 100644 intl/ngettext.c
- delete mode 100644 intl/os2compat.c
- delete mode 100644 intl/os2compat.h
- delete mode 100644 intl/osdep.c
- delete mode 100644 intl/plural-exp.c
- delete mode 100644 intl/plural-exp.h
- delete mode 100644 intl/plural.c
- delete mode 100644 intl/plural.y
- delete mode 100644 intl/printf-args.c
- delete mode 100644 intl/printf-args.h
- delete mode 100644 intl/printf-parse.c
- delete mode 100644 intl/printf-parse.h
- delete mode 100644 intl/printf.c
- delete mode 100644 intl/ref-add.sin
- delete mode 100644 intl/ref-del.sin
- delete mode 100644 intl/relocatable.c
- delete mode 100644 intl/relocatable.h
- delete mode 100644 intl/textdomain.c
- delete mode 100644 intl/tsearch.c
- delete mode 100644 intl/tsearch.h
- delete mode 100644 intl/vasnprintf.c
- delete mode 100644 intl/vasnprintf.h
- delete mode 100644 intl/vasnwprintf.h
- delete mode 100644 intl/version.c
- delete mode 100644 intl/wprintf-parse.h
- delete mode 100644 intl/xsize.h
-
---- a/ABOUT-NLS
-+++ b/ABOUT-NLS
-@@ -1,1068 +1 @@
--1 Notes on the Free Translation Project
--***************************************
--
--Free software is going international! The Free Translation Project is
--a way to get maintainers of free software, translators, and users all
--together, so that free software will gradually become able to speak many
--languages. A few packages already provide translations for their
--messages.
--
-- If you found this `ABOUT-NLS' file inside a distribution, you may
--assume that the distributed package does use GNU `gettext' internally,
--itself available at your nearest GNU archive site. But you do _not_
--need to install GNU `gettext' prior to configuring, installing or using
--this package with messages translated.
--
-- Installers will find here some useful hints. These notes also
--explain how users should proceed for getting the programs to use the
--available translations. They tell how people wanting to contribute and
--work on translations can contact the appropriate team.
--
-- When reporting bugs in the `intl/' directory or bugs which may be
--related to internationalization, you should tell about the version of
--`gettext' which is used. The information can be found in the
--`intl/VERSION' file, in internationalized packages.
--
--1.1 Quick configuration advice
--==============================
--
--If you want to exploit the full power of internationalization, you
--should configure it using
--
-- ./configure --with-included-gettext
--
--to force usage of internationalizing routines provided within this
--package, despite the existence of internationalizing capabilities in the
--operating system where this package is being installed. So far, only
--the `gettext' implementation in the GNU C library version 2 provides as
--many features (such as locale alias, message inheritance, automatic
--charset conversion or plural form handling) as the implementation here.
--It is also not possible to offer this additional functionality on top
--of a `catgets' implementation. Future versions of GNU `gettext' will
--very likely convey even more functionality. So it might be a good idea
--to change to GNU `gettext' as soon as possible.
--
-- So you need _not_ provide this option if you are using GNU libc 2 or
--you have installed a recent copy of the GNU gettext package with the
--included `libintl'.
--
--1.2 INSTALL Matters
--===================
--
--Some packages are "localizable" when properly installed; the programs
--they contain can be made to speak your own native language. Most such
--packages use GNU `gettext'. Other packages have their own ways to
--internationalization, predating GNU `gettext'.
--
-- By default, this package will be installed to allow translation of
--messages. It will automatically detect whether the system already
--provides the GNU `gettext' functions. If not, the included GNU
--`gettext' library will be used. This library is wholly contained
--within this package, usually in the `intl/' subdirectory, so prior
--installation of the GNU `gettext' package is _not_ required.
--Installers may use special options at configuration time for changing
--the default behaviour. The commands:
--
-- ./configure --with-included-gettext
-- ./configure --disable-nls
--
--will, respectively, bypass any pre-existing `gettext' to use the
--internationalizing routines provided within this package, or else,
--_totally_ disable translation of messages.
--
-- When you already have GNU `gettext' installed on your system and run
--configure without an option for your new package, `configure' will
--probably detect the previously built and installed `libintl.a' file and
--will decide to use this. This might not be desirable. You should use
--the more recent version of the GNU `gettext' library. I.e. if the file
--`intl/VERSION' shows that the library which comes with this package is
--more recent, you should use
--
-- ./configure --with-included-gettext
--
--to prevent auto-detection.
--
-- The configuration process will not test for the `catgets' function
--and therefore it will not be used. The reason is that even an
--emulation of `gettext' on top of `catgets' could not provide all the
--extensions of the GNU `gettext' library.
--
-- Internationalized packages usually have many `po/LL.po' files, where
--LL gives an ISO 639 two-letter code identifying the language. Unless
--translations have been forbidden at `configure' time by using the
--`--disable-nls' switch, all available translations are installed
--together with the package. However, the environment variable `LINGUAS'
--may be set, prior to configuration, to limit the installed set.
--`LINGUAS' should then contain a space separated list of two-letter
--codes, stating which languages are allowed.
--
--1.3 Using This Package
--======================
--
--As a user, if your language has been installed for this package, you
--only have to set the `LANG' environment variable to the appropriate
--`LL_CC' combination. If you happen to have the `LC_ALL' or some other
--`LC_xxx' environment variables set, you should unset them before
--setting `LANG', otherwise the setting of `LANG' will not have the
--desired effect. Here `LL' is an ISO 639 two-letter language code, and
--`CC' is an ISO 3166 two-letter country code. For example, let's
--suppose that you speak German and live in Germany. At the shell
--prompt, merely execute `setenv LANG de_DE' (in `csh'),
--`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
--This can be done from your `.login' or `.profile' file, once and for
--all.
--
-- You might think that the country code specification is redundant.
--But in fact, some languages have dialects in different countries. For
--example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
--country code serves to distinguish the dialects.
--
-- The locale naming convention of `LL_CC', with `LL' denoting the
--language and `CC' denoting the country, is the one use on systems based
--on GNU libc. On other systems, some variations of this scheme are
--used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
--locales supported by your system for your language by running the
--command `locale -a | grep '^LL''.
--
-- Not all programs have translations for all languages. By default, an
--English message is shown in place of a nonexistent translation. If you
--understand other languages, you can set up a priority list of languages.
--This is done through a different environment variable, called
--`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
--for the purpose of message handling, but you still need to have `LANG'
--set to the primary language; this is required by other parts of the
--system libraries. For example, some Swedish users who would rather
--read translations in German than English for when Swedish is not
--available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
--
-- Special advice for Norwegian users: The language code for Norwegian
--bokma*l changed from `no' to `nb' recently (in 2003). During the
--transition period, while some message catalogs for this language are
--installed under `nb' and some older ones under `no', it's recommended
--for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
--older translations are used.
--
-- In the `LANGUAGE' environment variable, but not in the `LANG'
--environment variable, `LL_CC' combinations can be abbreviated as `LL'
--to denote the language's main dialect. For example, `de' is equivalent
--to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
--(Portuguese as spoken in Portugal) in this context.
--
--1.4 Translating Teams
--=====================
--
--For the Free Translation Project to be a success, we need interested
--people who like their own language and write it well, and who are also
--able to synergize with other translators speaking the same language.
--Each translation team has its own mailing list. The up-to-date list of
--teams can be found at the Free Translation Project's homepage,
--`http://translationproject.org/', in the "Teams" area.
--
-- If you'd like to volunteer to _work_ at translating messages, you
--should become a member of the translating team for your own language.
--The subscribing address is _not_ the same as the list itself, it has
--`-request' appended. For example, speakers of Swedish can send a
--message to `sv-request@li.org', having this message body:
--
-- subscribe
--
-- Keep in mind that team members are expected to participate
--_actively_ in translations, or at solving translational difficulties,
--rather than merely lurking around. If your team does not exist yet and
--you want to start one, or if you are unsure about what to do or how to
--get started, please write to `coordinator@translationproject.org' to
--reach the coordinator for all translator teams.
--
-- The English team is special. It works at improving and uniformizing
--the terminology in use. Proven linguistic skills are praised more than
--programming skills, here.
--
--1.5 Available Packages
--======================
--
--Languages are not equally supported in all packages. The following
--matrix shows the current state of internationalization, as of November
--2007. The matrix shows, in regard of each package, for which languages
--PO files have been submitted to translation coordination, with a
--translation percentage of at least 50%.
--
-- Ready PO files af am ar az be bg bs ca cs cy da de el en en_GB eo
-- +----------------------------------------------------+
-- Compendium | [] [] [] [] |
-- a2ps | [] [] [] [] [] |
-- aegis | () |
-- ant-phone | () |
-- anubis | [] |
-- ap-utils | |
-- aspell | [] [] [] [] [] |
-- bash | [] |
-- bfd | |
-- bibshelf | [] |
-- binutils | |
-- bison | [] [] |
-- bison-runtime | [] |
-- bluez-pin | [] [] [] [] [] |
-- cflow | [] |
-- clisp | [] [] [] |
-- console-tools | [] [] |
-- coreutils | [] [] [] [] |
-- cpio | |
-- cpplib | [] [] [] |
-- cryptonit | [] |
-- dialog | |
-- diffutils | [] [] [] [] [] [] |
-- doodle | [] |
-- e2fsprogs | [] [] |
-- enscript | [] [] [] [] |
-- fetchmail | [] [] () [] [] |
-- findutils | [] |
-- findutils_stable | [] [] [] |
-- flex | [] [] [] |
-- fslint | |
-- gas | |
-- gawk | [] [] [] |
-- gcal | [] |
-- gcc | [] |
-- gettext-examples | [] [] [] [] [] |
-- gettext-runtime | [] [] [] [] [] |
-- gettext-tools | [] [] |
-- gip | [] |
-- gliv | [] [] |
-- glunarclock | [] |
-- gmult | [] [] |
-- gnubiff | () |
-- gnucash | [] [] () () [] |
-- gnuedu | |
-- gnulib | [] |
-- gnunet | |
-- gnunet-gtk | |
-- gnutls | [] |
-- gpe-aerial | [] [] |
-- gpe-beam | [] [] |
-- gpe-calendar | |
-- gpe-clock | [] [] |
-- gpe-conf | [] [] |
-- gpe-contacts | |
-- gpe-edit | [] |
-- gpe-filemanager | |
-- gpe-go | [] |
-- gpe-login | [] [] |
-- gpe-ownerinfo | [] [] |
-- gpe-package | |
-- gpe-sketchbook | [] [] |
-- gpe-su | [] [] |
-- gpe-taskmanager | [] [] |
-- gpe-timesheet | [] |
-- gpe-today | [] [] |
-- gpe-todo | |
-- gphoto2 | [] [] [] [] |
-- gprof | [] [] |
-- gpsdrive | |
-- gramadoir | [] [] |
-- grep | [] [] |
-- gretl | () |
-- gsasl | |
-- gss | |
-- gst-plugins-bad | [] [] |
-- gst-plugins-base | [] [] |
-- gst-plugins-good | [] [] [] |
-- gst-plugins-ugly | [] [] |
-- gstreamer | [] [] [] [] [] [] [] |
-- gtick | () |
-- gtkam | [] [] [] [] |
-- gtkorphan | [] [] |
-- gtkspell | [] [] [] [] |
-- gutenprint | [] |
-- hello | [] [] [] [] [] |
-- herrie | [] |
-- hylafax | |
-- idutils | [] [] |
-- indent | [] [] [] [] |
-- iso_15924 | |
-- iso_3166 | [] [] [] [] [] [] [] [] [] [] [] |
-- iso_3166_2 | |
-- iso_4217 | [] [] [] |
-- iso_639 | [] [] [] [] |
-- jpilot | [] |
-- jtag | |
-- jwhois | |
-- kbd | [] [] [] [] |
-- keytouch | [] [] |
-- keytouch-editor | [] |
-- keytouch-keyboa... | [] |
-- latrine | () |
-- ld | [] |
-- leafpad | [] [] [] [] [] |
-- libc | [] [] [] [] |
-- libexif | [] |
-- libextractor | [] |
-- libgpewidget | [] [] [] |
-- libgpg-error | [] |
-- libgphoto2 | [] [] |
-- libgphoto2_port | [] [] |
-- libgsasl | |
-- libiconv | [] [] |
-- libidn | [] [] [] |
-- lifelines | [] () |
-- lilypond | [] |
-- lingoteach | |
-- lprng | |
-- lynx | [] [] [] [] |
-- m4 | [] [] [] [] |
-- mailfromd | |
-- mailutils | [] |
-- make | [] [] |
-- man-db | [] [] [] |
-- minicom | [] [] [] |
-- nano | [] [] [] |
-- opcodes | [] |
-- parted | [] [] |
-- pilot-qof | |
-- popt | [] [] [] |
-- psmisc | [] |
-- pwdutils | |
-- qof | |
-- radius | [] |
-- recode | [] [] [] [] [] [] |
-- rpm | [] |
-- screem | |
-- scrollkeeper | [] [] [] [] [] [] [] [] |
-- sed | [] [] [] |
-- shared-mime-info | [] [] [] [] () [] [] [] |
-- sharutils | [] [] [] [] [] [] |
-- shishi | |
-- skencil | [] () |
-- solfege | |
-- soundtracker | [] [] |
-- sp | [] |
-- system-tools-ba... | [] [] [] [] [] [] [] [] [] |
-- tar | [] [] |
-- texinfo | [] [] [] |
-- tin | () () |
-- tuxpaint | [] [] [] [] [] [] |
-- unicode-han-tra... | |
-- unicode-transla... | |
-- util-linux | [] [] [] [] |
-- util-linux-ng | [] [] [] [] |
-- vorbis-tools | [] |
-- wastesedge | () |
-- wdiff | [] [] [] [] |
-- wget | [] [] [] |
-- xchat | [] [] [] [] [] [] [] |
-- xkeyboard-config | [] |
-- xpad | [] [] [] |
-- +----------------------------------------------------+
-- af am ar az be bg bs ca cs cy da de el en en_GB eo
-- 6 0 2 1 8 26 2 40 48 2 56 88 15 1 15 18
--
-- es et eu fa fi fr ga gl gu he hi hr hu id is it
-- +--------------------------------------------------+
-- Compendium | [] [] [] [] [] |
-- a2ps | [] [] [] () |
-- aegis | |
-- ant-phone | [] |
-- anubis | [] |
-- ap-utils | [] [] |
-- aspell | [] [] [] |
-- bash | [] |
-- bfd | [] [] |
-- bibshelf | [] [] [] |
-- binutils | [] [] [] |
-- bison | [] [] [] [] [] [] |
-- bison-runtime | [] [] [] [] [] |
-- bluez-pin | [] [] [] [] [] |
-- cflow | [] |
-- clisp | [] [] |
-- console-tools | |
-- coreutils | [] [] [] [] [] [] |
-- cpio | [] [] [] |
-- cpplib | [] [] |
-- cryptonit | [] |
-- dialog | [] [] [] |
-- diffutils | [] [] [] [] [] [] [] [] [] |
-- doodle | [] [] |
-- e2fsprogs | [] [] [] |
-- enscript | [] [] [] |
-- fetchmail | [] |
-- findutils | [] [] [] |
-- findutils_stable | [] [] [] [] |
-- flex | [] [] [] |
-- fslint | |
-- gas | [] [] |
-- gawk | [] [] [] [] () |
-- gcal | [] [] |
-- gcc | [] |
-- gettext-examples | [] [] [] [] [] [] [] |
-- gettext-runtime | [] [] [] [] [] [] |
-- gettext-tools | [] [] [] [] |
-- gip | [] [] [] [] |
-- gliv | () |
-- glunarclock | [] [] [] |
-- gmult | [] [] [] |
-- gnubiff | () () |
-- gnucash | () () () |
-- gnuedu | [] |
-- gnulib | [] [] [] |
-- gnunet | |
-- gnunet-gtk | |
-- gnutls | |
-- gpe-aerial | [] [] |
-- gpe-beam | [] [] |
-- gpe-calendar | |
-- gpe-clock | [] [] [] [] |
-- gpe-conf | [] |
-- gpe-contacts | [] [] |
-- gpe-edit | [] [] [] [] |
-- gpe-filemanager | [] |
-- gpe-go | [] [] [] |
-- gpe-login | [] [] [] |
-- gpe-ownerinfo | [] [] [] [] [] |
-- gpe-package | [] |
-- gpe-sketchbook | [] [] |
-- gpe-su | [] [] [] [] |
-- gpe-taskmanager | [] [] [] |
-- gpe-timesheet | [] [] [] [] |
-- gpe-today | [] [] [] [] |
-- gpe-todo | [] |
-- gphoto2 | [] [] [] [] [] |
-- gprof | [] [] [] [] [] |
-- gpsdrive | [] |
-- gramadoir | [] [] |
-- grep | [] [] [] |
-- gretl | [] [] [] () |
-- gsasl | [] [] |
-- gss | [] [] |
-- gst-plugins-bad | [] [] [] [] |
-- gst-plugins-base | [] [] [] [] |
-- gst-plugins-good | [] [] [] [] [] |
-- gst-plugins-ugly | [] [] [] [] |
-- gstreamer | [] [] [] |
-- gtick | [] [] [] |
-- gtkam | [] [] [] [] |
-- gtkorphan | [] [] |
-- gtkspell | [] [] [] [] [] [] [] |
-- gutenprint | [] |
-- hello | [] [] [] [] [] [] [] [] [] [] [] [] [] |
-- herrie | [] |
-- hylafax | |
-- idutils | [] [] [] [] [] |
-- indent | [] [] [] [] [] [] [] [] [] [] |
-- iso_15924 | [] |
-- iso_3166 | [] [] [] [] [] [] [] [] [] [] [] [] [] |
-- iso_3166_2 | [] |
-- iso_4217 | [] [] [] [] [] [] |
-- iso_639 | [] [] [] [] [] [] |
-- jpilot | [] [] |
-- jtag | [] |
-- jwhois | [] [] [] [] [] |
-- kbd | [] [] |
-- keytouch | [] [] [] |
-- keytouch-editor | [] |
-- keytouch-keyboa... | [] [] |
-- latrine | [] [] |
-- ld | [] [] [] [] |
-- leafpad | [] [] [] [] [] [] |
-- libc | [] [] [] [] [] |
-- libexif | [] |
-- libextractor | [] |
-- libgpewidget | [] [] [] [] [] |
-- libgpg-error | [] |
-- libgphoto2 | [] [] [] |
-- libgphoto2_port | [] [] |
-- libgsasl | [] [] |
-- libiconv | [] [] [] |
-- libidn | [] [] |
-- lifelines | () |
-- lilypond | [] [] [] |
-- lingoteach | [] [] [] |
-- lprng | |
-- lynx | [] [] [] |
-- m4 | [] [] [] [] |
-- mailfromd | |
-- mailutils | [] [] |
-- make | [] [] [] [] [] [] [] [] |
-- man-db | [] |
-- minicom | [] [] [] [] |
-- nano | [] [] [] [] [] [] [] |
-- opcodes | [] [] [] [] |
-- parted | [] [] [] |
-- pilot-qof | |
-- popt | [] [] [] [] |
-- psmisc | [] [] |
-- pwdutils | |
-- qof | [] |
-- radius | [] [] |
-- recode | [] [] [] [] [] [] [] [] |
-- rpm | [] [] |
-- screem | |
-- scrollkeeper | [] [] [] |
-- sed | [] [] [] [] [] |
-- shared-mime-info | [] [] [] [] [] [] |
-- sharutils | [] [] [] [] [] [] [] [] |
-- shishi | [] |
-- skencil | [] [] |
-- solfege | [] |
-- soundtracker | [] [] [] |
-- sp | [] |
-- system-tools-ba... | [] [] [] [] [] [] [] [] [] |
-- tar | [] [] [] [] [] |
-- texinfo | [] [] [] |
-- tin | [] () |
-- tuxpaint | [] [] |
-- unicode-han-tra... | |
-- unicode-transla... | [] [] |
-- util-linux | [] [] [] [] [] [] [] |
-- util-linux-ng | [] [] [] [] [] [] [] |
-- vorbis-tools | |
-- wastesedge | () |
-- wdiff | [] [] [] [] [] [] [] [] |
-- wget | [] [] [] [] [] [] [] [] |
-- xchat | [] [] [] [] [] [] [] |
-- xkeyboard-config | [] [] [] [] |
-- xpad | [] [] [] |
-- +--------------------------------------------------+
-- es et eu fa fi fr ga gl gu he hi hr hu id is it
-- 85 22 14 2 48 101 61 12 2 8 2 6 53 29 1 52
--
-- ja ka ko ku ky lg lt lv mk mn ms mt nb ne nl nn
-- +--------------------------------------------------+
-- Compendium | [] |
-- a2ps | () [] [] |
-- aegis | () |
-- ant-phone | [] |
-- anubis | [] [] [] |
-- ap-utils | [] |
-- aspell | [] [] |
-- bash | [] |
-- bfd | |
-- bibshelf | [] |
-- binutils | |
-- bison | [] [] [] |
-- bison-runtime | [] [] [] |
-- bluez-pin | [] [] [] |
-- cflow | |
-- clisp | [] |
-- console-tools | |
-- coreutils | [] |
-- cpio | [] |
-- cpplib | [] |
-- cryptonit | [] |
-- dialog | [] [] |
-- diffutils | [] [] [] |
-- doodle | |
-- e2fsprogs | [] |
-- enscript | [] |
-- fetchmail | [] [] |
-- findutils | [] |
-- findutils_stable | [] |
-- flex | [] [] |
-- fslint | |
-- gas | |
-- gawk | [] [] |
-- gcal | |
-- gcc | |
-- gettext-examples | [] [] [] |
-- gettext-runtime | [] [] [] |
-- gettext-tools | [] [] |
-- gip | [] [] |
-- gliv | [] |
-- glunarclock | [] [] |
-- gmult | [] [] [] |
-- gnubiff | |
-- gnucash | () () () |
-- gnuedu | |
-- gnulib | [] [] |
-- gnunet | |
-- gnunet-gtk | |
-- gnutls | [] |
-- gpe-aerial | [] |
-- gpe-beam | [] |
-- gpe-calendar | [] |
-- gpe-clock | [] [] [] |
-- gpe-conf | [] [] [] |
-- gpe-contacts | [] |
-- gpe-edit | [] [] [] |
-- gpe-filemanager | [] [] |
-- gpe-go | [] [] [] |
-- gpe-login | [] [] [] |
-- gpe-ownerinfo | [] [] |
-- gpe-package | [] [] |
-- gpe-sketchbook | [] [] |
-- gpe-su | [] [] [] |
-- gpe-taskmanager | [] [] [] [] |
-- gpe-timesheet | [] |
-- gpe-today | [] [] |
-- gpe-todo | [] |
-- gphoto2 | [] [] |
-- gprof | [] |
-- gpsdrive | [] |
-- gramadoir | () |
-- grep | [] [] |
-- gretl | |
-- gsasl | [] |
-- gss | |
-- gst-plugins-bad | [] |
-- gst-plugins-base | [] |
-- gst-plugins-good | [] |
-- gst-plugins-ugly | [] |
-- gstreamer | [] |
-- gtick | [] |
-- gtkam | [] [] |
-- gtkorphan | [] |
-- gtkspell | [] [] |
-- gutenprint | [] |
-- hello | [] [] [] [] [] [] [] |
-- herrie | [] |
-- hylafax | |
-- idutils | [] |
-- indent | [] [] |
-- iso_15924 | [] |
-- iso_3166 | [] [] [] [] [] [] [] [] |
-- iso_3166_2 | [] |
-- iso_4217 | [] [] [] |
-- iso_639 | [] [] [] [] |
-- jpilot | () () |
-- jtag | |
-- jwhois | [] |
-- kbd | [] |
-- keytouch | [] |
-- keytouch-editor | [] |
-- keytouch-keyboa... | |
-- latrine | [] |
-- ld | |
-- leafpad | [] [] |
-- libc | [] [] [] |
-- libexif | |
-- libextractor | |
-- libgpewidget | [] |
-- libgpg-error | |
-- libgphoto2 | [] |
-- libgphoto2_port | [] |
-- libgsasl | [] |
-- libiconv | [] |
-- libidn | [] [] |
-- lifelines | [] |
-- lilypond | [] |
-- lingoteach | [] |
-- lprng | |
-- lynx | [] [] |
-- m4 | [] [] |
-- mailfromd | |
-- mailutils | |
-- make | [] [] [] |
-- man-db | |
-- minicom | [] |
-- nano | [] [] [] |
-- opcodes | [] |
-- parted | [] [] |
-- pilot-qof | |
-- popt | [] [] [] |
-- psmisc | [] [] [] |
-- pwdutils | |
-- qof | |
-- radius | |
-- recode | [] |
-- rpm | [] [] |
-- screem | [] |
-- scrollkeeper | [] [] [] [] |
-- sed | [] [] |
-- shared-mime-info | [] [] [] [] [] [] [] |
-- sharutils | [] [] |
-- shishi | |
-- skencil | |
-- solfege | () () |
-- soundtracker | |
-- sp | () |
-- system-tools-ba... | [] [] [] [] |
-- tar | [] [] [] |
-- texinfo | [] [] |
-- tin | |
-- tuxpaint | () [] [] |
-- unicode-han-tra... | |
-- unicode-transla... | |
-- util-linux | [] [] |
-- util-linux-ng | [] [] |
-- vorbis-tools | |
-- wastesedge | [] |
-- wdiff | [] [] |
-- wget | [] [] |
-- xchat | [] [] [] [] |
-- xkeyboard-config | [] [] [] |
-- xpad | [] [] [] |
-- +--------------------------------------------------+
-- ja ka ko ku ky lg lt lv mk mn ms mt nb ne nl nn
-- 51 2 25 3 2 0 6 0 2 2 20 0 11 1 103 6
--
-- or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta
-- +--------------------------------------------------+
-- Compendium | [] [] [] [] [] |
-- a2ps | () [] [] [] [] [] [] |
-- aegis | () () |
-- ant-phone | [] [] |
-- anubis | [] [] [] |
-- ap-utils | () |
-- aspell | [] [] [] |
-- bash | [] [] |
-- bfd | |
-- bibshelf | [] |
-- binutils | [] [] |
-- bison | [] [] [] [] [] |
-- bison-runtime | [] [] [] [] [] |
-- bluez-pin | [] [] [] [] [] [] [] [] [] |
-- cflow | [] |
-- clisp | [] |
-- console-tools | [] |
-- coreutils | [] [] [] [] |
-- cpio | [] [] [] |
-- cpplib | [] |
-- cryptonit | [] [] |
-- dialog | [] |
-- diffutils | [] [] [] [] [] [] |
-- doodle | [] [] |
-- e2fsprogs | [] [] |
-- enscript | [] [] [] [] [] |
-- fetchmail | [] [] [] |
-- findutils | [] [] [] |
-- findutils_stable | [] [] [] [] [] [] |
-- flex | [] [] [] [] [] |
-- fslint | [] |
-- gas | |
-- gawk | [] [] [] [] |
-- gcal | [] |
-- gcc | [] [] |
-- gettext-examples | [] [] [] [] [] [] [] [] |
-- gettext-runtime | [] [] [] [] [] [] [] [] |
-- gettext-tools | [] [] [] [] [] [] [] |
-- gip | [] [] [] [] |
-- gliv | [] [] [] [] [] [] |
-- glunarclock | [] [] [] [] [] [] |
-- gmult | [] [] [] [] |
-- gnubiff | () [] |
-- gnucash | () [] |
-- gnuedu | |
-- gnulib | [] [] [] |
-- gnunet | |
-- gnunet-gtk | [] |
-- gnutls | [] [] |
-- gpe-aerial | [] [] [] [] [] [] [] |
-- gpe-beam | [] [] [] [] [] [] [] |
-- gpe-calendar | [] [] [] [] |
-- gpe-clock | [] [] [] [] [] [] [] [] |
-- gpe-conf | [] [] [] [] [] [] [] |
-- gpe-contacts | [] [] [] [] [] |
-- gpe-edit | [] [] [] [] [] [] [] [] [] |
-- gpe-filemanager | [] [] |
-- gpe-go | [] [] [] [] [] [] [] [] |
-- gpe-login | [] [] [] [] [] [] [] [] |
-- gpe-ownerinfo | [] [] [] [] [] [] [] [] |
-- gpe-package | [] [] |
-- gpe-sketchbook | [] [] [] [] [] [] [] [] |
-- gpe-su | [] [] [] [] [] [] [] [] |
-- gpe-taskmanager | [] [] [] [] [] [] [] [] |
-- gpe-timesheet | [] [] [] [] [] [] [] [] |
-- gpe-today | [] [] [] [] [] [] [] [] |
-- gpe-todo | [] [] [] [] |
-- gphoto2 | [] [] [] [] [] [] |
-- gprof | [] [] [] |
-- gpsdrive | [] [] |
-- gramadoir | [] [] |
-- grep | [] [] [] [] |
-- gretl | [] [] [] |
-- gsasl | [] [] [] |
-- gss | [] [] [] [] |
-- gst-plugins-bad | [] [] [] |
-- gst-plugins-base | [] [] |
-- gst-plugins-good | [] [] |
-- gst-plugins-ugly | [] [] [] |
-- gstreamer | [] [] [] [] |
-- gtick | [] |
-- gtkam | [] [] [] [] [] |
-- gtkorphan | [] |
-- gtkspell | [] [] [] [] [] [] [] [] |
-- gutenprint | [] |
-- hello | [] [] [] [] [] [] [] [] |
-- herrie | [] [] [] |
-- hylafax | |
-- idutils | [] [] [] [] [] |
-- indent | [] [] [] [] [] [] [] |
-- iso_15924 | |
-- iso_3166 | [] [] [] [] [] [] [] [] [] [] [] [] [] |
-- iso_3166_2 | |
-- iso_4217 | [] [] [] [] [] [] [] |
-- iso_639 | [] [] [] [] [] [] [] |
-- jpilot | |
-- jtag | [] |
-- jwhois | [] [] [] [] |
-- kbd | [] [] [] |
-- keytouch | [] |
-- keytouch-editor | [] |
-- keytouch-keyboa... | [] |
-- latrine | |
-- ld | [] |
-- leafpad | [] [] [] [] [] [] |
-- libc | [] [] [] [] |
-- libexif | [] [] |
-- libextractor | [] [] |
-- libgpewidget | [] [] [] [] [] [] [] [] |
-- libgpg-error | [] [] [] |
-- libgphoto2 | [] |
-- libgphoto2_port | [] [] [] |
-- libgsasl | [] [] [] [] |
-- libiconv | [] [] [] |
-- libidn | [] [] () |
-- lifelines | [] [] |
-- lilypond | |
-- lingoteach | [] |
-- lprng | [] |
-- lynx | [] [] [] |
-- m4 | [] [] [] [] [] |
-- mailfromd | [] |
-- mailutils | [] [] [] |
-- make | [] [] [] [] |
-- man-db | [] [] [] [] |
-- minicom | [] [] [] [] [] |
-- nano | [] [] [] [] |
-- opcodes | [] [] |
-- parted | [] |
-- pilot-qof | |
-- popt | [] [] [] [] |
-- psmisc | [] [] |
-- pwdutils | [] [] |
-- qof | [] [] |
-- radius | [] [] |
-- recode | [] [] [] [] [] [] [] |
-- rpm | [] [] [] [] |
-- screem | |
-- scrollkeeper | [] [] [] [] [] [] [] |
-- sed | [] [] [] [] [] [] [] [] [] |
-- shared-mime-info | [] [] [] [] [] [] |
-- sharutils | [] [] [] [] |
-- shishi | [] |
-- skencil | [] [] [] |
-- solfege | [] |
-- soundtracker | [] [] |
-- sp | |
-- system-tools-ba... | [] [] [] [] [] [] [] [] [] |
-- tar | [] [] [] [] |
-- texinfo | [] [] [] [] |
-- tin | () |
-- tuxpaint | [] [] [] [] [] [] |
-- unicode-han-tra... | |
-- unicode-transla... | |
-- util-linux | [] [] [] [] |
-- util-linux-ng | [] [] [] [] |
-- vorbis-tools | [] |
-- wastesedge | |
-- wdiff | [] [] [] [] [] [] [] |
-- wget | [] [] [] [] |
-- xchat | [] [] [] [] [] [] [] |
-- xkeyboard-config | [] [] [] |
-- xpad | [] [] [] |
-- +--------------------------------------------------+
-- or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta
-- 0 5 77 31 53 4 58 72 3 45 46 9 45 122 3
--
-- tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu
-- +---------------------------------------------------+
-- Compendium | [] [] [] [] | 19
-- a2ps | [] [] [] | 19
-- aegis | [] | 1
-- ant-phone | [] [] | 6
-- anubis | [] [] [] | 11
-- ap-utils | () [] | 4
-- aspell | [] [] [] | 16
-- bash | [] | 6
-- bfd | | 2
-- bibshelf | [] | 7
-- binutils | [] [] [] [] | 9
-- bison | [] [] [] [] | 20
-- bison-runtime | [] [] [] [] | 18
-- bluez-pin | [] [] [] [] [] [] | 28
-- cflow | [] [] | 5
-- clisp | | 9
-- console-tools | [] [] | 5
-- coreutils | [] [] [] | 18
-- cpio | [] [] [] [] | 11
-- cpplib | [] [] [] [] [] | 12
-- cryptonit | [] | 6
-- dialog | [] [] [] | 9
-- diffutils | [] [] [] [] [] | 29
-- doodle | [] | 6
-- e2fsprogs | [] [] | 10
-- enscript | [] [] [] | 16
-- fetchmail | [] [] | 12
-- findutils | [] [] [] | 11
-- findutils_stable | [] [] [] [] | 18
-- flex | [] [] | 15
-- fslint | [] | 2
-- gas | [] | 3
-- gawk | [] [] [] | 16
-- gcal | [] | 5
-- gcc | [] [] [] | 7
-- gettext-examples | [] [] [] [] [] [] | 29
-- gettext-runtime | [] [] [] [] [] [] | 28
-- gettext-tools | [] [] [] [] [] | 20
-- gip | [] [] | 13
-- gliv | [] [] | 11
-- glunarclock | [] [] [] | 15
-- gmult | [] [] [] [] | 16
-- gnubiff | [] | 2
-- gnucash | () [] | 5
-- gnuedu | [] | 2
-- gnulib | [] | 10
-- gnunet | | 0
-- gnunet-gtk | [] [] | 3
-- gnutls | | 4
-- gpe-aerial | [] [] | 14
-- gpe-beam | [] [] | 14
-- gpe-calendar | [] [] | 7
-- gpe-clock | [] [] [] [] | 21
-- gpe-conf | [] [] [] | 16
-- gpe-contacts | [] [] | 10
-- gpe-edit | [] [] [] [] [] | 22
-- gpe-filemanager | [] [] | 7
-- gpe-go | [] [] [] [] | 19
-- gpe-login | [] [] [] [] [] | 21
-- gpe-ownerinfo | [] [] [] [] | 21
-- gpe-package | [] | 6
-- gpe-sketchbook | [] [] | 16
-- gpe-su | [] [] [] [] | 21
-- gpe-taskmanager | [] [] [] [] | 21
-- gpe-timesheet | [] [] [] [] | 18
-- gpe-today | [] [] [] [] [] | 21
-- gpe-todo | [] [] | 8
-- gphoto2 | [] [] [] [] | 21
-- gprof | [] [] | 13
-- gpsdrive | [] | 5
-- gramadoir | [] | 7
-- grep | [] | 12
-- gretl | | 6
-- gsasl | [] [] [] | 9
-- gss | [] | 7
-- gst-plugins-bad | [] [] [] | 13
-- gst-plugins-base | [] [] | 11
-- gst-plugins-good | [] [] [] [] [] | 16
-- gst-plugins-ugly | [] [] [] | 13
-- gstreamer | [] [] [] | 18
-- gtick | [] [] | 7
-- gtkam | [] | 16
-- gtkorphan | [] | 7
-- gtkspell | [] [] [] [] [] [] | 27
-- gutenprint | | 4
-- hello | [] [] [] [] [] | 38
-- herrie | [] [] | 8
-- hylafax | | 0
-- idutils | [] [] | 15
-- indent | [] [] [] [] [] | 28
-- iso_15924 | [] [] | 4
-- iso_3166 | [] [] [] [] [] [] [] [] [] | 54
-- iso_3166_2 | [] [] | 4
-- iso_4217 | [] [] [] [] [] | 24
-- iso_639 | [] [] [] [] [] | 26
-- jpilot | [] [] [] [] | 7
-- jtag | [] | 3
-- jwhois | [] [] [] | 13
-- kbd | [] [] [] | 13
-- keytouch | [] | 8
-- keytouch-editor | [] | 5
-- keytouch-keyboa... | [] | 5
-- latrine | [] [] | 5
-- ld | [] [] [] [] | 10
-- leafpad | [] [] [] [] [] | 24
-- libc | [] [] [] | 19
-- libexif | [] | 5
-- libextractor | [] | 5
-- libgpewidget | [] [] [] | 20
-- libgpg-error | [] | 6
-- libgphoto2 | [] [] | 9
-- libgphoto2_port | [] [] [] | 11
-- libgsasl | [] | 8
-- libiconv | [] [] | 11
-- libidn | [] [] | 11
-- lifelines | | 4
-- lilypond | [] | 6
-- lingoteach | [] | 6
-- lprng | [] | 2
-- lynx | [] [] [] | 15
-- m4 | [] [] [] | 18
-- mailfromd | [] [] | 3
-- mailutils | [] [] | 8
-- make | [] [] [] | 20
-- man-db | [] | 9
-- minicom | [] | 14
-- nano | [] [] [] | 20
-- opcodes | [] [] | 10
-- parted | [] [] [] | 11
-- pilot-qof | [] | 1
-- popt | [] [] [] [] | 18
-- psmisc | [] [] | 10
-- pwdutils | [] | 3
-- qof | [] | 4
-- radius | [] [] | 7
-- recode | [] [] [] | 25
-- rpm | [] [] [] [] | 13
-- screem | [] | 2
-- scrollkeeper | [] [] [] [] | 26
-- sed | [] [] [] [] | 23
-- shared-mime-info | [] [] [] | 29
-- sharutils | [] [] [] | 23
-- shishi | [] | 3
-- skencil | [] | 7
-- solfege | [] | 3
-- soundtracker | [] [] | 9
-- sp | [] | 3
-- system-tools-ba... | [] [] [] [] [] [] [] | 38
-- tar | [] [] [] | 17
-- texinfo | [] [] [] | 15
-- tin | | 1
-- tuxpaint | [] [] [] | 19
-- unicode-han-tra... | | 0
-- unicode-transla... | | 2
-- util-linux | [] [] [] | 20
-- util-linux-ng | [] [] [] | 20
-- vorbis-tools | [] [] | 4
-- wastesedge | | 1
-- wdiff | [] [] | 23
-- wget | [] [] [] | 20
-- xchat | [] [] [] [] | 29
-- xkeyboard-config | [] [] [] | 14
-- xpad | [] [] [] | 15
-- +---------------------------------------------------+
-- 76 teams tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu
-- 163 domains 0 3 1 74 51 0 143 21 1 57 7 45 0 2036
--
-- Some counters in the preceding matrix are higher than the number of
--visible blocks let us expect. This is because a few extra PO files are
--used for implementing regional variants of languages, or language
--dialects.
--
-- For a PO file in the matrix above to be effective, the package to
--which it applies should also have been internationalized and
--distributed as such by its maintainer. There might be an observable
--lag between the mere existence a PO file and its wide availability in a
--distribution.
--
-- If November 2007 seems to be old, you may fetch a more recent copy
--of this `ABOUT-NLS' file on most GNU archive sites. The most
--up-to-date matrix with full percentage details can be found at
--`http://translationproject.org/extra/matrix.html'.
--
--1.6 Using `gettext' in new packages
--===================================
--
--If you are writing a freely available program and want to
--internationalize it you are welcome to use GNU `gettext' in your
--package. Of course you have to respect the GNU Library General Public
--License which covers the use of the GNU `gettext' library. This means
--in particular that even non-free programs can use `libintl' as a shared
--library, whereas only free software can use `libintl' as a static
--library or use modified versions of `libintl'.
--
-- Once the sources are changed appropriately and the setup can handle
--the use of `gettext' the only thing missing are the translations. The
--Free Translation Project is also available for packages which are not
--developed inside the GNU project. Therefore the information given above
--applies also for every other Free Software Project. Contact
--`coordinator@translationproject.org' to make the `.pot' files available
--to the translation teams.
--
-+<https://www.gnu.org/software/gettext/manual/html_node/Users.html>
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,3 +1,10 @@
-+2019-12-07 gettextize <bug-gnu-gettext@gnu.org>
-+
-+ * m4/intlmacosx.m4: Upgrade to gettext-0.20.1.
-+ * Makefile.am (SUBDIRS): Remove intl.
-+ * configure.ac (AC_CONFIG_FILES): Remove intl/Makefile.
-+ (AM_GNU_GETTEXT_VERSION): Bump to 0.20.
-+
- 2013-03-13 Steve Langasek <steve.langasek@ubuntu.com>
-
- * nih/watch.c (nih_watch_walk_filter): New NihFileFilter function
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1,6 +1,6 @@
- ## Process this file with automake to produce Makefile.in
-
--SUBDIRS = m4 intl nih nih-dbus nih-dbus-tool po
-+SUBDIRS = m4 nih nih-dbus nih-dbus-tool po
-
- EXTRA_DIST = HACKING
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -15,8 +15,8 @@ AM_MAINTAINER_MODE([enable])
- LT_PREREQ(2.2.4)
- LT_INIT
-
--AM_GNU_GETTEXT_VERSION([0.17])
--AM_GNU_GETTEXT()
-+AM_GNU_GETTEXT_VERSION([0.20])
-+AM_GNU_GETTEXT([external])
-
- # Checks for programs.
- AC_PROG_CC
-@@ -58,7 +58,7 @@ AS_IF([test "$cross_compiling" = "yes"],
- AC_SUBST([NIH_DBUS_TOOL], ["\${top_builddir}/nih-dbus-tool/nih-dbus-tool"])])],
- [AC_SUBST([NIH_DBUS_TOOL], ["\${top_builddir}/nih-dbus-tool/nih-dbus-tool"])])
-
--AC_CONFIG_FILES([ Makefile m4/Makefile intl/Makefile
-+AC_CONFIG_FILES([ Makefile m4/Makefile
- nih/Makefile nih/libnih.pc
- nih-dbus/Makefile nih-dbus/libnih-dbus.pc
- nih-dbus-tool/Makefile
---- a/intl/ChangeLog
-+++ /dev/null
-@@ -1,4 +0,0 @@
--2007-11-07 GNU <bug-gnu-gettext@gnu.org>
--
-- * Version 0.17 released.
--
---- a/intl/Makefile.in
-+++ /dev/null
-@@ -1,587 +0,0 @@
--# Makefile for directory with message catalog handling library of GNU gettext
--# Copyright (C) 1995-1998, 2000-2007 Free Software Foundation, Inc.
--#
--# This program is free software; you can redistribute it and/or modify it
--# under the terms of the GNU Library General Public License as published
--# by the Free Software Foundation; either version 2, or (at your option)
--# any later version.
--#
--# This program 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
--# Library General Public License for more details.
--#
--# You should have received a copy of the GNU Library General Public
--# License along with this program; if not, write to the Free Software
--# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
--# USA.
--
--PACKAGE = @PACKAGE@
--VERSION = @VERSION@
--
--SHELL = /bin/sh
--
--srcdir = @srcdir@
--top_srcdir = @top_srcdir@
--top_builddir = ..
--
--# The VPATH variables allows builds with $builddir != $srcdir, assuming a
--# 'make' program that supports VPATH (such as GNU make). This line is removed
--# by autoconf automatically when "$(srcdir)" = ".".
--# In this directory, the VPATH handling is particular:
--# 1. If INTL_LIBTOOL_SUFFIX_PREFIX is 'l' (indicating a build with libtool),
--# the .c -> .lo rules carefully use $(srcdir), so that VPATH can be omitted.
--# 2. If PACKAGE = gettext-tools, VPATH _must_ be omitted, because otherwise
--# 'make' does the wrong thing if GNU gettext was configured with
--# "./configure --srcdir=`pwd`", namely it gets confused by the .lo and .la
--# files it finds in srcdir = ../../gettext-runtime/intl.
--VPATH = $(srcdir)
--
--prefix = @prefix@
--exec_prefix = @exec_prefix@
--transform = @program_transform_name@
--libdir = @libdir@
--includedir = @includedir@
--datarootdir = @datarootdir@
--datadir = @datadir@
--localedir = $(datadir)/locale
--gettextsrcdir = $(datadir)/gettext/intl
--aliaspath = $(localedir)
--subdir = intl
--
--INSTALL = @INSTALL@
--INSTALL_DATA = @INSTALL_DATA@
--
--# We use $(mkdir_p).
--# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
--# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
--# @install_sh@ does not start with $(SHELL), so we add it.
--# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
--# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
--# versions, $(mkinstalldirs) and $(install_sh) are unused.
--mkinstalldirs = $(SHELL) @install_sh@ -d
--install_sh = $(SHELL) @install_sh@
--MKDIR_P = @MKDIR_P@
--mkdir_p = @mkdir_p@
--
--l = @INTL_LIBTOOL_SUFFIX_PREFIX@
--
--AR = ar
--CC = @CC@
--LIBTOOL = @LIBTOOL@
--RANLIB = @RANLIB@
--YACC = @INTLBISON@ -y -d
--YFLAGS = --name-prefix=__gettext
--WINDRES = @WINDRES@
--
--# -DBUILDING_LIBINTL: Change expansion of LIBINTL_DLL_EXPORTED macro.
--# -DBUILDING_DLL: Change expansion of RELOCATABLE_DLL_EXPORTED macro.
--DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
---DLIBDIR=\"$(libdir)\" -DBUILDING_LIBINTL -DBUILDING_DLL -DIN_LIBINTL \
---DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \
---Dset_relocation_prefix=libintl_set_relocation_prefix \
---Drelocate=libintl_relocate \
---DDEPENDS_ON_LIBICONV=1 @DEFS@
--CPPFLAGS = @CPPFLAGS@
--CFLAGS = @CFLAGS@ @CFLAG_VISIBILITY@
--LDFLAGS = @LDFLAGS@ $(LDFLAGS_@WOE32DLL@)
--LDFLAGS_yes = -Wl,--export-all-symbols
--LDFLAGS_no =
--LIBS = @LIBS@
--
--COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
--
--HEADERS = \
-- gmo.h \
-- gettextP.h \
-- hash-string.h \
-- loadinfo.h \
-- plural-exp.h \
-- eval-plural.h \
-- localcharset.h \
-- lock.h \
-- relocatable.h \
-- tsearch.h tsearch.c \
-- xsize.h \
-- printf-args.h printf-args.c \
-- printf-parse.h wprintf-parse.h printf-parse.c \
-- vasnprintf.h vasnwprintf.h vasnprintf.c \
-- os2compat.h \
-- libgnuintl.h.in
--SOURCES = \
-- bindtextdom.c \
-- dcgettext.c \
-- dgettext.c \
-- gettext.c \
-- finddomain.c \
-- hash-string.c \
-- loadmsgcat.c \
-- localealias.c \
-- textdomain.c \
-- l10nflist.c \
-- explodename.c \
-- dcigettext.c \
-- dcngettext.c \
-- dngettext.c \
-- ngettext.c \
-- plural.y \
-- plural-exp.c \
-- localcharset.c \
-- lock.c \
-- relocatable.c \
-- langprefs.c \
-- localename.c \
-- log.c \
-- printf.c \
-- version.c \
-- osdep.c \
-- os2compat.c \
-- intl-exports.c \
-- intl-compat.c
--OBJECTS = \
-- bindtextdom.$lo \
-- dcgettext.$lo \
-- dgettext.$lo \
-- gettext.$lo \
-- finddomain.$lo \
-- hash-string.$lo \
-- loadmsgcat.$lo \
-- localealias.$lo \
-- textdomain.$lo \
-- l10nflist.$lo \
-- explodename.$lo \
-- dcigettext.$lo \
-- dcngettext.$lo \
-- dngettext.$lo \
-- ngettext.$lo \
-- plural.$lo \
-- plural-exp.$lo \
-- localcharset.$lo \
-- lock.$lo \
-- relocatable.$lo \
-- langprefs.$lo \
-- localename.$lo \
-- log.$lo \
-- printf.$lo \
-- version.$lo \
-- osdep.$lo \
-- intl-compat.$lo
--OBJECTS_RES_yes = libintl.res
--OBJECTS_RES_no =
--DISTFILES.common = Makefile.in \
--config.charset locale.alias ref-add.sin ref-del.sin export.h libintl.rc \
--$(HEADERS) $(SOURCES)
--DISTFILES.generated = plural.c
--DISTFILES.normal = VERSION
--DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc README.woe32
--DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \
--COPYING.LIB-2 gettext.h libgettext.h plural-eval.c libgnuintl.h \
--libgnuintl.h_vms Makefile.vms libgnuintl.h.msvc-static \
--libgnuintl.h.msvc-shared Makefile.msvc
--
--all: all-@USE_INCLUDED_LIBINTL@
--all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
--all-no: all-no-@BUILD_INCLUDED_LIBINTL@
--all-no-yes: libgnuintl.$la
--all-no-no:
--
--libintl.a libgnuintl.a: $(OBJECTS)
-- rm -f $@
-- $(AR) cru $@ $(OBJECTS)
-- $(RANLIB) $@
--
--libintl.la libgnuintl.la: $(OBJECTS) $(OBJECTS_RES_@WOE32@)
-- $(LIBTOOL) --mode=link \
-- $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
-- $(OBJECTS) @LTLIBICONV@ @INTL_MACOSX_LIBS@ $(LIBS) @LTLIBTHREAD@ @LTLIBC@ \
-- $(OBJECTS_RES_@WOE32@) \
-- -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
-- -rpath $(libdir) \
-- -no-undefined
--
--# Libtool's library version information for libintl.
--# Before making a gettext release, the gettext maintainer must change this
--# according to the libtool documentation, section "Library interface versions".
--# Maintainers of other packages that include the intl directory must *not*
--# change these values.
--LTV_CURRENT=8
--LTV_REVISION=2
--LTV_AGE=0
--
--.SUFFIXES:
--.SUFFIXES: .c .y .o .lo .sin .sed
--
--.c.o:
-- $(COMPILE) $<
--
--.y.c:
-- $(YACC) $(YFLAGS) --output $@ $<
-- rm -f $*.h
--
--bindtextdom.lo: $(srcdir)/bindtextdom.c
-- $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/bindtextdom.c
--dcgettext.lo: $(srcdir)/dcgettext.c
-- $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcgettext.c
--dgettext.lo: $(srcdir)/dgettext.c
-- $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dgettext.c
--gettext.lo: $(srcdir)/gettext.c
-- $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/gettext.c
--finddomain.lo: $(srcdir)/finddomain.c
-- $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/finddomain.c
--hash-string.lo: $(srcdir)/hash-string.c
-- $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/hash-string.c
--loadmsgcat.lo: $(srcdir)/loadmsgcat.c
-- $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/loadmsgcat.c
--localealias.lo: $(srcdir)/localealias.c
-- $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localealias.c
--textdomain.lo: $(srcdir)/textdomain.c
-- $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/textdomain.c
--l10nflist.lo: $(srcdir)/l10nflist.c
-- $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/l10nflist.c
--explodename.lo: $(srcdir)/explodename.c
-- $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/explodename.c
--dcigettext.lo: $(srcdir)/dcigettext.c
-- $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcigettext.c
--dcngettext.lo: $(srcdir)/dcngettext.c
-- $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcngettext.c
--dngettext.lo: $(srcdir)/dngettext.c
-- $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dngettext.c
--ngettext.lo: $(srcdir)/ngettext.c
-- $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/ngettext.c
--plural.lo: $(srcdir)/plural.c
-- $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural.c
--plural-exp.lo: $(srcdir)/plural-exp.c
-- $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural-exp.c
--localcharset.lo: $(srcdir)/localcharset.c
-- $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localcharset.c
--lock.lo: $(srcdir)/lock.c
-- $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/lock.c
--relocatable.lo: $(srcdir)/relocatable.c
-- $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/relocatable.c
--langprefs.lo: $(srcdir)/langprefs.c
-- $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/langprefs.c
--localename.lo: $(srcdir)/localename.c
-- $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localename.c
--log.lo: $(srcdir)/log.c
-- $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/log.c
--printf.lo: $(srcdir)/printf.c
-- $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/printf.c
--version.lo: $(srcdir)/version.c
-- $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/version.c
--osdep.lo: $(srcdir)/osdep.c
-- $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/osdep.c
--intl-compat.lo: $(srcdir)/intl-compat.c
-- $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/intl-compat.c
--
--# This rule is executed only on Woe32 systems.
--# The following sed expressions come from the windres-options script. They are
--# inlined here, so that they can be written in a Makefile without requiring a
--# temporary file. They must contain literal newlines rather than semicolons,
--# so that they work with the sed-3.02 that is shipped with MSYS. We can use
--# GNU bash's $'\n' syntax to obtain such a newline.
--libintl.res: $(srcdir)/libintl.rc
-- nl=$$'\n'; \
-- sed_extract_major='/^[0-9]/{'$${nl}'s/^\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \
-- sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{'$${nl}'s/^[0-9]*[.]\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \
-- sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{'$${nl}'s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \
-- $(WINDRES) \
-- "-DPACKAGE_VERSION_STRING=\\\"$(VERSION)\\\"" \
-- "-DPACKAGE_VERSION_MAJOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_major"` \
-- "-DPACKAGE_VERSION_MINOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_minor"` \
-- "-DPACKAGE_VERSION_SUBMINOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_subminor"` \
-- -i $(srcdir)/libintl.rc -o libintl.res --output-format=coff
--
--ref-add.sed: $(srcdir)/ref-add.sin
-- sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-add.sin > t-ref-add.sed
-- mv t-ref-add.sed ref-add.sed
--ref-del.sed: $(srcdir)/ref-del.sin
-- sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-del.sin > t-ref-del.sed
-- mv t-ref-del.sed ref-del.sed
--
--INCLUDES = -I. -I$(srcdir) -I..
--
--libgnuintl.h: $(srcdir)/libgnuintl.h.in
-- sed -e '/IN_LIBGLOCALE/d' \
-- -e 's,@''HAVE_POSIX_PRINTF''@,@HAVE_POSIX_PRINTF@,g' \
-- -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \
-- -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \
-- -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \
-- < $(srcdir)/libgnuintl.h.in \
-- | if test '@WOE32DLL@' = yes; then \
-- sed -e 's/extern \([^()]*\);/extern __declspec (dllimport) \1;/'; \
-- else \
-- cat; \
-- fi \
-- | sed -e 's/extern \([^"]\)/extern LIBINTL_DLL_EXPORTED \1/' \
-- -e "/#define _LIBINTL_H/r $(srcdir)/export.h" \
-- | sed -e 's,@''HAVE_VISIBILITY''@,@HAVE_VISIBILITY@,g' \
-- > libgnuintl.h
--
--libintl.h: $(srcdir)/libgnuintl.h.in
-- sed -e '/IN_LIBGLOCALE/d' \
-- -e 's,@''HAVE_POSIX_PRINTF''@,@HAVE_POSIX_PRINTF@,g' \
-- -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \
-- -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \
-- -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \
-- < $(srcdir)/libgnuintl.h.in > libintl.h
--
--charset.alias: $(srcdir)/config.charset
-- $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
-- mv t-$@ $@
--
--check: all
--
--# We must not install the libintl.h/libintl.a files if we are on a
--# system which has the GNU gettext() function in its C library or in a
--# separate library.
--# If you want to use the one which comes with this version of the
--# package, you have to use `configure --with-included-gettext'.
--install: install-exec install-data
--install-exec: all
-- if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
-- && test '@USE_INCLUDED_LIBINTL@' = yes; then \
-- $(mkdir_p) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
-- $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \
-- $(LIBTOOL) --mode=install \
-- $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \
-- if test "@RELOCATABLE@" = yes; then \
-- dependencies=`sed -n -e 's,^dependency_libs=\(.*\),\1,p' < $(DESTDIR)$(libdir)/libintl.la | sed -e "s,^',," -e "s,'\$$,,"`; \
-- if test -n "$$dependencies"; then \
-- rm -f $(DESTDIR)$(libdir)/libintl.la; \
-- fi; \
-- fi; \
-- else \
-- : ; \
-- fi
-- if test "$(PACKAGE)" = "gettext-tools" \
-- && test '@USE_INCLUDED_LIBINTL@' = no \
-- && test @GLIBC2@ != no; then \
-- $(mkdir_p) $(DESTDIR)$(libdir); \
-- $(LIBTOOL) --mode=install \
-- $(INSTALL_DATA) libgnuintl.$la $(DESTDIR)$(libdir)/libgnuintl.$la; \
-- rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \
-- $(INSTALL_DATA) $(DESTDIR)$(libdir)/libgnuintl.so $(DESTDIR)$(libdir)/preloadable_libintl.so; \
-- $(LIBTOOL) --mode=uninstall \
-- rm -f $(DESTDIR)$(libdir)/libgnuintl.$la; \
-- else \
-- : ; \
-- fi
-- if test '@USE_INCLUDED_LIBINTL@' = yes; then \
-- test @GLIBC21@ != no || $(mkdir_p) $(DESTDIR)$(libdir); \
-- temp=$(DESTDIR)$(libdir)/t-charset.alias; \
-- dest=$(DESTDIR)$(libdir)/charset.alias; \
-- if test -f $(DESTDIR)$(libdir)/charset.alias; then \
-- orig=$(DESTDIR)$(libdir)/charset.alias; \
-- sed -f ref-add.sed $$orig > $$temp; \
-- $(INSTALL_DATA) $$temp $$dest; \
-- rm -f $$temp; \
-- else \
-- if test @GLIBC21@ = no; then \
-- orig=charset.alias; \
-- sed -f ref-add.sed $$orig > $$temp; \
-- $(INSTALL_DATA) $$temp $$dest; \
-- rm -f $$temp; \
-- fi; \
-- fi; \
-- $(mkdir_p) $(DESTDIR)$(localedir); \
-- test -f $(DESTDIR)$(localedir)/locale.alias \
-- && orig=$(DESTDIR)$(localedir)/locale.alias \
-- || orig=$(srcdir)/locale.alias; \
-- temp=$(DESTDIR)$(localedir)/t-locale.alias; \
-- dest=$(DESTDIR)$(localedir)/locale.alias; \
-- sed -f ref-add.sed $$orig > $$temp; \
-- $(INSTALL_DATA) $$temp $$dest; \
-- rm -f $$temp; \
-- else \
-- : ; \
-- fi
--install-data: all
-- if test "$(PACKAGE)" = "gettext-tools"; then \
-- $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
-- $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
-- $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
-- dists="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \
-- for file in $$dists; do \
-- $(INSTALL_DATA) $(srcdir)/$$file \
-- $(DESTDIR)$(gettextsrcdir)/$$file; \
-- done; \
-- chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \
-- dists="$(DISTFILES.generated)"; \
-- for file in $$dists; do \
-- if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
-- $(INSTALL_DATA) $$dir/$$file \
-- $(DESTDIR)$(gettextsrcdir)/$$file; \
-- done; \
-- dists="$(DISTFILES.obsolete)"; \
-- for file in $$dists; do \
-- rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
-- done; \
-- else \
-- : ; \
-- fi
--
--install-strip: install
--
--install-dvi install-html install-info install-ps install-pdf:
--
--installdirs:
-- if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
-- && test '@USE_INCLUDED_LIBINTL@' = yes; then \
-- $(mkdir_p) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
-- else \
-- : ; \
-- fi
-- if test "$(PACKAGE)" = "gettext-tools" \
-- && test '@USE_INCLUDED_LIBINTL@' = no \
-- && test @GLIBC2@ != no; then \
-- $(mkdir_p) $(DESTDIR)$(libdir); \
-- else \
-- : ; \
-- fi
-- if test '@USE_INCLUDED_LIBINTL@' = yes; then \
-- test @GLIBC21@ != no || $(mkdir_p) $(DESTDIR)$(libdir); \
-- $(mkdir_p) $(DESTDIR)$(localedir); \
-- else \
-- : ; \
-- fi
-- if test "$(PACKAGE)" = "gettext-tools"; then \
-- $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
-- else \
-- : ; \
-- fi
--
--# Define this as empty until I found a useful application.
--installcheck:
--
--uninstall:
-- if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
-- && test '@USE_INCLUDED_LIBINTL@' = yes; then \
-- rm -f $(DESTDIR)$(includedir)/libintl.h; \
-- $(LIBTOOL) --mode=uninstall \
-- rm -f $(DESTDIR)$(libdir)/libintl.$la; \
-- else \
-- : ; \
-- fi
-- if test "$(PACKAGE)" = "gettext-tools" \
-- && test '@USE_INCLUDED_LIBINTL@' = no \
-- && test @GLIBC2@ != no; then \
-- rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \
-- else \
-- : ; \
-- fi
-- if test '@USE_INCLUDED_LIBINTL@' = yes; then \
-- if test -f $(DESTDIR)$(libdir)/charset.alias; then \
-- temp=$(DESTDIR)$(libdir)/t-charset.alias; \
-- dest=$(DESTDIR)$(libdir)/charset.alias; \
-- sed -f ref-del.sed $$dest > $$temp; \
-- if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
-- rm -f $$dest; \
-- else \
-- $(INSTALL_DATA) $$temp $$dest; \
-- fi; \
-- rm -f $$temp; \
-- fi; \
-- if test -f $(DESTDIR)$(localedir)/locale.alias; then \
-- temp=$(DESTDIR)$(localedir)/t-locale.alias; \
-- dest=$(DESTDIR)$(localedir)/locale.alias; \
-- sed -f ref-del.sed $$dest > $$temp; \
-- if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
-- rm -f $$dest; \
-- else \
-- $(INSTALL_DATA) $$temp $$dest; \
-- fi; \
-- rm -f $$temp; \
-- fi; \
-- else \
-- : ; \
-- fi
-- if test "$(PACKAGE)" = "gettext-tools"; then \
-- for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \
-- rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
-- done; \
-- else \
-- : ; \
-- fi
--
--info dvi ps pdf html:
--
--$(OBJECTS): ../config.h libgnuintl.h
--bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo textdomain.$lo: $(srcdir)/gettextP.h $(srcdir)/gmo.h $(srcdir)/loadinfo.h
--hash-string.$lo dcigettext.$lo loadmsgcat.$lo: $(srcdir)/hash-string.h
--explodename.$lo l10nflist.$lo: $(srcdir)/loadinfo.h
--dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: $(srcdir)/plural-exp.h
--dcigettext.$lo: $(srcdir)/eval-plural.h
--localcharset.$lo: $(srcdir)/localcharset.h
--bindtextdom.$lo dcigettext.$lo finddomain.$lo loadmsgcat.$lo localealias.$lo lock.$lo log.$lo: $(srcdir)/lock.h
--localealias.$lo localcharset.$lo relocatable.$lo: $(srcdir)/relocatable.h
--printf.$lo: $(srcdir)/printf-args.h $(srcdir)/printf-args.c $(srcdir)/printf-parse.h $(srcdir)/wprintf-parse.h $(srcdir)/xsize.h $(srcdir)/printf-parse.c $(srcdir)/vasnprintf.h $(srcdir)/vasnwprintf.h $(srcdir)/vasnprintf.c
--
--# A bison-2.1 generated plural.c includes <libintl.h> if ENABLE_NLS.
--PLURAL_DEPS_yes = libintl.h
--PLURAL_DEPS_no =
--plural.$lo: $(PLURAL_DEPS_@USE_INCLUDED_LIBINTL@)
--
--tags: TAGS
--
--TAGS: $(HEADERS) $(SOURCES)
-- here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
--
--ctags: CTAGS
--
--CTAGS: $(HEADERS) $(SOURCES)
-- here=`pwd`; cd $(srcdir) && ctags -o $$here/CTAGS $(HEADERS) $(SOURCES)
--
--id: ID
--
--ID: $(HEADERS) $(SOURCES)
-- here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
--
--
--mostlyclean:
-- rm -f *.a *.la *.o *.obj *.lo libintl.res core core.*
-- rm -f libgnuintl.h libintl.h charset.alias ref-add.sed ref-del.sed
-- rm -f -r .libs _libs
--
--clean: mostlyclean
--
--distclean: clean
-- rm -f Makefile ID TAGS
-- if test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; then \
-- rm -f ChangeLog.inst $(DISTFILES.normal); \
-- else \
-- : ; \
-- fi
--
--maintainer-clean: distclean
-- @echo "This command is intended for maintainers to use;"
-- @echo "it deletes files that may require special tools to rebuild."
--
--
--# GNU gettext needs not contain the file `VERSION' but contains some
--# other files which should not be distributed in other packages.
--distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
--dist distdir: Makefile
-- if test "$(PACKAGE)" = "gettext-tools"; then \
-- : ; \
-- else \
-- if test "$(PACKAGE)" = "gettext-runtime"; then \
-- additional="$(DISTFILES.gettext)"; \
-- else \
-- additional="$(DISTFILES.normal)"; \
-- fi; \
-- $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
-- for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
-- if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
-- cp -p $$dir/$$file $(distdir) || test $$file = Makefile.in || exit 1; \
-- done; \
-- fi
--
--Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-- cd $(top_builddir) && $(SHELL) ./config.status
--# This would be more efficient, but doesn't work any more with autoconf-2.57,
--# when AC_CONFIG_FILES([intl/Makefile:somedir/Makefile.in]) is used.
--# cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
--
--# Tell versions [3.59,3.63) of GNU make not to export all variables.
--# Otherwise a system limit (for SysV at least) may be exceeded.
--.NOEXPORT:
---- a/intl/VERSION
-+++ /dev/null
-@@ -1 +0,0 @@
--GNU gettext library from gettext-0.17
---- a/intl/bindtextdom.c
-+++ /dev/null
-@@ -1,340 +0,0 @@
--/* Implementation of the bindtextdomain(3) function
-- Copyright (C) 1995-1998, 2000-2003, 2005-2006 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--#ifdef HAVE_CONFIG_H
--# include <config.h>
--#endif
--
--#include <stddef.h>
--#include <stdlib.h>
--#include <string.h>
--
--#include "gettextP.h"
--#ifdef _LIBC
--# include <libintl.h>
--#else
--# include "libgnuintl.h"
--#endif
--
--/* Handle multi-threaded applications. */
--#ifdef _LIBC
--# include <bits/libc-lock.h>
--# define gl_rwlock_define __libc_rwlock_define
--# define gl_rwlock_wrlock __libc_rwlock_wrlock
--# define gl_rwlock_unlock __libc_rwlock_unlock
--#else
--# include "lock.h"
--#endif
--
--/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
--#ifndef offsetof
--# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
--#endif
--
--/* @@ end of prolog @@ */
--
--/* Lock variable to protect the global data in the gettext implementation. */
--gl_rwlock_define (extern, _nl_state_lock attribute_hidden)
--
--
--/* Names for the libintl functions are a problem. They must not clash
-- with existing names and they should follow ANSI C. But this source
-- code is also used in GNU C Library where the names have a __
-- prefix. So we have to make a difference here. */
--#ifdef _LIBC
--# define BINDTEXTDOMAIN __bindtextdomain
--# define BIND_TEXTDOMAIN_CODESET __bind_textdomain_codeset
--# ifndef strdup
--# define strdup(str) __strdup (str)
--# endif
--#else
--# define BINDTEXTDOMAIN libintl_bindtextdomain
--# define BIND_TEXTDOMAIN_CODESET libintl_bind_textdomain_codeset
--#endif
--
--/* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP
-- to be used for the DOMAINNAME message catalog.
-- If *DIRNAMEP or *CODESETP is NULL, the corresponding attribute is not
-- modified, only the current value is returned.
-- If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither
-- modified nor returned. */
--static void
--set_binding_values (const char *domainname,
-- const char **dirnamep, const char **codesetp)
--{
-- struct binding *binding;
-- int modified;
--
-- /* Some sanity checks. */
-- if (domainname == NULL || domainname[0] == '\0')
-- {
-- if (dirnamep)
-- *dirnamep = NULL;
-- if (codesetp)
-- *codesetp = NULL;
-- return;
-- }
--
-- gl_rwlock_wrlock (_nl_state_lock);
--
-- modified = 0;
--
-- for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
-- {
-- int compare = strcmp (domainname, binding->domainname);
-- if (compare == 0)
-- /* We found it! */
-- break;
-- if (compare < 0)
-- {
-- /* It is not in the list. */
-- binding = NULL;
-- break;
-- }
-- }
--
-- if (binding != NULL)
-- {
-- if (dirnamep)
-- {
-- const char *dirname = *dirnamep;
--
-- if (dirname == NULL)
-- /* The current binding has be to returned. */
-- *dirnamep = binding->dirname;
-- else
-- {
-- /* The domain is already bound. If the new value and the old
-- one are equal we simply do nothing. Otherwise replace the
-- old binding. */
-- char *result = binding->dirname;
-- if (strcmp (dirname, result) != 0)
-- {
-- if (strcmp (dirname, _nl_default_dirname) == 0)
-- result = (char *) _nl_default_dirname;
-- else
-- {
--#if defined _LIBC || defined HAVE_STRDUP
-- result = strdup (dirname);
--#else
-- size_t len = strlen (dirname) + 1;
-- result = (char *) malloc (len);
-- if (__builtin_expect (result != NULL, 1))
-- memcpy (result, dirname, len);
--#endif
-- }
--
-- if (__builtin_expect (result != NULL, 1))
-- {
-- if (binding->dirname != _nl_default_dirname)
-- free (binding->dirname);
--
-- binding->dirname = result;
-- modified = 1;
-- }
-- }
-- *dirnamep = result;
-- }
-- }
--
-- if (codesetp)
-- {
-- const char *codeset = *codesetp;
--
-- if (codeset == NULL)
-- /* The current binding has be to returned. */
-- *codesetp = binding->codeset;
-- else
-- {
-- /* The domain is already bound. If the new value and the old
-- one are equal we simply do nothing. Otherwise replace the
-- old binding. */
-- char *result = binding->codeset;
-- if (result == NULL || strcmp (codeset, result) != 0)
-- {
--#if defined _LIBC || defined HAVE_STRDUP
-- result = strdup (codeset);
--#else
-- size_t len = strlen (codeset) + 1;
-- result = (char *) malloc (len);
-- if (__builtin_expect (result != NULL, 1))
-- memcpy (result, codeset, len);
--#endif
--
-- if (__builtin_expect (result != NULL, 1))
-- {
-- if (binding->codeset != NULL)
-- free (binding->codeset);
--
-- binding->codeset = result;
-- modified = 1;
-- }
-- }
-- *codesetp = result;
-- }
-- }
-- }
-- else if ((dirnamep == NULL || *dirnamep == NULL)
-- && (codesetp == NULL || *codesetp == NULL))
-- {
-- /* Simply return the default values. */
-- if (dirnamep)
-- *dirnamep = _nl_default_dirname;
-- if (codesetp)
-- *codesetp = NULL;
-- }
-- else
-- {
-- /* We have to create a new binding. */
-- size_t len = strlen (domainname) + 1;
-- struct binding *new_binding =
-- (struct binding *) malloc (offsetof (struct binding, domainname) + len);
--
-- if (__builtin_expect (new_binding == NULL, 0))
-- goto failed;
--
-- memcpy (new_binding->domainname, domainname, len);
--
-- if (dirnamep)
-- {
-- const char *dirname = *dirnamep;
--
-- if (dirname == NULL)
-- /* The default value. */
-- dirname = _nl_default_dirname;
-- else
-- {
-- if (strcmp (dirname, _nl_default_dirname) == 0)
-- dirname = _nl_default_dirname;
-- else
-- {
-- char *result;
--#if defined _LIBC || defined HAVE_STRDUP
-- result = strdup (dirname);
-- if (__builtin_expect (result == NULL, 0))
-- goto failed_dirname;
--#else
-- size_t len = strlen (dirname) + 1;
-- result = (char *) malloc (len);
-- if (__builtin_expect (result == NULL, 0))
-- goto failed_dirname;
-- memcpy (result, dirname, len);
--#endif
-- dirname = result;
-- }
-- }
-- *dirnamep = dirname;
-- new_binding->dirname = (char *) dirname;
-- }
-- else
-- /* The default value. */
-- new_binding->dirname = (char *) _nl_default_dirname;
--
-- if (codesetp)
-- {
-- const char *codeset = *codesetp;
--
-- if (codeset != NULL)
-- {
-- char *result;
--
--#if defined _LIBC || defined HAVE_STRDUP
-- result = strdup (codeset);
-- if (__builtin_expect (result == NULL, 0))
-- goto failed_codeset;
--#else
-- size_t len = strlen (codeset) + 1;
-- result = (char *) malloc (len);
-- if (__builtin_expect (result == NULL, 0))
-- goto failed_codeset;
-- memcpy (result, codeset, len);
--#endif
-- codeset = result;
-- }
-- *codesetp = codeset;
-- new_binding->codeset = (char *) codeset;
-- }
-- else
-- new_binding->codeset = NULL;
--
-- /* Now enqueue it. */
-- if (_nl_domain_bindings == NULL
-- || strcmp (domainname, _nl_domain_bindings->domainname) < 0)
-- {
-- new_binding->next = _nl_domain_bindings;
-- _nl_domain_bindings = new_binding;
-- }
-- else
-- {
-- binding = _nl_domain_bindings;
-- while (binding->next != NULL
-- && strcmp (domainname, binding->next->domainname) > 0)
-- binding = binding->next;
--
-- new_binding->next = binding->next;
-- binding->next = new_binding;
-- }
--
-- modified = 1;
--
-- /* Here we deal with memory allocation failures. */
-- if (0)
-- {
-- failed_codeset:
-- if (new_binding->dirname != _nl_default_dirname)
-- free (new_binding->dirname);
-- failed_dirname:
-- free (new_binding);
-- failed:
-- if (dirnamep)
-- *dirnamep = NULL;
-- if (codesetp)
-- *codesetp = NULL;
-- }
-- }
--
-- /* If we modified any binding, we flush the caches. */
-- if (modified)
-- ++_nl_msg_cat_cntr;
--
-- gl_rwlock_unlock (_nl_state_lock);
--}
--
--/* Specify that the DOMAINNAME message catalog will be found
-- in DIRNAME rather than in the system locale data base. */
--char *
--BINDTEXTDOMAIN (const char *domainname, const char *dirname)
--{
-- set_binding_values (domainname, &dirname, NULL);
-- return (char *) dirname;
--}
--
--/* Specify the character encoding in which the messages from the
-- DOMAINNAME message catalog will be returned. */
--char *
--BIND_TEXTDOMAIN_CODESET (const char *domainname, const char *codeset)
--{
-- set_binding_values (domainname, NULL, &codeset);
-- return (char *) codeset;
--}
--
--#ifdef _LIBC
--/* Aliases for function names in GNU C Library. */
--weak_alias (__bindtextdomain, bindtextdomain);
--weak_alias (__bind_textdomain_codeset, bind_textdomain_codeset);
--#endif
---- a/intl/config.charset
-+++ /dev/null
-@@ -1,640 +0,0 @@
--#! /bin/sh
--# Output a system dependent table of character encoding aliases.
--#
--# Copyright (C) 2000-2004, 2006 Free Software Foundation, Inc.
--#
--# This program is free software; you can redistribute it and/or modify it
--# under the terms of the GNU Library General Public License as published
--# by the Free Software Foundation; either version 2, or (at your option)
--# any later version.
--#
--# This program 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
--# Library General Public License for more details.
--#
--# You should have received a copy of the GNU Library General Public
--# License along with this program; if not, write to the Free Software
--# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
--# USA.
--#
--# The table consists of lines of the form
--# ALIAS CANONICAL
--#
--# ALIAS is the (system dependent) result of "nl_langinfo (CODESET)".
--# ALIAS is compared in a case sensitive way.
--#
--# CANONICAL is the GNU canonical name for this character encoding.
--# It must be an encoding supported by libiconv. Support by GNU libc is
--# also desirable. CANONICAL is case insensitive. Usually an upper case
--# MIME charset name is preferred.
--# The current list of GNU canonical charset names is as follows.
--#
--# name MIME? used by which systems
--# ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin
--# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd darwin
--# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd darwin
--# ISO-8859-3 Y glibc solaris
--# ISO-8859-4 Y osf solaris freebsd netbsd darwin
--# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd darwin
--# ISO-8859-6 Y glibc aix hpux solaris
--# ISO-8859-7 Y glibc aix hpux irix osf solaris netbsd darwin
--# ISO-8859-8 Y glibc aix hpux osf solaris
--# ISO-8859-9 Y glibc aix hpux irix osf solaris darwin
--# ISO-8859-13 glibc netbsd darwin
--# ISO-8859-14 glibc
--# ISO-8859-15 glibc aix osf solaris freebsd darwin
--# KOI8-R Y glibc solaris freebsd netbsd darwin
--# KOI8-U Y glibc freebsd netbsd darwin
--# KOI8-T glibc
--# CP437 dos
--# CP775 dos
--# CP850 aix osf dos
--# CP852 dos
--# CP855 dos
--# CP856 aix
--# CP857 dos
--# CP861 dos
--# CP862 dos
--# CP864 dos
--# CP865 dos
--# CP866 freebsd netbsd darwin dos
--# CP869 dos
--# CP874 woe32 dos
--# CP922 aix
--# CP932 aix woe32 dos
--# CP943 aix
--# CP949 osf woe32 dos
--# CP950 woe32 dos
--# CP1046 aix
--# CP1124 aix
--# CP1125 dos
--# CP1129 aix
--# CP1250 woe32
--# CP1251 glibc solaris netbsd darwin woe32
--# CP1252 aix woe32
--# CP1253 woe32
--# CP1254 woe32
--# CP1255 glibc woe32
--# CP1256 woe32
--# CP1257 woe32
--# GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin
--# EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin
--# EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin
--# EUC-TW glibc aix hpux irix osf solaris netbsd
--# BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin
--# BIG5-HKSCS glibc solaris
--# GBK glibc aix osf solaris woe32 dos
--# GB18030 glibc solaris netbsd
--# SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin
--# JOHAB glibc solaris woe32
--# TIS-620 glibc aix hpux osf solaris
--# VISCII Y glibc
--# TCVN5712-1 glibc
--# GEORGIAN-PS glibc
--# HP-ROMAN8 hpux
--# HP-ARABIC8 hpux
--# HP-GREEK8 hpux
--# HP-HEBREW8 hpux
--# HP-TURKISH8 hpux
--# HP-KANA8 hpux
--# DEC-KANJI osf
--# DEC-HANYU osf
--# UTF-8 Y glibc aix hpux osf solaris netbsd darwin
--#
--# Note: Names which are not marked as being a MIME name should not be used in
--# Internet protocols for information interchange (mail, news, etc.).
--#
--# Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
--# must understand both names and treat them as equivalent.
--#
--# The first argument passed to this file is the canonical host specification,
--# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
--# or
--# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
--
--host="$1"
--os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'`
--echo "# This file contains a table of character encoding aliases,"
--echo "# suitable for operating system '${os}'."
--echo "# It was automatically generated from config.charset."
--# List of references, updated during installation:
--echo "# Packages using this file: "
--case "$os" in
-- linux-gnulibc1*)
-- # Linux libc5 doesn't have nl_langinfo(CODESET); therefore
-- # localcharset.c falls back to using the full locale name
-- # from the environment variables.
-- echo "C ASCII"
-- echo "POSIX ASCII"
-- for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \
-- en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \
-- en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \
-- es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \
-- et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \
-- fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \
-- it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \
-- sv_FI sv_SE; do
-- echo "$l ISO-8859-1"
-- echo "$l.iso-8859-1 ISO-8859-1"
-- echo "$l.iso-8859-15 ISO-8859-15"
-- echo "$l.iso-8859-15@euro ISO-8859-15"
-- echo "$l@euro ISO-8859-15"
-- echo "$l.cp-437 CP437"
-- echo "$l.cp-850 CP850"
-- echo "$l.cp-1252 CP1252"
-- echo "$l.cp-1252@euro CP1252"
-- #echo "$l.atari-st ATARI-ST" # not a commonly used encoding
-- echo "$l.utf-8 UTF-8"
-- echo "$l.utf-8@euro UTF-8"
-- done
-- for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \
-- sl_SI sr sr_CS sr_YU; do
-- echo "$l ISO-8859-2"
-- echo "$l.iso-8859-2 ISO-8859-2"
-- echo "$l.cp-852 CP852"
-- echo "$l.cp-1250 CP1250"
-- echo "$l.utf-8 UTF-8"
-- done
-- for l in mk mk_MK ru ru_RU; do
-- echo "$l ISO-8859-5"
-- echo "$l.iso-8859-5 ISO-8859-5"
-- echo "$l.koi8-r KOI8-R"
-- echo "$l.cp-866 CP866"
-- echo "$l.cp-1251 CP1251"
-- echo "$l.utf-8 UTF-8"
-- done
-- for l in ar ar_SA; do
-- echo "$l ISO-8859-6"
-- echo "$l.iso-8859-6 ISO-8859-6"
-- echo "$l.cp-864 CP864"
-- #echo "$l.cp-868 CP868" # not a commonly used encoding
-- echo "$l.cp-1256 CP1256"
-- echo "$l.utf-8 UTF-8"
-- done
-- for l in el el_GR gr gr_GR; do
-- echo "$l ISO-8859-7"
-- echo "$l.iso-8859-7 ISO-8859-7"
-- echo "$l.cp-869 CP869"
-- echo "$l.cp-1253 CP1253"
-- echo "$l.cp-1253@euro CP1253"
-- echo "$l.utf-8 UTF-8"
-- echo "$l.utf-8@euro UTF-8"
-- done
-- for l in he he_IL iw iw_IL; do
-- echo "$l ISO-8859-8"
-- echo "$l.iso-8859-8 ISO-8859-8"
-- echo "$l.cp-862 CP862"
-- echo "$l.cp-1255 CP1255"
-- echo "$l.utf-8 UTF-8"
-- done
-- for l in tr tr_TR; do
-- echo "$l ISO-8859-9"
-- echo "$l.iso-8859-9 ISO-8859-9"
-- echo "$l.cp-857 CP857"
-- echo "$l.cp-1254 CP1254"
-- echo "$l.utf-8 UTF-8"
-- done
-- for l in lt lt_LT lv lv_LV; do
-- #echo "$l BALTIC" # not a commonly used encoding, wrong encoding name
-- echo "$l ISO-8859-13"
-- done
-- for l in ru_UA uk uk_UA; do
-- echo "$l KOI8-U"
-- done
-- for l in zh zh_CN; do
-- #echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name
-- echo "$l GB2312"
-- done
-- for l in ja ja_JP ja_JP.EUC; do
-- echo "$l EUC-JP"
-- done
-- for l in ko ko_KR; do
-- echo "$l EUC-KR"
-- done
-- for l in th th_TH; do
-- echo "$l TIS-620"
-- done
-- for l in fa fa_IR; do
-- #echo "$l ISIRI-3342" # a broken encoding
-- echo "$l.utf-8 UTF-8"
-- done
-- ;;
-- linux* | *-gnu*)
-- # With glibc-2.1 or newer, we don't need any canonicalization,
-- # because glibc has iconv and both glibc and libiconv support all
-- # GNU canonical names directly. Therefore, the Makefile does not
-- # need to install the alias file at all.
-- # The following applies only to glibc-2.0.x and older libcs.
-- echo "ISO_646.IRV:1983 ASCII"
-- ;;
-- aix*)
-- echo "ISO8859-1 ISO-8859-1"
-- echo "ISO8859-2 ISO-8859-2"
-- echo "ISO8859-5 ISO-8859-5"
-- echo "ISO8859-6 ISO-8859-6"
-- echo "ISO8859-7 ISO-8859-7"
-- echo "ISO8859-8 ISO-8859-8"
-- echo "ISO8859-9 ISO-8859-9"
-- echo "ISO8859-15 ISO-8859-15"
-- echo "IBM-850 CP850"
-- echo "IBM-856 CP856"
-- echo "IBM-921 ISO-8859-13"
-- echo "IBM-922 CP922"
-- echo "IBM-932 CP932"
-- echo "IBM-943 CP943"
-- echo "IBM-1046 CP1046"
-- echo "IBM-1124 CP1124"
-- echo "IBM-1129 CP1129"
-- echo "IBM-1252 CP1252"
-- echo "IBM-eucCN GB2312"
-- echo "IBM-eucJP EUC-JP"
-- echo "IBM-eucKR EUC-KR"
-- echo "IBM-eucTW EUC-TW"
-- echo "big5 BIG5"
-- echo "GBK GBK"
-- echo "TIS-620 TIS-620"
-- echo "UTF-8 UTF-8"
-- ;;
-- hpux*)
-- echo "iso88591 ISO-8859-1"
-- echo "iso88592 ISO-8859-2"
-- echo "iso88595 ISO-8859-5"
-- echo "iso88596 ISO-8859-6"
-- echo "iso88597 ISO-8859-7"
-- echo "iso88598 ISO-8859-8"
-- echo "iso88599 ISO-8859-9"
-- echo "iso885915 ISO-8859-15"
-- echo "roman8 HP-ROMAN8"
-- echo "arabic8 HP-ARABIC8"
-- echo "greek8 HP-GREEK8"
-- echo "hebrew8 HP-HEBREW8"
-- echo "turkish8 HP-TURKISH8"
-- echo "kana8 HP-KANA8"
-- echo "tis620 TIS-620"
-- echo "big5 BIG5"
-- echo "eucJP EUC-JP"
-- echo "eucKR EUC-KR"
-- echo "eucTW EUC-TW"
-- echo "hp15CN GB2312"
-- #echo "ccdc ?" # what is this?
-- echo "SJIS SHIFT_JIS"
-- echo "utf8 UTF-8"
-- ;;
-- irix*)
-- echo "ISO8859-1 ISO-8859-1"
-- echo "ISO8859-2 ISO-8859-2"
-- echo "ISO8859-5 ISO-8859-5"
-- echo "ISO8859-7 ISO-8859-7"
-- echo "ISO8859-9 ISO-8859-9"
-- echo "eucCN GB2312"
-- echo "eucJP EUC-JP"
-- echo "eucKR EUC-KR"
-- echo "eucTW EUC-TW"
-- ;;
-- osf*)
-- echo "ISO8859-1 ISO-8859-1"
-- echo "ISO8859-2 ISO-8859-2"
-- echo "ISO8859-4 ISO-8859-4"
-- echo "ISO8859-5 ISO-8859-5"
-- echo "ISO8859-7 ISO-8859-7"
-- echo "ISO8859-8 ISO-8859-8"
-- echo "ISO8859-9 ISO-8859-9"
-- echo "ISO8859-15 ISO-8859-15"
-- echo "cp850 CP850"
-- echo "big5 BIG5"
-- echo "dechanyu DEC-HANYU"
-- echo "dechanzi GB2312"
-- echo "deckanji DEC-KANJI"
-- echo "deckorean EUC-KR"
-- echo "eucJP EUC-JP"
-- echo "eucKR EUC-KR"
-- echo "eucTW EUC-TW"
-- echo "GBK GBK"
-- echo "KSC5601 CP949"
-- echo "sdeckanji EUC-JP"
-- echo "SJIS SHIFT_JIS"
-- echo "TACTIS TIS-620"
-- echo "UTF-8 UTF-8"
-- ;;
-- solaris*)
-- echo "646 ASCII"
-- echo "ISO8859-1 ISO-8859-1"
-- echo "ISO8859-2 ISO-8859-2"
-- echo "ISO8859-3 ISO-8859-3"
-- echo "ISO8859-4 ISO-8859-4"
-- echo "ISO8859-5 ISO-8859-5"
-- echo "ISO8859-6 ISO-8859-6"
-- echo "ISO8859-7 ISO-8859-7"
-- echo "ISO8859-8 ISO-8859-8"
-- echo "ISO8859-9 ISO-8859-9"
-- echo "ISO8859-15 ISO-8859-15"
-- echo "koi8-r KOI8-R"
-- echo "ansi-1251 CP1251"
-- echo "BIG5 BIG5"
-- echo "Big5-HKSCS BIG5-HKSCS"
-- echo "gb2312 GB2312"
-- echo "GBK GBK"
-- echo "GB18030 GB18030"
-- echo "cns11643 EUC-TW"
-- echo "5601 EUC-KR"
-- echo "ko_KR.johap92 JOHAB"
-- echo "eucJP EUC-JP"
-- echo "PCK SHIFT_JIS"
-- echo "TIS620.2533 TIS-620"
-- #echo "sun_eu_greek ?" # what is this?
-- echo "UTF-8 UTF-8"
-- ;;
-- freebsd* | os2*)
-- # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
-- # localcharset.c falls back to using the full locale name
-- # from the environment variables.
-- # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just
-- # reuse FreeBSD's locale data for OS/2.
-- echo "C ASCII"
-- echo "US-ASCII ASCII"
-- for l in la_LN lt_LN; do
-- echo "$l.ASCII ASCII"
-- done
-- for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
-- fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
-- lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
-- echo "$l.ISO_8859-1 ISO-8859-1"
-- echo "$l.DIS_8859-15 ISO-8859-15"
-- done
-- for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do
-- echo "$l.ISO_8859-2 ISO-8859-2"
-- done
-- for l in la_LN lt_LT; do
-- echo "$l.ISO_8859-4 ISO-8859-4"
-- done
-- for l in ru_RU ru_SU; do
-- echo "$l.KOI8-R KOI8-R"
-- echo "$l.ISO_8859-5 ISO-8859-5"
-- echo "$l.CP866 CP866"
-- done
-- echo "uk_UA.KOI8-U KOI8-U"
-- echo "zh_TW.BIG5 BIG5"
-- echo "zh_TW.Big5 BIG5"
-- echo "zh_CN.EUC GB2312"
-- echo "ja_JP.EUC EUC-JP"
-- echo "ja_JP.SJIS SHIFT_JIS"
-- echo "ja_JP.Shift_JIS SHIFT_JIS"
-- echo "ko_KR.EUC EUC-KR"
-- ;;
-- netbsd*)
-- echo "646 ASCII"
-- echo "ISO8859-1 ISO-8859-1"
-- echo "ISO8859-2 ISO-8859-2"
-- echo "ISO8859-4 ISO-8859-4"
-- echo "ISO8859-5 ISO-8859-5"
-- echo "ISO8859-7 ISO-8859-7"
-- echo "ISO8859-13 ISO-8859-13"
-- echo "ISO8859-15 ISO-8859-15"
-- echo "eucCN GB2312"
-- echo "eucJP EUC-JP"
-- echo "eucKR EUC-KR"
-- echo "eucTW EUC-TW"
-- echo "BIG5 BIG5"
-- echo "SJIS SHIFT_JIS"
-- ;;
-- darwin[56]*)
-- # Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore
-- # localcharset.c falls back to using the full locale name
-- # from the environment variables.
-- echo "C ASCII"
-- for l in en_AU en_CA en_GB en_US la_LN; do
-- echo "$l.US-ASCII ASCII"
-- done
-- for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
-- fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \
-- nl_NL no_NO pt_PT sv_SE; do
-- echo "$l ISO-8859-1"
-- echo "$l.ISO8859-1 ISO-8859-1"
-- echo "$l.ISO8859-15 ISO-8859-15"
-- done
-- for l in la_LN; do
-- echo "$l.ISO8859-1 ISO-8859-1"
-- echo "$l.ISO8859-15 ISO-8859-15"
-- done
-- for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do
-- echo "$l.ISO8859-2 ISO-8859-2"
-- done
-- for l in la_LN lt_LT; do
-- echo "$l.ISO8859-4 ISO-8859-4"
-- done
-- for l in ru_RU; do
-- echo "$l.KOI8-R KOI8-R"
-- echo "$l.ISO8859-5 ISO-8859-5"
-- echo "$l.CP866 CP866"
-- done
-- for l in bg_BG; do
-- echo "$l.CP1251 CP1251"
-- done
-- echo "uk_UA.KOI8-U KOI8-U"
-- echo "zh_TW.BIG5 BIG5"
-- echo "zh_TW.Big5 BIG5"
-- echo "zh_CN.EUC GB2312"
-- echo "ja_JP.EUC EUC-JP"
-- echo "ja_JP.SJIS SHIFT_JIS"
-- echo "ko_KR.EUC EUC-KR"
-- ;;
-- darwin*)
-- # Darwin 7.5 has nl_langinfo(CODESET), but it is useless:
-- # - It returns the empty string when LANG is set to a locale of the
-- # form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8
-- # LC_CTYPE file.
-- # - The environment variables LANG, LC_CTYPE, LC_ALL are not set by
-- # the system; nl_langinfo(CODESET) returns "US-ASCII" in this case.
-- # - The documentation says:
-- # "... all code that calls BSD system routines should ensure
-- # that the const *char parameters of these routines are in UTF-8
-- # encoding. All BSD system functions expect their string
-- # parameters to be in UTF-8 encoding and nothing else."
-- # It also says
-- # "An additional caveat is that string parameters for files,
-- # paths, and other file-system entities must be in canonical
-- # UTF-8. In a canonical UTF-8 Unicode string, all decomposable
-- # characters are decomposed ..."
-- # but this is not true: You can pass non-decomposed UTF-8 strings
-- # to file system functions, and it is the OS which will convert
-- # them to decomposed UTF-8 before accessing the file system.
-- # - The Apple Terminal application displays UTF-8 by default.
-- # - However, other applications are free to use different encodings:
-- # - xterm uses ISO-8859-1 by default.
-- # - TextEdit uses MacRoman by default.
-- # We prefer UTF-8 over decomposed UTF-8-MAC because one should
-- # minimize the use of decomposed Unicode. Unfortunately, through the
-- # Darwin file system, decomposed UTF-8 strings are leaked into user
-- # space nevertheless.
-- echo "* UTF-8"
-- ;;
-- beos*)
-- # BeOS has a single locale, and it has UTF-8 encoding.
-- echo "* UTF-8"
-- ;;
-- msdosdjgpp*)
-- # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore
-- # localcharset.c falls back to using the full locale name
-- # from the environment variables.
-- echo "#"
-- echo "# The encodings given here may not all be correct."
-- echo "# If you find that the encoding given for your language and"
-- echo "# country is not the one your DOS machine actually uses, just"
-- echo "# correct it in this file, and send a mail to"
-- echo "# Juan Manuel Guerrero <juan.guerrero@gmx.de>"
-- echo "# and Bruno Haible <bruno@clisp.org>."
-- echo "#"
-- echo "C ASCII"
-- # ISO-8859-1 languages
-- echo "ca CP850"
-- echo "ca_ES CP850"
-- echo "da CP865" # not CP850 ??
-- echo "da_DK CP865" # not CP850 ??
-- echo "de CP850"
-- echo "de_AT CP850"
-- echo "de_CH CP850"
-- echo "de_DE CP850"
-- echo "en CP850"
-- echo "en_AU CP850" # not CP437 ??
-- echo "en_CA CP850"
-- echo "en_GB CP850"
-- echo "en_NZ CP437"
-- echo "en_US CP437"
-- echo "en_ZA CP850" # not CP437 ??
-- echo "es CP850"
-- echo "es_AR CP850"
-- echo "es_BO CP850"
-- echo "es_CL CP850"
-- echo "es_CO CP850"
-- echo "es_CR CP850"
-- echo "es_CU CP850"
-- echo "es_DO CP850"
-- echo "es_EC CP850"
-- echo "es_ES CP850"
-- echo "es_GT CP850"
-- echo "es_HN CP850"
-- echo "es_MX CP850"
-- echo "es_NI CP850"
-- echo "es_PA CP850"
-- echo "es_PY CP850"
-- echo "es_PE CP850"
-- echo "es_SV CP850"
-- echo "es_UY CP850"
-- echo "es_VE CP850"
-- echo "et CP850"
-- echo "et_EE CP850"
-- echo "eu CP850"
-- echo "eu_ES CP850"
-- echo "fi CP850"
-- echo "fi_FI CP850"
-- echo "fr CP850"
-- echo "fr_BE CP850"
-- echo "fr_CA CP850"
-- echo "fr_CH CP850"
-- echo "fr_FR CP850"
-- echo "ga CP850"
-- echo "ga_IE CP850"
-- echo "gd CP850"
-- echo "gd_GB CP850"
-- echo "gl CP850"
-- echo "gl_ES CP850"
-- echo "id CP850" # not CP437 ??
-- echo "id_ID CP850" # not CP437 ??
-- echo "is CP861" # not CP850 ??
-- echo "is_IS CP861" # not CP850 ??
-- echo "it CP850"
-- echo "it_CH CP850"
-- echo "it_IT CP850"
-- echo "lt CP775"
-- echo "lt_LT CP775"
-- echo "lv CP775"
-- echo "lv_LV CP775"
-- echo "nb CP865" # not CP850 ??
-- echo "nb_NO CP865" # not CP850 ??
-- echo "nl CP850"
-- echo "nl_BE CP850"
-- echo "nl_NL CP850"
-- echo "nn CP865" # not CP850 ??
-- echo "nn_NO CP865" # not CP850 ??
-- echo "no CP865" # not CP850 ??
-- echo "no_NO CP865" # not CP850 ??
-- echo "pt CP850"
-- echo "pt_BR CP850"
-- echo "pt_PT CP850"
-- echo "sv CP850"
-- echo "sv_SE CP850"
-- # ISO-8859-2 languages
-- echo "cs CP852"
-- echo "cs_CZ CP852"
-- echo "hr CP852"
-- echo "hr_HR CP852"
-- echo "hu CP852"
-- echo "hu_HU CP852"
-- echo "pl CP852"
-- echo "pl_PL CP852"
-- echo "ro CP852"
-- echo "ro_RO CP852"
-- echo "sk CP852"
-- echo "sk_SK CP852"
-- echo "sl CP852"
-- echo "sl_SI CP852"
-- echo "sq CP852"
-- echo "sq_AL CP852"
-- echo "sr CP852" # CP852 or CP866 or CP855 ??
-- echo "sr_CS CP852" # CP852 or CP866 or CP855 ??
-- echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
-- # ISO-8859-3 languages
-- echo "mt CP850"
-- echo "mt_MT CP850"
-- # ISO-8859-5 languages
-- echo "be CP866"
-- echo "be_BE CP866"
-- echo "bg CP866" # not CP855 ??
-- echo "bg_BG CP866" # not CP855 ??
-- echo "mk CP866" # not CP855 ??
-- echo "mk_MK CP866" # not CP855 ??
-- echo "ru CP866"
-- echo "ru_RU CP866"
-- echo "uk CP1125"
-- echo "uk_UA CP1125"
-- # ISO-8859-6 languages
-- echo "ar CP864"
-- echo "ar_AE CP864"
-- echo "ar_DZ CP864"
-- echo "ar_EG CP864"
-- echo "ar_IQ CP864"
-- echo "ar_IR CP864"
-- echo "ar_JO CP864"
-- echo "ar_KW CP864"
-- echo "ar_MA CP864"
-- echo "ar_OM CP864"
-- echo "ar_QA CP864"
-- echo "ar_SA CP864"
-- echo "ar_SY CP864"
-- # ISO-8859-7 languages
-- echo "el CP869"
-- echo "el_GR CP869"
-- # ISO-8859-8 languages
-- echo "he CP862"
-- echo "he_IL CP862"
-- # ISO-8859-9 languages
-- echo "tr CP857"
-- echo "tr_TR CP857"
-- # Japanese
-- echo "ja CP932"
-- echo "ja_JP CP932"
-- # Chinese
-- echo "zh_CN GBK"
-- echo "zh_TW CP950" # not CP938 ??
-- # Korean
-- echo "kr CP949" # not CP934 ??
-- echo "kr_KR CP949" # not CP934 ??
-- # Thai
-- echo "th CP874"
-- echo "th_TH CP874"
-- # Other
-- echo "eo CP850"
-- echo "eo_EO CP850"
-- ;;
--esac
---- a/intl/dcgettext.c
-+++ /dev/null
-@@ -1,56 +0,0 @@
--/* Implementation of the dcgettext(3) function.
-- Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--#ifdef HAVE_CONFIG_H
--# include <config.h>
--#endif
--
--#include "gettextP.h"
--#ifdef _LIBC
--# include <libintl.h>
--#else
--# include "libgnuintl.h"
--#endif
--
--/* @@ end of prolog @@ */
--
--/* Names for the libintl functions are a problem. They must not clash
-- with existing names and they should follow ANSI C. But this source
-- code is also used in GNU C Library where the names have a __
-- prefix. So we have to make a difference here. */
--#ifdef _LIBC
--# define DCGETTEXT __dcgettext
--# define DCIGETTEXT __dcigettext
--#else
--# define DCGETTEXT libintl_dcgettext
--# define DCIGETTEXT libintl_dcigettext
--#endif
--
--/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
-- locale. */
--char *
--DCGETTEXT (const char *domainname, const char *msgid, int category)
--{
-- return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category);
--}
--
--#ifdef _LIBC
--/* Alias for function name in GNU C Library. */
--INTDEF(__dcgettext)
--weak_alias (__dcgettext, dcgettext);
--#endif
---- a/intl/dcigettext.c
-+++ /dev/null
-@@ -1,1689 +0,0 @@
--/* Implementation of the internal dcigettext function.
-- Copyright (C) 1995-1999, 2000-2007 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--/* Tell glibc's <string.h> to provide a prototype for mempcpy().
-- This must come before <config.h> because <config.h> may include
-- <features.h>, and once <features.h> has been included, it's too late. */
--#ifndef _GNU_SOURCE
--# define _GNU_SOURCE 1
--#endif
--
--#ifdef HAVE_CONFIG_H
--# include <config.h>
--#endif
--
--/* NL_LOCALE_NAME does not work in glibc-2.4. Ignore it. */
--#undef HAVE_NL_LOCALE_NAME
--
--#include <sys/types.h>
--
--#ifdef __GNUC__
--# define alloca __builtin_alloca
--# define HAVE_ALLOCA 1
--#else
--# ifdef _MSC_VER
--# include <malloc.h>
--# define alloca _alloca
--# else
--# if defined HAVE_ALLOCA_H || defined _LIBC
--# include <alloca.h>
--# else
--# ifdef _AIX
-- #pragma alloca
--# else
--# ifndef alloca
--char *alloca ();
--# endif
--# endif
--# endif
--# endif
--#endif
--
--#include <errno.h>
--#ifndef errno
--extern int errno;
--#endif
--#ifndef __set_errno
--# define __set_errno(val) errno = (val)
--#endif
--
--#include <stddef.h>
--#include <stdlib.h>
--#include <string.h>
--
--#if defined HAVE_UNISTD_H || defined _LIBC
--# include <unistd.h>
--#endif
--
--#include <locale.h>
--
--#ifdef _LIBC
-- /* Guess whether integer division by zero raises signal SIGFPE.
-- Set to 1 only if you know for sure. In case of doubt, set to 0. */
--# if defined __alpha__ || defined __arm__ || defined __i386__ \
-- || defined __m68k__ || defined __s390__
--# define INTDIV0_RAISES_SIGFPE 1
--# else
--# define INTDIV0_RAISES_SIGFPE 0
--# endif
--#endif
--#if !INTDIV0_RAISES_SIGFPE
--# include <signal.h>
--#endif
--
--#if defined HAVE_SYS_PARAM_H || defined _LIBC
--# include <sys/param.h>
--#endif
--
--#if !defined _LIBC
--# if HAVE_NL_LOCALE_NAME
--# include <langinfo.h>
--# endif
--# include "localcharset.h"
--#endif
--
--#include "gettextP.h"
--#include "plural-exp.h"
--#ifdef _LIBC
--# include <libintl.h>
--#else
--# ifdef IN_LIBGLOCALE
--# include <libintl.h>
--# endif
--# include "libgnuintl.h"
--#endif
--#include "hash-string.h"
--
--/* Handle multi-threaded applications. */
--#ifdef _LIBC
--# include <bits/libc-lock.h>
--# define gl_rwlock_define_initialized __libc_rwlock_define_initialized
--# define gl_rwlock_rdlock __libc_rwlock_rdlock
--# define gl_rwlock_wrlock __libc_rwlock_wrlock
--# define gl_rwlock_unlock __libc_rwlock_unlock
--#else
--# include "lock.h"
--#endif
--
--/* Alignment of types. */
--#if defined __GNUC__ && __GNUC__ >= 2
--# define alignof(TYPE) __alignof__ (TYPE)
--#else
--# define alignof(TYPE) \
-- ((int) &((struct { char dummy1; TYPE dummy2; } *) 0)->dummy2)
--#endif
--
--/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
--#ifndef offsetof
--# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
--#endif
--
--/* @@ end of prolog @@ */
--
--#ifdef _LIBC
--/* Rename the non ANSI C functions. This is required by the standard
-- because some ANSI C functions will require linking with this object
-- file and the name space must not be polluted. */
--# define getcwd __getcwd
--# ifndef stpcpy
--# define stpcpy __stpcpy
--# endif
--# define tfind __tfind
--#else
--# if !defined HAVE_GETCWD
--char *getwd ();
--# define getcwd(buf, max) getwd (buf)
--# else
--# if VMS
--# define getcwd(buf, max) (getcwd) (buf, max, 0)
--# else
--char *getcwd ();
--# endif
--# endif
--# ifndef HAVE_STPCPY
--static char *stpcpy (char *dest, const char *src);
--# endif
--# ifndef HAVE_MEMPCPY
--static void *mempcpy (void *dest, const void *src, size_t n);
--# endif
--#endif
--
--/* Use a replacement if the system does not provide the `tsearch' function
-- family. */
--#if HAVE_TSEARCH || defined _LIBC
--# include <search.h>
--#else
--# define tsearch libintl_tsearch
--# define tfind libintl_tfind
--# define tdelete libintl_tdelete
--# define twalk libintl_twalk
--# include "tsearch.h"
--#endif
--
--#ifdef _LIBC
--# define tsearch __tsearch
--#endif
--
--/* Amount to increase buffer size by in each try. */
--#define PATH_INCR 32
--
--/* The following is from pathmax.h. */
--/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define
-- PATH_MAX but might cause redefinition warnings when sys/param.h is
-- later included (as on MORE/BSD 4.3). */
--#if defined _POSIX_VERSION || (defined HAVE_LIMITS_H && !defined __GNUC__)
--# include <limits.h>
--#endif
--
--#ifndef _POSIX_PATH_MAX
--# define _POSIX_PATH_MAX 255
--#endif
--
--#if !defined PATH_MAX && defined _PC_PATH_MAX
--# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX))
--#endif
--
--/* Don't include sys/param.h if it already has been. */
--#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
--# include <sys/param.h>
--#endif
--
--#if !defined PATH_MAX && defined MAXPATHLEN
--# define PATH_MAX MAXPATHLEN
--#endif
--
--#ifndef PATH_MAX
--# define PATH_MAX _POSIX_PATH_MAX
--#endif
--
--/* Pathname support.
-- ISSLASH(C) tests whether C is a directory separator character.
-- IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not,
-- it may be concatenated to a directory pathname.
-- IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
-- */
--#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
-- /* Win32, Cygwin, OS/2, DOS */
--# define ISSLASH(C) ((C) == '/' || (C) == '\\')
--# define HAS_DEVICE(P) \
-- ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
-- && (P)[1] == ':')
--# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
--# define IS_PATH_WITH_DIR(P) \
-- (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
--#else
-- /* Unix */
--# define ISSLASH(C) ((C) == '/')
--# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
--# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
--#endif
--
--/* Whether to support different locales in different threads. */
--#if defined _LIBC || HAVE_NL_LOCALE_NAME || (HAVE_STRUCT___LOCALE_STRUCT___NAMES && defined USE_IN_GETTEXT_TESTS) || defined IN_LIBGLOCALE
--# define HAVE_PER_THREAD_LOCALE
--#endif
--
--/* This is the type used for the search tree where known translations
-- are stored. */
--struct known_translation_t
--{
-- /* Domain in which to search. */
-- const char *domainname;
--
-- /* The category. */
-- int category;
--
--#ifdef HAVE_PER_THREAD_LOCALE
-- /* Name of the relevant locale category, or "" for the global locale. */
-- const char *localename;
--#endif
--
--#ifdef IN_LIBGLOCALE
-- /* The character encoding. */
-- const char *encoding;
--#endif
--
-- /* State of the catalog counter at the point the string was found. */
-- int counter;
--
-- /* Catalog where the string was found. */
-- struct loaded_l10nfile *domain;
--
-- /* And finally the translation. */
-- const char *translation;
-- size_t translation_length;
--
-- /* Pointer to the string in question. */
-- char msgid[ZERO];
--};
--
--gl_rwlock_define_initialized (static, tree_lock)
--
--/* Root of the search tree with known translations. */
--static void *root;
--
--/* Function to compare two entries in the table of known translations. */
--static int
--transcmp (const void *p1, const void *p2)
--{
-- const struct known_translation_t *s1;
-- const struct known_translation_t *s2;
-- int result;
--
-- s1 = (const struct known_translation_t *) p1;
-- s2 = (const struct known_translation_t *) p2;
--
-- result = strcmp (s1->msgid, s2->msgid);
-- if (result == 0)
-- {
-- result = strcmp (s1->domainname, s2->domainname);
-- if (result == 0)
-- {
--#ifdef HAVE_PER_THREAD_LOCALE
-- result = strcmp (s1->localename, s2->localename);
-- if (result == 0)
--#endif
-- {
--#ifdef IN_LIBGLOCALE
-- result = strcmp (s1->encoding, s2->encoding);
-- if (result == 0)
--#endif
-- /* We compare the category last (though this is the cheapest
-- operation) since it is hopefully always the same (namely
-- LC_MESSAGES). */
-- result = s1->category - s2->category;
-- }
-- }
-- }
--
-- return result;
--}
--
--/* Name of the default domain used for gettext(3) prior any call to
-- textdomain(3). The default value for this is "messages". */
--const char _nl_default_default_domain[] attribute_hidden = "messages";
--
--#ifndef IN_LIBGLOCALE
--/* Value used as the default domain for gettext(3). */
--const char *_nl_current_default_domain attribute_hidden
-- = _nl_default_default_domain;
--#endif
--
--/* Contains the default location of the message catalogs. */
--#if defined __EMX__
--extern const char _nl_default_dirname[];
--#else
--# ifdef _LIBC
--extern const char _nl_default_dirname[];
--libc_hidden_proto (_nl_default_dirname)
--# endif
--const char _nl_default_dirname[] = LOCALEDIR;
--# ifdef _LIBC
--libc_hidden_data_def (_nl_default_dirname)
--# endif
--#endif
--
--#ifndef IN_LIBGLOCALE
--/* List with bindings of specific domains created by bindtextdomain()
-- calls. */
--struct binding *_nl_domain_bindings;
--#endif
--
--/* Prototypes for local functions. */
--static char *plural_lookup (struct loaded_l10nfile *domain,
-- unsigned long int n,
-- const char *translation, size_t translation_len)
-- internal_function;
--
--#ifdef IN_LIBGLOCALE
--static const char *guess_category_value (int category,
-- const char *categoryname,
-- const char *localename)
-- internal_function;
--#else
--static const char *guess_category_value (int category,
-- const char *categoryname)
-- internal_function;
--#endif
--
--#ifdef _LIBC
--# include "../locale/localeinfo.h"
--# define category_to_name(category) \
-- _nl_category_names.str + _nl_category_name_idxs[category]
--#else
--static const char *category_to_name (int category) internal_function;
--#endif
--#if (defined _LIBC || HAVE_ICONV) && !defined IN_LIBGLOCALE
--static const char *get_output_charset (struct binding *domainbinding)
-- internal_function;
--#endif
--
--
--/* For those loosing systems which don't have `alloca' we have to add
-- some additional code emulating it. */
--#ifdef HAVE_ALLOCA
--/* Nothing has to be done. */
--# define freea(p) /* nothing */
--# define ADD_BLOCK(list, address) /* nothing */
--# define FREE_BLOCKS(list) /* nothing */
--#else
--struct block_list
--{
-- void *address;
-- struct block_list *next;
--};
--# define ADD_BLOCK(list, addr) \
-- do { \
-- struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
-- /* If we cannot get a free block we cannot add the new element to \
-- the list. */ \
-- if (newp != NULL) { \
-- newp->address = (addr); \
-- newp->next = (list); \
-- (list) = newp; \
-- } \
-- } while (0)
--# define FREE_BLOCKS(list) \
-- do { \
-- while (list != NULL) { \
-- struct block_list *old = list; \
-- list = list->next; \
-- free (old->address); \
-- free (old); \
-- } \
-- } while (0)
--# undef alloca
--# define alloca(size) (malloc (size))
--# define freea(p) free (p)
--#endif /* have alloca */
--
--
--#ifdef _LIBC
--/* List of blocks allocated for translations. */
--typedef struct transmem_list
--{
-- struct transmem_list *next;
-- char data[ZERO];
--} transmem_block_t;
--static struct transmem_list *transmem_list;
--#else
--typedef unsigned char transmem_block_t;
--#endif
--
--
--/* Names for the libintl functions are a problem. They must not clash
-- with existing names and they should follow ANSI C. But this source
-- code is also used in GNU C Library where the names have a __
-- prefix. So we have to make a difference here. */
--#ifdef _LIBC
--# define DCIGETTEXT __dcigettext
--#else
--# define DCIGETTEXT libintl_dcigettext
--#endif
--
--/* Lock variable to protect the global data in the gettext implementation. */
--gl_rwlock_define_initialized (, _nl_state_lock attribute_hidden)
--
--/* Checking whether the binaries runs SUID must be done and glibc provides
-- easier methods therefore we make a difference here. */
--#ifdef _LIBC
--# define ENABLE_SECURE __libc_enable_secure
--# define DETERMINE_SECURE
--#else
--# ifndef HAVE_GETUID
--# define getuid() 0
--# endif
--# ifndef HAVE_GETGID
--# define getgid() 0
--# endif
--# ifndef HAVE_GETEUID
--# define geteuid() getuid()
--# endif
--# ifndef HAVE_GETEGID
--# define getegid() getgid()
--# endif
--static int enable_secure;
--# define ENABLE_SECURE (enable_secure == 1)
--# define DETERMINE_SECURE \
-- if (enable_secure == 0) \
-- { \
-- if (getuid () != geteuid () || getgid () != getegid ()) \
-- enable_secure = 1; \
-- else \
-- enable_secure = -1; \
-- }
--#endif
--
--/* Get the function to evaluate the plural expression. */
--#include "eval-plural.h"
--
--/* Look up MSGID in the DOMAINNAME message catalog for the current
-- CATEGORY locale and, if PLURAL is nonzero, search over string
-- depending on the plural form determined by N. */
--#ifdef IN_LIBGLOCALE
--char *
--gl_dcigettext (const char *domainname,
-- const char *msgid1, const char *msgid2,
-- int plural, unsigned long int n,
-- int category,
-- const char *localename, const char *encoding)
--#else
--char *
--DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2,
-- int plural, unsigned long int n, int category)
--#endif
--{
--#ifndef HAVE_ALLOCA
-- struct block_list *block_list = NULL;
--#endif
-- struct loaded_l10nfile *domain;
-- struct binding *binding;
-- const char *categoryname;
-- const char *categoryvalue;
-- const char *dirname;
-- char *xdomainname;
-- char *single_locale;
-- char *retval;
-- size_t retlen;
-- int saved_errno;
-- struct known_translation_t *search;
-- struct known_translation_t **foundp = NULL;
-- size_t msgid_len;
--#if defined HAVE_PER_THREAD_LOCALE && !defined IN_LIBGLOCALE
-- const char *localename;
--#endif
-- size_t domainname_len;
--
-- /* If no real MSGID is given return NULL. */
-- if (msgid1 == NULL)
-- return NULL;
--
--#ifdef _LIBC
-- if (category < 0 || category >= __LC_LAST || category == LC_ALL)
-- /* Bogus. */
-- return (plural == 0
-- ? (char *) msgid1
-- /* Use the Germanic plural rule. */
-- : n == 1 ? (char *) msgid1 : (char *) msgid2);
--#endif
--
-- /* Preserve the `errno' value. */
-- saved_errno = errno;
--
-- gl_rwlock_rdlock (_nl_state_lock);
--
-- /* If DOMAINNAME is NULL, we are interested in the default domain. If
-- CATEGORY is not LC_MESSAGES this might not make much sense but the
-- definition left this undefined. */
-- if (domainname == NULL)
-- domainname = _nl_current_default_domain;
--
-- /* OS/2 specific: backward compatibility with older libintl versions */
--#ifdef LC_MESSAGES_COMPAT
-- if (category == LC_MESSAGES_COMPAT)
-- category = LC_MESSAGES;
--#endif
--
-- msgid_len = strlen (msgid1) + 1;
--
-- /* Try to find the translation among those which we found at
-- some time. */
-- search = (struct known_translation_t *)
-- alloca (offsetof (struct known_translation_t, msgid) + msgid_len);
-- memcpy (search->msgid, msgid1, msgid_len);
-- search->domainname = domainname;
-- search->category = category;
--#ifdef HAVE_PER_THREAD_LOCALE
--# ifndef IN_LIBGLOCALE
--# ifdef _LIBC
-- localename = __current_locale_name (category);
--# else
--# if HAVE_NL_LOCALE_NAME
-- /* NL_LOCALE_NAME is public glibc API introduced in glibc-2.4. */
-- localename = nl_langinfo (NL_LOCALE_NAME (category));
--# else
--# if HAVE_STRUCT___LOCALE_STRUCT___NAMES && defined USE_IN_GETTEXT_TESTS
-- /* The __names field is not public glibc API and must therefore not be used
-- in code that is installed in public locations. */
-- {
-- locale_t thread_locale = uselocale (NULL);
-- if (thread_locale != LC_GLOBAL_LOCALE)
-- localename = thread_locale->__names[category];
-- else
-- localename = "";
-- }
--# endif
--# endif
--# endif
--# endif
-- search->localename = localename;
--# ifdef IN_LIBGLOCALE
-- search->encoding = encoding;
--# endif
--
-- /* Since tfind/tsearch manage a balanced tree, concurrent tfind and
-- tsearch calls can be fatal. */
-- gl_rwlock_rdlock (tree_lock);
--
-- foundp = (struct known_translation_t **) tfind (search, &root, transcmp);
--
-- gl_rwlock_unlock (tree_lock);
--
-- freea (search);
-- if (foundp != NULL && (*foundp)->counter == _nl_msg_cat_cntr)
-- {
-- /* Now deal with plural. */
-- if (plural)
-- retval = plural_lookup ((*foundp)->domain, n, (*foundp)->translation,
-- (*foundp)->translation_length);
-- else
-- retval = (char *) (*foundp)->translation;
--
-- gl_rwlock_unlock (_nl_state_lock);
-- __set_errno (saved_errno);
-- return retval;
-- }
--#endif
--
-- /* See whether this is a SUID binary or not. */
-- DETERMINE_SECURE;
--
-- /* First find matching binding. */
--#ifdef IN_LIBGLOCALE
-- /* We can use a trivial binding, since _nl_find_msg will ignore it anyway,
-- and _nl_load_domain and _nl_find_domain just pass it through. */
-- binding = NULL;
-- dirname = bindtextdomain (domainname, NULL);
--#else
-- for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
-- {
-- int compare = strcmp (domainname, binding->domainname);
-- if (compare == 0)
-- /* We found it! */
-- break;
-- if (compare < 0)
-- {
-- /* It is not in the list. */
-- binding = NULL;
-- break;
-- }
-- }
--
-- if (binding == NULL)
-- dirname = _nl_default_dirname;
-- else
-- {
-- dirname = binding->dirname;
--#endif
-- if (!IS_ABSOLUTE_PATH (dirname))
-- {
-- /* We have a relative path. Make it absolute now. */
-- size_t dirname_len = strlen (dirname) + 1;
-- size_t path_max;
-- char *resolved_dirname;
-- char *ret;
--
-- path_max = (unsigned int) PATH_MAX;
-- path_max += 2; /* The getcwd docs say to do this. */
--
-- for (;;)
-- {
-- resolved_dirname = (char *) alloca (path_max + dirname_len);
-- ADD_BLOCK (block_list, tmp_dirname);
--
-- __set_errno (0);
-- ret = getcwd (resolved_dirname, path_max);
-- if (ret != NULL || errno != ERANGE)
-- break;
--
-- path_max += path_max / 2;
-- path_max += PATH_INCR;
-- }
--
-- if (ret == NULL)
-- /* We cannot get the current working directory. Don't signal an
-- error but simply return the default string. */
-- goto return_untranslated;
--
-- stpcpy (stpcpy (strchr (resolved_dirname, '\0'), "/"), dirname);
-- dirname = resolved_dirname;
-- }
--#ifndef IN_LIBGLOCALE
-- }
--#endif
--
-- /* Now determine the symbolic name of CATEGORY and its value. */
-- categoryname = category_to_name (category);
--#ifdef IN_LIBGLOCALE
-- categoryvalue = guess_category_value (category, categoryname, localename);
--#else
-- categoryvalue = guess_category_value (category, categoryname);
--#endif
--
-- domainname_len = strlen (domainname);
-- xdomainname = (char *) alloca (strlen (categoryname)
-- + domainname_len + 5);
-- ADD_BLOCK (block_list, xdomainname);
--
-- stpcpy ((char *) mempcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"),
-- domainname, domainname_len),
-- ".mo");
--
-- /* Creating working area. */
-- single_locale = (char *) alloca (strlen (categoryvalue) + 1);
-- ADD_BLOCK (block_list, single_locale);
--
--
-- /* Search for the given string. This is a loop because we perhaps
-- got an ordered list of languages to consider for the translation. */
-- while (1)
-- {
-- /* Make CATEGORYVALUE point to the next element of the list. */
-- while (categoryvalue[0] != '\0' && categoryvalue[0] == ':')
-- ++categoryvalue;
-- if (categoryvalue[0] == '\0')
-- {
-- /* The whole contents of CATEGORYVALUE has been searched but
-- no valid entry has been found. We solve this situation
-- by implicitly appending a "C" entry, i.e. no translation
-- will take place. */
-- single_locale[0] = 'C';
-- single_locale[1] = '\0';
-- }
-- else
-- {
-- char *cp = single_locale;
-- while (categoryvalue[0] != '\0' && categoryvalue[0] != ':')
-- *cp++ = *categoryvalue++;
-- *cp = '\0';
--
-- /* When this is a SUID binary we must not allow accessing files
-- outside the dedicated directories. */
-- if (ENABLE_SECURE && IS_PATH_WITH_DIR (single_locale))
-- /* Ingore this entry. */
-- continue;
-- }
--
-- /* If the current locale value is C (or POSIX) we don't load a
-- domain. Return the MSGID. */
-- if (strcmp (single_locale, "C") == 0
-- || strcmp (single_locale, "POSIX") == 0)
-- break;
--
-- /* Find structure describing the message catalog matching the
-- DOMAINNAME and CATEGORY. */
-- domain = _nl_find_domain (dirname, single_locale, xdomainname, binding);
--
-- if (domain != NULL)
-- {
--#if defined IN_LIBGLOCALE
-- retval = _nl_find_msg (domain, binding, encoding, msgid1, &retlen);
--#else
-- retval = _nl_find_msg (domain, binding, msgid1, 1, &retlen);
--#endif
--
-- if (retval == NULL)
-- {
-- int cnt;
--
-- for (cnt = 0; domain->successor[cnt] != NULL; ++cnt)
-- {
--#if defined IN_LIBGLOCALE
-- retval = _nl_find_msg (domain->successor[cnt], binding,
-- encoding, msgid1, &retlen);
--#else
-- retval = _nl_find_msg (domain->successor[cnt], binding,
-- msgid1, 1, &retlen);
--#endif
--
-- if (retval != NULL)
-- {
-- domain = domain->successor[cnt];
-- break;
-- }
-- }
-- }
--
-- /* Returning -1 means that some resource problem exists
-- (likely memory) and that the strings could not be
-- converted. Return the original strings. */
-- if (__builtin_expect (retval == (char *) -1, 0))
-- break;
--
-- if (retval != NULL)
-- {
-- /* Found the translation of MSGID1 in domain DOMAIN:
-- starting at RETVAL, RETLEN bytes. */
-- FREE_BLOCKS (block_list);
-- if (foundp == NULL)
-- {
-- /* Create a new entry and add it to the search tree. */
-- size_t size;
-- struct known_translation_t *newp;
--
-- size = offsetof (struct known_translation_t, msgid)
-- + msgid_len + domainname_len + 1;
--#ifdef HAVE_PER_THREAD_LOCALE
-- size += strlen (localename) + 1;
--#endif
-- newp = (struct known_translation_t *) malloc (size);
-- if (newp != NULL)
-- {
-- char *new_domainname;
--#ifdef HAVE_PER_THREAD_LOCALE
-- char *new_localename;
--#endif
--
-- new_domainname =
-- (char *) mempcpy (newp->msgid, msgid1, msgid_len);
-- memcpy (new_domainname, domainname, domainname_len + 1);
--#ifdef HAVE_PER_THREAD_LOCALE
-- new_localename = new_domainname + domainname_len + 1;
-- strcpy (new_localename, localename);
--#endif
-- newp->domainname = new_domainname;
-- newp->category = category;
--#ifdef HAVE_PER_THREAD_LOCALE
-- newp->localename = new_localename;
--#endif
--#ifdef IN_LIBGLOCALE
-- newp->encoding = encoding;
--#endif
-- newp->counter = _nl_msg_cat_cntr;
-- newp->domain = domain;
-- newp->translation = retval;
-- newp->translation_length = retlen;
--
-- gl_rwlock_wrlock (tree_lock);
--
-- /* Insert the entry in the search tree. */
-- foundp = (struct known_translation_t **)
-- tsearch (newp, &root, transcmp);
--
-- gl_rwlock_unlock (tree_lock);
--
-- if (foundp == NULL
-- || __builtin_expect (*foundp != newp, 0))
-- /* The insert failed. */
-- free (newp);
-- }
-- }
-- else
-- {
-- /* We can update the existing entry. */
-- (*foundp)->counter = _nl_msg_cat_cntr;
-- (*foundp)->domain = domain;
-- (*foundp)->translation = retval;
-- (*foundp)->translation_length = retlen;
-- }
--
-- __set_errno (saved_errno);
--
-- /* Now deal with plural. */
-- if (plural)
-- retval = plural_lookup (domain, n, retval, retlen);
--
-- gl_rwlock_unlock (_nl_state_lock);
-- return retval;
-- }
-- }
-- }
--
-- return_untranslated:
-- /* Return the untranslated MSGID. */
-- FREE_BLOCKS (block_list);
-- gl_rwlock_unlock (_nl_state_lock);
--#ifndef _LIBC
-- if (!ENABLE_SECURE)
-- {
-- extern void _nl_log_untranslated (const char *logfilename,
-- const char *domainname,
-- const char *msgid1, const char *msgid2,
-- int plural);
-- const char *logfilename = getenv ("GETTEXT_LOG_UNTRANSLATED");
--
-- if (logfilename != NULL && logfilename[0] != '\0')
-- _nl_log_untranslated (logfilename, domainname, msgid1, msgid2, plural);
-- }
--#endif
-- __set_errno (saved_errno);
-- return (plural == 0
-- ? (char *) msgid1
-- /* Use the Germanic plural rule. */
-- : n == 1 ? (char *) msgid1 : (char *) msgid2);
--}
--
--
--/* Look up the translation of msgid within DOMAIN_FILE and DOMAINBINDING.
-- Return it if found. Return NULL if not found or in case of a conversion
-- failure (problem in the particular message catalog). Return (char *) -1
-- in case of a memory allocation failure during conversion (only if
-- ENCODING != NULL resp. CONVERT == true). */
--char *
--internal_function
--#ifdef IN_LIBGLOCALE
--_nl_find_msg (struct loaded_l10nfile *domain_file,
-- struct binding *domainbinding, const char *encoding,
-- const char *msgid,
-- size_t *lengthp)
--#else
--_nl_find_msg (struct loaded_l10nfile *domain_file,
-- struct binding *domainbinding,
-- const char *msgid, int convert,
-- size_t *lengthp)
--#endif
--{
-- struct loaded_domain *domain;
-- nls_uint32 nstrings;
-- size_t act;
-- char *result;
-- size_t resultlen;
--
-- if (domain_file->decided <= 0)
-- _nl_load_domain (domain_file, domainbinding);
--
-- if (domain_file->data == NULL)
-- return NULL;
--
-- domain = (struct loaded_domain *) domain_file->data;
--
-- nstrings = domain->nstrings;
--
-- /* Locate the MSGID and its translation. */
-- if (domain->hash_tab != NULL)
-- {
-- /* Use the hashing table. */
-- nls_uint32 len = strlen (msgid);
-- nls_uint32 hash_val = __hash_string (msgid);
-- nls_uint32 idx = hash_val % domain->hash_size;
-- nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
--
-- while (1)
-- {
-- nls_uint32 nstr =
-- W (domain->must_swap_hash_tab, domain->hash_tab[idx]);
--
-- if (nstr == 0)
-- /* Hash table entry is empty. */
-- return NULL;
--
-- nstr--;
--
-- /* Compare msgid with the original string at index nstr.
-- We compare the lengths with >=, not ==, because plural entries
-- are represented by strings with an embedded NUL. */
-- if (nstr < nstrings
-- ? W (domain->must_swap, domain->orig_tab[nstr].length) >= len
-- && (strcmp (msgid,
-- domain->data + W (domain->must_swap,
-- domain->orig_tab[nstr].offset))
-- == 0)
-- : domain->orig_sysdep_tab[nstr - nstrings].length > len
-- && (strcmp (msgid,
-- domain->orig_sysdep_tab[nstr - nstrings].pointer)
-- == 0))
-- {
-- act = nstr;
-- goto found;
-- }
--
-- if (idx >= domain->hash_size - incr)
-- idx -= domain->hash_size - incr;
-- else
-- idx += incr;
-- }
-- /* NOTREACHED */
-- }
-- else
-- {
-- /* Try the default method: binary search in the sorted array of
-- messages. */
-- size_t top, bottom;
--
-- bottom = 0;
-- top = nstrings;
-- while (bottom < top)
-- {
-- int cmp_val;
--
-- act = (bottom + top) / 2;
-- cmp_val = strcmp (msgid, (domain->data
-- + W (domain->must_swap,
-- domain->orig_tab[act].offset)));
-- if (cmp_val < 0)
-- top = act;
-- else if (cmp_val > 0)
-- bottom = act + 1;
-- else
-- goto found;
-- }
-- /* No translation was found. */
-- return NULL;
-- }
--
-- found:
-- /* The translation was found at index ACT. If we have to convert the
-- string to use a different character set, this is the time. */
-- if (act < nstrings)
-- {
-- result = (char *)
-- (domain->data + W (domain->must_swap, domain->trans_tab[act].offset));
-- resultlen = W (domain->must_swap, domain->trans_tab[act].length) + 1;
-- }
-- else
-- {
-- result = (char *) domain->trans_sysdep_tab[act - nstrings].pointer;
-- resultlen = domain->trans_sysdep_tab[act - nstrings].length;
-- }
--
--#if defined _LIBC || HAVE_ICONV
--# ifdef IN_LIBGLOCALE
-- if (encoding != NULL)
--# else
-- if (convert)
--# endif
-- {
-- /* We are supposed to do a conversion. */
--# ifndef IN_LIBGLOCALE
-- const char *encoding = get_output_charset (domainbinding);
--# endif
-- size_t nconversions;
-- struct converted_domain *convd;
-- size_t i;
--
-- /* Protect against reallocation of the table. */
-- gl_rwlock_rdlock (domain->conversions_lock);
--
-- /* Search whether a table with converted translations for this
-- encoding has already been allocated. */
-- nconversions = domain->nconversions;
-- convd = NULL;
--
-- for (i = nconversions; i > 0; )
-- {
-- i--;
-- if (strcmp (domain->conversions[i].encoding, encoding) == 0)
-- {
-- convd = &domain->conversions[i];
-- break;
-- }
-- }
--
-- gl_rwlock_unlock (domain->conversions_lock);
--
-- if (convd == NULL)
-- {
-- /* We have to allocate a new conversions table. */
-- gl_rwlock_wrlock (domain->conversions_lock);
--
-- /* Maybe in the meantime somebody added the translation.
-- Recheck. */
-- for (i = nconversions; i > 0; )
-- {
-- i--;
-- if (strcmp (domain->conversions[i].encoding, encoding) == 0)
-- {
-- convd = &domain->conversions[i];
-- goto found_convd;
-- }
-- }
--
-- {
-- /* Allocate a table for the converted translations for this
-- encoding. */
-- struct converted_domain *new_conversions =
-- (struct converted_domain *)
-- (domain->conversions != NULL
-- ? realloc (domain->conversions,
-- (nconversions + 1) * sizeof (struct converted_domain))
-- : malloc ((nconversions + 1) * sizeof (struct converted_domain)));
--
-- if (__builtin_expect (new_conversions == NULL, 0))
-- {
-- /* Nothing we can do, no more memory. We cannot use the
-- translation because it might be encoded incorrectly. */
-- unlock_fail:
-- gl_rwlock_unlock (domain->conversions_lock);
-- return (char *) -1;
-- }
--
-- domain->conversions = new_conversions;
--
-- /* Copy the 'encoding' string to permanent storage. */
-- encoding = strdup (encoding);
-- if (__builtin_expect (encoding == NULL, 0))
-- /* Nothing we can do, no more memory. We cannot use the
-- translation because it might be encoded incorrectly. */
-- goto unlock_fail;
--
-- convd = &new_conversions[nconversions];
-- convd->encoding = encoding;
--
-- /* Find out about the character set the file is encoded with.
-- This can be found (in textual form) in the entry "". If this
-- entry does not exist or if this does not contain the 'charset='
-- information, we will assume the charset matches the one the
-- current locale and we don't have to perform any conversion. */
--# ifdef _LIBC
-- convd->conv = (__gconv_t) -1;
--# else
--# if HAVE_ICONV
-- convd->conv = (iconv_t) -1;
--# endif
--# endif
-- {
-- char *nullentry;
-- size_t nullentrylen;
--
-- /* Get the header entry. This is a recursion, but it doesn't
-- reallocate domain->conversions because we pass
-- encoding = NULL or convert = 0, respectively. */
-- nullentry =
--# ifdef IN_LIBGLOCALE
-- _nl_find_msg (domain_file, domainbinding, NULL, "",
-- &nullentrylen);
--# else
-- _nl_find_msg (domain_file, domainbinding, "", 0, &nullentrylen);
--# endif
--
-- if (nullentry != NULL)
-- {
-- const char *charsetstr;
--
-- charsetstr = strstr (nullentry, "charset=");
-- if (charsetstr != NULL)
-- {
-- size_t len;
-- char *charset;
-- const char *outcharset;
--
-- charsetstr += strlen ("charset=");
-- len = strcspn (charsetstr, " \t\n");
--
-- charset = (char *) alloca (len + 1);
--# if defined _LIBC || HAVE_MEMPCPY
-- *((char *) mempcpy (charset, charsetstr, len)) = '\0';
--# else
-- memcpy (charset, charsetstr, len);
-- charset[len] = '\0';
--# endif
--
-- outcharset = encoding;
--
--# ifdef _LIBC
-- /* We always want to use transliteration. */
-- outcharset = norm_add_slashes (outcharset, "TRANSLIT");
-- charset = norm_add_slashes (charset, "");
-- int r = __gconv_open (outcharset, charset, &convd->conv,
-- GCONV_AVOID_NOCONV);
-- if (__builtin_expect (r != __GCONV_OK, 0))
-- {
-- /* If the output encoding is the same there is
-- nothing to do. Otherwise do not use the
-- translation at all. */
-- if (__builtin_expect (r != __GCONV_NULCONV, 1))
-- {
-- gl_rwlock_unlock (domain->conversions_lock);
-- free ((char *) encoding);
-- return NULL;
-- }
--
-- convd->conv = (__gconv_t) -1;
-- }
--# else
--# if HAVE_ICONV
-- /* When using GNU libc >= 2.2 or GNU libiconv >= 1.5,
-- we want to use transliteration. */
--# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \
-- || _LIBICONV_VERSION >= 0x0105
-- if (strchr (outcharset, '/') == NULL)
-- {
-- char *tmp;
--
-- len = strlen (outcharset);
-- tmp = (char *) alloca (len + 10 + 1);
-- memcpy (tmp, outcharset, len);
-- memcpy (tmp + len, "//TRANSLIT", 10 + 1);
-- outcharset = tmp;
--
-- convd->conv = iconv_open (outcharset, charset);
--
-- freea (outcharset);
-- }
-- else
--# endif
-- convd->conv = iconv_open (outcharset, charset);
--# endif
--# endif
--
-- freea (charset);
-- }
-- }
-- }
-- convd->conv_tab = NULL;
-- /* Here domain->conversions is still == new_conversions. */
-- domain->nconversions++;
-- }
--
-- found_convd:
-- gl_rwlock_unlock (domain->conversions_lock);
-- }
--
-- if (
--# ifdef _LIBC
-- convd->conv != (__gconv_t) -1
--# else
--# if HAVE_ICONV
-- convd->conv != (iconv_t) -1
--# endif
--# endif
-- )
-- {
-- /* We are supposed to do a conversion. First allocate an
-- appropriate table with the same structure as the table
-- of translations in the file, where we can put the pointers
-- to the converted strings in.
-- There is a slight complication with plural entries. They
-- are represented by consecutive NUL terminated strings. We
-- handle this case by converting RESULTLEN bytes, including
-- NULs. */
--
-- if (convd->conv_tab == NULL
-- && ((convd->conv_tab =
-- (char **) calloc (nstrings + domain->n_sysdep_strings,
-- sizeof (char *)))
-- == NULL))
-- /* Mark that we didn't succeed allocating a table. */
-- convd->conv_tab = (char **) -1;
--
-- if (__builtin_expect (convd->conv_tab == (char **) -1, 0))
-- /* Nothing we can do, no more memory. We cannot use the
-- translation because it might be encoded incorrectly. */
-- return (char *) -1;
--
-- if (convd->conv_tab[act] == NULL)
-- {
-- /* We haven't used this string so far, so it is not
-- translated yet. Do this now. */
-- /* We use a bit more efficient memory handling.
-- We allocate always larger blocks which get used over
-- time. This is faster than many small allocations. */
-- __libc_lock_define_initialized (static, lock)
--# define INITIAL_BLOCK_SIZE 4080
-- static unsigned char *freemem;
-- static size_t freemem_size;
--
-- const unsigned char *inbuf;
-- unsigned char *outbuf;
-- int malloc_count;
--# ifndef _LIBC
-- transmem_block_t *transmem_list = NULL;
--# endif
--
-- __libc_lock_lock (lock);
--
-- inbuf = (const unsigned char *) result;
-- outbuf = freemem + sizeof (size_t);
--
-- malloc_count = 0;
-- while (1)
-- {
-- transmem_block_t *newmem;
--# ifdef _LIBC
-- size_t non_reversible;
-- int res;
--
-- if (freemem_size < sizeof (size_t))
-- goto resize_freemem;
--
-- res = __gconv (convd->conv,
-- &inbuf, inbuf + resultlen,
-- &outbuf,
-- outbuf + freemem_size - sizeof (size_t),
-- &non_reversible);
--
-- if (res == __GCONV_OK || res == __GCONV_EMPTY_INPUT)
-- break;
--
-- if (res != __GCONV_FULL_OUTPUT)
-- {
-- /* We should not use the translation at all, it
-- is incorrectly encoded. */
-- __libc_lock_unlock (lock);
-- return NULL;
-- }
--
-- inbuf = (const unsigned char *) result;
--# else
--# if HAVE_ICONV
-- const char *inptr = (const char *) inbuf;
-- size_t inleft = resultlen;
-- char *outptr = (char *) outbuf;
-- size_t outleft;
--
-- if (freemem_size < sizeof (size_t))
-- goto resize_freemem;
--
-- outleft = freemem_size - sizeof (size_t);
-- if (iconv (convd->conv,
-- (ICONV_CONST char **) &inptr, &inleft,
-- &outptr, &outleft)
-- != (size_t) (-1))
-- {
-- outbuf = (unsigned char *) outptr;
-- break;
-- }
-- if (errno != E2BIG)
-- {
-- __libc_lock_unlock (lock);
-- return NULL;
-- }
--# endif
--# endif
--
-- resize_freemem:
-- /* We must allocate a new buffer or resize the old one. */
-- if (malloc_count > 0)
-- {
-- ++malloc_count;
-- freemem_size = malloc_count * INITIAL_BLOCK_SIZE;
-- newmem = (transmem_block_t *) realloc (transmem_list,
-- freemem_size);
--# ifdef _LIBC
-- if (newmem != NULL)
-- transmem_list = transmem_list->next;
-- else
-- {
-- struct transmem_list *old = transmem_list;
--
-- transmem_list = transmem_list->next;
-- free (old);
-- }
--# endif
-- }
-- else
-- {
-- malloc_count = 1;
-- freemem_size = INITIAL_BLOCK_SIZE;
-- newmem = (transmem_block_t *) malloc (freemem_size);
-- }
-- if (__builtin_expect (newmem == NULL, 0))
-- {
-- freemem = NULL;
-- freemem_size = 0;
-- __libc_lock_unlock (lock);
-- return (char *) -1;
-- }
--
--# ifdef _LIBC
-- /* Add the block to the list of blocks we have to free
-- at some point. */
-- newmem->next = transmem_list;
-- transmem_list = newmem;
--
-- freemem = (unsigned char *) newmem->data;
-- freemem_size -= offsetof (struct transmem_list, data);
--# else
-- transmem_list = newmem;
-- freemem = newmem;
--# endif
--
-- outbuf = freemem + sizeof (size_t);
-- }
--
-- /* We have now in our buffer a converted string. Put this
-- into the table of conversions. */
-- *(size_t *) freemem = outbuf - freemem - sizeof (size_t);
-- convd->conv_tab[act] = (char *) freemem;
-- /* Shrink freemem, but keep it aligned. */
-- freemem_size -= outbuf - freemem;
-- freemem = outbuf;
-- freemem += freemem_size & (alignof (size_t) - 1);
-- freemem_size = freemem_size & ~ (alignof (size_t) - 1);
--
-- __libc_lock_unlock (lock);
-- }
--
-- /* Now convd->conv_tab[act] contains the translation of all
-- the plural variants. */
-- result = convd->conv_tab[act] + sizeof (size_t);
-- resultlen = *(size_t *) convd->conv_tab[act];
-- }
-- }
--
-- /* The result string is converted. */
--
--#endif /* _LIBC || HAVE_ICONV */
--
-- *lengthp = resultlen;
-- return result;
--}
--
--
--/* Look up a plural variant. */
--static char *
--internal_function
--plural_lookup (struct loaded_l10nfile *domain, unsigned long int n,
-- const char *translation, size_t translation_len)
--{
-- struct loaded_domain *domaindata = (struct loaded_domain *) domain->data;
-- unsigned long int index;
-- const char *p;
--
-- index = plural_eval (domaindata->plural, n);
-- if (index >= domaindata->nplurals)
-- /* This should never happen. It means the plural expression and the
-- given maximum value do not match. */
-- index = 0;
--
-- /* Skip INDEX strings at TRANSLATION. */
-- p = translation;
-- while (index-- > 0)
-- {
--#ifdef _LIBC
-- p = __rawmemchr (p, '\0');
--#else
-- p = strchr (p, '\0');
--#endif
-- /* And skip over the NUL byte. */
-- p++;
--
-- if (p >= translation + translation_len)
-- /* This should never happen. It means the plural expression
-- evaluated to a value larger than the number of variants
-- available for MSGID1. */
-- return (char *) translation;
-- }
-- return (char *) p;
--}
--
--#ifndef _LIBC
--/* Return string representation of locale CATEGORY. */
--static const char *
--internal_function
--category_to_name (int category)
--{
-- const char *retval;
--
-- switch (category)
-- {
--#ifdef LC_COLLATE
-- case LC_COLLATE:
-- retval = "LC_COLLATE";
-- break;
--#endif
--#ifdef LC_CTYPE
-- case LC_CTYPE:
-- retval = "LC_CTYPE";
-- break;
--#endif
--#ifdef LC_MONETARY
-- case LC_MONETARY:
-- retval = "LC_MONETARY";
-- break;
--#endif
--#ifdef LC_NUMERIC
-- case LC_NUMERIC:
-- retval = "LC_NUMERIC";
-- break;
--#endif
--#ifdef LC_TIME
-- case LC_TIME:
-- retval = "LC_TIME";
-- break;
--#endif
--#ifdef LC_MESSAGES
-- case LC_MESSAGES:
-- retval = "LC_MESSAGES";
-- break;
--#endif
--#ifdef LC_RESPONSE
-- case LC_RESPONSE:
-- retval = "LC_RESPONSE";
-- break;
--#endif
--#ifdef LC_ALL
-- case LC_ALL:
-- /* This might not make sense but is perhaps better than any other
-- value. */
-- retval = "LC_ALL";
-- break;
--#endif
-- default:
-- /* If you have a better idea for a default value let me know. */
-- retval = "LC_XXX";
-- }
--
-- return retval;
--}
--#endif
--
--/* Guess value of current locale from value of the environment variables
-- or system-dependent defaults. */
--static const char *
--internal_function
--#ifdef IN_LIBGLOCALE
--guess_category_value (int category, const char *categoryname,
-- const char *locale)
--
--#else
--guess_category_value (int category, const char *categoryname)
--#endif
--{
-- const char *language;
--#ifndef IN_LIBGLOCALE
-- const char *locale;
--# ifndef _LIBC
-- const char *language_default;
-- int locale_defaulted;
--# endif
--#endif
--
-- /* We use the settings in the following order:
-- 1. The value of the environment variable 'LANGUAGE'. This is a GNU
-- extension. Its value can be a colon-separated list of locale names.
-- 2. The value of the environment variable 'LC_ALL', 'LC_xxx', or 'LANG'.
-- More precisely, the first among these that is set to a non-empty value.
-- This is how POSIX specifies it. The value is a single locale name.
-- 3. A system-dependent preference list of languages. Its value can be a
-- colon-separated list of locale names.
-- 4. A system-dependent default locale name.
-- This way:
-- - System-dependent settings can be overridden by environment variables.
-- - If the system provides both a list of languages and a default locale,
-- the former is used. */
--
--#ifndef IN_LIBGLOCALE
-- /* Fetch the locale name, through the POSIX method of looking to `LC_ALL',
-- `LC_xxx', and `LANG'. On some systems this can be done by the
-- `setlocale' function itself. */
--# ifdef _LIBC
-- locale = __current_locale_name (category);
--# else
--# if HAVE_STRUCT___LOCALE_STRUCT___NAMES && defined USE_IN_GETTEXT_TESTS
-- /* The __names field is not public glibc API and must therefore not be used
-- in code that is installed in public locations. */
-- locale_t thread_locale = uselocale (NULL);
-- if (thread_locale != LC_GLOBAL_LOCALE)
-- {
-- locale = thread_locale->__names[category];
-- locale_defaulted = 0;
-- }
-- else
--# endif
-- {
-- locale = _nl_locale_name_posix (category, categoryname);
-- locale_defaulted = 0;
-- if (locale == NULL)
-- {
-- locale = _nl_locale_name_default ();
-- locale_defaulted = 1;
-- }
-- }
--# endif
--#endif
--
-- /* Ignore LANGUAGE and its system-dependent analogon if the locale is set
-- to "C" because
-- 1. "C" locale usually uses the ASCII encoding, and most international
-- messages use non-ASCII characters. These characters get displayed
-- as question marks (if using glibc's iconv()) or as invalid 8-bit
-- characters (because other iconv()s refuse to convert most non-ASCII
-- characters to ASCII). In any case, the output is ugly.
-- 2. The precise output of some programs in the "C" locale is specified
-- by POSIX and should not depend on environment variables like
-- "LANGUAGE" or system-dependent information. We allow such programs
-- to use gettext(). */
-- if (strcmp (locale, "C") == 0)
-- return locale;
--
-- /* The highest priority value is the value of the 'LANGUAGE' environment
-- variable. */
-- language = getenv ("LANGUAGE");
-- if (language != NULL && language[0] != '\0')
-- return language;
--#if !defined IN_LIBGLOCALE && !defined _LIBC
-- /* The next priority value is the locale name, if not defaulted. */
-- if (locale_defaulted)
-- {
-- /* The next priority value is the default language preferences list. */
-- language_default = _nl_language_preferences_default ();
-- if (language_default != NULL)
-- return language_default;
-- }
-- /* The least priority value is the locale name, if defaulted. */
--#endif
-- return locale;
--}
--
--#if (defined _LIBC || HAVE_ICONV) && !defined IN_LIBGLOCALE
--/* Returns the output charset. */
--static const char *
--internal_function
--get_output_charset (struct binding *domainbinding)
--{
-- /* The output charset should normally be determined by the locale. But
-- sometimes the locale is not used or not correctly set up, so we provide
-- a possibility for the user to override this: the OUTPUT_CHARSET
-- environment variable. Moreover, the value specified through
-- bind_textdomain_codeset overrides both. */
-- if (domainbinding != NULL && domainbinding->codeset != NULL)
-- return domainbinding->codeset;
-- else
-- {
-- /* For speed reasons, we look at the value of OUTPUT_CHARSET only
-- once. This is a user variable that is not supposed to change
-- during a program run. */
-- static char *output_charset_cache;
-- static int output_charset_cached;
--
-- if (!output_charset_cached)
-- {
-- const char *value = getenv ("OUTPUT_CHARSET");
--
-- if (value != NULL && value[0] != '\0')
-- {
-- size_t len = strlen (value) + 1;
-- char *value_copy = (char *) malloc (len);
--
-- if (value_copy != NULL)
-- memcpy (value_copy, value, len);
-- output_charset_cache = value_copy;
-- }
-- output_charset_cached = 1;
-- }
--
-- if (output_charset_cache != NULL)
-- return output_charset_cache;
-- else
-- {
--# ifdef _LIBC
-- return _NL_CURRENT (LC_CTYPE, CODESET);
--# else
--# if HAVE_ICONV
-- return locale_charset ();
--# endif
--# endif
-- }
-- }
--}
--#endif
--
--/* @@ begin of epilog @@ */
--
--/* We don't want libintl.a to depend on any other library. So we
-- avoid the non-standard function stpcpy. In GNU C Library this
-- function is available, though. Also allow the symbol HAVE_STPCPY
-- to be defined. */
--#if !_LIBC && !HAVE_STPCPY
--static char *
--stpcpy (char *dest, const char *src)
--{
-- while ((*dest++ = *src++) != '\0')
-- /* Do nothing. */ ;
-- return dest - 1;
--}
--#endif
--
--#if !_LIBC && !HAVE_MEMPCPY
--static void *
--mempcpy (void *dest, const void *src, size_t n)
--{
-- return (void *) ((char *) memcpy (dest, src, n) + n);
--}
--#endif
--
--#if !_LIBC && !HAVE_TSEARCH
--# include "tsearch.c"
--#endif
--
--
--#ifdef _LIBC
--/* If we want to free all resources we have to do some work at
-- program's end. */
--libc_freeres_fn (free_mem)
--{
-- void *old;
--
-- while (_nl_domain_bindings != NULL)
-- {
-- struct binding *oldp = _nl_domain_bindings;
-- _nl_domain_bindings = _nl_domain_bindings->next;
-- if (oldp->dirname != _nl_default_dirname)
-- /* Yes, this is a pointer comparison. */
-- free (oldp->dirname);
-- free (oldp->codeset);
-- free (oldp);
-- }
--
-- if (_nl_current_default_domain != _nl_default_default_domain)
-- /* Yes, again a pointer comparison. */
-- free ((char *) _nl_current_default_domain);
--
-- /* Remove the search tree with the known translations. */
-- __tdestroy (root, free);
-- root = NULL;
--
-- while (transmem_list != NULL)
-- {
-- old = transmem_list;
-- transmem_list = transmem_list->next;
-- free (old);
-- }
--}
--#endif
---- a/intl/dcngettext.c
-+++ /dev/null
-@@ -1,57 +0,0 @@
--/* Implementation of the dcngettext(3) function.
-- Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--#ifdef HAVE_CONFIG_H
--# include <config.h>
--#endif
--
--#include "gettextP.h"
--#ifdef _LIBC
--# include <libintl.h>
--#else
--# include "libgnuintl.h"
--#endif
--
--/* @@ end of prolog @@ */
--
--/* Names for the libintl functions are a problem. They must not clash
-- with existing names and they should follow ANSI C. But this source
-- code is also used in GNU C Library where the names have a __
-- prefix. So we have to make a difference here. */
--#ifdef _LIBC
--# define DCNGETTEXT __dcngettext
--# define DCIGETTEXT __dcigettext
--#else
--# define DCNGETTEXT libintl_dcngettext
--# define DCIGETTEXT libintl_dcigettext
--#endif
--
--/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
-- locale. */
--char *
--DCNGETTEXT (const char *domainname,
-- const char *msgid1, const char *msgid2, unsigned long int n,
-- int category)
--{
-- return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category);
--}
--
--#ifdef _LIBC
--/* Alias for function name in GNU C Library. */
--weak_alias (__dcngettext, dcngettext);
--#endif
---- a/intl/dgettext.c
-+++ /dev/null
-@@ -1,58 +0,0 @@
--/* Implementation of the dgettext(3) function.
-- Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--#ifdef HAVE_CONFIG_H
--# include <config.h>
--#endif
--
--#include "gettextP.h"
--
--#include <locale.h>
--
--#ifdef _LIBC
--# include <libintl.h>
--#else
--# include "libgnuintl.h"
--#endif
--
--/* @@ end of prolog @@ */
--
--/* Names for the libintl functions are a problem. They must not clash
-- with existing names and they should follow ANSI C. But this source
-- code is also used in GNU C Library where the names have a __
-- prefix. So we have to make a difference here. */
--#ifdef _LIBC
--# define DGETTEXT __dgettext
--# define DCGETTEXT INTUSE(__dcgettext)
--#else
--# define DGETTEXT libintl_dgettext
--# define DCGETTEXT libintl_dcgettext
--#endif
--
--/* Look up MSGID in the DOMAINNAME message catalog of the current
-- LC_MESSAGES locale. */
--char *
--DGETTEXT (const char *domainname, const char *msgid)
--{
-- return DCGETTEXT (domainname, msgid, LC_MESSAGES);
--}
--
--#ifdef _LIBC
--/* Alias for function name in GNU C Library. */
--weak_alias (__dgettext, dgettext);
--#endif
---- a/intl/dngettext.c
-+++ /dev/null
-@@ -1,59 +0,0 @@
--/* Implementation of the dngettext(3) function.
-- Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--#ifdef HAVE_CONFIG_H
--# include <config.h>
--#endif
--
--#include "gettextP.h"
--
--#include <locale.h>
--
--#ifdef _LIBC
--# include <libintl.h>
--#else
--# include "libgnuintl.h"
--#endif
--
--/* @@ end of prolog @@ */
--
--/* Names for the libintl functions are a problem. They must not clash
-- with existing names and they should follow ANSI C. But this source
-- code is also used in GNU C Library where the names have a __
-- prefix. So we have to make a difference here. */
--#ifdef _LIBC
--# define DNGETTEXT __dngettext
--# define DCNGETTEXT __dcngettext
--#else
--# define DNGETTEXT libintl_dngettext
--# define DCNGETTEXT libintl_dcngettext
--#endif
--
--/* Look up MSGID in the DOMAINNAME message catalog of the current
-- LC_MESSAGES locale and skip message according to the plural form. */
--char *
--DNGETTEXT (const char *domainname,
-- const char *msgid1, const char *msgid2, unsigned long int n)
--{
-- return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES);
--}
--
--#ifdef _LIBC
--/* Alias for function name in GNU C Library. */
--weak_alias (__dngettext, dngettext);
--#endif
---- a/intl/eval-plural.h
-+++ /dev/null
-@@ -1,108 +0,0 @@
--/* Plural expression evaluation.
-- Copyright (C) 2000-2003, 2007 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--#ifndef STATIC
--#define STATIC static
--#endif
--
--/* Evaluate the plural expression and return an index value. */
--STATIC
--unsigned long int
--internal_function
--plural_eval (const struct expression *pexp, unsigned long int n)
--{
-- switch (pexp->nargs)
-- {
-- case 0:
-- switch (pexp->operation)
-- {
-- case var:
-- return n;
-- case num:
-- return pexp->val.num;
-- default:
-- break;
-- }
-- /* NOTREACHED */
-- break;
-- case 1:
-- {
-- /* pexp->operation must be lnot. */
-- unsigned long int arg = plural_eval (pexp->val.args[0], n);
-- return ! arg;
-- }
-- case 2:
-- {
-- unsigned long int leftarg = plural_eval (pexp->val.args[0], n);
-- if (pexp->operation == lor)
-- return leftarg || plural_eval (pexp->val.args[1], n);
-- else if (pexp->operation == land)
-- return leftarg && plural_eval (pexp->val.args[1], n);
-- else
-- {
-- unsigned long int rightarg = plural_eval (pexp->val.args[1], n);
--
-- switch (pexp->operation)
-- {
-- case mult:
-- return leftarg * rightarg;
-- case divide:
--#if !INTDIV0_RAISES_SIGFPE
-- if (rightarg == 0)
-- raise (SIGFPE);
--#endif
-- return leftarg / rightarg;
-- case module:
--#if !INTDIV0_RAISES_SIGFPE
-- if (rightarg == 0)
-- raise (SIGFPE);
--#endif
-- return leftarg % rightarg;
-- case plus:
-- return leftarg + rightarg;
-- case minus:
-- return leftarg - rightarg;
-- case less_than:
-- return leftarg < rightarg;
-- case greater_than:
-- return leftarg > rightarg;
-- case less_or_equal:
-- return leftarg <= rightarg;
-- case greater_or_equal:
-- return leftarg >= rightarg;
-- case equal:
-- return leftarg == rightarg;
-- case not_equal:
-- return leftarg != rightarg;
-- default:
-- break;
-- }
-- }
-- /* NOTREACHED */
-- break;
-- }
-- case 3:
-- {
-- /* pexp->operation must be qmop. */
-- unsigned long int boolarg = plural_eval (pexp->val.args[0], n);
-- return plural_eval (pexp->val.args[boolarg ? 1 : 2], n);
-- }
-- }
-- /* NOTREACHED */
-- return 0;
--}
---- a/intl/explodename.c
-+++ /dev/null
-@@ -1,135 +0,0 @@
--/* Copyright (C) 1995-1998, 2000-2001, 2003, 2005, 2007 Free Software Foundation, Inc.
-- Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--#ifdef HAVE_CONFIG_H
--# include <config.h>
--#endif
--
--#include <stdlib.h>
--#include <string.h>
--#include <sys/types.h>
--
--#include "loadinfo.h"
--
--/* On some strange systems still no definition of NULL is found. Sigh! */
--#ifndef NULL
--# if defined __STDC__ && __STDC__
--# define NULL ((void *) 0)
--# else
--# define NULL 0
--# endif
--#endif
--
--/* @@ end of prolog @@ */
--
--/* Split a locale name NAME into a leading language part and all the
-- rest. Return a pointer to the first character after the language,
-- i.e. to the first byte of the rest. */
--static char *_nl_find_language (const char *name);
--
--static char *
--_nl_find_language (const char *name)
--{
-- while (name[0] != '\0' && name[0] != '_' && name[0] != '@' && name[0] != '.')
-- ++name;
--
-- return (char *) name;
--}
--
--
--int
--_nl_explode_name (char *name,
-- const char **language, const char **modifier,
-- const char **territory, const char **codeset,
-- const char **normalized_codeset)
--{
-- char *cp;
-- int mask;
--
-- *modifier = NULL;
-- *territory = NULL;
-- *codeset = NULL;
-- *normalized_codeset = NULL;
--
-- /* Now we determine the single parts of the locale name. First
-- look for the language. Termination symbols are `_', '.', and `@'. */
-- mask = 0;
-- *language = cp = name;
-- cp = _nl_find_language (*language);
--
-- if (*language == cp)
-- /* This does not make sense: language has to be specified. Use
-- this entry as it is without exploding. Perhaps it is an alias. */
-- cp = strchr (*language, '\0');
-- else
-- {
-- if (cp[0] == '_')
-- {
-- /* Next is the territory. */
-- cp[0] = '\0';
-- *territory = ++cp;
--
-- while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@')
-- ++cp;
--
-- mask |= XPG_TERRITORY;
-- }
--
-- if (cp[0] == '.')
-- {
-- /* Next is the codeset. */
-- cp[0] = '\0';
-- *codeset = ++cp;
--
-- while (cp[0] != '\0' && cp[0] != '@')
-- ++cp;
--
-- mask |= XPG_CODESET;
--
-- if (*codeset != cp && (*codeset)[0] != '\0')
-- {
-- *normalized_codeset = _nl_normalize_codeset (*codeset,
-- cp - *codeset);
-- if (*normalized_codeset == NULL)
-- return -1;
-- else if (strcmp (*codeset, *normalized_codeset) == 0)
-- free ((char *) *normalized_codeset);
-- else
-- mask |= XPG_NORM_CODESET;
-- }
-- }
-- }
--
-- if (cp[0] == '@')
-- {
-- /* Next is the modifier. */
-- cp[0] = '\0';
-- *modifier = ++cp;
--
-- if (cp[0] != '\0')
-- mask |= XPG_MODIFIER;
-- }
--
-- if (*territory != NULL && (*territory)[0] == '\0')
-- mask &= ~XPG_TERRITORY;
--
-- if (*codeset != NULL && (*codeset)[0] == '\0')
-- mask &= ~XPG_CODESET;
--
-- return mask;
--}
---- a/intl/export.h
-+++ /dev/null
-@@ -1,6 +0,0 @@
--
--#if @HAVE_VISIBILITY@ && BUILDING_LIBINTL
--#define LIBINTL_DLL_EXPORTED __attribute__((__visibility__("default")))
--#else
--#define LIBINTL_DLL_EXPORTED
--#endif
---- a/intl/finddomain.c
-+++ /dev/null
-@@ -1,212 +0,0 @@
--/* Handle list of needed message catalogs
-- Copyright (C) 1995-1999, 2000-2001, 2003-2007 Free Software Foundation, Inc.
-- Written by Ulrich Drepper <drepper@gnu.org>, 1995.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--#ifdef HAVE_CONFIG_H
--# include <config.h>
--#endif
--
--#include <stdio.h>
--#include <sys/types.h>
--#include <stdlib.h>
--#include <string.h>
--
--#if defined HAVE_UNISTD_H || defined _LIBC
--# include <unistd.h>
--#endif
--
--#include "gettextP.h"
--#ifdef _LIBC
--# include <libintl.h>
--#else
--# include "libgnuintl.h"
--#endif
--
--/* Handle multi-threaded applications. */
--#ifdef _LIBC
--# include <bits/libc-lock.h>
--# define gl_rwlock_define_initialized __libc_rwlock_define_initialized
--# define gl_rwlock_rdlock __libc_rwlock_rdlock
--# define gl_rwlock_wrlock __libc_rwlock_wrlock
--# define gl_rwlock_unlock __libc_rwlock_unlock
--#else
--# include "lock.h"
--#endif
--
--/* @@ end of prolog @@ */
--/* List of already loaded domains. */
--static struct loaded_l10nfile *_nl_loaded_domains;
--
--
--/* Return a data structure describing the message catalog described by
-- the DOMAINNAME and CATEGORY parameters with respect to the currently
-- established bindings. */
--struct loaded_l10nfile *
--internal_function
--_nl_find_domain (const char *dirname, char *locale,
-- const char *domainname, struct binding *domainbinding)
--{
-- struct loaded_l10nfile *retval;
-- const char *language;
-- const char *modifier;
-- const char *territory;
-- const char *codeset;
-- const char *normalized_codeset;
-- const char *alias_value;
-- int mask;
--
-- /* LOCALE can consist of up to four recognized parts for the XPG syntax:
--
-- language[_territory][.codeset][@modifier]
--
-- Beside the first part all of them are allowed to be missing. If
-- the full specified locale is not found, the less specific one are
-- looked for. The various parts will be stripped off according to
-- the following order:
-- (1) codeset
-- (2) normalized codeset
-- (3) territory
-- (4) modifier
-- */
--
-- /* We need to protect modifying the _NL_LOADED_DOMAINS data. */
-- gl_rwlock_define_initialized (static, lock);
-- gl_rwlock_rdlock (lock);
--
-- /* If we have already tested for this locale entry there has to
-- be one data set in the list of loaded domains. */
-- retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
-- strlen (dirname) + 1, 0, locale, NULL, NULL,
-- NULL, NULL, domainname, 0);
--
-- gl_rwlock_unlock (lock);
--
-- if (retval != NULL)
-- {
-- /* We know something about this locale. */
-- int cnt;
--
-- if (retval->decided <= 0)
-- _nl_load_domain (retval, domainbinding);
--
-- if (retval->data != NULL)
-- return retval;
--
-- for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
-- {
-- if (retval->successor[cnt]->decided <= 0)
-- _nl_load_domain (retval->successor[cnt], domainbinding);
--
-- if (retval->successor[cnt]->data != NULL)
-- break;
-- }
--
-- return retval;
-- /* NOTREACHED */
-- }
--
-- /* See whether the locale value is an alias. If yes its value
-- *overwrites* the alias name. No test for the original value is
-- done. */
-- alias_value = _nl_expand_alias (locale);
-- if (alias_value != NULL)
-- {
--#if defined _LIBC || defined HAVE_STRDUP
-- locale = strdup (alias_value);
-- if (locale == NULL)
-- return NULL;
--#else
-- size_t len = strlen (alias_value) + 1;
-- locale = (char *) malloc (len);
-- if (locale == NULL)
-- return NULL;
--
-- memcpy (locale, alias_value, len);
--#endif
-- }
--
-- /* Now we determine the single parts of the locale name. First
-- look for the language. Termination symbols are `_', '.', and `@'. */
-- mask = _nl_explode_name (locale, &language, &modifier, &territory,
-- &codeset, &normalized_codeset);
-- if (mask == -1)
-- /* This means we are out of core. */
-- return NULL;
--
-- /* We need to protect modifying the _NL_LOADED_DOMAINS data. */
-- gl_rwlock_wrlock (lock);
--
-- /* Create all possible locale entries which might be interested in
-- generalization. */
-- retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
-- strlen (dirname) + 1, mask, language, territory,
-- codeset, normalized_codeset, modifier,
-- domainname, 1);
--
-- gl_rwlock_unlock (lock);
--
-- if (retval == NULL)
-- /* This means we are out of core. */
-- goto out;
--
-- if (retval->decided <= 0)
-- _nl_load_domain (retval, domainbinding);
-- if (retval->data == NULL)
-- {
-- int cnt;
-- for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
-- {
-- if (retval->successor[cnt]->decided <= 0)
-- _nl_load_domain (retval->successor[cnt], domainbinding);
-- if (retval->successor[cnt]->data != NULL)
-- break;
-- }
-- }
--
-- /* The room for an alias was dynamically allocated. Free it now. */
-- if (alias_value != NULL)
-- free (locale);
--
--out:
-- /* The space for normalized_codeset is dynamically allocated. Free it. */
-- if (mask & XPG_NORM_CODESET)
-- free ((void *) normalized_codeset);
--
-- return retval;
--}
--
--
--#ifdef _LIBC
--/* This is called from iconv/gconv_db.c's free_mem, as locales must
-- be freed before freeing gconv steps arrays. */
--void __libc_freeres_fn_section
--_nl_finddomain_subfreeres ()
--{
-- struct loaded_l10nfile *runp = _nl_loaded_domains;
--
-- while (runp != NULL)
-- {
-- struct loaded_l10nfile *here = runp;
-- if (runp->data != NULL)
-- _nl_unload_domain ((struct loaded_domain *) runp->data);
-- runp = runp->next;
-- free ((char *) here->filename);
-- free (here);
-- }
--}
--#endif
---- a/intl/gettext.c
-+++ /dev/null
-@@ -1,63 +0,0 @@
--/* Implementation of gettext(3) function.
-- Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--#ifdef HAVE_CONFIG_H
--# include <config.h>
--#endif
--
--#ifdef _LIBC
--# define __need_NULL
--# include <stddef.h>
--#else
--# include <stdlib.h> /* Just for NULL. */
--#endif
--
--#include "gettextP.h"
--#ifdef _LIBC
--# include <libintl.h>
--#else
--# include "libgnuintl.h"
--#endif
--
--/* @@ end of prolog @@ */
--
--/* Names for the libintl functions are a problem. They must not clash
-- with existing names and they should follow ANSI C. But this source
-- code is also used in GNU C Library where the names have a __
-- prefix. So we have to make a difference here. */
--#ifdef _LIBC
--# define GETTEXT __gettext
--# define DCGETTEXT INTUSE(__dcgettext)
--#else
--# define GETTEXT libintl_gettext
--# define DCGETTEXT libintl_dcgettext
--#endif
--
--/* Look up MSGID in the current default message catalog for the current
-- LC_MESSAGES locale. If not found, returns MSGID itself (the default
-- text). */
--char *
--GETTEXT (const char *msgid)
--{
-- return DCGETTEXT (NULL, msgid, LC_MESSAGES);
--}
--
--#ifdef _LIBC
--/* Alias for function name in GNU C Library. */
--weak_alias (__gettext, gettext);
--#endif
---- a/intl/gettextP.h
-+++ /dev/null
-@@ -1,297 +0,0 @@
--/* Header describing internals of libintl library.
-- Copyright (C) 1995-1999, 2000-2007 Free Software Foundation, Inc.
-- Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--#ifndef _GETTEXTP_H
--#define _GETTEXTP_H
--
--#include <stddef.h> /* Get size_t. */
--
--#ifdef _LIBC
--# include "../iconv/gconv_int.h"
--#else
--# if HAVE_ICONV
--# include <iconv.h>
--# endif
--#endif
--
--/* Handle multi-threaded applications. */
--#ifdef _LIBC
--# include <bits/libc-lock.h>
--# define gl_rwlock_define __libc_rwlock_define
--#else
--# include "lock.h"
--#endif
--
--#ifdef _LIBC
--extern char *__gettext (const char *__msgid);
--extern char *__dgettext (const char *__domainname, const char *__msgid);
--extern char *__dcgettext (const char *__domainname, const char *__msgid,
-- int __category);
--extern char *__ngettext (const char *__msgid1, const char *__msgid2,
-- unsigned long int __n);
--extern char *__dngettext (const char *__domainname,
-- const char *__msgid1, const char *__msgid2,
-- unsigned long int n);
--extern char *__dcngettext (const char *__domainname,
-- const char *__msgid1, const char *__msgid2,
-- unsigned long int __n, int __category);
--extern char *__dcigettext (const char *__domainname,
-- const char *__msgid1, const char *__msgid2,
-- int __plural, unsigned long int __n,
-- int __category);
--extern char *__textdomain (const char *__domainname);
--extern char *__bindtextdomain (const char *__domainname,
-- const char *__dirname);
--extern char *__bind_textdomain_codeset (const char *__domainname,
-- const char *__codeset);
--extern void _nl_finddomain_subfreeres (void) attribute_hidden;
--extern void _nl_unload_domain (struct loaded_domain *__domain)
-- internal_function attribute_hidden;
--#else
--/* Declare the exported libintl_* functions, in a way that allows us to
-- call them under their real name. */
--# undef _INTL_REDIRECT_INLINE
--# undef _INTL_REDIRECT_MACROS
--# define _INTL_REDIRECT_MACROS
--# include "libgnuintl.h"
--# ifdef IN_LIBGLOCALE
--extern char *gl_dcigettext (const char *__domainname,
-- const char *__msgid1, const char *__msgid2,
-- int __plural, unsigned long int __n,
-- int __category,
-- const char *__localename, const char *__encoding);
--# else
--extern char *libintl_dcigettext (const char *__domainname,
-- const char *__msgid1, const char *__msgid2,
-- int __plural, unsigned long int __n,
-- int __category);
--# endif
--#endif
--
--#include "loadinfo.h"
--
--#include "gmo.h" /* Get nls_uint32. */
--
--/* @@ end of prolog @@ */
--
--#ifndef internal_function
--# define internal_function
--#endif
--
--#ifndef attribute_hidden
--# define attribute_hidden
--#endif
--
--/* Tell the compiler when a conditional or integer expression is
-- almost always true or almost always false. */
--#ifndef HAVE_BUILTIN_EXPECT
--# define __builtin_expect(expr, val) (expr)
--#endif
--
--#ifndef W
--# define W(flag, data) ((flag) ? SWAP (data) : (data))
--#endif
--
--
--#ifdef _LIBC
--# include <byteswap.h>
--# define SWAP(i) bswap_32 (i)
--#else
--static inline nls_uint32
--# ifdef __cplusplus
--SWAP (nls_uint32 i)
--# else
--SWAP (i)
-- nls_uint32 i;
--# endif
--{
-- return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
--}
--#endif
--
--
--/* In-memory representation of system dependent string. */
--struct sysdep_string_desc
--{
-- /* Length of addressed string, including the trailing NUL. */
-- size_t length;
-- /* Pointer to addressed string. */
-- const char *pointer;
--};
--
--/* Cache of translated strings after charset conversion.
-- Note: The strings are converted to the target encoding only on an as-needed
-- basis. */
--struct converted_domain
--{
-- /* The target encoding name. */
-- const char *encoding;
-- /* The descriptor for conversion from the message catalog's encoding to
-- this target encoding. */
--#ifdef _LIBC
-- __gconv_t conv;
--#else
--# if HAVE_ICONV
-- iconv_t conv;
--# endif
--#endif
-- /* The table of translated strings after charset conversion. */
-- char **conv_tab;
--};
--
--/* The representation of an opened message catalog. */
--struct loaded_domain
--{
-- /* Pointer to memory containing the .mo file. */
-- const char *data;
-- /* 1 if the memory is mmap()ed, 0 if the memory is malloc()ed. */
-- int use_mmap;
-- /* Size of mmap()ed memory. */
-- size_t mmap_size;
-- /* 1 if the .mo file uses a different endianness than this machine. */
-- int must_swap;
-- /* Pointer to additional malloc()ed memory. */
-- void *malloced;
--
-- /* Number of static strings pairs. */
-- nls_uint32 nstrings;
-- /* Pointer to descriptors of original strings in the file. */
-- const struct string_desc *orig_tab;
-- /* Pointer to descriptors of translated strings in the file. */
-- const struct string_desc *trans_tab;
--
-- /* Number of system dependent strings pairs. */
-- nls_uint32 n_sysdep_strings;
-- /* Pointer to descriptors of original sysdep strings. */
-- const struct sysdep_string_desc *orig_sysdep_tab;
-- /* Pointer to descriptors of translated sysdep strings. */
-- const struct sysdep_string_desc *trans_sysdep_tab;
--
-- /* Size of hash table. */
-- nls_uint32 hash_size;
-- /* Pointer to hash table. */
-- const nls_uint32 *hash_tab;
-- /* 1 if the hash table uses a different endianness than this machine. */
-- int must_swap_hash_tab;
--
-- /* Cache of charset conversions of the translated strings. */
-- struct converted_domain *conversions;
-- size_t nconversions;
-- gl_rwlock_define (, conversions_lock)
--
-- const struct expression *plural;
-- unsigned long int nplurals;
--};
--
--/* We want to allocate a string at the end of the struct. But ISO C
-- doesn't allow zero sized arrays. */
--#ifdef __GNUC__
--# define ZERO 0
--#else
--# define ZERO 1
--#endif
--
--/* A set of settings bound to a message domain. Used to store settings
-- from bindtextdomain() and bind_textdomain_codeset(). */
--struct binding
--{
-- struct binding *next;
-- char *dirname;
-- char *codeset;
-- char domainname[ZERO];
--};
--
--/* A counter which is incremented each time some previous translations
-- become invalid.
-- This variable is part of the external ABI of the GNU libintl. */
--#ifdef IN_LIBGLOCALE
--# include <glocale/config.h>
--extern LIBGLOCALE_DLL_EXPORTED int _nl_msg_cat_cntr;
--#else
--extern LIBINTL_DLL_EXPORTED int _nl_msg_cat_cntr;
--#endif
--
--#ifndef _LIBC
--extern const char *_nl_language_preferences_default (void);
--# define gl_locale_name_canonicalize _nl_locale_name_canonicalize
--extern void _nl_locale_name_canonicalize (char *name);
--# define gl_locale_name_posix _nl_locale_name_posix
--extern const char *_nl_locale_name_posix (int category,
-- const char *categoryname);
--# define gl_locale_name_default _nl_locale_name_default
--extern const char *_nl_locale_name_default (void);
--# define gl_locale_name _nl_locale_name
--extern const char *_nl_locale_name (int category, const char *categoryname);
--#endif
--
--struct loaded_l10nfile *_nl_find_domain (const char *__dirname, char *__locale,
-- const char *__domainname,
-- struct binding *__domainbinding)
-- internal_function;
--void _nl_load_domain (struct loaded_l10nfile *__domain,
-- struct binding *__domainbinding)
-- internal_function;
--
--#ifdef IN_LIBGLOCALE
--char *_nl_find_msg (struct loaded_l10nfile *domain_file,
-- struct binding *domainbinding, const char *encoding,
-- const char *msgid,
-- size_t *lengthp)
-- internal_function;
--#else
--char *_nl_find_msg (struct loaded_l10nfile *domain_file,
-- struct binding *domainbinding, const char *msgid,
-- int convert, size_t *lengthp)
-- internal_function;
--#endif
--
--/* The internal variables in the standalone libintl.a must have different
-- names than the internal variables in GNU libc, otherwise programs
-- using libintl.a cannot be linked statically. */
--#if !defined _LIBC
--# define _nl_default_dirname libintl_nl_default_dirname
--# define _nl_domain_bindings libintl_nl_domain_bindings
--#endif
--
--/* Contains the default location of the message catalogs. */
--extern const char _nl_default_dirname[];
--#ifdef _LIBC
--libc_hidden_proto (_nl_default_dirname)
--#endif
--
--/* List with bindings of specific domains. */
--extern struct binding *_nl_domain_bindings;
--
--/* The internal variables in the standalone libintl.a must have different
-- names than the internal variables in GNU libc, otherwise programs
-- using libintl.a cannot be linked statically. */
--#if !defined _LIBC
--# define _nl_default_default_domain libintl_nl_default_default_domain
--# define _nl_current_default_domain libintl_nl_current_default_domain
--#endif
--
--/* Name of the default text domain. */
--extern const char _nl_default_default_domain[] attribute_hidden;
--
--/* Default text domain in which entries for gettext(3) are to be found. */
--extern const char *_nl_current_default_domain attribute_hidden;
--
--/* @@ begin of epilog @@ */
--
--#endif /* gettextP.h */
---- a/intl/gmo.h
-+++ /dev/null
-@@ -1,152 +0,0 @@
--/* Description of GNU message catalog format: general file layout.
-- Copyright (C) 1995, 1997, 2000-2002, 2004, 2006 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--#ifndef _GETTEXT_H
--#define _GETTEXT_H 1
--
--#include <limits.h>
--
--/* @@ end of prolog @@ */
--
--/* The magic number of the GNU message catalog format. */
--#define _MAGIC 0x950412de
--#define _MAGIC_SWAPPED 0xde120495
--
--/* Revision number of the currently used .mo (binary) file format. */
--#define MO_REVISION_NUMBER 0
--#define MO_REVISION_NUMBER_WITH_SYSDEP_I 1
--
--/* The following contortions are an attempt to use the C preprocessor
-- to determine an unsigned integral type that is 32 bits wide. An
-- alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
-- as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work
-- when cross-compiling. */
--
--#if __STDC__
--# define UINT_MAX_32_BITS 4294967295U
--#else
--# define UINT_MAX_32_BITS 0xFFFFFFFF
--#endif
--
--/* If UINT_MAX isn't defined, assume it's a 32-bit type.
-- This should be valid for all systems GNU cares about because
-- that doesn't include 16-bit systems, and only modern systems
-- (that certainly have <limits.h>) have 64+-bit integral types. */
--
--#ifndef UINT_MAX
--# define UINT_MAX UINT_MAX_32_BITS
--#endif
--
--#if UINT_MAX == UINT_MAX_32_BITS
--typedef unsigned nls_uint32;
--#else
--# if USHRT_MAX == UINT_MAX_32_BITS
--typedef unsigned short nls_uint32;
--# else
--# if ULONG_MAX == UINT_MAX_32_BITS
--typedef unsigned long nls_uint32;
--# else
-- /* The following line is intended to throw an error. Using #error is
-- not portable enough. */
-- "Cannot determine unsigned 32-bit data type."
--# endif
--# endif
--#endif
--
--
--/* Header for binary .mo file format. */
--struct mo_file_header
--{
-- /* The magic number. */
-- nls_uint32 magic;
-- /* The revision number of the file format. */
-- nls_uint32 revision;
--
-- /* The following are only used in .mo files with major revision 0 or 1. */
--
-- /* The number of strings pairs. */
-- nls_uint32 nstrings;
-- /* Offset of table with start offsets of original strings. */
-- nls_uint32 orig_tab_offset;
-- /* Offset of table with start offsets of translated strings. */
-- nls_uint32 trans_tab_offset;
-- /* Size of hash table. */
-- nls_uint32 hash_tab_size;
-- /* Offset of first hash table entry. */
-- nls_uint32 hash_tab_offset;
--
-- /* The following are only used in .mo files with minor revision >= 1. */
--
-- /* The number of system dependent segments. */
-- nls_uint32 n_sysdep_segments;
-- /* Offset of table describing system dependent segments. */
-- nls_uint32 sysdep_segments_offset;
-- /* The number of system dependent strings pairs. */
-- nls_uint32 n_sysdep_strings;
-- /* Offset of table with start offsets of original sysdep strings. */
-- nls_uint32 orig_sysdep_tab_offset;
-- /* Offset of table with start offsets of translated sysdep strings. */
-- nls_uint32 trans_sysdep_tab_offset;
--};
--
--/* Descriptor for static string contained in the binary .mo file. */
--struct string_desc
--{
-- /* Length of addressed string, not including the trailing NUL. */
-- nls_uint32 length;
-- /* Offset of string in file. */
-- nls_uint32 offset;
--};
--
--/* The following are only used in .mo files with minor revision >= 1. */
--
--/* Descriptor for system dependent string segment. */
--struct sysdep_segment
--{
-- /* Length of addressed string, including the trailing NUL. */
-- nls_uint32 length;
-- /* Offset of string in file. */
-- nls_uint32 offset;
--};
--
--/* Pair of a static and a system dependent segment, in struct sysdep_string. */
--struct segment_pair
--{
-- /* Size of static segment. */
-- nls_uint32 segsize;
-- /* Reference to system dependent string segment, or ~0 at the end. */
-- nls_uint32 sysdepref;
--};
--
--/* Descriptor for system dependent string. */
--struct sysdep_string
--{
-- /* Offset of static string segments in file. */
-- nls_uint32 offset;
-- /* Alternating sequence of static and system dependent segments.
-- The last segment is a static segment, including the trailing NUL. */
-- struct segment_pair segments[1];
--};
--
--/* Marker for the end of the segments[] array. This has the value 0xFFFFFFFF,
-- regardless whether 'int' is 16 bit, 32 bit, or 64 bit. */
--#define SEGMENTS_END ((nls_uint32) ~0)
--
--/* @@ begin of epilog @@ */
--
--#endif /* gettext.h */
---- a/intl/hash-string.c
-+++ /dev/null
-@@ -1,51 +0,0 @@
--/* Implements a string hashing function.
-- Copyright (C) 1995, 1997, 1998, 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, write to the Free
-- Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-- Boston, MA 02110-1301, USA. */
--
--#ifdef HAVE_CONFIG_H
--# include <config.h>
--#endif
--
--/* Specification. */
--#include "hash-string.h"
--
--
--/* Defines the so called `hashpjw' function by P.J. Weinberger
-- [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
-- 1986, 1987 Bell Telephone Laboratories, Inc.] */
--unsigned long int
--__hash_string (const char *str_param)
--{
-- unsigned long int hval, g;
-- const char *str = str_param;
--
-- /* Compute the hash value for the given string. */
-- hval = 0;
-- while (*str != '\0')
-- {
-- hval <<= 4;
-- hval += (unsigned char) *str++;
-- g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4));
-- if (g != 0)
-- {
-- hval ^= g >> (HASHWORDBITS - 8);
-- hval ^= g;
-- }
-- }
-- return hval;
--}
---- a/intl/hash-string.h
-+++ /dev/null
-@@ -1,36 +0,0 @@
--/* Description of GNU message catalog format: string hashing function.
-- Copyright (C) 1995, 1997-1998, 2000-2003, 2005 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--/* @@ end of prolog @@ */
--
--/* We assume to have `unsigned long int' value with at least 32 bits. */
--#define HASHWORDBITS 32
--
--
--#ifndef _LIBC
--# ifdef IN_LIBINTL
--# define __hash_string libintl_hash_string
--# else
--# define __hash_string hash_string
--# endif
--#endif
--
--/* Defines the so called `hashpjw' function by P.J. Weinberger
-- [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
-- 1986, 1987 Bell Telephone Laboratories, Inc.] */
--extern unsigned long int __hash_string (const char *str_param);
---- a/intl/intl-compat.c
-+++ /dev/null
-@@ -1,133 +0,0 @@
--/* intl-compat.c - Stub functions to call gettext functions from GNU gettext
-- Library.
-- Copyright (C) 1995, 2000-2003, 2005 Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--#ifdef HAVE_CONFIG_H
--# include <config.h>
--#endif
--
--#include "gettextP.h"
--
--/* @@ end of prolog @@ */
--
--/* This file redirects the gettext functions (without prefix) to those
-- defined in the included GNU libintl library (with "libintl_" prefix).
-- It is compiled into libintl in order to make the AM_GNU_GETTEXT test
-- of gettext <= 0.11.2 work with the libintl library >= 0.11.3 which
-- has the redirections primarily in the <libintl.h> include file.
-- It is also compiled into libgnuintl so that libgnuintl.so can be used
-- as LD_PRELOADable library on glibc systems, to provide the extra
-- features that the functions in the libc don't have (namely, logging). */
--
--
--#undef gettext
--#undef dgettext
--#undef dcgettext
--#undef ngettext
--#undef dngettext
--#undef dcngettext
--#undef textdomain
--#undef bindtextdomain
--#undef bind_textdomain_codeset
--
--
--/* When building a DLL, we must export some functions. Note that because
-- the functions are only defined for binary backward compatibility, we
-- don't need to use __declspec(dllimport) in any case. */
--#if HAVE_VISIBILITY && BUILDING_DLL
--# define DLL_EXPORTED __attribute__((__visibility__("default")))
--#elif defined _MSC_VER && BUILDING_DLL
--# define DLL_EXPORTED __declspec(dllexport)
--#else
--# define DLL_EXPORTED
--#endif
--
--
--DLL_EXPORTED
--char *
--gettext (const char *msgid)
--{
-- return libintl_gettext (msgid);
--}
--
--
--DLL_EXPORTED
--char *
--dgettext (const char *domainname, const char *msgid)
--{
-- return libintl_dgettext (domainname, msgid);
--}
--
--
--DLL_EXPORTED
--char *
--dcgettext (const char *domainname, const char *msgid, int category)
--{
-- return libintl_dcgettext (domainname, msgid, category);
--}
--
--
--DLL_EXPORTED
--char *
--ngettext (const char *msgid1, const char *msgid2, unsigned long int n)
--{
-- return libintl_ngettext (msgid1, msgid2, n);
--}
--
--
--DLL_EXPORTED
--char *
--dngettext (const char *domainname,
-- const char *msgid1, const char *msgid2, unsigned long int n)
--{
-- return libintl_dngettext (domainname, msgid1, msgid2, n);
--}
--
--
--DLL_EXPORTED
--char *
--dcngettext (const char *domainname,
-- const char *msgid1, const char *msgid2, unsigned long int n,
-- int category)
--{
-- return libintl_dcngettext (domainname, msgid1, msgid2, n, category);
--}
--
--
--DLL_EXPORTED
--char *
--textdomain (const char *domainname)
--{
-- return libintl_textdomain (domainname);
--}
--
--
--DLL_EXPORTED
--char *
--bindtextdomain (const char *domainname, const char *dirname)
--{
-- return libintl_bindtextdomain (domainname, dirname);
--}
--
--
--DLL_EXPORTED
--char *
--bind_textdomain_codeset (const char *domainname, const char *codeset)
--{
-- return libintl_bind_textdomain_codeset (domainname, codeset);
--}
---- a/intl/intl-exports.c
-+++ /dev/null
-@@ -1,36 +0,0 @@
--/* List of exported symbols of libintl on Cygwin.
-- Copyright (C) 2006 Free Software Foundation, Inc.
-- Written by Bruno Haible <bruno@clisp.org>, 2006.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
-- /* IMP(x) is a symbol that contains the address of x. */
--#define IMP(x) _imp__##x
--
-- /* Ensure that the variable x is exported from the library, and that a
-- pseudo-variable IMP(x) is available. */
--#define VARIABLE(x) \
-- /* Export x without redefining x. This code was found by compiling a \
-- snippet: \
-- extern __declspec(dllexport) int x; int x = 42; */ \
-- asm (".section .drectve\n"); \
-- asm (".ascii \" -export:" #x ",data\"\n"); \
-- asm (".data\n"); \
-- /* Allocate a pseudo-variable IMP(x). */ \
-- extern int x; \
-- void * IMP(x) = &x;
--
--VARIABLE(libintl_version)
---- a/intl/l10nflist.c
-+++ /dev/null
-@@ -1,400 +0,0 @@
--/* Copyright (C) 1995-1999, 2000-2006 Free Software Foundation, Inc.
-- Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--/* Tell glibc's <string.h> to provide a prototype for stpcpy().
-- This must come before <config.h> because <config.h> may include
-- <features.h>, and once <features.h> has been included, it's too late. */
--#ifndef _GNU_SOURCE
--# define _GNU_SOURCE 1
--#endif
--
--#ifdef HAVE_CONFIG_H
--# include <config.h>
--#endif
--
--#include <string.h>
--
--#if defined _LIBC || defined HAVE_ARGZ_H
--# include <argz.h>
--#endif
--#include <ctype.h>
--#include <sys/types.h>
--#include <stdlib.h>
--
--#include "loadinfo.h"
--
--/* On some strange systems still no definition of NULL is found. Sigh! */
--#ifndef NULL
--# if defined __STDC__ && __STDC__
--# define NULL ((void *) 0)
--# else
--# define NULL 0
--# endif
--#endif
--
--/* @@ end of prolog @@ */
--
--#ifdef _LIBC
--/* Rename the non ANSI C functions. This is required by the standard
-- because some ANSI C functions will require linking with this object
-- file and the name space must not be polluted. */
--# ifndef stpcpy
--# define stpcpy(dest, src) __stpcpy(dest, src)
--# endif
--#else
--# ifndef HAVE_STPCPY
--static char *stpcpy (char *dest, const char *src);
--# endif
--#endif
--
--/* Pathname support.
-- ISSLASH(C) tests whether C is a directory separator character.
-- IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not,
-- it may be concatenated to a directory pathname.
-- */
--#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
-- /* Win32, Cygwin, OS/2, DOS */
--# define ISSLASH(C) ((C) == '/' || (C) == '\\')
--# define HAS_DEVICE(P) \
-- ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
-- && (P)[1] == ':')
--# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
--#else
-- /* Unix */
--# define ISSLASH(C) ((C) == '/')
--# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
--#endif
--
--/* Define function which are usually not available. */
--
--#ifdef _LIBC
--# define __argz_count(argz, len) INTUSE(__argz_count) (argz, len)
--#elif defined HAVE_ARGZ_COUNT
--# undef __argz_count
--# define __argz_count argz_count
--#else
--/* Returns the number of strings in ARGZ. */
--static size_t
--argz_count__ (const char *argz, size_t len)
--{
-- size_t count = 0;
-- while (len > 0)
-- {
-- size_t part_len = strlen (argz);
-- argz += part_len + 1;
-- len -= part_len + 1;
-- count++;
-- }
-- return count;
--}
--# undef __argz_count
--# define __argz_count(argz, len) argz_count__ (argz, len)
--#endif /* !_LIBC && !HAVE_ARGZ_COUNT */
--
--#ifdef _LIBC
--# define __argz_stringify(argz, len, sep) \
-- INTUSE(__argz_stringify) (argz, len, sep)
--#elif defined HAVE_ARGZ_STRINGIFY
--# undef __argz_stringify
--# define __argz_stringify argz_stringify
--#else
--/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
-- except the last into the character SEP. */
--static void
--argz_stringify__ (char *argz, size_t len, int sep)
--{
-- while (len > 0)
-- {
-- size_t part_len = strlen (argz);
-- argz += part_len;
-- len -= part_len + 1;
-- if (len > 0)
-- *argz++ = sep;
-- }
--}
--# undef __argz_stringify
--# define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep)
--#endif /* !_LIBC && !HAVE_ARGZ_STRINGIFY */
--
--#ifdef _LIBC
--#elif defined HAVE_ARGZ_NEXT
--# undef __argz_next
--# define __argz_next argz_next
--#else
--static char *
--argz_next__ (char *argz, size_t argz_len, const char *entry)
--{
-- if (entry)
-- {
-- if (entry < argz + argz_len)
-- entry = strchr (entry, '\0') + 1;
--
-- return entry >= argz + argz_len ? NULL : (char *) entry;
-- }
-- else
-- if (argz_len > 0)
-- return argz;
-- else
-- return 0;
--}
--# undef __argz_next
--# define __argz_next(argz, len, entry) argz_next__ (argz, len, entry)
--#endif /* !_LIBC && !HAVE_ARGZ_NEXT */
--
--
--/* Return number of bits set in X. */
--static inline int
--pop (int x)
--{
-- /* We assume that no more than 16 bits are used. */
-- x = ((x & ~0x5555) >> 1) + (x & 0x5555);
-- x = ((x & ~0x3333) >> 2) + (x & 0x3333);
-- x = ((x >> 4) + x) & 0x0f0f;
-- x = ((x >> 8) + x) & 0xff;
--
-- return x;
--}
--
--
--struct loaded_l10nfile *
--_nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list,
-- const char *dirlist, size_t dirlist_len,
-- int mask, const char *language, const char *territory,
-- const char *codeset, const char *normalized_codeset,
-- const char *modifier,
-- const char *filename, int do_allocate)
--{
-- char *abs_filename;
-- struct loaded_l10nfile **lastp;
-- struct loaded_l10nfile *retval;
-- char *cp;
-- size_t dirlist_count;
-- size_t entries;
-- int cnt;
--
-- /* If LANGUAGE contains an absolute directory specification, we ignore
-- DIRLIST. */
-- if (IS_ABSOLUTE_PATH (language))
-- dirlist_len = 0;
--
-- /* Allocate room for the full file name. */
-- abs_filename = (char *) malloc (dirlist_len
-- + strlen (language)
-- + ((mask & XPG_TERRITORY) != 0
-- ? strlen (territory) + 1 : 0)
-- + ((mask & XPG_CODESET) != 0
-- ? strlen (codeset) + 1 : 0)
-- + ((mask & XPG_NORM_CODESET) != 0
-- ? strlen (normalized_codeset) + 1 : 0)
-- + ((mask & XPG_MODIFIER) != 0
-- ? strlen (modifier) + 1 : 0)
-- + 1 + strlen (filename) + 1);
--
-- if (abs_filename == NULL)
-- return NULL;
--
-- /* Construct file name. */
-- cp = abs_filename;
-- if (dirlist_len > 0)
-- {
-- memcpy (cp, dirlist, dirlist_len);
-- __argz_stringify (cp, dirlist_len, PATH_SEPARATOR);
-- cp += dirlist_len;
-- cp[-1] = '/';
-- }
--
-- cp = stpcpy (cp, language);
--
-- if ((mask & XPG_TERRITORY) != 0)
-- {
-- *cp++ = '_';
-- cp = stpcpy (cp, territory);
-- }
-- if ((mask & XPG_CODESET) != 0)
-- {
-- *cp++ = '.';
-- cp = stpcpy (cp, codeset);
-- }
-- if ((mask & XPG_NORM_CODESET) != 0)
-- {
-- *cp++ = '.';
-- cp = stpcpy (cp, normalized_codeset);
-- }
-- if ((mask & XPG_MODIFIER) != 0)
-- {
-- *cp++ = '@';
-- cp = stpcpy (cp, modifier);
-- }
--
-- *cp++ = '/';
-- stpcpy (cp, filename);
--
-- /* Look in list of already loaded domains whether it is already
-- available. */
-- lastp = l10nfile_list;
-- for (retval = *l10nfile_list; retval != NULL; retval = retval->next)
-- if (retval->filename != NULL)
-- {
-- int compare = strcmp (retval->filename, abs_filename);
-- if (compare == 0)
-- /* We found it! */
-- break;
-- if (compare < 0)
-- {
-- /* It's not in the list. */
-- retval = NULL;
-- break;
-- }
--
-- lastp = &retval->next;
-- }
--
-- if (retval != NULL || do_allocate == 0)
-- {
-- free (abs_filename);
-- return retval;
-- }
--
-- dirlist_count = (dirlist_len > 0 ? __argz_count (dirlist, dirlist_len) : 1);
--
-- /* Allocate a new loaded_l10nfile. */
-- retval =
-- (struct loaded_l10nfile *)
-- malloc (sizeof (*retval)
-- + (((dirlist_count << pop (mask)) + (dirlist_count > 1 ? 1 : 0))
-- * sizeof (struct loaded_l10nfile *)));
-- if (retval == NULL)
-- {
-- free (abs_filename);
-- return NULL;
-- }
--
-- retval->filename = abs_filename;
--
-- /* We set retval->data to NULL here; it is filled in later.
-- Setting retval->decided to 1 here means that retval does not
-- correspond to a real file (dirlist_count > 1) or is not worth
-- looking up (if an unnormalized codeset was specified). */
-- retval->decided = (dirlist_count > 1
-- || ((mask & XPG_CODESET) != 0
-- && (mask & XPG_NORM_CODESET) != 0));
-- retval->data = NULL;
--
-- retval->next = *lastp;
-- *lastp = retval;
--
-- entries = 0;
-- /* Recurse to fill the inheritance list of RETVAL.
-- If the DIRLIST is a real list (i.e. DIRLIST_COUNT > 1), the RETVAL
-- entry does not correspond to a real file; retval->filename contains
-- colons. In this case we loop across all elements of DIRLIST and
-- across all bit patterns dominated by MASK.
-- If the DIRLIST is a single directory or entirely redundant (i.e.
-- DIRLIST_COUNT == 1), we loop across all bit patterns dominated by
-- MASK, excluding MASK itself.
-- In either case, we loop down from MASK to 0. This has the effect
-- that the extra bits in the locale name are dropped in this order:
-- first the modifier, then the territory, then the codeset, then the
-- normalized_codeset. */
-- for (cnt = dirlist_count > 1 ? mask : mask - 1; cnt >= 0; --cnt)
-- if ((cnt & ~mask) == 0
-- && !((cnt & XPG_CODESET) != 0 && (cnt & XPG_NORM_CODESET) != 0))
-- {
-- if (dirlist_count > 1)
-- {
-- /* Iterate over all elements of the DIRLIST. */
-- char *dir = NULL;
--
-- while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
-- != NULL)
-- retval->successor[entries++]
-- = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1,
-- cnt, language, territory, codeset,
-- normalized_codeset, modifier, filename,
-- 1);
-- }
-- else
-- retval->successor[entries++]
-- = _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len,
-- cnt, language, territory, codeset,
-- normalized_codeset, modifier, filename, 1);
-- }
-- retval->successor[entries] = NULL;
--
-- return retval;
--}
--
--/* Normalize codeset name. There is no standard for the codeset
-- names. Normalization allows the user to use any of the common
-- names. The return value is dynamically allocated and has to be
-- freed by the caller. */
--const char *
--_nl_normalize_codeset (const char *codeset, size_t name_len)
--{
-- int len = 0;
-- int only_digit = 1;
-- char *retval;
-- char *wp;
-- size_t cnt;
--
-- for (cnt = 0; cnt < name_len; ++cnt)
-- if (isalnum ((unsigned char) codeset[cnt]))
-- {
-- ++len;
--
-- if (isalpha ((unsigned char) codeset[cnt]))
-- only_digit = 0;
-- }
--
-- retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1);
--
-- if (retval != NULL)
-- {
-- if (only_digit)
-- wp = stpcpy (retval, "iso");
-- else
-- wp = retval;
--
-- for (cnt = 0; cnt < name_len; ++cnt)
-- if (isalpha ((unsigned char) codeset[cnt]))
-- *wp++ = tolower ((unsigned char) codeset[cnt]);
-- else if (isdigit ((unsigned char) codeset[cnt]))
-- *wp++ = codeset[cnt];
--
-- *wp = '\0';
-- }
--
-- return (const char *) retval;
--}
--
--
--/* @@ begin of epilog @@ */
--
--/* We don't want libintl.a to depend on any other library. So we
-- avoid the non-standard function stpcpy. In GNU C Library this
-- function is available, though. Also allow the symbol HAVE_STPCPY
-- to be defined. */
--#if !_LIBC && !HAVE_STPCPY
--static char *
--stpcpy (char *dest, const char *src)
--{
-- while ((*dest++ = *src++) != '\0')
-- /* Do nothing. */ ;
-- return dest - 1;
--}
--#endif
---- a/intl/langprefs.c
-+++ /dev/null
-@@ -1,130 +0,0 @@
--/* Determine the user's language preferences.
-- Copyright (C) 2004-2006 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--/* Written by Bruno Haible <bruno@clisp.org>. */
--
--#ifdef HAVE_CONFIG_H
--# include <config.h>
--#endif
--
--#include <stdlib.h>
--
--#if HAVE_CFPREFERENCESCOPYAPPVALUE
--# include <string.h>
--# include <CoreFoundation/CFPreferences.h>
--# include <CoreFoundation/CFPropertyList.h>
--# include <CoreFoundation/CFArray.h>
--# include <CoreFoundation/CFString.h>
--extern void _nl_locale_name_canonicalize (char *name);
--#endif
--
--/* Determine the user's language preferences, as a colon separated list of
-- locale names in XPG syntax
-- language[_territory][.codeset][@modifier]
-- The result must not be freed; it is statically allocated.
-- The LANGUAGE environment variable does not need to be considered; it is
-- already taken into account by the caller. */
--
--const char *
--_nl_language_preferences_default (void)
--{
--#if HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.2 or newer */
-- {
-- /* Cache the preferences list, since CoreFoundation calls are expensive. */
-- static const char *cached_languages;
-- static int cache_initialized;
--
-- if (!cache_initialized)
-- {
-- CFTypeRef preferences =
-- CFPreferencesCopyAppValue (CFSTR ("AppleLanguages"),
-- kCFPreferencesCurrentApplication);
-- if (preferences != NULL
-- && CFGetTypeID (preferences) == CFArrayGetTypeID ())
-- {
-- CFArrayRef prefArray = (CFArrayRef)preferences;
-- int n = CFArrayGetCount (prefArray);
-- char buf[256];
-- size_t size = 0;
-- int i;
--
-- for (i = 0; i < n; i++)
-- {
-- CFTypeRef element = CFArrayGetValueAtIndex (prefArray, i);
-- if (element != NULL
-- && CFGetTypeID (element) == CFStringGetTypeID ()
-- && CFStringGetCString ((CFStringRef)element,
-- buf, sizeof (buf),
-- kCFStringEncodingASCII))
-- {
-- _nl_locale_name_canonicalize (buf);
-- size += strlen (buf) + 1;
-- /* Most GNU programs use msgids in English and don't ship
-- an en.mo message catalog. Therefore when we see "en"
-- in the preferences list, arrange for gettext() to
-- return the msgid, and ignore all further elements of
-- the preferences list. */
-- if (strcmp (buf, "en") == 0)
-- break;
-- }
-- else
-- break;
-- }
-- if (size > 0)
-- {
-- char *languages = (char *) malloc (size);
--
-- if (languages != NULL)
-- {
-- char *p = languages;
--
-- for (i = 0; i < n; i++)
-- {
-- CFTypeRef element =
-- CFArrayGetValueAtIndex (prefArray, i);
-- if (element != NULL
-- && CFGetTypeID (element) == CFStringGetTypeID ()
-- && CFStringGetCString ((CFStringRef)element,
-- buf, sizeof (buf),
-- kCFStringEncodingASCII))
-- {
-- _nl_locale_name_canonicalize (buf);
-- strcpy (p, buf);
-- p += strlen (buf);
-- *p++ = ':';
-- if (strcmp (buf, "en") == 0)
-- break;
-- }
-- else
-- break;
-- }
-- *--p = '\0';
--
-- cached_languages = languages;
-- }
-- }
-- }
-- cache_initialized = 1;
-- }
-- if (cached_languages != NULL)
-- return cached_languages;
-- }
--#endif
--
-- return NULL;
--}
---- a/intl/libgnuintl.h.in
-+++ /dev/null
-@@ -1,419 +0,0 @@
--/* Message catalogs for internationalization.
-- Copyright (C) 1995-1997, 2000-2007 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--#ifndef _LIBINTL_H
--#define _LIBINTL_H 1
--
--#include <locale.h>
--
--/* The LC_MESSAGES locale category is the category used by the functions
-- gettext() and dgettext(). It is specified in POSIX, but not in ANSI C.
-- On systems that don't define it, use an arbitrary value instead.
-- On Solaris, <locale.h> defines __LOCALE_H (or _LOCALE_H in Solaris 2.5)
-- then includes <libintl.h> (i.e. this file!) and then only defines
-- LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES
-- in this case. */
--#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun))
--# define LC_MESSAGES 1729
--#endif
--
--/* We define an additional symbol to signal that we use the GNU
-- implementation of gettext. */
--#define __USE_GNU_GETTEXT 1
--
--/* Provide information about the supported file formats. Returns the
-- maximum minor revision number supported for a given major revision. */
--#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \
-- ((major) == 0 || (major) == 1 ? 1 : -1)
--
--/* Resolve a platform specific conflict on DJGPP. GNU gettext takes
-- precedence over _conio_gettext. */
--#ifdef __DJGPP__
--# undef gettext
--#endif
--
--#ifdef __cplusplus
--extern "C" {
--#endif
--
--
--/* Version number: (major<<16) + (minor<<8) + subminor */
--#define LIBINTL_VERSION 0x001100
--extern int libintl_version;
--
--
--/* We redirect the functions to those prefixed with "libintl_". This is
-- necessary, because some systems define gettext/textdomain/... in the C
-- library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer).
-- If we used the unprefixed names, there would be cases where the
-- definition in the C library would override the one in the libintl.so
-- shared library. Recall that on ELF systems, the symbols are looked
-- up in the following order:
-- 1. in the executable,
-- 2. in the shared libraries specified on the link command line, in order,
-- 3. in the dependencies of the shared libraries specified on the link
-- command line,
-- 4. in the dlopen()ed shared libraries, in the order in which they were
-- dlopen()ed.
-- The definition in the C library would override the one in libintl.so if
-- either
-- * -lc is given on the link command line and -lintl isn't, or
-- * -lc is given on the link command line before -lintl, or
-- * libintl.so is a dependency of a dlopen()ed shared library but not
-- linked to the executable at link time.
-- Since Solaris gettext() behaves differently than GNU gettext(), this
-- would be unacceptable.
--
-- The redirection happens by default through macros in C, so that &gettext
-- is independent of the compilation unit, but through inline functions in
-- C++, in order not to interfere with the name mangling of class fields or
-- class methods called 'gettext'. */
--
--/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS.
-- If he doesn't, we choose the method. A third possible method is
-- _INTL_REDIRECT_ASM, supported only by GCC. */
--#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
--# if __GNUC__ >= 2 && !(__APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus)
--# define _INTL_REDIRECT_ASM
--# else
--# ifdef __cplusplus
--# define _INTL_REDIRECT_INLINE
--# else
--# define _INTL_REDIRECT_MACROS
--# endif
--# endif
--#endif
--/* Auxiliary macros. */
--#ifdef _INTL_REDIRECT_ASM
--# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname))
--# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring
--# define _INTL_STRINGIFY(prefix) #prefix
--#else
--# define _INTL_ASM(cname)
--#endif
--
--/* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return
-- its n-th argument literally. This enables GCC to warn for example about
-- printf (gettext ("foo %y")). */
--#if __GNUC__ >= 3 && !(__APPLE_CC__ > 1 && defined __cplusplus)
--# define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n)))
--#else
--# define _INTL_MAY_RETURN_STRING_ARG(n)
--#endif
--
--/* Look up MSGID in the current default message catalog for the current
-- LC_MESSAGES locale. If not found, returns MSGID itself (the default
-- text). */
--#ifdef _INTL_REDIRECT_INLINE
--extern char *libintl_gettext (const char *__msgid)
-- _INTL_MAY_RETURN_STRING_ARG (1);
--static inline char *gettext (const char *__msgid)
--{
-- return libintl_gettext (__msgid);
--}
--#else
--#ifdef _INTL_REDIRECT_MACROS
--# define gettext libintl_gettext
--#endif
--extern char *gettext (const char *__msgid)
-- _INTL_ASM (libintl_gettext)
-- _INTL_MAY_RETURN_STRING_ARG (1);
--#endif
--
--/* Look up MSGID in the DOMAINNAME message catalog for the current
-- LC_MESSAGES locale. */
--#ifdef _INTL_REDIRECT_INLINE
--extern char *libintl_dgettext (const char *__domainname, const char *__msgid)
-- _INTL_MAY_RETURN_STRING_ARG (2);
--static inline char *dgettext (const char *__domainname, const char *__msgid)
--{
-- return libintl_dgettext (__domainname, __msgid);
--}
--#else
--#ifdef _INTL_REDIRECT_MACROS
--# define dgettext libintl_dgettext
--#endif
--extern char *dgettext (const char *__domainname, const char *__msgid)
-- _INTL_ASM (libintl_dgettext)
-- _INTL_MAY_RETURN_STRING_ARG (2);
--#endif
--
--/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
-- locale. */
--#ifdef _INTL_REDIRECT_INLINE
--extern char *libintl_dcgettext (const char *__domainname, const char *__msgid,
-- int __category)
-- _INTL_MAY_RETURN_STRING_ARG (2);
--static inline char *dcgettext (const char *__domainname, const char *__msgid,
-- int __category)
--{
-- return libintl_dcgettext (__domainname, __msgid, __category);
--}
--#else
--#ifdef _INTL_REDIRECT_MACROS
--# define dcgettext libintl_dcgettext
--#endif
--extern char *dcgettext (const char *__domainname, const char *__msgid,
-- int __category)
-- _INTL_ASM (libintl_dcgettext)
-- _INTL_MAY_RETURN_STRING_ARG (2);
--#endif
--
--
--/* Similar to `gettext' but select the plural form corresponding to the
-- number N. */
--#ifdef _INTL_REDIRECT_INLINE
--extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2,
-- unsigned long int __n)
-- _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2);
--static inline char *ngettext (const char *__msgid1, const char *__msgid2,
-- unsigned long int __n)
--{
-- return libintl_ngettext (__msgid1, __msgid2, __n);
--}
--#else
--#ifdef _INTL_REDIRECT_MACROS
--# define ngettext libintl_ngettext
--#endif
--extern char *ngettext (const char *__msgid1, const char *__msgid2,
-- unsigned long int __n)
-- _INTL_ASM (libintl_ngettext)
-- _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2);
--#endif
--
--/* Similar to `dgettext' but select the plural form corresponding to the
-- number N. */
--#ifdef _INTL_REDIRECT_INLINE
--extern char *libintl_dngettext (const char *__domainname, const char *__msgid1,
-- const char *__msgid2, unsigned long int __n)
-- _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
--static inline char *dngettext (const char *__domainname, const char *__msgid1,
-- const char *__msgid2, unsigned long int __n)
--{
-- return libintl_dngettext (__domainname, __msgid1, __msgid2, __n);
--}
--#else
--#ifdef _INTL_REDIRECT_MACROS
--# define dngettext libintl_dngettext
--#endif
--extern char *dngettext (const char *__domainname,
-- const char *__msgid1, const char *__msgid2,
-- unsigned long int __n)
-- _INTL_ASM (libintl_dngettext)
-- _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
--#endif
--
--/* Similar to `dcgettext' but select the plural form corresponding to the
-- number N. */
--#ifdef _INTL_REDIRECT_INLINE
--extern char *libintl_dcngettext (const char *__domainname,
-- const char *__msgid1, const char *__msgid2,
-- unsigned long int __n, int __category)
-- _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
--static inline char *dcngettext (const char *__domainname,
-- const char *__msgid1, const char *__msgid2,
-- unsigned long int __n, int __category)
--{
-- return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category);
--}
--#else
--#ifdef _INTL_REDIRECT_MACROS
--# define dcngettext libintl_dcngettext
--#endif
--extern char *dcngettext (const char *__domainname,
-- const char *__msgid1, const char *__msgid2,
-- unsigned long int __n, int __category)
-- _INTL_ASM (libintl_dcngettext)
-- _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
--#endif
--
--
--#ifndef IN_LIBGLOCALE
--
--/* Set the current default message catalog to DOMAINNAME.
-- If DOMAINNAME is null, return the current default.
-- If DOMAINNAME is "", reset to the default of "messages". */
--#ifdef _INTL_REDIRECT_INLINE
--extern char *libintl_textdomain (const char *__domainname);
--static inline char *textdomain (const char *__domainname)
--{
-- return libintl_textdomain (__domainname);
--}
--#else
--#ifdef _INTL_REDIRECT_MACROS
--# define textdomain libintl_textdomain
--#endif
--extern char *textdomain (const char *__domainname)
-- _INTL_ASM (libintl_textdomain);
--#endif
--
--/* Specify that the DOMAINNAME message catalog will be found
-- in DIRNAME rather than in the system locale data base. */
--#ifdef _INTL_REDIRECT_INLINE
--extern char *libintl_bindtextdomain (const char *__domainname,
-- const char *__dirname);
--static inline char *bindtextdomain (const char *__domainname,
-- const char *__dirname)
--{
-- return libintl_bindtextdomain (__domainname, __dirname);
--}
--#else
--#ifdef _INTL_REDIRECT_MACROS
--# define bindtextdomain libintl_bindtextdomain
--#endif
--extern char *bindtextdomain (const char *__domainname, const char *__dirname)
-- _INTL_ASM (libintl_bindtextdomain);
--#endif
--
--/* Specify the character encoding in which the messages from the
-- DOMAINNAME message catalog will be returned. */
--#ifdef _INTL_REDIRECT_INLINE
--extern char *libintl_bind_textdomain_codeset (const char *__domainname,
-- const char *__codeset);
--static inline char *bind_textdomain_codeset (const char *__domainname,
-- const char *__codeset)
--{
-- return libintl_bind_textdomain_codeset (__domainname, __codeset);
--}
--#else
--#ifdef _INTL_REDIRECT_MACROS
--# define bind_textdomain_codeset libintl_bind_textdomain_codeset
--#endif
--extern char *bind_textdomain_codeset (const char *__domainname,
-- const char *__codeset)
-- _INTL_ASM (libintl_bind_textdomain_codeset);
--#endif
--
--#endif /* IN_LIBGLOCALE */
--
--
--/* Support for format strings with positions in *printf(), following the
-- POSIX/XSI specification.
-- Note: These replacements for the *printf() functions are visible only
-- in source files that #include <libintl.h> or #include "gettext.h".
-- Packages that use *printf() in source files that don't refer to _()
-- or gettext() but for which the format string could be the return value
-- of _() or gettext() need to add this #include. Oh well. */
--
--#if !@HAVE_POSIX_PRINTF@
--
--#include <stdio.h>
--#include <stddef.h>
--
--/* Get va_list. */
--#if __STDC__ || defined __cplusplus || defined _MSC_VER
--# include <stdarg.h>
--#else
--# include <varargs.h>
--#endif
--
--#undef fprintf
--#define fprintf libintl_fprintf
--extern int fprintf (FILE *, const char *, ...);
--#undef vfprintf
--#define vfprintf libintl_vfprintf
--extern int vfprintf (FILE *, const char *, va_list);
--
--#undef printf
--#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__
--/* Don't break __attribute__((format(printf,M,N))).
-- This redefinition is only possible because the libc in NetBSD, Cygwin,
-- mingw does not have a function __printf__. */
--# define libintl_printf __printf__
--#endif
--#define printf libintl_printf
--extern int printf (const char *, ...);
--#undef vprintf
--#define vprintf libintl_vprintf
--extern int vprintf (const char *, va_list);
--
--#undef sprintf
--#define sprintf libintl_sprintf
--extern int sprintf (char *, const char *, ...);
--#undef vsprintf
--#define vsprintf libintl_vsprintf
--extern int vsprintf (char *, const char *, va_list);
--
--#if @HAVE_SNPRINTF@
--
--#undef snprintf
--#define snprintf libintl_snprintf
--extern int snprintf (char *, size_t, const char *, ...);
--#undef vsnprintf
--#define vsnprintf libintl_vsnprintf
--extern int vsnprintf (char *, size_t, const char *, va_list);
--
--#endif
--
--#if @HAVE_ASPRINTF@
--
--#undef asprintf
--#define asprintf libintl_asprintf
--extern int asprintf (char **, const char *, ...);
--#undef vasprintf
--#define vasprintf libintl_vasprintf
--extern int vasprintf (char **, const char *, va_list);
--
--#endif
--
--#if @HAVE_WPRINTF@
--
--#undef fwprintf
--#define fwprintf libintl_fwprintf
--extern int fwprintf (FILE *, const wchar_t *, ...);
--#undef vfwprintf
--#define vfwprintf libintl_vfwprintf
--extern int vfwprintf (FILE *, const wchar_t *, va_list);
--
--#undef wprintf
--#define wprintf libintl_wprintf
--extern int wprintf (const wchar_t *, ...);
--#undef vwprintf
--#define vwprintf libintl_vwprintf
--extern int vwprintf (const wchar_t *, va_list);
--
--#undef swprintf
--#define swprintf libintl_swprintf
--extern int swprintf (wchar_t *, size_t, const wchar_t *, ...);
--#undef vswprintf
--#define vswprintf libintl_vswprintf
--extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list);
--
--#endif
--
--#endif
--
--
--/* Support for relocatable packages. */
--
--/* Sets the original and the current installation prefix of the package.
-- Relocation simply replaces a pathname starting with the original prefix
-- by the corresponding pathname with the current prefix instead. Both
-- prefixes should be directory names without trailing slash (i.e. use ""
-- instead of "/"). */
--#define libintl_set_relocation_prefix libintl_set_relocation_prefix
--extern void
-- libintl_set_relocation_prefix (const char *orig_prefix,
-- const char *curr_prefix);
--
--
--#ifdef __cplusplus
--}
--#endif
--
--#endif /* libintl.h */
---- a/intl/libintl.rc
-+++ /dev/null
-@@ -1,38 +0,0 @@
--/* Resources for intl.dll */
--
--#include <winver.h>
--
--VS_VERSION_INFO VERSIONINFO
-- FILEVERSION PACKAGE_VERSION_MAJOR,PACKAGE_VERSION_MINOR,PACKAGE_VERSION_SUBMINOR,0
-- PRODUCTVERSION PACKAGE_VERSION_MAJOR,PACKAGE_VERSION_MINOR,PACKAGE_VERSION_SUBMINOR,0
-- FILEFLAGSMASK 0x3fL /* VS_FFI_FILEFLAGSMASK */
--#ifdef _DEBUG
-- FILEFLAGS 0x1L /* VS_FF_DEBUG */
--#else
-- FILEFLAGS 0x0L
--#endif
-- FILEOS 0x10004L /* VOS_DOS_WINDOWS32 */
-- FILETYPE 0x2L /* VFT_DLL */
-- FILESUBTYPE 0x0L /* VFT2_UNKNOWN */
--BEGIN
-- BLOCK "StringFileInfo"
-- BEGIN
-- BLOCK "04090000" /* Lang = US English, Charset = ASCII */
-- BEGIN
-- VALUE "Comments", "This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA\0"
-- VALUE "CompanyName", "Free Software Foundation\0"
-- VALUE "FileDescription", "LGPLed libintl for Windows NT/2000/XP/Vista and Windows 95/98/ME\0"
-- VALUE "FileVersion", PACKAGE_VERSION_STRING "\0"
-- VALUE "InternalName", "intl.dll\0"
-- VALUE "LegalCopyright", "Copyright (C) 1995-2007\0"
-- VALUE "LegalTrademarks", "\0"
-- VALUE "OriginalFilename", "intl.dll\0"
-- VALUE "ProductName", "libintl: accessing NLS message catalogs\0"
-- VALUE "ProductVersion", PACKAGE_VERSION_STRING "\0"
-- END
-- END
-- BLOCK "VarFileInfo"
-- BEGIN
-- VALUE "Translation", 0x0409, 0 /* US English, ASCII */
-- END
--END
---- a/intl/loadinfo.h
-+++ /dev/null
-@@ -1,132 +0,0 @@
--/* Copyright (C) 1996-1999, 2000-2003, 2005-2006 Free Software Foundation, Inc.
-- This file is part of the GNU C Library.
-- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--#ifndef _LOADINFO_H
--#define _LOADINFO_H 1
--
--/* Declarations of locale dependent catalog lookup functions.
-- Implemented in
--
-- localealias.c Possibly replace a locale name by another.
-- explodename.c Split a locale name into its various fields.
-- l10nflist.c Generate a list of filenames of possible message catalogs.
-- finddomain.c Find and open the relevant message catalogs.
--
-- The main function _nl_find_domain() in finddomain.c is declared
-- in gettextP.h.
-- */
--
--#ifndef internal_function
--# define internal_function
--#endif
--
--#ifndef LIBINTL_DLL_EXPORTED
--# define LIBINTL_DLL_EXPORTED
--#endif
--
--/* Tell the compiler when a conditional or integer expression is
-- almost always true or almost always false. */
--#ifndef HAVE_BUILTIN_EXPECT
--# define __builtin_expect(expr, val) (expr)
--#endif
--
--/* Separator in PATH like lists of pathnames. */
--#if ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __EMX__ || defined __DJGPP__
-- /* Win32, OS/2, DOS */
--# define PATH_SEPARATOR ';'
--#else
-- /* Unix */
--# define PATH_SEPARATOR ':'
--#endif
--
--/* Encoding of locale name parts. */
--#define XPG_NORM_CODESET 1
--#define XPG_CODESET 2
--#define XPG_TERRITORY 4
--#define XPG_MODIFIER 8
--
--
--struct loaded_l10nfile
--{
-- const char *filename;
-- int decided;
--
-- const void *data;
--
-- struct loaded_l10nfile *next;
-- struct loaded_l10nfile *successor[1];
--};
--
--
--/* Normalize codeset name. There is no standard for the codeset
-- names. Normalization allows the user to use any of the common
-- names. The return value is dynamically allocated and has to be
-- freed by the caller. */
--extern const char *_nl_normalize_codeset (const char *codeset,
-- size_t name_len);
--
--/* Lookup a locale dependent file.
-- *L10NFILE_LIST denotes a pool of lookup results of locale dependent
-- files of the same kind, sorted in decreasing order of ->filename.
-- DIRLIST and DIRLIST_LEN are an argz list of directories in which to
-- look, containing at least one directory (i.e. DIRLIST_LEN > 0).
-- MASK, LANGUAGE, TERRITORY, CODESET, NORMALIZED_CODESET, MODIFIER
-- are the pieces of the locale name, as produced by _nl_explode_name().
-- FILENAME is the filename suffix.
-- The return value is the lookup result, either found in *L10NFILE_LIST,
-- or - if DO_ALLOCATE is nonzero - freshly allocated, or possibly NULL.
-- If the return value is non-NULL, it is added to *L10NFILE_LIST, and
-- its ->next field denotes the chaining inside *L10NFILE_LIST, and
-- furthermore its ->successor[] field contains a list of other lookup
-- results from which this lookup result inherits. */
--extern struct loaded_l10nfile *
--_nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list,
-- const char *dirlist, size_t dirlist_len, int mask,
-- const char *language, const char *territory,
-- const char *codeset, const char *normalized_codeset,
-- const char *modifier,
-- const char *filename, int do_allocate);
--
--/* Lookup the real locale name for a locale alias NAME, or NULL if
-- NAME is not a locale alias (but possibly a real locale name).
-- The return value is statically allocated and must not be freed. */
--/* Part of the libintl ABI only for the sake of the gettext.m4 macro. */
--extern LIBINTL_DLL_EXPORTED const char *_nl_expand_alias (const char *name);
--
--/* Split a locale name NAME into its pieces: language, modifier,
-- territory, codeset.
-- NAME gets destructively modified: NUL bytes are inserted here and
-- there. *LANGUAGE gets assigned NAME. Each of *MODIFIER, *TERRITORY,
-- *CODESET gets assigned either a pointer into the old NAME string, or
-- NULL. *NORMALIZED_CODESET gets assigned the expanded *CODESET, if it
-- is different from *CODESET; this one is dynamically allocated and has
-- to be freed by the caller.
-- The return value is a bitmask, where each bit corresponds to one
-- filled-in value:
-- XPG_MODIFIER for *MODIFIER,
-- XPG_TERRITORY for *TERRITORY,
-- XPG_CODESET for *CODESET,
-- XPG_NORM_CODESET for *NORMALIZED_CODESET.
-- */
--extern int _nl_explode_name (char *name, const char **language,
-- const char **modifier, const char **territory,
-- const char **codeset,
-- const char **normalized_codeset);
--
--#endif /* loadinfo.h */
---- a/intl/loadmsgcat.c
-+++ /dev/null
-@@ -1,1336 +0,0 @@
--/* Load needed message catalogs.
-- Copyright (C) 1995-1999, 2000-2007 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--/* Tell glibc's <string.h> to provide a prototype for mempcpy().
-- This must come before <config.h> because <config.h> may include
-- <features.h>, and once <features.h> has been included, it's too late. */
--#ifndef _GNU_SOURCE
--# define _GNU_SOURCE 1
--#endif
--
--#ifdef HAVE_CONFIG_H
--# include <config.h>
--#endif
--
--#include <ctype.h>
--#include <errno.h>
--#include <fcntl.h>
--#include <sys/types.h>
--#include <sys/stat.h>
--
--#ifdef __GNUC__
--# undef alloca
--# define alloca __builtin_alloca
--# define HAVE_ALLOCA 1
--#else
--# ifdef _MSC_VER
--# include <malloc.h>
--# define alloca _alloca
--# else
--# if defined HAVE_ALLOCA_H || defined _LIBC
--# include <alloca.h>
--# else
--# ifdef _AIX
-- #pragma alloca
--# else
--# ifndef alloca
--char *alloca ();
--# endif
--# endif
--# endif
--# endif
--#endif
--
--#include <stdlib.h>
--#include <string.h>
--
--#if defined HAVE_UNISTD_H || defined _LIBC
--# include <unistd.h>
--#endif
--
--#ifdef _LIBC
--# include <langinfo.h>
--# include <locale.h>
--#endif
--
--#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
-- || (defined _LIBC && defined _POSIX_MAPPED_FILES)
--# include <sys/mman.h>
--# undef HAVE_MMAP
--# define HAVE_MMAP 1
--#else
--# undef HAVE_MMAP
--#endif
--
--#if defined HAVE_STDINT_H_WITH_UINTMAX || defined _LIBC
--# include <stdint.h>
--#endif
--#if defined HAVE_INTTYPES_H || defined _LIBC
--# include <inttypes.h>
--#endif
--
--#include "gmo.h"
--#include "gettextP.h"
--#include "hash-string.h"
--#include "plural-exp.h"
--
--#ifdef _LIBC
--# include "../locale/localeinfo.h"
--# include <not-cancel.h>
--#endif
--
--/* Handle multi-threaded applications. */
--#ifdef _LIBC
--# include <bits/libc-lock.h>
--#else
--# include "lock.h"
--#endif
--
--/* Provide fallback values for macros that ought to be defined in <inttypes.h>.
-- Note that our fallback values need not be literal strings, because we don't
-- use them with preprocessor string concatenation. */
--#if !defined PRId8 || PRI_MACROS_BROKEN
--# undef PRId8
--# define PRId8 "d"
--#endif
--#if !defined PRIi8 || PRI_MACROS_BROKEN
--# undef PRIi8
--# define PRIi8 "i"
--#endif
--#if !defined PRIo8 || PRI_MACROS_BROKEN
--# undef PRIo8
--# define PRIo8 "o"
--#endif
--#if !defined PRIu8 || PRI_MACROS_BROKEN
--# undef PRIu8
--# define PRIu8 "u"
--#endif
--#if !defined PRIx8 || PRI_MACROS_BROKEN
--# undef PRIx8
--# define PRIx8 "x"
--#endif
--#if !defined PRIX8 || PRI_MACROS_BROKEN
--# undef PRIX8
--# define PRIX8 "X"
--#endif
--#if !defined PRId16 || PRI_MACROS_BROKEN
--# undef PRId16
--# define PRId16 "d"
--#endif
--#if !defined PRIi16 || PRI_MACROS_BROKEN
--# undef PRIi16
--# define PRIi16 "i"
--#endif
--#if !defined PRIo16 || PRI_MACROS_BROKEN
--# undef PRIo16
--# define PRIo16 "o"
--#endif
--#if !defined PRIu16 || PRI_MACROS_BROKEN
--# undef PRIu16
--# define PRIu16 "u"
--#endif
--#if !defined PRIx16 || PRI_MACROS_BROKEN
--# undef PRIx16
--# define PRIx16 "x"
--#endif
--#if !defined PRIX16 || PRI_MACROS_BROKEN
--# undef PRIX16
--# define PRIX16 "X"
--#endif
--#if !defined PRId32 || PRI_MACROS_BROKEN
--# undef PRId32
--# define PRId32 "d"
--#endif
--#if !defined PRIi32 || PRI_MACROS_BROKEN
--# undef PRIi32
--# define PRIi32 "i"
--#endif
--#if !defined PRIo32 || PRI_MACROS_BROKEN
--# undef PRIo32
--# define PRIo32 "o"
--#endif
--#if !defined PRIu32 || PRI_MACROS_BROKEN
--# undef PRIu32
--# define PRIu32 "u"
--#endif
--#if !defined PRIx32 || PRI_MACROS_BROKEN
--# undef PRIx32
--# define PRIx32 "x"
--#endif
--#if !defined PRIX32 || PRI_MACROS_BROKEN
--# undef PRIX32
--# define PRIX32 "X"
--#endif
--#if !defined PRId64 || PRI_MACROS_BROKEN
--# undef PRId64
--# define PRId64 (sizeof (long) == 8 ? "ld" : "lld")
--#endif
--#if !defined PRIi64 || PRI_MACROS_BROKEN
--# undef PRIi64
--# define PRIi64 (sizeof (long) == 8 ? "li" : "lli")
--#endif
--#if !defined PRIo64 || PRI_MACROS_BROKEN
--# undef PRIo64
--# define PRIo64 (sizeof (long) == 8 ? "lo" : "llo")
--#endif
--#if !defined PRIu64 || PRI_MACROS_BROKEN
--# undef PRIu64
--# define PRIu64 (sizeof (long) == 8 ? "lu" : "llu")
--#endif
--#if !defined PRIx64 || PRI_MACROS_BROKEN
--# undef PRIx64
--# define PRIx64 (sizeof (long) == 8 ? "lx" : "llx")
--#endif
--#if !defined PRIX64 || PRI_MACROS_BROKEN
--# undef PRIX64
--# define PRIX64 (sizeof (long) == 8 ? "lX" : "llX")
--#endif
--#if !defined PRIdLEAST8 || PRI_MACROS_BROKEN
--# undef PRIdLEAST8
--# define PRIdLEAST8 "d"
--#endif
--#if !defined PRIiLEAST8 || PRI_MACROS_BROKEN
--# undef PRIiLEAST8
--# define PRIiLEAST8 "i"
--#endif
--#if !defined PRIoLEAST8 || PRI_MACROS_BROKEN
--# undef PRIoLEAST8
--# define PRIoLEAST8 "o"
--#endif
--#if !defined PRIuLEAST8 || PRI_MACROS_BROKEN
--# undef PRIuLEAST8
--# define PRIuLEAST8 "u"
--#endif
--#if !defined PRIxLEAST8 || PRI_MACROS_BROKEN
--# undef PRIxLEAST8
--# define PRIxLEAST8 "x"
--#endif
--#if !defined PRIXLEAST8 || PRI_MACROS_BROKEN
--# undef PRIXLEAST8
--# define PRIXLEAST8 "X"
--#endif
--#if !defined PRIdLEAST16 || PRI_MACROS_BROKEN
--# undef PRIdLEAST16
--# define PRIdLEAST16 "d"
--#endif
--#if !defined PRIiLEAST16 || PRI_MACROS_BROKEN
--# undef PRIiLEAST16
--# define PRIiLEAST16 "i"
--#endif
--#if !defined PRIoLEAST16 || PRI_MACROS_BROKEN
--# undef PRIoLEAST16
--# define PRIoLEAST16 "o"
--#endif
--#if !defined PRIuLEAST16 || PRI_MACROS_BROKEN
--# undef PRIuLEAST16
--# define PRIuLEAST16 "u"
--#endif
--#if !defined PRIxLEAST16 || PRI_MACROS_BROKEN
--# undef PRIxLEAST16
--# define PRIxLEAST16 "x"
--#endif
--#if !defined PRIXLEAST16 || PRI_MACROS_BROKEN
--# undef PRIXLEAST16
--# define PRIXLEAST16 "X"
--#endif
--#if !defined PRIdLEAST32 || PRI_MACROS_BROKEN
--# undef PRIdLEAST32
--# define PRIdLEAST32 "d"
--#endif
--#if !defined PRIiLEAST32 || PRI_MACROS_BROKEN
--# undef PRIiLEAST32
--# define PRIiLEAST32 "i"
--#endif
--#if !defined PRIoLEAST32 || PRI_MACROS_BROKEN
--# undef PRIoLEAST32
--# define PRIoLEAST32 "o"
--#endif
--#if !defined PRIuLEAST32 || PRI_MACROS_BROKEN
--# undef PRIuLEAST32
--# define PRIuLEAST32 "u"
--#endif
--#if !defined PRIxLEAST32 || PRI_MACROS_BROKEN
--# undef PRIxLEAST32
--# define PRIxLEAST32 "x"
--#endif
--#if !defined PRIXLEAST32 || PRI_MACROS_BROKEN
--# undef PRIXLEAST32
--# define PRIXLEAST32 "X"
--#endif
--#if !defined PRIdLEAST64 || PRI_MACROS_BROKEN
--# undef PRIdLEAST64
--# define PRIdLEAST64 PRId64
--#endif
--#if !defined PRIiLEAST64 || PRI_MACROS_BROKEN
--# undef PRIiLEAST64
--# define PRIiLEAST64 PRIi64
--#endif
--#if !defined PRIoLEAST64 || PRI_MACROS_BROKEN
--# undef PRIoLEAST64
--# define PRIoLEAST64 PRIo64
--#endif
--#if !defined PRIuLEAST64 || PRI_MACROS_BROKEN
--# undef PRIuLEAST64
--# define PRIuLEAST64 PRIu64
--#endif
--#if !defined PRIxLEAST64 || PRI_MACROS_BROKEN
--# undef PRIxLEAST64
--# define PRIxLEAST64 PRIx64
--#endif
--#if !defined PRIXLEAST64 || PRI_MACROS_BROKEN
--# undef PRIXLEAST64
--# define PRIXLEAST64 PRIX64
--#endif
--#if !defined PRIdFAST8 || PRI_MACROS_BROKEN
--# undef PRIdFAST8
--# define PRIdFAST8 "d"
--#endif
--#if !defined PRIiFAST8 || PRI_MACROS_BROKEN
--# undef PRIiFAST8
--# define PRIiFAST8 "i"
--#endif
--#if !defined PRIoFAST8 || PRI_MACROS_BROKEN
--# undef PRIoFAST8
--# define PRIoFAST8 "o"
--#endif
--#if !defined PRIuFAST8 || PRI_MACROS_BROKEN
--# undef PRIuFAST8
--# define PRIuFAST8 "u"
--#endif
--#if !defined PRIxFAST8 || PRI_MACROS_BROKEN
--# undef PRIxFAST8
--# define PRIxFAST8 "x"
--#endif
--#if !defined PRIXFAST8 || PRI_MACROS_BROKEN
--# undef PRIXFAST8
--# define PRIXFAST8 "X"
--#endif
--#if !defined PRIdFAST16 || PRI_MACROS_BROKEN
--# undef PRIdFAST16
--# define PRIdFAST16 "d"
--#endif
--#if !defined PRIiFAST16 || PRI_MACROS_BROKEN
--# undef PRIiFAST16
--# define PRIiFAST16 "i"
--#endif
--#if !defined PRIoFAST16 || PRI_MACROS_BROKEN
--# undef PRIoFAST16
--# define PRIoFAST16 "o"
--#endif
--#if !defined PRIuFAST16 || PRI_MACROS_BROKEN
--# undef PRIuFAST16
--# define PRIuFAST16 "u"
--#endif
--#if !defined PRIxFAST16 || PRI_MACROS_BROKEN
--# undef PRIxFAST16
--# define PRIxFAST16 "x"
--#endif
--#if !defined PRIXFAST16 || PRI_MACROS_BROKEN
--# undef PRIXFAST16
--# define PRIXFAST16 "X"
--#endif
--#if !defined PRIdFAST32 || PRI_MACROS_BROKEN
--# undef PRIdFAST32
--# define PRIdFAST32 "d"
--#endif
--#if !defined PRIiFAST32 || PRI_MACROS_BROKEN
--# undef PRIiFAST32
--# define PRIiFAST32 "i"
--#endif
--#if !defined PRIoFAST32 || PRI_MACROS_BROKEN
--# undef PRIoFAST32
--# define PRIoFAST32 "o"
--#endif
--#if !defined PRIuFAST32 || PRI_MACROS_BROKEN
--# undef PRIuFAST32
--# define PRIuFAST32 "u"
--#endif
--#if !defined PRIxFAST32 || PRI_MACROS_BROKEN
--# undef PRIxFAST32
--# define PRIxFAST32 "x"
--#endif
--#if !defined PRIXFAST32 || PRI_MACROS_BROKEN
--# undef PRIXFAST32
--# define PRIXFAST32 "X"
--#endif
--#if !defined PRIdFAST64 || PRI_MACROS_BROKEN
--# undef PRIdFAST64
--# define PRIdFAST64 PRId64
--#endif
--#if !defined PRIiFAST64 || PRI_MACROS_BROKEN
--# undef PRIiFAST64
--# define PRIiFAST64 PRIi64
--#endif
--#if !defined PRIoFAST64 || PRI_MACROS_BROKEN
--# undef PRIoFAST64
--# define PRIoFAST64 PRIo64
--#endif
--#if !defined PRIuFAST64 || PRI_MACROS_BROKEN
--# undef PRIuFAST64
--# define PRIuFAST64 PRIu64
--#endif
--#if !defined PRIxFAST64 || PRI_MACROS_BROKEN
--# undef PRIxFAST64
--# define PRIxFAST64 PRIx64
--#endif
--#if !defined PRIXFAST64 || PRI_MACROS_BROKEN
--# undef PRIXFAST64
--# define PRIXFAST64 PRIX64
--#endif
--#if !defined PRIdMAX || PRI_MACROS_BROKEN
--# undef PRIdMAX
--# define PRIdMAX (sizeof (uintmax_t) == sizeof (long) ? "ld" : "lld")
--#endif
--#if !defined PRIiMAX || PRI_MACROS_BROKEN
--# undef PRIiMAX
--# define PRIiMAX (sizeof (uintmax_t) == sizeof (long) ? "li" : "lli")
--#endif
--#if !defined PRIoMAX || PRI_MACROS_BROKEN
--# undef PRIoMAX
--# define PRIoMAX (sizeof (uintmax_t) == sizeof (long) ? "lo" : "llo")
--#endif
--#if !defined PRIuMAX || PRI_MACROS_BROKEN
--# undef PRIuMAX
--# define PRIuMAX (sizeof (uintmax_t) == sizeof (long) ? "lu" : "llu")
--#endif
--#if !defined PRIxMAX || PRI_MACROS_BROKEN
--# undef PRIxMAX
--# define PRIxMAX (sizeof (uintmax_t) == sizeof (long) ? "lx" : "llx")
--#endif
--#if !defined PRIXMAX || PRI_MACROS_BROKEN
--# undef PRIXMAX
--# define PRIXMAX (sizeof (uintmax_t) == sizeof (long) ? "lX" : "llX")
--#endif
--#if !defined PRIdPTR || PRI_MACROS_BROKEN
--# undef PRIdPTR
--# define PRIdPTR \
-- (sizeof (void *) == sizeof (long) ? "ld" : \
-- sizeof (void *) == sizeof (int) ? "d" : \
-- "lld")
--#endif
--#if !defined PRIiPTR || PRI_MACROS_BROKEN
--# undef PRIiPTR
--# define PRIiPTR \
-- (sizeof (void *) == sizeof (long) ? "li" : \
-- sizeof (void *) == sizeof (int) ? "i" : \
-- "lli")
--#endif
--#if !defined PRIoPTR || PRI_MACROS_BROKEN
--# undef PRIoPTR
--# define PRIoPTR \
-- (sizeof (void *) == sizeof (long) ? "lo" : \
-- sizeof (void *) == sizeof (int) ? "o" : \
-- "llo")
--#endif
--#if !defined PRIuPTR || PRI_MACROS_BROKEN
--# undef PRIuPTR
--# define PRIuPTR \
-- (sizeof (void *) == sizeof (long) ? "lu" : \
-- sizeof (void *) == sizeof (int) ? "u" : \
-- "llu")
--#endif
--#if !defined PRIxPTR || PRI_MACROS_BROKEN
--# undef PRIxPTR
--# define PRIxPTR \
-- (sizeof (void *) == sizeof (long) ? "lx" : \
-- sizeof (void *) == sizeof (int) ? "x" : \
-- "llx")
--#endif
--#if !defined PRIXPTR || PRI_MACROS_BROKEN
--# undef PRIXPTR
--# define PRIXPTR \
-- (sizeof (void *) == sizeof (long) ? "lX" : \
-- sizeof (void *) == sizeof (int) ? "X" : \
-- "llX")
--#endif
--
--/* @@ end of prolog @@ */
--
--#ifdef _LIBC
--/* Rename the non ISO C functions. This is required by the standard
-- because some ISO C functions will require linking with this object
-- file and the name space must not be polluted. */
--# define open(name, flags) open_not_cancel_2 (name, flags)
--# define close(fd) close_not_cancel_no_status (fd)
--# define read(fd, buf, n) read_not_cancel (fd, buf, n)
--# define mmap(addr, len, prot, flags, fd, offset) \
-- __mmap (addr, len, prot, flags, fd, offset)
--# define munmap(addr, len) __munmap (addr, len)
--#endif
--
--/* For those losing systems which don't have `alloca' we have to add
-- some additional code emulating it. */
--#ifdef HAVE_ALLOCA
--# define freea(p) /* nothing */
--#else
--# define alloca(n) malloc (n)
--# define freea(p) free (p)
--#endif
--
--/* For systems that distinguish between text and binary I/O.
-- O_BINARY is usually declared in <fcntl.h>. */
--#if !defined O_BINARY && defined _O_BINARY
-- /* For MSC-compatible compilers. */
--# define O_BINARY _O_BINARY
--# define O_TEXT _O_TEXT
--#endif
--#ifdef __BEOS__
-- /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
--# undef O_BINARY
--# undef O_TEXT
--#endif
--/* On reasonable systems, binary I/O is the default. */
--#ifndef O_BINARY
--# define O_BINARY 0
--#endif
--
--
--/* We need a sign, whether a new catalog was loaded, which can be associated
-- with all translations. This is important if the translations are
-- cached by one of GCC's features. */
--int _nl_msg_cat_cntr;
--
--
--/* Expand a system dependent string segment. Return NULL if unsupported. */
--static const char *
--get_sysdep_segment_value (const char *name)
--{
-- /* Test for an ISO C 99 section 7.8.1 format string directive.
-- Syntax:
-- P R I { d | i | o | u | x | X }
-- { { | LEAST | FAST } { 8 | 16 | 32 | 64 } | MAX | PTR } */
-- /* We don't use a table of 14 times 6 'const char *' strings here, because
-- data relocations cost startup time. */
-- if (name[0] == 'P' && name[1] == 'R' && name[2] == 'I')
-- {
-- if (name[3] == 'd' || name[3] == 'i' || name[3] == 'o' || name[3] == 'u'
-- || name[3] == 'x' || name[3] == 'X')
-- {
-- if (name[4] == '8' && name[5] == '\0')
-- {
-- if (name[3] == 'd')
-- return PRId8;
-- if (name[3] == 'i')
-- return PRIi8;
-- if (name[3] == 'o')
-- return PRIo8;
-- if (name[3] == 'u')
-- return PRIu8;
-- if (name[3] == 'x')
-- return PRIx8;
-- if (name[3] == 'X')
-- return PRIX8;
-- abort ();
-- }
-- if (name[4] == '1' && name[5] == '6' && name[6] == '\0')
-- {
-- if (name[3] == 'd')
-- return PRId16;
-- if (name[3] == 'i')
-- return PRIi16;
-- if (name[3] == 'o')
-- return PRIo16;
-- if (name[3] == 'u')
-- return PRIu16;
-- if (name[3] == 'x')
-- return PRIx16;
-- if (name[3] == 'X')
-- return PRIX16;
-- abort ();
-- }
-- if (name[4] == '3' && name[5] == '2' && name[6] == '\0')
-- {
-- if (name[3] == 'd')
-- return PRId32;
-- if (name[3] == 'i')
-- return PRIi32;
-- if (name[3] == 'o')
-- return PRIo32;
-- if (name[3] == 'u')
-- return PRIu32;
-- if (name[3] == 'x')
-- return PRIx32;
-- if (name[3] == 'X')
-- return PRIX32;
-- abort ();
-- }
-- if (name[4] == '6' && name[5] == '4' && name[6] == '\0')
-- {
-- if (name[3] == 'd')
-- return PRId64;
-- if (name[3] == 'i')
-- return PRIi64;
-- if (name[3] == 'o')
-- return PRIo64;
-- if (name[3] == 'u')
-- return PRIu64;
-- if (name[3] == 'x')
-- return PRIx64;
-- if (name[3] == 'X')
-- return PRIX64;
-- abort ();
-- }
-- if (name[4] == 'L' && name[5] == 'E' && name[6] == 'A'
-- && name[7] == 'S' && name[8] == 'T')
-- {
-- if (name[9] == '8' && name[10] == '\0')
-- {
-- if (name[3] == 'd')
-- return PRIdLEAST8;
-- if (name[3] == 'i')
-- return PRIiLEAST8;
-- if (name[3] == 'o')
-- return PRIoLEAST8;
-- if (name[3] == 'u')
-- return PRIuLEAST8;
-- if (name[3] == 'x')
-- return PRIxLEAST8;
-- if (name[3] == 'X')
-- return PRIXLEAST8;
-- abort ();
-- }
-- if (name[9] == '1' && name[10] == '6' && name[11] == '\0')
-- {
-- if (name[3] == 'd')
-- return PRIdLEAST16;
-- if (name[3] == 'i')
-- return PRIiLEAST16;
-- if (name[3] == 'o')
-- return PRIoLEAST16;
-- if (name[3] == 'u')
-- return PRIuLEAST16;
-- if (name[3] == 'x')
-- return PRIxLEAST16;
-- if (name[3] == 'X')
-- return PRIXLEAST16;
-- abort ();
-- }
-- if (name[9] == '3' && name[10] == '2' && name[11] == '\0')
-- {
-- if (name[3] == 'd')
-- return PRIdLEAST32;
-- if (name[3] == 'i')
-- return PRIiLEAST32;
-- if (name[3] == 'o')
-- return PRIoLEAST32;
-- if (name[3] == 'u')
-- return PRIuLEAST32;
-- if (name[3] == 'x')
-- return PRIxLEAST32;
-- if (name[3] == 'X')
-- return PRIXLEAST32;
-- abort ();
-- }
-- if (name[9] == '6' && name[10] == '4' && name[11] == '\0')
-- {
-- if (name[3] == 'd')
-- return PRIdLEAST64;
-- if (name[3] == 'i')
-- return PRIiLEAST64;
-- if (name[3] == 'o')
-- return PRIoLEAST64;
-- if (name[3] == 'u')
-- return PRIuLEAST64;
-- if (name[3] == 'x')
-- return PRIxLEAST64;
-- if (name[3] == 'X')
-- return PRIXLEAST64;
-- abort ();
-- }
-- }
-- if (name[4] == 'F' && name[5] == 'A' && name[6] == 'S'
-- && name[7] == 'T')
-- {
-- if (name[8] == '8' && name[9] == '\0')
-- {
-- if (name[3] == 'd')
-- return PRIdFAST8;
-- if (name[3] == 'i')
-- return PRIiFAST8;
-- if (name[3] == 'o')
-- return PRIoFAST8;
-- if (name[3] == 'u')
-- return PRIuFAST8;
-- if (name[3] == 'x')
-- return PRIxFAST8;
-- if (name[3] == 'X')
-- return PRIXFAST8;
-- abort ();
-- }
-- if (name[8] == '1' && name[9] == '6' && name[10] == '\0')
-- {
-- if (name[3] == 'd')
-- return PRIdFAST16;
-- if (name[3] == 'i')
-- return PRIiFAST16;
-- if (name[3] == 'o')
-- return PRIoFAST16;
-- if (name[3] == 'u')
-- return PRIuFAST16;
-- if (name[3] == 'x')
-- return PRIxFAST16;
-- if (name[3] == 'X')
-- return PRIXFAST16;
-- abort ();
-- }
-- if (name[8] == '3' && name[9] == '2' && name[10] == '\0')
-- {
-- if (name[3] == 'd')
-- return PRIdFAST32;
-- if (name[3] == 'i')
-- return PRIiFAST32;
-- if (name[3] == 'o')
-- return PRIoFAST32;
-- if (name[3] == 'u')
-- return PRIuFAST32;
-- if (name[3] == 'x')
-- return PRIxFAST32;
-- if (name[3] == 'X')
-- return PRIXFAST32;
-- abort ();
-- }
-- if (name[8] == '6' && name[9] == '4' && name[10] == '\0')
-- {
-- if (name[3] == 'd')
-- return PRIdFAST64;
-- if (name[3] == 'i')
-- return PRIiFAST64;
-- if (name[3] == 'o')
-- return PRIoFAST64;
-- if (name[3] == 'u')
-- return PRIuFAST64;
-- if (name[3] == 'x')
-- return PRIxFAST64;
-- if (name[3] == 'X')
-- return PRIXFAST64;
-- abort ();
-- }
-- }
-- if (name[4] == 'M' && name[5] == 'A' && name[6] == 'X'
-- && name[7] == '\0')
-- {
-- if (name[3] == 'd')
-- return PRIdMAX;
-- if (name[3] == 'i')
-- return PRIiMAX;
-- if (name[3] == 'o')
-- return PRIoMAX;
-- if (name[3] == 'u')
-- return PRIuMAX;
-- if (name[3] == 'x')
-- return PRIxMAX;
-- if (name[3] == 'X')
-- return PRIXMAX;
-- abort ();
-- }
-- if (name[4] == 'P' && name[5] == 'T' && name[6] == 'R'
-- && name[7] == '\0')
-- {
-- if (name[3] == 'd')
-- return PRIdPTR;
-- if (name[3] == 'i')
-- return PRIiPTR;
-- if (name[3] == 'o')
-- return PRIoPTR;
-- if (name[3] == 'u')
-- return PRIuPTR;
-- if (name[3] == 'x')
-- return PRIxPTR;
-- if (name[3] == 'X')
-- return PRIXPTR;
-- abort ();
-- }
-- }
-- }
-- /* Test for a glibc specific printf() format directive flag. */
-- if (name[0] == 'I' && name[1] == '\0')
-- {
--#if defined _LIBC || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
-- /* The 'I' flag, in numeric format directives, replaces ASCII digits
-- with the 'outdigits' defined in the LC_CTYPE locale facet. This is
-- used for Farsi (Persian) and maybe Arabic. */
-- return "I";
--#else
-- return "";
--#endif
-- }
-- /* Other system dependent strings are not valid. */
-- return NULL;
--}
--
--/* Load the message catalogs specified by FILENAME. If it is no valid
-- message catalog do nothing. */
--void
--internal_function
--_nl_load_domain (struct loaded_l10nfile *domain_file,
-- struct binding *domainbinding)
--{
-- __libc_lock_define_initialized_recursive (static, lock)
-- int fd = -1;
-- size_t size;
--#ifdef _LIBC
-- struct stat64 st;
--#else
-- struct stat st;
--#endif
-- struct mo_file_header *data = (struct mo_file_header *) -1;
-- int use_mmap = 0;
-- struct loaded_domain *domain;
-- int revision;
-- const char *nullentry;
-- size_t nullentrylen;
--
-- __libc_lock_lock_recursive (lock);
-- if (domain_file->decided != 0)
-- {
-- /* There are two possibilities:
--
-- + this is the same thread calling again during this initialization
-- via _nl_find_msg. We have initialized everything this call needs.
--
-- + this is another thread which tried to initialize this object.
-- Not necessary anymore since if the lock is available this
-- is finished.
-- */
-- goto done;
-- }
--
-- domain_file->decided = -1;
-- domain_file->data = NULL;
--
-- /* Note that it would be useless to store domainbinding in domain_file
-- because domainbinding might be == NULL now but != NULL later (after
-- a call to bind_textdomain_codeset). */
--
-- /* If the record does not represent a valid locale the FILENAME
-- might be NULL. This can happen when according to the given
-- specification the locale file name is different for XPG and CEN
-- syntax. */
-- if (domain_file->filename == NULL)
-- goto out;
--
-- /* Try to open the addressed file. */
-- fd = open (domain_file->filename, O_RDONLY | O_BINARY);
-- if (fd == -1)
-- goto out;
--
-- /* We must know about the size of the file. */
-- if (
--#ifdef _LIBC
-- __builtin_expect (fstat64 (fd, &st) != 0, 0)
--#else
-- __builtin_expect (fstat (fd, &st) != 0, 0)
--#endif
-- || __builtin_expect ((size = (size_t) st.st_size) != st.st_size, 0)
-- || __builtin_expect (size < sizeof (struct mo_file_header), 0))
-- /* Something went wrong. */
-- goto out;
--
--#ifdef HAVE_MMAP
-- /* Now we are ready to load the file. If mmap() is available we try
-- this first. If not available or it failed we try to load it. */
-- data = (struct mo_file_header *) mmap (NULL, size, PROT_READ,
-- MAP_PRIVATE, fd, 0);
--
-- if (__builtin_expect (data != (struct mo_file_header *) -1, 1))
-- {
-- /* mmap() call was successful. */
-- close (fd);
-- fd = -1;
-- use_mmap = 1;
-- }
--#endif
--
-- /* If the data is not yet available (i.e. mmap'ed) we try to load
-- it manually. */
-- if (data == (struct mo_file_header *) -1)
-- {
-- size_t to_read;
-- char *read_ptr;
--
-- data = (struct mo_file_header *) malloc (size);
-- if (data == NULL)
-- goto out;
--
-- to_read = size;
-- read_ptr = (char *) data;
-- do
-- {
-- long int nb = (long int) read (fd, read_ptr, to_read);
-- if (nb <= 0)
-- {
--#ifdef EINTR
-- if (nb == -1 && errno == EINTR)
-- continue;
--#endif
-- goto out;
-- }
-- read_ptr += nb;
-- to_read -= nb;
-- }
-- while (to_read > 0);
--
-- close (fd);
-- fd = -1;
-- }
--
-- /* Using the magic number we can test whether it really is a message
-- catalog file. */
-- if (__builtin_expect (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED,
-- 0))
-- {
-- /* The magic number is wrong: not a message catalog file. */
--#ifdef HAVE_MMAP
-- if (use_mmap)
-- munmap ((caddr_t) data, size);
-- else
--#endif
-- free (data);
-- goto out;
-- }
--
-- domain = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
-- if (domain == NULL)
-- goto out;
-- domain_file->data = domain;
--
-- domain->data = (char *) data;
-- domain->use_mmap = use_mmap;
-- domain->mmap_size = size;
-- domain->must_swap = data->magic != _MAGIC;
-- domain->malloced = NULL;
--
-- /* Fill in the information about the available tables. */
-- revision = W (domain->must_swap, data->revision);
-- /* We support only the major revisions 0 and 1. */
-- switch (revision >> 16)
-- {
-- case 0:
-- case 1:
-- domain->nstrings = W (domain->must_swap, data->nstrings);
-- domain->orig_tab = (const struct string_desc *)
-- ((char *) data + W (domain->must_swap, data->orig_tab_offset));
-- domain->trans_tab = (const struct string_desc *)
-- ((char *) data + W (domain->must_swap, data->trans_tab_offset));
-- domain->hash_size = W (domain->must_swap, data->hash_tab_size);
-- domain->hash_tab =
-- (domain->hash_size > 2
-- ? (const nls_uint32 *)
-- ((char *) data + W (domain->must_swap, data->hash_tab_offset))
-- : NULL);
-- domain->must_swap_hash_tab = domain->must_swap;
--
-- /* Now dispatch on the minor revision. */
-- switch (revision & 0xffff)
-- {
-- case 0:
-- domain->n_sysdep_strings = 0;
-- domain->orig_sysdep_tab = NULL;
-- domain->trans_sysdep_tab = NULL;
-- break;
-- case 1:
-- default:
-- {
-- nls_uint32 n_sysdep_strings;
--
-- if (domain->hash_tab == NULL)
-- /* This is invalid. These minor revisions need a hash table. */
-- goto invalid;
--
-- n_sysdep_strings =
-- W (domain->must_swap, data->n_sysdep_strings);
-- if (n_sysdep_strings > 0)
-- {
-- nls_uint32 n_sysdep_segments;
-- const struct sysdep_segment *sysdep_segments;
-- const char **sysdep_segment_values;
-- const nls_uint32 *orig_sysdep_tab;
-- const nls_uint32 *trans_sysdep_tab;
-- nls_uint32 n_inmem_sysdep_strings;
-- size_t memneed;
-- char *mem;
-- struct sysdep_string_desc *inmem_orig_sysdep_tab;
-- struct sysdep_string_desc *inmem_trans_sysdep_tab;
-- nls_uint32 *inmem_hash_tab;
-- unsigned int i, j;
--
-- /* Get the values of the system dependent segments. */
-- n_sysdep_segments =
-- W (domain->must_swap, data->n_sysdep_segments);
-- sysdep_segments = (const struct sysdep_segment *)
-- ((char *) data
-- + W (domain->must_swap, data->sysdep_segments_offset));
-- sysdep_segment_values =
-- (const char **)
-- alloca (n_sysdep_segments * sizeof (const char *));
-- for (i = 0; i < n_sysdep_segments; i++)
-- {
-- const char *name =
-- (char *) data
-- + W (domain->must_swap, sysdep_segments[i].offset);
-- nls_uint32 namelen =
-- W (domain->must_swap, sysdep_segments[i].length);
--
-- if (!(namelen > 0 && name[namelen - 1] == '\0'))
-- {
-- freea (sysdep_segment_values);
-- goto invalid;
-- }
--
-- sysdep_segment_values[i] = get_sysdep_segment_value (name);
-- }
--
-- orig_sysdep_tab = (const nls_uint32 *)
-- ((char *) data
-- + W (domain->must_swap, data->orig_sysdep_tab_offset));
-- trans_sysdep_tab = (const nls_uint32 *)
-- ((char *) data
-- + W (domain->must_swap, data->trans_sysdep_tab_offset));
--
-- /* Compute the amount of additional memory needed for the
-- system dependent strings and the augmented hash table.
-- At the same time, also drop string pairs which refer to
-- an undefined system dependent segment. */
-- n_inmem_sysdep_strings = 0;
-- memneed = domain->hash_size * sizeof (nls_uint32);
-- for (i = 0; i < n_sysdep_strings; i++)
-- {
-- int valid = 1;
-- size_t needs[2];
--
-- for (j = 0; j < 2; j++)
-- {
-- const struct sysdep_string *sysdep_string =
-- (const struct sysdep_string *)
-- ((char *) data
-- + W (domain->must_swap,
-- j == 0
-- ? orig_sysdep_tab[i]
-- : trans_sysdep_tab[i]));
-- size_t need = 0;
-- const struct segment_pair *p = sysdep_string->segments;
--
-- if (W (domain->must_swap, p->sysdepref) != SEGMENTS_END)
-- for (p = sysdep_string->segments;; p++)
-- {
-- nls_uint32 sysdepref;
--
-- need += W (domain->must_swap, p->segsize);
--
-- sysdepref = W (domain->must_swap, p->sysdepref);
-- if (sysdepref == SEGMENTS_END)
-- break;
--
-- if (sysdepref >= n_sysdep_segments)
-- {
-- /* Invalid. */
-- freea (sysdep_segment_values);
-- goto invalid;
-- }
--
-- if (sysdep_segment_values[sysdepref] == NULL)
-- {
-- /* This particular string pair is invalid. */
-- valid = 0;
-- break;
-- }
--
-- need += strlen (sysdep_segment_values[sysdepref]);
-- }
--
-- needs[j] = need;
-- if (!valid)
-- break;
-- }
--
-- if (valid)
-- {
-- n_inmem_sysdep_strings++;
-- memneed += needs[0] + needs[1];
-- }
-- }
-- memneed += 2 * n_inmem_sysdep_strings
-- * sizeof (struct sysdep_string_desc);
--
-- if (n_inmem_sysdep_strings > 0)
-- {
-- unsigned int k;
--
-- /* Allocate additional memory. */
-- mem = (char *) malloc (memneed);
-- if (mem == NULL)
-- goto invalid;
--
-- domain->malloced = mem;
-- inmem_orig_sysdep_tab = (struct sysdep_string_desc *) mem;
-- mem += n_inmem_sysdep_strings
-- * sizeof (struct sysdep_string_desc);
-- inmem_trans_sysdep_tab = (struct sysdep_string_desc *) mem;
-- mem += n_inmem_sysdep_strings
-- * sizeof (struct sysdep_string_desc);
-- inmem_hash_tab = (nls_uint32 *) mem;
-- mem += domain->hash_size * sizeof (nls_uint32);
--
-- /* Compute the system dependent strings. */
-- k = 0;
-- for (i = 0; i < n_sysdep_strings; i++)
-- {
-- int valid = 1;
--
-- for (j = 0; j < 2; j++)
-- {
-- const struct sysdep_string *sysdep_string =
-- (const struct sysdep_string *)
-- ((char *) data
-- + W (domain->must_swap,
-- j == 0
-- ? orig_sysdep_tab[i]
-- : trans_sysdep_tab[i]));
-- const struct segment_pair *p =
-- sysdep_string->segments;
--
-- if (W (domain->must_swap, p->sysdepref)
-- != SEGMENTS_END)
-- for (p = sysdep_string->segments;; p++)
-- {
-- nls_uint32 sysdepref;
--
-- sysdepref =
-- W (domain->must_swap, p->sysdepref);
-- if (sysdepref == SEGMENTS_END)
-- break;
--
-- if (sysdep_segment_values[sysdepref] == NULL)
-- {
-- /* This particular string pair is
-- invalid. */
-- valid = 0;
-- break;
-- }
-- }
--
-- if (!valid)
-- break;
-- }
--
-- if (valid)
-- {
-- for (j = 0; j < 2; j++)
-- {
-- const struct sysdep_string *sysdep_string =
-- (const struct sysdep_string *)
-- ((char *) data
-- + W (domain->must_swap,
-- j == 0
-- ? orig_sysdep_tab[i]
-- : trans_sysdep_tab[i]));
-- const char *static_segments =
-- (char *) data
-- + W (domain->must_swap, sysdep_string->offset);
-- const struct segment_pair *p =
-- sysdep_string->segments;
--
-- /* Concatenate the segments, and fill
-- inmem_orig_sysdep_tab[k] (for j == 0) and
-- inmem_trans_sysdep_tab[k] (for j == 1). */
--
-- struct sysdep_string_desc *inmem_tab_entry =
-- (j == 0
-- ? inmem_orig_sysdep_tab
-- : inmem_trans_sysdep_tab)
-- + k;
--
-- if (W (domain->must_swap, p->sysdepref)
-- == SEGMENTS_END)
-- {
-- /* Only one static segment. */
-- inmem_tab_entry->length =
-- W (domain->must_swap, p->segsize);
-- inmem_tab_entry->pointer = static_segments;
-- }
-- else
-- {
-- inmem_tab_entry->pointer = mem;
--
-- for (p = sysdep_string->segments;; p++)
-- {
-- nls_uint32 segsize =
-- W (domain->must_swap, p->segsize);
-- nls_uint32 sysdepref =
-- W (domain->must_swap, p->sysdepref);
-- size_t n;
--
-- if (segsize > 0)
-- {
-- memcpy (mem, static_segments, segsize);
-- mem += segsize;
-- static_segments += segsize;
-- }
--
-- if (sysdepref == SEGMENTS_END)
-- break;
--
-- n = strlen (sysdep_segment_values[sysdepref]);
-- memcpy (mem, sysdep_segment_values[sysdepref], n);
-- mem += n;
-- }
--
-- inmem_tab_entry->length =
-- mem - inmem_tab_entry->pointer;
-- }
-- }
--
-- k++;
-- }
-- }
-- if (k != n_inmem_sysdep_strings)
-- abort ();
--
-- /* Compute the augmented hash table. */
-- for (i = 0; i < domain->hash_size; i++)
-- inmem_hash_tab[i] =
-- W (domain->must_swap_hash_tab, domain->hash_tab[i]);
-- for (i = 0; i < n_inmem_sysdep_strings; i++)
-- {
-- const char *msgid = inmem_orig_sysdep_tab[i].pointer;
-- nls_uint32 hash_val = __hash_string (msgid);
-- nls_uint32 idx = hash_val % domain->hash_size;
-- nls_uint32 incr =
-- 1 + (hash_val % (domain->hash_size - 2));
--
-- for (;;)
-- {
-- if (inmem_hash_tab[idx] == 0)
-- {
-- /* Hash table entry is empty. Use it. */
-- inmem_hash_tab[idx] = 1 + domain->nstrings + i;
-- break;
-- }
--
-- if (idx >= domain->hash_size - incr)
-- idx -= domain->hash_size - incr;
-- else
-- idx += incr;
-- }
-- }
--
-- domain->n_sysdep_strings = n_inmem_sysdep_strings;
-- domain->orig_sysdep_tab = inmem_orig_sysdep_tab;
-- domain->trans_sysdep_tab = inmem_trans_sysdep_tab;
--
-- domain->hash_tab = inmem_hash_tab;
-- domain->must_swap_hash_tab = 0;
-- }
-- else
-- {
-- domain->n_sysdep_strings = 0;
-- domain->orig_sysdep_tab = NULL;
-- domain->trans_sysdep_tab = NULL;
-- }
--
-- freea (sysdep_segment_values);
-- }
-- else
-- {
-- domain->n_sysdep_strings = 0;
-- domain->orig_sysdep_tab = NULL;
-- domain->trans_sysdep_tab = NULL;
-- }
-- }
-- break;
-- }
-- break;
-- default:
-- /* This is an invalid revision. */
-- invalid:
-- /* This is an invalid .mo file. */
-- if (domain->malloced)
-- free (domain->malloced);
--#ifdef HAVE_MMAP
-- if (use_mmap)
-- munmap ((caddr_t) data, size);
-- else
--#endif
-- free (data);
-- free (domain);
-- domain_file->data = NULL;
-- goto out;
-- }
--
-- /* No caches of converted translations so far. */
-- domain->conversions = NULL;
-- domain->nconversions = 0;
-- gl_rwlock_init (domain->conversions_lock);
--
-- /* Get the header entry and look for a plural specification. */
--#ifdef IN_LIBGLOCALE
-- nullentry =
-- _nl_find_msg (domain_file, domainbinding, NULL, "", &nullentrylen);
--#else
-- nullentry = _nl_find_msg (domain_file, domainbinding, "", 0, &nullentrylen);
--#endif
-- EXTRACT_PLURAL_EXPRESSION (nullentry, &domain->plural, &domain->nplurals);
--
-- out:
-- if (fd != -1)
-- close (fd);
--
-- domain_file->decided = 1;
--
-- done:
-- __libc_lock_unlock_recursive (lock);
--}
--
--
--#ifdef _LIBC
--void
--internal_function __libc_freeres_fn_section
--_nl_unload_domain (struct loaded_domain *domain)
--{
-- size_t i;
--
-- if (domain->plural != &__gettext_germanic_plural)
-- __gettext_free_exp ((struct expression *) domain->plural);
--
-- for (i = 0; i < domain->nconversions; i++)
-- {
-- struct converted_domain *convd = &domain->conversions[i];
--
-- free (convd->encoding);
-- if (convd->conv_tab != NULL && convd->conv_tab != (char **) -1)
-- free (convd->conv_tab);
-- if (convd->conv != (__gconv_t) -1)
-- __gconv_close (convd->conv);
-- }
-- if (domain->conversions != NULL)
-- free (domain->conversions);
-- __libc_rwlock_fini (domain->conversions_lock);
--
-- if (domain->malloced)
-- free (domain->malloced);
--
--# ifdef _POSIX_MAPPED_FILES
-- if (domain->use_mmap)
-- munmap ((caddr_t) domain->data, domain->mmap_size);
-- else
--# endif /* _POSIX_MAPPED_FILES */
-- free ((void *) domain->data);
--
-- free (domain);
--}
--#endif
---- a/intl/localcharset.c
-+++ /dev/null
-@@ -1,461 +0,0 @@
--/* Determine a canonical name for the current locale's character encoding.
--
-- Copyright (C) 2000-2006 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--/* Written by Bruno Haible <bruno@clisp.org>. */
--
--#include <config.h>
--
--/* Specification. */
--#include "localcharset.h"
--
--#include <stddef.h>
--#include <stdio.h>
--#include <string.h>
--#include <stdlib.h>
--
--#if defined _WIN32 || defined __WIN32__
--# define WIN32_NATIVE
--#endif
--
--#if defined __EMX__
--/* Assume EMX program runs on OS/2, even if compiled under DOS. */
--# define OS2
--#endif
--
--#if !defined WIN32_NATIVE
--# if HAVE_LANGINFO_CODESET
--# include <langinfo.h>
--# else
--# if 0 /* see comment below */
--# include <locale.h>
--# endif
--# endif
--# ifdef __CYGWIN__
--# define WIN32_LEAN_AND_MEAN
--# include <windows.h>
--# endif
--#elif defined WIN32_NATIVE
--# define WIN32_LEAN_AND_MEAN
--# include <windows.h>
--#endif
--#if defined OS2
--# define INCL_DOS
--# include <os2.h>
--#endif
--
--#if ENABLE_RELOCATABLE
--# include "relocatable.h"
--#else
--# define relocate(pathname) (pathname)
--#endif
--
--/* Get LIBDIR. */
--#ifndef LIBDIR
--# include "configmake.h"
--#endif
--
--#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
-- /* Win32, Cygwin, OS/2, DOS */
--# define ISSLASH(C) ((C) == '/' || (C) == '\\')
--#endif
--
--#ifndef DIRECTORY_SEPARATOR
--# define DIRECTORY_SEPARATOR '/'
--#endif
--
--#ifndef ISSLASH
--# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
--#endif
--
--#if HAVE_DECL_GETC_UNLOCKED
--# undef getc
--# define getc getc_unlocked
--#endif
--
--/* The following static variable is declared 'volatile' to avoid a
-- possible multithread problem in the function get_charset_aliases. If we
-- are running in a threaded environment, and if two threads initialize
-- 'charset_aliases' simultaneously, both will produce the same value,
-- and everything will be ok if the two assignments to 'charset_aliases'
-- are atomic. But I don't know what will happen if the two assignments mix. */
--#if __STDC__ != 1
--# define volatile /* empty */
--#endif
--/* Pointer to the contents of the charset.alias file, if it has already been
-- read, else NULL. Its format is:
-- ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */
--static const char * volatile charset_aliases;
--
--/* Return a pointer to the contents of the charset.alias file. */
--static const char *
--get_charset_aliases (void)
--{
-- const char *cp;
--
-- cp = charset_aliases;
-- if (cp == NULL)
-- {
--#if !(defined VMS || defined WIN32_NATIVE || defined __CYGWIN__)
-- FILE *fp;
-- const char *dir;
-- const char *base = "charset.alias";
-- char *file_name;
--
-- /* Make it possible to override the charset.alias location. This is
-- necessary for running the testsuite before "make install". */
-- dir = getenv ("CHARSETALIASDIR");
-- if (dir == NULL || dir[0] == '\0')
-- dir = relocate (LIBDIR);
--
-- /* Concatenate dir and base into freshly allocated file_name. */
-- {
-- size_t dir_len = strlen (dir);
-- size_t base_len = strlen (base);
-- int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1]));
-- file_name = (char *) malloc (dir_len + add_slash + base_len + 1);
-- if (file_name != NULL)
-- {
-- memcpy (file_name, dir, dir_len);
-- if (add_slash)
-- file_name[dir_len] = DIRECTORY_SEPARATOR;
-- memcpy (file_name + dir_len + add_slash, base, base_len + 1);
-- }
-- }
--
-- if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL)
-- /* Out of memory or file not found, treat it as empty. */
-- cp = "";
-- else
-- {
-- /* Parse the file's contents. */
-- char *res_ptr = NULL;
-- size_t res_size = 0;
--
-- for (;;)
-- {
-- int c;
-- char buf1[50+1];
-- char buf2[50+1];
-- size_t l1, l2;
-- char *old_res_ptr;
--
-- c = getc (fp);
-- if (c == EOF)
-- break;
-- if (c == '\n' || c == ' ' || c == '\t')
-- continue;
-- if (c == '#')
-- {
-- /* Skip comment, to end of line. */
-- do
-- c = getc (fp);
-- while (!(c == EOF || c == '\n'));
-- if (c == EOF)
-- break;
-- continue;
-- }
-- ungetc (c, fp);
-- if (fscanf (fp, "%50s %50s", buf1, buf2) < 2)
-- break;
-- l1 = strlen (buf1);
-- l2 = strlen (buf2);
-- old_res_ptr = res_ptr;
-- if (res_size == 0)
-- {
-- res_size = l1 + 1 + l2 + 1;
-- res_ptr = (char *) malloc (res_size + 1);
-- }
-- else
-- {
-- res_size += l1 + 1 + l2 + 1;
-- res_ptr = (char *) realloc (res_ptr, res_size + 1);
-- }
-- if (res_ptr == NULL)
-- {
-- /* Out of memory. */
-- res_size = 0;
-- if (old_res_ptr != NULL)
-- free (old_res_ptr);
-- break;
-- }
-- strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
-- strcpy (res_ptr + res_size - (l2 + 1), buf2);
-- }
-- fclose (fp);
-- if (res_size == 0)
-- cp = "";
-- else
-- {
-- *(res_ptr + res_size) = '\0';
-- cp = res_ptr;
-- }
-- }
--
-- if (file_name != NULL)
-- free (file_name);
--
--#else
--
--# if defined VMS
-- /* To avoid the troubles of an extra file charset.alias_vms in the
-- sources of many GNU packages, simply inline the aliases here. */
-- /* The list of encodings is taken from the OpenVMS 7.3-1 documentation
-- "Compaq C Run-Time Library Reference Manual for OpenVMS systems"
-- section 10.7 "Handling Different Character Sets". */
-- cp = "ISO8859-1" "\0" "ISO-8859-1" "\0"
-- "ISO8859-2" "\0" "ISO-8859-2" "\0"
-- "ISO8859-5" "\0" "ISO-8859-5" "\0"
-- "ISO8859-7" "\0" "ISO-8859-7" "\0"
-- "ISO8859-8" "\0" "ISO-8859-8" "\0"
-- "ISO8859-9" "\0" "ISO-8859-9" "\0"
-- /* Japanese */
-- "eucJP" "\0" "EUC-JP" "\0"
-- "SJIS" "\0" "SHIFT_JIS" "\0"
-- "DECKANJI" "\0" "DEC-KANJI" "\0"
-- "SDECKANJI" "\0" "EUC-JP" "\0"
-- /* Chinese */
-- "eucTW" "\0" "EUC-TW" "\0"
-- "DECHANYU" "\0" "DEC-HANYU" "\0"
-- "DECHANZI" "\0" "GB2312" "\0"
-- /* Korean */
-- "DECKOREAN" "\0" "EUC-KR" "\0";
--# endif
--
--# if defined WIN32_NATIVE || defined __CYGWIN__
-- /* To avoid the troubles of installing a separate file in the same
-- directory as the DLL and of retrieving the DLL's directory at
-- runtime, simply inline the aliases here. */
--
-- cp = "CP936" "\0" "GBK" "\0"
-- "CP1361" "\0" "JOHAB" "\0"
-- "CP20127" "\0" "ASCII" "\0"
-- "CP20866" "\0" "KOI8-R" "\0"
-- "CP20936" "\0" "GB2312" "\0"
-- "CP21866" "\0" "KOI8-RU" "\0"
-- "CP28591" "\0" "ISO-8859-1" "\0"
-- "CP28592" "\0" "ISO-8859-2" "\0"
-- "CP28593" "\0" "ISO-8859-3" "\0"
-- "CP28594" "\0" "ISO-8859-4" "\0"
-- "CP28595" "\0" "ISO-8859-5" "\0"
-- "CP28596" "\0" "ISO-8859-6" "\0"
-- "CP28597" "\0" "ISO-8859-7" "\0"
-- "CP28598" "\0" "ISO-8859-8" "\0"
-- "CP28599" "\0" "ISO-8859-9" "\0"
-- "CP28605" "\0" "ISO-8859-15" "\0"
-- "CP38598" "\0" "ISO-8859-8" "\0"
-- "CP51932" "\0" "EUC-JP" "\0"
-- "CP51936" "\0" "GB2312" "\0"
-- "CP51949" "\0" "EUC-KR" "\0"
-- "CP51950" "\0" "EUC-TW" "\0"
-- "CP54936" "\0" "GB18030" "\0"
-- "CP65001" "\0" "UTF-8" "\0";
--# endif
--#endif
--
-- charset_aliases = cp;
-- }
--
-- return cp;
--}
--
--/* Determine the current locale's character encoding, and canonicalize it
-- into one of the canonical names listed in config.charset.
-- The result must not be freed; it is statically allocated.
-- If the canonical name cannot be determined, the result is a non-canonical
-- name. */
--
--#ifdef STATIC
--STATIC
--#endif
--const char *
--locale_charset (void)
--{
-- const char *codeset;
-- const char *aliases;
--
--#if !(defined WIN32_NATIVE || defined OS2)
--
--# if HAVE_LANGINFO_CODESET
--
-- /* Most systems support nl_langinfo (CODESET) nowadays. */
-- codeset = nl_langinfo (CODESET);
--
--# ifdef __CYGWIN__
-- /* Cygwin 2006 does not have locales. nl_langinfo (CODESET) always
-- returns "US-ASCII". As long as this is not fixed, return the suffix
-- of the locale name from the environment variables (if present) or
-- the codepage as a number. */
-- if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0)
-- {
-- const char *locale;
-- static char buf[2 + 10 + 1];
--
-- locale = getenv ("LC_ALL");
-- if (locale == NULL || locale[0] == '\0')
-- {
-- locale = getenv ("LC_CTYPE");
-- if (locale == NULL || locale[0] == '\0')
-- locale = getenv ("LANG");
-- }
-- if (locale != NULL && locale[0] != '\0')
-- {
-- /* If the locale name contains an encoding after the dot, return
-- it. */
-- const char *dot = strchr (locale, '.');
--
-- if (dot != NULL)
-- {
-- const char *modifier;
--
-- dot++;
-- /* Look for the possible @... trailer and remove it, if any. */
-- modifier = strchr (dot, '@');
-- if (modifier == NULL)
-- return dot;
-- if (modifier - dot < sizeof (buf))
-- {
-- memcpy (buf, dot, modifier - dot);
-- buf [modifier - dot] = '\0';
-- return buf;
-- }
-- }
-- }
--
-- /* Woe32 has a function returning the locale's codepage as a number. */
-- sprintf (buf, "CP%u", GetACP ());
-- codeset = buf;
-- }
--# endif
--
--# else
--
-- /* On old systems which lack it, use setlocale or getenv. */
-- const char *locale = NULL;
--
-- /* But most old systems don't have a complete set of locales. Some
-- (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
-- use setlocale here; it would return "C" when it doesn't support the
-- locale name the user has set. */
--# if 0
-- locale = setlocale (LC_CTYPE, NULL);
--# endif
-- if (locale == NULL || locale[0] == '\0')
-- {
-- locale = getenv ("LC_ALL");
-- if (locale == NULL || locale[0] == '\0')
-- {
-- locale = getenv ("LC_CTYPE");
-- if (locale == NULL || locale[0] == '\0')
-- locale = getenv ("LANG");
-- }
-- }
--
-- /* On some old systems, one used to set locale = "iso8859_1". On others,
-- you set it to "language_COUNTRY.charset". In any case, we resolve it
-- through the charset.alias file. */
-- codeset = locale;
--
--# endif
--
--#elif defined WIN32_NATIVE
--
-- static char buf[2 + 10 + 1];
--
-- /* Woe32 has a function returning the locale's codepage as a number. */
-- sprintf (buf, "CP%u", GetACP ());
-- codeset = buf;
--
--#elif defined OS2
--
-- const char *locale;
-- static char buf[2 + 10 + 1];
-- ULONG cp[3];
-- ULONG cplen;
--
-- /* Allow user to override the codeset, as set in the operating system,
-- with standard language environment variables. */
-- locale = getenv ("LC_ALL");
-- if (locale == NULL || locale[0] == '\0')
-- {
-- locale = getenv ("LC_CTYPE");
-- if (locale == NULL || locale[0] == '\0')
-- locale = getenv ("LANG");
-- }
-- if (locale != NULL && locale[0] != '\0')
-- {
-- /* If the locale name contains an encoding after the dot, return it. */
-- const char *dot = strchr (locale, '.');
--
-- if (dot != NULL)
-- {
-- const char *modifier;
--
-- dot++;
-- /* Look for the possible @... trailer and remove it, if any. */
-- modifier = strchr (dot, '@');
-- if (modifier == NULL)
-- return dot;
-- if (modifier - dot < sizeof (buf))
-- {
-- memcpy (buf, dot, modifier - dot);
-- buf [modifier - dot] = '\0';
-- return buf;
-- }
-- }
--
-- /* Resolve through the charset.alias file. */
-- codeset = locale;
-- }
-- else
-- {
-- /* OS/2 has a function returning the locale's codepage as a number. */
-- if (DosQueryCp (sizeof (cp), cp, &cplen))
-- codeset = "";
-- else
-- {
-- sprintf (buf, "CP%u", cp[0]);
-- codeset = buf;
-- }
-- }
--
--#endif
--
-- if (codeset == NULL)
-- /* The canonical name cannot be determined. */
-- codeset = "";
--
-- /* Resolve alias. */
-- for (aliases = get_charset_aliases ();
-- *aliases != '\0';
-- aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1)
-- if (strcmp (codeset, aliases) == 0
-- || (aliases[0] == '*' && aliases[1] == '\0'))
-- {
-- codeset = aliases + strlen (aliases) + 1;
-- break;
-- }
--
-- /* Don't return an empty string. GNU libc and GNU libiconv interpret
-- the empty string as denoting "the locale's character encoding",
-- thus GNU libiconv would call this function a second time. */
-- if (codeset[0] == '\0')
-- codeset = "ASCII";
--
-- return codeset;
--}
---- a/intl/localcharset.h
-+++ /dev/null
-@@ -1,42 +0,0 @@
--/* Determine a canonical name for the current locale's character encoding.
-- Copyright (C) 2000-2003 Free Software Foundation, Inc.
-- This file is part of the GNU CHARSET Library.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--#ifndef _LOCALCHARSET_H
--#define _LOCALCHARSET_H
--
--
--#ifdef __cplusplus
--extern "C" {
--#endif
--
--
--/* Determine the current locale's character encoding, and canonicalize it
-- into one of the canonical names listed in config.charset.
-- The result must not be freed; it is statically allocated.
-- If the canonical name cannot be determined, the result is a non-canonical
-- name. */
--extern const char * locale_charset (void);
--
--
--#ifdef __cplusplus
--}
--#endif
--
--
--#endif /* _LOCALCHARSET_H */
---- a/intl/locale.alias
-+++ /dev/null
-@@ -1,77 +0,0 @@
--# Locale name alias data base.
--# Copyright (C) 1996-2001,2003,2007 Free Software Foundation, Inc.
--#
--# This program is free software; you can redistribute it and/or modify it
--# under the terms of the GNU Library General Public License as published
--# by the Free Software Foundation; either version 2, or (at your option)
--# any later version.
--#
--# This program 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
--# Library General Public License for more details.
--#
--# You should have received a copy of the GNU Library General Public
--# License along with this program; if not, write to the Free Software
--# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
--# USA.
--
--# The format of this file is the same as for the corresponding file of
--# the X Window System, which normally can be found in
--# /usr/lib/X11/locale/locale.alias
--# A single line contains two fields: an alias and a substitution value.
--# All entries are case independent.
--
--# Note: This file is obsolete and is kept around for the time being for
--# backward compatibility. Nobody should rely on the names defined here.
--# Locales should always be specified by their full name.
--
--# Packages using this file:
--
--bokmal nb_NO.ISO-8859-1
--bokmål nb_NO.ISO-8859-1
--catalan ca_ES.ISO-8859-1
--croatian hr_HR.ISO-8859-2
--czech cs_CZ.ISO-8859-2
--danish da_DK.ISO-8859-1
--dansk da_DK.ISO-8859-1
--deutsch de_DE.ISO-8859-1
--dutch nl_NL.ISO-8859-1
--eesti et_EE.ISO-8859-1
--estonian et_EE.ISO-8859-1
--finnish fi_FI.ISO-8859-1
--français fr_FR.ISO-8859-1
--french fr_FR.ISO-8859-1
--galego gl_ES.ISO-8859-1
--galician gl_ES.ISO-8859-1
--german de_DE.ISO-8859-1
--greek el_GR.ISO-8859-7
--hebrew he_IL.ISO-8859-8
--hrvatski hr_HR.ISO-8859-2
--hungarian hu_HU.ISO-8859-2
--icelandic is_IS.ISO-8859-1
--italian it_IT.ISO-8859-1
--japanese ja_JP.eucJP
--japanese.euc ja_JP.eucJP
--ja_JP ja_JP.eucJP
--ja_JP.ujis ja_JP.eucJP
--japanese.sjis ja_JP.SJIS
--korean ko_KR.eucKR
--korean.euc ko_KR.eucKR
--ko_KR ko_KR.eucKR
--lithuanian lt_LT.ISO-8859-13
--no_NO nb_NO.ISO-8859-1
--no_NO.ISO-8859-1 nb_NO.ISO-8859-1
--norwegian nb_NO.ISO-8859-1
--nynorsk nn_NO.ISO-8859-1
--polish pl_PL.ISO-8859-2
--portuguese pt_PT.ISO-8859-1
--romanian ro_RO.ISO-8859-2
--russian ru_RU.ISO-8859-5
--slovak sk_SK.ISO-8859-2
--slovene sl_SI.ISO-8859-2
--slovenian sl_SI.ISO-8859-2
--spanish es_ES.ISO-8859-1
--swedish sv_SE.ISO-8859-1
--thai th_TH.TIS-620
--turkish tr_TR.ISO-8859-9
---- a/intl/localealias.c
-+++ /dev/null
-@@ -1,439 +0,0 @@
--/* Handle aliases for locale names.
-- Copyright (C) 1995-1999, 2000-2001, 2003, 2005-2006 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--/* Tell glibc's <string.h> to provide a prototype for mempcpy().
-- This must come before <config.h> because <config.h> may include
-- <features.h>, and once <features.h> has been included, it's too late. */
--#ifndef _GNU_SOURCE
--# define _GNU_SOURCE 1
--#endif
--
--#ifdef HAVE_CONFIG_H
--# include <config.h>
--#endif
--
--#include <ctype.h>
--#include <stdio.h>
--#if defined _LIBC || defined HAVE___FSETLOCKING
--# include <stdio_ext.h>
--#endif
--#include <sys/types.h>
--
--#ifdef __GNUC__
--# undef alloca
--# define alloca __builtin_alloca
--# define HAVE_ALLOCA 1
--#else
--# ifdef _MSC_VER
--# include <malloc.h>
--# define alloca _alloca
--# else
--# if defined HAVE_ALLOCA_H || defined _LIBC
--# include <alloca.h>
--# else
--# ifdef _AIX
-- #pragma alloca
--# else
--# ifndef alloca
--char *alloca ();
--# endif
--# endif
--# endif
--# endif
--#endif
--
--#include <stdlib.h>
--#include <string.h>
--
--#include "gettextP.h"
--
--#if ENABLE_RELOCATABLE
--# include "relocatable.h"
--#else
--# define relocate(pathname) (pathname)
--#endif
--
--/* @@ end of prolog @@ */
--
--#ifdef _LIBC
--/* Rename the non ANSI C functions. This is required by the standard
-- because some ANSI C functions will require linking with this object
-- file and the name space must not be polluted. */
--# define strcasecmp __strcasecmp
--
--# ifndef mempcpy
--# define mempcpy __mempcpy
--# endif
--# define HAVE_MEMPCPY 1
--# define HAVE___FSETLOCKING 1
--#endif
--
--/* Handle multi-threaded applications. */
--#ifdef _LIBC
--# include <bits/libc-lock.h>
--#else
--# include "lock.h"
--#endif
--
--#ifndef internal_function
--# define internal_function
--#endif
--
--/* Some optimizations for glibc. */
--#ifdef _LIBC
--# define FEOF(fp) feof_unlocked (fp)
--# define FGETS(buf, n, fp) fgets_unlocked (buf, n, fp)
--#else
--# define FEOF(fp) feof (fp)
--# define FGETS(buf, n, fp) fgets (buf, n, fp)
--#endif
--
--/* For those losing systems which don't have `alloca' we have to add
-- some additional code emulating it. */
--#ifdef HAVE_ALLOCA
--# define freea(p) /* nothing */
--#else
--# define alloca(n) malloc (n)
--# define freea(p) free (p)
--#endif
--
--#if defined _LIBC_REENTRANT || HAVE_DECL_FGETS_UNLOCKED
--# undef fgets
--# define fgets(buf, len, s) fgets_unlocked (buf, len, s)
--#endif
--#if defined _LIBC_REENTRANT || HAVE_DECL_FEOF_UNLOCKED
--# undef feof
--# define feof(s) feof_unlocked (s)
--#endif
--
--
--__libc_lock_define_initialized (static, lock)
--
--
--struct alias_map
--{
-- const char *alias;
-- const char *value;
--};
--
--
--#ifndef _LIBC
--# define libc_freeres_ptr(decl) decl
--#endif
--
--libc_freeres_ptr (static char *string_space);
--static size_t string_space_act;
--static size_t string_space_max;
--libc_freeres_ptr (static struct alias_map *map);
--static size_t nmap;
--static size_t maxmap;
--
--
--/* Prototypes for local functions. */
--static size_t read_alias_file (const char *fname, int fname_len)
-- internal_function;
--static int extend_alias_table (void);
--static int alias_compare (const struct alias_map *map1,
-- const struct alias_map *map2);
--
--
--const char *
--_nl_expand_alias (const char *name)
--{
-- static const char *locale_alias_path;
-- struct alias_map *retval;
-- const char *result = NULL;
-- size_t added;
--
-- __libc_lock_lock (lock);
--
-- if (locale_alias_path == NULL)
-- locale_alias_path = LOCALE_ALIAS_PATH;
--
-- do
-- {
-- struct alias_map item;
--
-- item.alias = name;
--
-- if (nmap > 0)
-- retval = (struct alias_map *) bsearch (&item, map, nmap,
-- sizeof (struct alias_map),
-- (int (*) (const void *,
-- const void *)
-- ) alias_compare);
-- else
-- retval = NULL;
--
-- /* We really found an alias. Return the value. */
-- if (retval != NULL)
-- {
-- result = retval->value;
-- break;
-- }
--
-- /* Perhaps we can find another alias file. */
-- added = 0;
-- while (added == 0 && locale_alias_path[0] != '\0')
-- {
-- const char *start;
--
-- while (locale_alias_path[0] == PATH_SEPARATOR)
-- ++locale_alias_path;
-- start = locale_alias_path;
--
-- while (locale_alias_path[0] != '\0'
-- && locale_alias_path[0] != PATH_SEPARATOR)
-- ++locale_alias_path;
--
-- if (start < locale_alias_path)
-- added = read_alias_file (start, locale_alias_path - start);
-- }
-- }
-- while (added != 0);
--
-- __libc_lock_unlock (lock);
--
-- return result;
--}
--
--
--static size_t
--internal_function
--read_alias_file (const char *fname, int fname_len)
--{
-- FILE *fp;
-- char *full_fname;
-- size_t added;
-- static const char aliasfile[] = "/locale.alias";
--
-- full_fname = (char *) alloca (fname_len + sizeof aliasfile);
--#ifdef HAVE_MEMPCPY
-- mempcpy (mempcpy (full_fname, fname, fname_len),
-- aliasfile, sizeof aliasfile);
--#else
-- memcpy (full_fname, fname, fname_len);
-- memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile);
--#endif
--
--#ifdef _LIBC
-- /* Note the file is opened with cancellation in the I/O functions
-- disabled. */
-- fp = fopen (relocate (full_fname), "rc");
--#else
-- fp = fopen (relocate (full_fname), "r");
--#endif
-- freea (full_fname);
-- if (fp == NULL)
-- return 0;
--
--#ifdef HAVE___FSETLOCKING
-- /* No threads present. */
-- __fsetlocking (fp, FSETLOCKING_BYCALLER);
--#endif
--
-- added = 0;
-- while (!FEOF (fp))
-- {
-- /* It is a reasonable approach to use a fix buffer here because
-- a) we are only interested in the first two fields
-- b) these fields must be usable as file names and so must not
-- be that long
-- We avoid a multi-kilobyte buffer here since this would use up
-- stack space which we might not have if the program ran out of
-- memory. */
-- char buf[400];
-- char *alias;
-- char *value;
-- char *cp;
-- int complete_line;
--
-- if (FGETS (buf, sizeof buf, fp) == NULL)
-- /* EOF reached. */
-- break;
--
-- /* Determine whether the line is complete. */
-- complete_line = strchr (buf, '\n') != NULL;
--
-- cp = buf;
-- /* Ignore leading white space. */
-- while (isspace ((unsigned char) cp[0]))
-- ++cp;
--
-- /* A leading '#' signals a comment line. */
-- if (cp[0] != '\0' && cp[0] != '#')
-- {
-- alias = cp++;
-- while (cp[0] != '\0' && !isspace ((unsigned char) cp[0]))
-- ++cp;
-- /* Terminate alias name. */
-- if (cp[0] != '\0')
-- *cp++ = '\0';
--
-- /* Now look for the beginning of the value. */
-- while (isspace ((unsigned char) cp[0]))
-- ++cp;
--
-- if (cp[0] != '\0')
-- {
-- value = cp++;
-- while (cp[0] != '\0' && !isspace ((unsigned char) cp[0]))
-- ++cp;
-- /* Terminate value. */
-- if (cp[0] == '\n')
-- {
-- /* This has to be done to make the following test
-- for the end of line possible. We are looking for
-- the terminating '\n' which do not overwrite here. */
-- *cp++ = '\0';
-- *cp = '\n';
-- }
-- else if (cp[0] != '\0')
-- *cp++ = '\0';
--
--#ifdef IN_LIBGLOCALE
-- /* glibc's locale.alias contains entries for ja_JP and ko_KR
-- that make it impossible to use a Japanese or Korean UTF-8
-- locale under the name "ja_JP" or "ko_KR". Ignore these
-- entries. */
-- if (strchr (alias, '_') == NULL)
--#endif
-- {
-- size_t alias_len;
-- size_t value_len;
--
-- if (nmap >= maxmap)
-- if (__builtin_expect (extend_alias_table (), 0))
-- goto out;
--
-- alias_len = strlen (alias) + 1;
-- value_len = strlen (value) + 1;
--
-- if (string_space_act + alias_len + value_len > string_space_max)
-- {
-- /* Increase size of memory pool. */
-- size_t new_size = (string_space_max
-- + (alias_len + value_len > 1024
-- ? alias_len + value_len : 1024));
-- char *new_pool = (char *) realloc (string_space, new_size);
-- if (new_pool == NULL)
-- goto out;
--
-- if (__builtin_expect (string_space != new_pool, 0))
-- {
-- size_t i;
--
-- for (i = 0; i < nmap; i++)
-- {
-- map[i].alias += new_pool - string_space;
-- map[i].value += new_pool - string_space;
-- }
-- }
--
-- string_space = new_pool;
-- string_space_max = new_size;
-- }
--
-- map[nmap].alias =
-- (const char *) memcpy (&string_space[string_space_act],
-- alias, alias_len);
-- string_space_act += alias_len;
--
-- map[nmap].value =
-- (const char *) memcpy (&string_space[string_space_act],
-- value, value_len);
-- string_space_act += value_len;
--
-- ++nmap;
-- ++added;
-- }
-- }
-- }
--
-- /* Possibly not the whole line fits into the buffer. Ignore
-- the rest of the line. */
-- if (! complete_line)
-- do
-- if (FGETS (buf, sizeof buf, fp) == NULL)
-- /* Make sure the inner loop will be left. The outer loop
-- will exit at the `feof' test. */
-- break;
-- while (strchr (buf, '\n') == NULL);
-- }
--
-- out:
-- /* Should we test for ferror()? I think we have to silently ignore
-- errors. --drepper */
-- fclose (fp);
--
-- if (added > 0)
-- qsort (map, nmap, sizeof (struct alias_map),
-- (int (*) (const void *, const void *)) alias_compare);
--
-- return added;
--}
--
--
--static int
--extend_alias_table ()
--{
-- size_t new_size;
-- struct alias_map *new_map;
--
-- new_size = maxmap == 0 ? 100 : 2 * maxmap;
-- new_map = (struct alias_map *) realloc (map, (new_size
-- * sizeof (struct alias_map)));
-- if (new_map == NULL)
-- /* Simply don't extend: we don't have any more core. */
-- return -1;
--
-- map = new_map;
-- maxmap = new_size;
-- return 0;
--}
--
--
--static int
--alias_compare (const struct alias_map *map1, const struct alias_map *map2)
--{
--#if defined _LIBC || defined HAVE_STRCASECMP
-- return strcasecmp (map1->alias, map2->alias);
--#else
-- const unsigned char *p1 = (const unsigned char *) map1->alias;
-- const unsigned char *p2 = (const unsigned char *) map2->alias;
-- unsigned char c1, c2;
--
-- if (p1 == p2)
-- return 0;
--
-- do
-- {
-- /* I know this seems to be odd but the tolower() function in
-- some systems libc cannot handle nonalpha characters. */
-- c1 = isupper (*p1) ? tolower (*p1) : *p1;
-- c2 = isupper (*p2) ? tolower (*p2) : *p2;
-- if (c1 == '\0')
-- break;
-- ++p1;
-- ++p2;
-- }
-- while (c1 == c2);
--
-- return c1 - c2;
--#endif
--}
---- a/intl/localename.c
-+++ /dev/null
-@@ -1,1507 +0,0 @@
--/* Determine name of the currently selected locale.
-- Copyright (C) 1995-1999, 2000-2007 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--/* Written by Ulrich Drepper <drepper@gnu.org>, 1995. */
--/* Win32 code written by Tor Lillqvist <tml@iki.fi>. */
--/* MacOS X code written by Bruno Haible <bruno@clisp.org>. */
--
--#include <config.h>
--
--/* Specification. */
--#ifdef IN_LIBINTL
--# include "gettextP.h"
--#else
--# include "localename.h"
--#endif
--
--#include <stdlib.h>
--#include <locale.h>
--
--#if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
--# include <string.h>
--# include <CoreFoundation/CFString.h>
--# if HAVE_CFLOCALECOPYCURRENT
--# include <CoreFoundation/CFLocale.h>
--# elif HAVE_CFPREFERENCESCOPYAPPVALUE
--# include <CoreFoundation/CFPreferences.h>
--# endif
--#endif
--
--#if defined _WIN32 || defined __WIN32__
--# define WIN32_NATIVE
--#endif
--
--#ifdef WIN32_NATIVE
--# define WIN32_LEAN_AND_MEAN
--# include <windows.h>
--/* List of language codes, sorted by value:
-- 0x01 LANG_ARABIC
-- 0x02 LANG_BULGARIAN
-- 0x03 LANG_CATALAN
-- 0x04 LANG_CHINESE
-- 0x05 LANG_CZECH
-- 0x06 LANG_DANISH
-- 0x07 LANG_GERMAN
-- 0x08 LANG_GREEK
-- 0x09 LANG_ENGLISH
-- 0x0a LANG_SPANISH
-- 0x0b LANG_FINNISH
-- 0x0c LANG_FRENCH
-- 0x0d LANG_HEBREW
-- 0x0e LANG_HUNGARIAN
-- 0x0f LANG_ICELANDIC
-- 0x10 LANG_ITALIAN
-- 0x11 LANG_JAPANESE
-- 0x12 LANG_KOREAN
-- 0x13 LANG_DUTCH
-- 0x14 LANG_NORWEGIAN
-- 0x15 LANG_POLISH
-- 0x16 LANG_PORTUGUESE
-- 0x17 LANG_RHAETO_ROMANCE
-- 0x18 LANG_ROMANIAN
-- 0x19 LANG_RUSSIAN
-- 0x1a LANG_CROATIAN == LANG_SERBIAN
-- 0x1b LANG_SLOVAK
-- 0x1c LANG_ALBANIAN
-- 0x1d LANG_SWEDISH
-- 0x1e LANG_THAI
-- 0x1f LANG_TURKISH
-- 0x20 LANG_URDU
-- 0x21 LANG_INDONESIAN
-- 0x22 LANG_UKRAINIAN
-- 0x23 LANG_BELARUSIAN
-- 0x24 LANG_SLOVENIAN
-- 0x25 LANG_ESTONIAN
-- 0x26 LANG_LATVIAN
-- 0x27 LANG_LITHUANIAN
-- 0x28 LANG_TAJIK
-- 0x29 LANG_FARSI
-- 0x2a LANG_VIETNAMESE
-- 0x2b LANG_ARMENIAN
-- 0x2c LANG_AZERI
-- 0x2d LANG_BASQUE
-- 0x2e LANG_SORBIAN
-- 0x2f LANG_MACEDONIAN
-- 0x30 LANG_SUTU
-- 0x31 LANG_TSONGA
-- 0x32 LANG_TSWANA
-- 0x33 LANG_VENDA
-- 0x34 LANG_XHOSA
-- 0x35 LANG_ZULU
-- 0x36 LANG_AFRIKAANS
-- 0x37 LANG_GEORGIAN
-- 0x38 LANG_FAEROESE
-- 0x39 LANG_HINDI
-- 0x3a LANG_MALTESE
-- 0x3b LANG_SAAMI
-- 0x3c LANG_GAELIC
-- 0x3d LANG_YIDDISH
-- 0x3e LANG_MALAY
-- 0x3f LANG_KAZAK
-- 0x40 LANG_KYRGYZ
-- 0x41 LANG_SWAHILI
-- 0x42 LANG_TURKMEN
-- 0x43 LANG_UZBEK
-- 0x44 LANG_TATAR
-- 0x45 LANG_BENGALI
-- 0x46 LANG_PUNJABI
-- 0x47 LANG_GUJARATI
-- 0x48 LANG_ORIYA
-- 0x49 LANG_TAMIL
-- 0x4a LANG_TELUGU
-- 0x4b LANG_KANNADA
-- 0x4c LANG_MALAYALAM
-- 0x4d LANG_ASSAMESE
-- 0x4e LANG_MARATHI
-- 0x4f LANG_SANSKRIT
-- 0x50 LANG_MONGOLIAN
-- 0x51 LANG_TIBETAN
-- 0x52 LANG_WELSH
-- 0x53 LANG_CAMBODIAN
-- 0x54 LANG_LAO
-- 0x55 LANG_BURMESE
-- 0x56 LANG_GALICIAN
-- 0x57 LANG_KONKANI
-- 0x58 LANG_MANIPURI
-- 0x59 LANG_SINDHI
-- 0x5a LANG_SYRIAC
-- 0x5b LANG_SINHALESE
-- 0x5c LANG_CHEROKEE
-- 0x5d LANG_INUKTITUT
-- 0x5e LANG_AMHARIC
-- 0x5f LANG_TAMAZIGHT
-- 0x60 LANG_KASHMIRI
-- 0x61 LANG_NEPALI
-- 0x62 LANG_FRISIAN
-- 0x63 LANG_PASHTO
-- 0x64 LANG_TAGALOG
-- 0x65 LANG_DIVEHI
-- 0x66 LANG_EDO
-- 0x67 LANG_FULFULDE
-- 0x68 LANG_HAUSA
-- 0x69 LANG_IBIBIO
-- 0x6a LANG_YORUBA
-- 0x70 LANG_IGBO
-- 0x71 LANG_KANURI
-- 0x72 LANG_OROMO
-- 0x73 LANG_TIGRINYA
-- 0x74 LANG_GUARANI
-- 0x75 LANG_HAWAIIAN
-- 0x76 LANG_LATIN
-- 0x77 LANG_SOMALI
-- 0x78 LANG_YI
-- 0x79 LANG_PAPIAMENTU
--*/
--/* Mingw headers don't have latest language and sublanguage codes. */
--# ifndef LANG_AFRIKAANS
--# define LANG_AFRIKAANS 0x36
--# endif
--# ifndef LANG_ALBANIAN
--# define LANG_ALBANIAN 0x1c
--# endif
--# ifndef LANG_AMHARIC
--# define LANG_AMHARIC 0x5e
--# endif
--# ifndef LANG_ARABIC
--# define LANG_ARABIC 0x01
--# endif
--# ifndef LANG_ARMENIAN
--# define LANG_ARMENIAN 0x2b
--# endif
--# ifndef LANG_ASSAMESE
--# define LANG_ASSAMESE 0x4d
--# endif
--# ifndef LANG_AZERI
--# define LANG_AZERI 0x2c
--# endif
--# ifndef LANG_BASQUE
--# define LANG_BASQUE 0x2d
--# endif
--# ifndef LANG_BELARUSIAN
--# define LANG_BELARUSIAN 0x23
--# endif
--# ifndef LANG_BENGALI
--# define LANG_BENGALI 0x45
--# endif
--# ifndef LANG_BURMESE
--# define LANG_BURMESE 0x55
--# endif
--# ifndef LANG_CAMBODIAN
--# define LANG_CAMBODIAN 0x53
--# endif
--# ifndef LANG_CATALAN
--# define LANG_CATALAN 0x03
--# endif
--# ifndef LANG_CHEROKEE
--# define LANG_CHEROKEE 0x5c
--# endif
--# ifndef LANG_DIVEHI
--# define LANG_DIVEHI 0x65
--# endif
--# ifndef LANG_EDO
--# define LANG_EDO 0x66
--# endif
--# ifndef LANG_ESTONIAN
--# define LANG_ESTONIAN 0x25
--# endif
--# ifndef LANG_FAEROESE
--# define LANG_FAEROESE 0x38
--# endif
--# ifndef LANG_FARSI
--# define LANG_FARSI 0x29
--# endif
--# ifndef LANG_FRISIAN
--# define LANG_FRISIAN 0x62
--# endif
--# ifndef LANG_FULFULDE
--# define LANG_FULFULDE 0x67
--# endif
--# ifndef LANG_GAELIC
--# define LANG_GAELIC 0x3c
--# endif
--# ifndef LANG_GALICIAN
--# define LANG_GALICIAN 0x56
--# endif
--# ifndef LANG_GEORGIAN
--# define LANG_GEORGIAN 0x37
--# endif
--# ifndef LANG_GUARANI
--# define LANG_GUARANI 0x74
--# endif
--# ifndef LANG_GUJARATI
--# define LANG_GUJARATI 0x47
--# endif
--# ifndef LANG_HAUSA
--# define LANG_HAUSA 0x68
--# endif
--# ifndef LANG_HAWAIIAN
--# define LANG_HAWAIIAN 0x75
--# endif
--# ifndef LANG_HEBREW
--# define LANG_HEBREW 0x0d
--# endif
--# ifndef LANG_HINDI
--# define LANG_HINDI 0x39
--# endif
--# ifndef LANG_IBIBIO
--# define LANG_IBIBIO 0x69
--# endif
--# ifndef LANG_IGBO
--# define LANG_IGBO 0x70
--# endif
--# ifndef LANG_INDONESIAN
--# define LANG_INDONESIAN 0x21
--# endif
--# ifndef LANG_INUKTITUT
--# define LANG_INUKTITUT 0x5d
--# endif
--# ifndef LANG_KANNADA
--# define LANG_KANNADA 0x4b
--# endif
--# ifndef LANG_KANURI
--# define LANG_KANURI 0x71
--# endif
--# ifndef LANG_KASHMIRI
--# define LANG_KASHMIRI 0x60
--# endif
--# ifndef LANG_KAZAK
--# define LANG_KAZAK 0x3f
--# endif
--# ifndef LANG_KONKANI
--# define LANG_KONKANI 0x57
--# endif
--# ifndef LANG_KYRGYZ
--# define LANG_KYRGYZ 0x40
--# endif
--# ifndef LANG_LAO
--# define LANG_LAO 0x54
--# endif
--# ifndef LANG_LATIN
--# define LANG_LATIN 0x76
--# endif
--# ifndef LANG_LATVIAN
--# define LANG_LATVIAN 0x26
--# endif
--# ifndef LANG_LITHUANIAN
--# define LANG_LITHUANIAN 0x27
--# endif
--# ifndef LANG_MACEDONIAN
--# define LANG_MACEDONIAN 0x2f
--# endif
--# ifndef LANG_MALAY
--# define LANG_MALAY 0x3e
--# endif
--# ifndef LANG_MALAYALAM
--# define LANG_MALAYALAM 0x4c
--# endif
--# ifndef LANG_MALTESE
--# define LANG_MALTESE 0x3a
--# endif
--# ifndef LANG_MANIPURI
--# define LANG_MANIPURI 0x58
--# endif
--# ifndef LANG_MARATHI
--# define LANG_MARATHI 0x4e
--# endif
--# ifndef LANG_MONGOLIAN
--# define LANG_MONGOLIAN 0x50
--# endif
--# ifndef LANG_NEPALI
--# define LANG_NEPALI 0x61
--# endif
--# ifndef LANG_ORIYA
--# define LANG_ORIYA 0x48
--# endif
--# ifndef LANG_OROMO
--# define LANG_OROMO 0x72
--# endif
--# ifndef LANG_PAPIAMENTU
--# define LANG_PAPIAMENTU 0x79
--# endif
--# ifndef LANG_PASHTO
--# define LANG_PASHTO 0x63
--# endif
--# ifndef LANG_PUNJABI
--# define LANG_PUNJABI 0x46
--# endif
--# ifndef LANG_RHAETO_ROMANCE
--# define LANG_RHAETO_ROMANCE 0x17
--# endif
--# ifndef LANG_SAAMI
--# define LANG_SAAMI 0x3b
--# endif
--# ifndef LANG_SANSKRIT
--# define LANG_SANSKRIT 0x4f
--# endif
--# ifndef LANG_SERBIAN
--# define LANG_SERBIAN 0x1a
--# endif
--# ifndef LANG_SINDHI
--# define LANG_SINDHI 0x59
--# endif
--# ifndef LANG_SINHALESE
--# define LANG_SINHALESE 0x5b
--# endif
--# ifndef LANG_SLOVAK
--# define LANG_SLOVAK 0x1b
--# endif
--# ifndef LANG_SOMALI
--# define LANG_SOMALI 0x77
--# endif
--# ifndef LANG_SORBIAN
--# define LANG_SORBIAN 0x2e
--# endif
--# ifndef LANG_SUTU
--# define LANG_SUTU 0x30
--# endif
--# ifndef LANG_SWAHILI
--# define LANG_SWAHILI 0x41
--# endif
--# ifndef LANG_SYRIAC
--# define LANG_SYRIAC 0x5a
--# endif
--# ifndef LANG_TAGALOG
--# define LANG_TAGALOG 0x64
--# endif
--# ifndef LANG_TAJIK
--# define LANG_TAJIK 0x28
--# endif
--# ifndef LANG_TAMAZIGHT
--# define LANG_TAMAZIGHT 0x5f
--# endif
--# ifndef LANG_TAMIL
--# define LANG_TAMIL 0x49
--# endif
--# ifndef LANG_TATAR
--# define LANG_TATAR 0x44
--# endif
--# ifndef LANG_TELUGU
--# define LANG_TELUGU 0x4a
--# endif
--# ifndef LANG_THAI
--# define LANG_THAI 0x1e
--# endif
--# ifndef LANG_TIBETAN
--# define LANG_TIBETAN 0x51
--# endif
--# ifndef LANG_TIGRINYA
--# define LANG_TIGRINYA 0x73
--# endif
--# ifndef LANG_TSONGA
--# define LANG_TSONGA 0x31
--# endif
--# ifndef LANG_TSWANA
--# define LANG_TSWANA 0x32
--# endif
--# ifndef LANG_TURKMEN
--# define LANG_TURKMEN 0x42
--# endif
--# ifndef LANG_UKRAINIAN
--# define LANG_UKRAINIAN 0x22
--# endif
--# ifndef LANG_URDU
--# define LANG_URDU 0x20
--# endif
--# ifndef LANG_UZBEK
--# define LANG_UZBEK 0x43
--# endif
--# ifndef LANG_VENDA
--# define LANG_VENDA 0x33
--# endif
--# ifndef LANG_VIETNAMESE
--# define LANG_VIETNAMESE 0x2a
--# endif
--# ifndef LANG_WELSH
--# define LANG_WELSH 0x52
--# endif
--# ifndef LANG_XHOSA
--# define LANG_XHOSA 0x34
--# endif
--# ifndef LANG_YI
--# define LANG_YI 0x78
--# endif
--# ifndef LANG_YIDDISH
--# define LANG_YIDDISH 0x3d
--# endif
--# ifndef LANG_YORUBA
--# define LANG_YORUBA 0x6a
--# endif
--# ifndef LANG_ZULU
--# define LANG_ZULU 0x35
--# endif
--# ifndef SUBLANG_ARABIC_SAUDI_ARABIA
--# define SUBLANG_ARABIC_SAUDI_ARABIA 0x01
--# endif
--# ifndef SUBLANG_ARABIC_IRAQ
--# define SUBLANG_ARABIC_IRAQ 0x02
--# endif
--# ifndef SUBLANG_ARABIC_EGYPT
--# define SUBLANG_ARABIC_EGYPT 0x03
--# endif
--# ifndef SUBLANG_ARABIC_LIBYA
--# define SUBLANG_ARABIC_LIBYA 0x04
--# endif
--# ifndef SUBLANG_ARABIC_ALGERIA
--# define SUBLANG_ARABIC_ALGERIA 0x05
--# endif
--# ifndef SUBLANG_ARABIC_MOROCCO
--# define SUBLANG_ARABIC_MOROCCO 0x06
--# endif
--# ifndef SUBLANG_ARABIC_TUNISIA
--# define SUBLANG_ARABIC_TUNISIA 0x07
--# endif
--# ifndef SUBLANG_ARABIC_OMAN
--# define SUBLANG_ARABIC_OMAN 0x08
--# endif
--# ifndef SUBLANG_ARABIC_YEMEN
--# define SUBLANG_ARABIC_YEMEN 0x09
--# endif
--# ifndef SUBLANG_ARABIC_SYRIA
--# define SUBLANG_ARABIC_SYRIA 0x0a
--# endif
--# ifndef SUBLANG_ARABIC_JORDAN
--# define SUBLANG_ARABIC_JORDAN 0x0b
--# endif
--# ifndef SUBLANG_ARABIC_LEBANON
--# define SUBLANG_ARABIC_LEBANON 0x0c
--# endif
--# ifndef SUBLANG_ARABIC_KUWAIT
--# define SUBLANG_ARABIC_KUWAIT 0x0d
--# endif
--# ifndef SUBLANG_ARABIC_UAE
--# define SUBLANG_ARABIC_UAE 0x0e
--# endif
--# ifndef SUBLANG_ARABIC_BAHRAIN
--# define SUBLANG_ARABIC_BAHRAIN 0x0f
--# endif
--# ifndef SUBLANG_ARABIC_QATAR
--# define SUBLANG_ARABIC_QATAR 0x10
--# endif
--# ifndef SUBLANG_AZERI_LATIN
--# define SUBLANG_AZERI_LATIN 0x01
--# endif
--# ifndef SUBLANG_AZERI_CYRILLIC
--# define SUBLANG_AZERI_CYRILLIC 0x02
--# endif
--# ifndef SUBLANG_BENGALI_INDIA
--# define SUBLANG_BENGALI_INDIA 0x01
--# endif
--# ifndef SUBLANG_BENGALI_BANGLADESH
--# define SUBLANG_BENGALI_BANGLADESH 0x02
--# endif
--# ifndef SUBLANG_CHINESE_MACAU
--# define SUBLANG_CHINESE_MACAU 0x05
--# endif
--# ifndef SUBLANG_ENGLISH_SOUTH_AFRICA
--# define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07
--# endif
--# ifndef SUBLANG_ENGLISH_JAMAICA
--# define SUBLANG_ENGLISH_JAMAICA 0x08
--# endif
--# ifndef SUBLANG_ENGLISH_CARIBBEAN
--# define SUBLANG_ENGLISH_CARIBBEAN 0x09
--# endif
--# ifndef SUBLANG_ENGLISH_BELIZE
--# define SUBLANG_ENGLISH_BELIZE 0x0a
--# endif
--# ifndef SUBLANG_ENGLISH_TRINIDAD
--# define SUBLANG_ENGLISH_TRINIDAD 0x0b
--# endif
--# ifndef SUBLANG_ENGLISH_ZIMBABWE
--# define SUBLANG_ENGLISH_ZIMBABWE 0x0c
--# endif
--# ifndef SUBLANG_ENGLISH_PHILIPPINES
--# define SUBLANG_ENGLISH_PHILIPPINES 0x0d
--# endif
--# ifndef SUBLANG_ENGLISH_INDONESIA
--# define SUBLANG_ENGLISH_INDONESIA 0x0e
--# endif
--# ifndef SUBLANG_ENGLISH_HONGKONG
--# define SUBLANG_ENGLISH_HONGKONG 0x0f
--# endif
--# ifndef SUBLANG_ENGLISH_INDIA
--# define SUBLANG_ENGLISH_INDIA 0x10
--# endif
--# ifndef SUBLANG_ENGLISH_MALAYSIA
--# define SUBLANG_ENGLISH_MALAYSIA 0x11
--# endif
--# ifndef SUBLANG_ENGLISH_SINGAPORE
--# define SUBLANG_ENGLISH_SINGAPORE 0x12
--# endif
--# ifndef SUBLANG_FRENCH_LUXEMBOURG
--# define SUBLANG_FRENCH_LUXEMBOURG 0x05
--# endif
--# ifndef SUBLANG_FRENCH_MONACO
--# define SUBLANG_FRENCH_MONACO 0x06
--# endif
--# ifndef SUBLANG_FRENCH_WESTINDIES
--# define SUBLANG_FRENCH_WESTINDIES 0x07
--# endif
--# ifndef SUBLANG_FRENCH_REUNION
--# define SUBLANG_FRENCH_REUNION 0x08
--# endif
--# ifndef SUBLANG_FRENCH_CONGO
--# define SUBLANG_FRENCH_CONGO 0x09
--# endif
--# ifndef SUBLANG_FRENCH_SENEGAL
--# define SUBLANG_FRENCH_SENEGAL 0x0a
--# endif
--# ifndef SUBLANG_FRENCH_CAMEROON
--# define SUBLANG_FRENCH_CAMEROON 0x0b
--# endif
--# ifndef SUBLANG_FRENCH_COTEDIVOIRE
--# define SUBLANG_FRENCH_COTEDIVOIRE 0x0c
--# endif
--# ifndef SUBLANG_FRENCH_MALI
--# define SUBLANG_FRENCH_MALI 0x0d
--# endif
--# ifndef SUBLANG_FRENCH_MOROCCO
--# define SUBLANG_FRENCH_MOROCCO 0x0e
--# endif
--# ifndef SUBLANG_FRENCH_HAITI
--# define SUBLANG_FRENCH_HAITI 0x0f
--# endif
--# ifndef SUBLANG_GERMAN_LUXEMBOURG
--# define SUBLANG_GERMAN_LUXEMBOURG 0x04
--# endif
--# ifndef SUBLANG_GERMAN_LIECHTENSTEIN
--# define SUBLANG_GERMAN_LIECHTENSTEIN 0x05
--# endif
--# ifndef SUBLANG_KASHMIRI_INDIA
--# define SUBLANG_KASHMIRI_INDIA 0x02
--# endif
--# ifndef SUBLANG_MALAY_MALAYSIA
--# define SUBLANG_MALAY_MALAYSIA 0x01
--# endif
--# ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM
--# define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02
--# endif
--# ifndef SUBLANG_NEPALI_INDIA
--# define SUBLANG_NEPALI_INDIA 0x02
--# endif
--# ifndef SUBLANG_PUNJABI_INDIA
--# define SUBLANG_PUNJABI_INDIA 0x01
--# endif
--# ifndef SUBLANG_PUNJABI_PAKISTAN
--# define SUBLANG_PUNJABI_PAKISTAN 0x02
--# endif
--# ifndef SUBLANG_ROMANIAN_ROMANIA
--# define SUBLANG_ROMANIAN_ROMANIA 0x01
--# endif
--# ifndef SUBLANG_ROMANIAN_MOLDOVA
--# define SUBLANG_ROMANIAN_MOLDOVA 0x02
--# endif
--# ifndef SUBLANG_SERBIAN_LATIN
--# define SUBLANG_SERBIAN_LATIN 0x02
--# endif
--# ifndef SUBLANG_SERBIAN_CYRILLIC
--# define SUBLANG_SERBIAN_CYRILLIC 0x03
--# endif
--# ifndef SUBLANG_SINDHI_PAKISTAN
--# define SUBLANG_SINDHI_PAKISTAN 0x01
--# endif
--# ifndef SUBLANG_SINDHI_AFGHANISTAN
--# define SUBLANG_SINDHI_AFGHANISTAN 0x02
--# endif
--# ifndef SUBLANG_SPANISH_GUATEMALA
--# define SUBLANG_SPANISH_GUATEMALA 0x04
--# endif
--# ifndef SUBLANG_SPANISH_COSTA_RICA
--# define SUBLANG_SPANISH_COSTA_RICA 0x05
--# endif
--# ifndef SUBLANG_SPANISH_PANAMA
--# define SUBLANG_SPANISH_PANAMA 0x06
--# endif
--# ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC
--# define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07
--# endif
--# ifndef SUBLANG_SPANISH_VENEZUELA
--# define SUBLANG_SPANISH_VENEZUELA 0x08
--# endif
--# ifndef SUBLANG_SPANISH_COLOMBIA
--# define SUBLANG_SPANISH_COLOMBIA 0x09
--# endif
--# ifndef SUBLANG_SPANISH_PERU
--# define SUBLANG_SPANISH_PERU 0x0a
--# endif
--# ifndef SUBLANG_SPANISH_ARGENTINA
--# define SUBLANG_SPANISH_ARGENTINA 0x0b
--# endif
--# ifndef SUBLANG_SPANISH_ECUADOR
--# define SUBLANG_SPANISH_ECUADOR 0x0c
--# endif
--# ifndef SUBLANG_SPANISH_CHILE
--# define SUBLANG_SPANISH_CHILE 0x0d
--# endif
--# ifndef SUBLANG_SPANISH_URUGUAY
--# define SUBLANG_SPANISH_URUGUAY 0x0e
--# endif
--# ifndef SUBLANG_SPANISH_PARAGUAY
--# define SUBLANG_SPANISH_PARAGUAY 0x0f
--# endif
--# ifndef SUBLANG_SPANISH_BOLIVIA
--# define SUBLANG_SPANISH_BOLIVIA 0x10
--# endif
--# ifndef SUBLANG_SPANISH_EL_SALVADOR
--# define SUBLANG_SPANISH_EL_SALVADOR 0x11
--# endif
--# ifndef SUBLANG_SPANISH_HONDURAS
--# define SUBLANG_SPANISH_HONDURAS 0x12
--# endif
--# ifndef SUBLANG_SPANISH_NICARAGUA
--# define SUBLANG_SPANISH_NICARAGUA 0x13
--# endif
--# ifndef SUBLANG_SPANISH_PUERTO_RICO
--# define SUBLANG_SPANISH_PUERTO_RICO 0x14
--# endif
--# ifndef SUBLANG_SWEDISH_FINLAND
--# define SUBLANG_SWEDISH_FINLAND 0x02
--# endif
--# ifndef SUBLANG_TAMAZIGHT_ARABIC
--# define SUBLANG_TAMAZIGHT_ARABIC 0x01
--# endif
--# ifndef SUBLANG_TAMAZIGHT_ALGERIA_LATIN
--# define SUBLANG_TAMAZIGHT_ALGERIA_LATIN 0x02
--# endif
--# ifndef SUBLANG_TIGRINYA_ETHIOPIA
--# define SUBLANG_TIGRINYA_ETHIOPIA 0x01
--# endif
--# ifndef SUBLANG_TIGRINYA_ERITREA
--# define SUBLANG_TIGRINYA_ERITREA 0x02
--# endif
--# ifndef SUBLANG_URDU_PAKISTAN
--# define SUBLANG_URDU_PAKISTAN 0x01
--# endif
--# ifndef SUBLANG_URDU_INDIA
--# define SUBLANG_URDU_INDIA 0x02
--# endif
--# ifndef SUBLANG_UZBEK_LATIN
--# define SUBLANG_UZBEK_LATIN 0x01
--# endif
--# ifndef SUBLANG_UZBEK_CYRILLIC
--# define SUBLANG_UZBEK_CYRILLIC 0x02
--# endif
--#endif
--
--# if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
--/* MacOS X 10.2 or newer */
--
--/* Canonicalize a MacOS X locale name to a Unix locale name.
-- NAME is a sufficiently large buffer.
-- On input, it contains the MacOS X locale name.
-- On output, it contains the Unix locale name. */
--# if !defined IN_LIBINTL
--static
--# endif
--void
--gl_locale_name_canonicalize (char *name)
--{
-- /* This conversion is based on a posting by
-- Deborah GoldSmith <goldsmit@apple.com> on 2005-03-08,
-- http://lists.apple.com/archives/carbon-dev/2005/Mar/msg00293.html */
--
-- /* Convert legacy (NeXTstep inherited) English names to Unix (ISO 639 and
-- ISO 3166) names. Prior to MacOS X 10.3, there is no API for doing this.
-- Therefore we do it ourselves, using a table based on the results of the
-- MacOS X 10.3.8 function
-- CFLocaleCreateCanonicalLocaleIdentifierFromString(). */
-- typedef struct { const char legacy[21+1]; const char unixy[5+1]; }
-- legacy_entry;
-- static const legacy_entry legacy_table[] = {
-- { "Afrikaans", "af" },
-- { "Albanian", "sq" },
-- { "Amharic", "am" },
-- { "Arabic", "ar" },
-- { "Armenian", "hy" },
-- { "Assamese", "as" },
-- { "Aymara", "ay" },
-- { "Azerbaijani", "az" },
-- { "Basque", "eu" },
-- { "Belarusian", "be" },
-- { "Belorussian", "be" },
-- { "Bengali", "bn" },
-- { "Brazilian Portugese", "pt_BR" },
-- { "Brazilian Portuguese", "pt_BR" },
-- { "Breton", "br" },
-- { "Bulgarian", "bg" },
-- { "Burmese", "my" },
-- { "Byelorussian", "be" },
-- { "Catalan", "ca" },
-- { "Chewa", "ny" },
-- { "Chichewa", "ny" },
-- { "Chinese", "zh" },
-- { "Chinese, Simplified", "zh_CN" },
-- { "Chinese, Traditional", "zh_TW" },
-- { "Chinese, Tradtional", "zh_TW" },
-- { "Croatian", "hr" },
-- { "Czech", "cs" },
-- { "Danish", "da" },
-- { "Dutch", "nl" },
-- { "Dzongkha", "dz" },
-- { "English", "en" },
-- { "Esperanto", "eo" },
-- { "Estonian", "et" },
-- { "Faroese", "fo" },
-- { "Farsi", "fa" },
-- { "Finnish", "fi" },
-- { "Flemish", "nl_BE" },
-- { "French", "fr" },
-- { "Galician", "gl" },
-- { "Gallegan", "gl" },
-- { "Georgian", "ka" },
-- { "German", "de" },
-- { "Greek", "el" },
-- { "Greenlandic", "kl" },
-- { "Guarani", "gn" },
-- { "Gujarati", "gu" },
-- { "Hawaiian", "haw" }, /* Yes, "haw", not "cpe". */
-- { "Hebrew", "he" },
-- { "Hindi", "hi" },
-- { "Hungarian", "hu" },
-- { "Icelandic", "is" },
-- { "Indonesian", "id" },
-- { "Inuktitut", "iu" },
-- { "Irish", "ga" },
-- { "Italian", "it" },
-- { "Japanese", "ja" },
-- { "Javanese", "jv" },
-- { "Kalaallisut", "kl" },
-- { "Kannada", "kn" },
-- { "Kashmiri", "ks" },
-- { "Kazakh", "kk" },
-- { "Khmer", "km" },
-- { "Kinyarwanda", "rw" },
-- { "Kirghiz", "ky" },
-- { "Korean", "ko" },
-- { "Kurdish", "ku" },
-- { "Latin", "la" },
-- { "Latvian", "lv" },
-- { "Lithuanian", "lt" },
-- { "Macedonian", "mk" },
-- { "Malagasy", "mg" },
-- { "Malay", "ms" },
-- { "Malayalam", "ml" },
-- { "Maltese", "mt" },
-- { "Manx", "gv" },
-- { "Marathi", "mr" },
-- { "Moldavian", "mo" },
-- { "Mongolian", "mn" },
-- { "Nepali", "ne" },
-- { "Norwegian", "nb" }, /* Yes, "nb", not the obsolete "no". */
-- { "Nyanja", "ny" },
-- { "Nynorsk", "nn" },
-- { "Oriya", "or" },
-- { "Oromo", "om" },
-- { "Panjabi", "pa" },
-- { "Pashto", "ps" },
-- { "Persian", "fa" },
-- { "Polish", "pl" },
-- { "Portuguese", "pt" },
-- { "Portuguese, Brazilian", "pt_BR" },
-- { "Punjabi", "pa" },
-- { "Pushto", "ps" },
-- { "Quechua", "qu" },
-- { "Romanian", "ro" },
-- { "Ruanda", "rw" },
-- { "Rundi", "rn" },
-- { "Russian", "ru" },
-- { "Sami", "se_NO" }, /* Not just "se". */
-- { "Sanskrit", "sa" },
-- { "Scottish", "gd" },
-- { "Serbian", "sr" },
-- { "Simplified Chinese", "zh_CN" },
-- { "Sindhi", "sd" },
-- { "Sinhalese", "si" },
-- { "Slovak", "sk" },
-- { "Slovenian", "sl" },
-- { "Somali", "so" },
-- { "Spanish", "es" },
-- { "Sundanese", "su" },
-- { "Swahili", "sw" },
-- { "Swedish", "sv" },
-- { "Tagalog", "tl" },
-- { "Tajik", "tg" },
-- { "Tajiki", "tg" },
-- { "Tamil", "ta" },
-- { "Tatar", "tt" },
-- { "Telugu", "te" },
-- { "Thai", "th" },
-- { "Tibetan", "bo" },
-- { "Tigrinya", "ti" },
-- { "Tongan", "to" },
-- { "Traditional Chinese", "zh_TW" },
-- { "Turkish", "tr" },
-- { "Turkmen", "tk" },
-- { "Uighur", "ug" },
-- { "Ukrainian", "uk" },
-- { "Urdu", "ur" },
-- { "Uzbek", "uz" },
-- { "Vietnamese", "vi" },
-- { "Welsh", "cy" },
-- { "Yiddish", "yi" }
-- };
--
-- /* Convert new-style locale names with language tags (ISO 639 and ISO 15924)
-- to Unix (ISO 639 and ISO 3166) names. */
-- typedef struct { const char langtag[7+1]; const char unixy[12+1]; }
-- langtag_entry;
-- static const langtag_entry langtag_table[] = {
-- /* MacOS X has "az-Arab", "az-Cyrl", "az-Latn".
-- The default script for az on Unix is Latin. */
-- { "az-Latn", "az" },
-- /* MacOS X has "ga-dots". Does not yet exist on Unix. */
-- { "ga-dots", "ga" },
-- /* MacOS X has "kk-Cyrl". Does not yet exist on Unix. */
-- /* MacOS X has "mn-Cyrl", "mn-Mong".
-- The default script for mn on Unix is Cyrillic. */
-- { "mn-Cyrl", "mn" },
-- /* MacOS X has "ms-Arab", "ms-Latn".
-- The default script for ms on Unix is Latin. */
-- { "ms-Latn", "ms" },
-- /* MacOS X has "tg-Cyrl".
-- The default script for tg on Unix is Cyrillic. */
-- { "tg-Cyrl", "tg" },
-- /* MacOS X has "tk-Cyrl". Does not yet exist on Unix. */
-- /* MacOS X has "tt-Cyrl".
-- The default script for tt on Unix is Cyrillic. */
-- { "tt-Cyrl", "tt" },
-- /* MacOS X has "zh-Hans", "zh-Hant".
-- Country codes are used to distinguish these on Unix. */
-- { "zh-Hans", "zh_CN" },
-- { "zh-Hant", "zh_TW" }
-- };
--
-- /* Convert script names (ISO 15924) to Unix conventions.
-- See http://www.unicode.org/iso15924/iso15924-codes.html */
-- typedef struct { const char script[4+1]; const char unixy[9+1]; }
-- script_entry;
-- static const script_entry script_table[] = {
-- { "Arab", "arabic" },
-- { "Cyrl", "cyrillic" },
-- { "Mong", "mongolian" }
-- };
--
-- /* Step 1: Convert using legacy_table. */
-- if (name[0] >= 'A' && name[0] <= 'Z')
-- {
-- unsigned int i1, i2;
-- i1 = 0;
-- i2 = sizeof (legacy_table) / sizeof (legacy_entry);
-- while (i2 - i1 > 1)
-- {
-- /* At this point we know that if name occurs in legacy_table,
-- its index must be >= i1 and < i2. */
-- unsigned int i = (i1 + i2) >> 1;
-- const legacy_entry *p = &legacy_table[i];
-- if (strcmp (name, p->legacy) < 0)
-- i2 = i;
-- else
-- i1 = i;
-- }
-- if (strcmp (name, legacy_table[i1].legacy) == 0)
-- {
-- strcpy (name, legacy_table[i1].unixy);
-- return;
-- }
-- }
--
-- /* Step 2: Convert using langtag_table and script_table. */
-- if (strlen (name) == 7 && name[2] == '-')
-- {
-- unsigned int i1, i2;
-- i1 = 0;
-- i2 = sizeof (langtag_table) / sizeof (langtag_entry);
-- while (i2 - i1 > 1)
-- {
-- /* At this point we know that if name occurs in langtag_table,
-- its index must be >= i1 and < i2. */
-- unsigned int i = (i1 + i2) >> 1;
-- const langtag_entry *p = &langtag_table[i];
-- if (strcmp (name, p->langtag) < 0)
-- i2 = i;
-- else
-- i1 = i;
-- }
-- if (strcmp (name, langtag_table[i1].langtag) == 0)
-- {
-- strcpy (name, langtag_table[i1].unixy);
-- return;
-- }
--
-- i1 = 0;
-- i2 = sizeof (script_table) / sizeof (script_entry);
-- while (i2 - i1 > 1)
-- {
-- /* At this point we know that if (name + 3) occurs in script_table,
-- its index must be >= i1 and < i2. */
-- unsigned int i = (i1 + i2) >> 1;
-- const script_entry *p = &script_table[i];
-- if (strcmp (name + 3, p->script) < 0)
-- i2 = i;
-- else
-- i1 = i;
-- }
-- if (strcmp (name + 3, script_table[i1].script) == 0)
-- {
-- name[2] = '@';
-- strcpy (name + 3, script_table[i1].unixy);
-- return;
-- }
-- }
--
-- /* Step 3: Convert new-style dash to Unix underscore. */
-- {
-- char *p;
-- for (p = name; *p != '\0'; p++)
-- if (*p == '-')
-- *p = '_';
-- }
--}
--
--#endif
--
--/* XPG3 defines the result of 'setlocale (category, NULL)' as:
-- "Directs 'setlocale()' to query 'category' and return the current
-- setting of 'local'."
-- However it does not specify the exact format. Neither do SUSV2 and
-- ISO C 99. So we can use this feature only on selected systems (e.g.
-- those using GNU C Library). */
--#if defined _LIBC || (defined __GLIBC__ && __GLIBC__ >= 2)
--# define HAVE_LOCALE_NULL
--#endif
--
--/* Determine the current locale's name, and canonicalize it into XPG syntax
-- language[_territory][.codeset][@modifier]
-- The codeset part in the result is not reliable; the locale_charset()
-- should be used for codeset information instead.
-- The result must not be freed; it is statically allocated. */
--
--const char *
--gl_locale_name_posix (int category, const char *categoryname)
--{
-- /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'.
-- On some systems this can be done by the 'setlocale' function itself. */
--#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
-- return setlocale (category, NULL);
--#else
-- const char *retval;
--
-- /* Setting of LC_ALL overrides all other. */
-- retval = getenv ("LC_ALL");
-- if (retval != NULL && retval[0] != '\0')
-- return retval;
-- /* Next comes the name of the desired category. */
-- retval = getenv (categoryname);
-- if (retval != NULL && retval[0] != '\0')
-- return retval;
-- /* Last possibility is the LANG environment variable. */
-- retval = getenv ("LANG");
-- if (retval != NULL && retval[0] != '\0')
-- return retval;
--
-- return NULL;
--#endif
--}
--
--const char *
--gl_locale_name_default (void)
--{
-- /* POSIX:2001 says:
-- "All implementations shall define a locale as the default locale, to be
-- invoked when no environment variables are set, or set to the empty
-- string. This default locale can be the POSIX locale or any other
-- implementation-defined locale. Some implementations may provide
-- facilities for local installation administrators to set the default
-- locale, customizing it for each location. POSIX:2001 does not require
-- such a facility. */
--
--#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined(WIN32_NATIVE))
--
-- /* The system does not have a way of setting the locale, other than the
-- POSIX specified environment variables. We use C as default locale. */
-- return "C";
--
--#else
--
-- /* Return an XPG style locale name language[_territory][@modifier].
-- Don't even bother determining the codeset; it's not useful in this
-- context, because message catalogs are not specific to a single
-- codeset. */
--
--# if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
-- /* MacOS X 10.2 or newer */
-- {
-- /* Cache the locale name, since CoreFoundation calls are expensive. */
-- static const char *cached_localename;
--
-- if (cached_localename == NULL)
-- {
-- char namebuf[256];
--# if HAVE_CFLOCALECOPYCURRENT /* MacOS X 10.3 or newer */
-- CFLocaleRef locale = CFLocaleCopyCurrent ();
-- CFStringRef name = CFLocaleGetIdentifier (locale);
--
-- if (CFStringGetCString (name, namebuf, sizeof(namebuf),
-- kCFStringEncodingASCII))
-- {
-- gl_locale_name_canonicalize (namebuf);
-- cached_localename = strdup (namebuf);
-- }
-- CFRelease (locale);
--# elif HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.2 or newer */
-- CFTypeRef value =
-- CFPreferencesCopyAppValue (CFSTR ("AppleLocale"),
-- kCFPreferencesCurrentApplication);
-- if (value != NULL
-- && CFGetTypeID (value) == CFStringGetTypeID ()
-- && CFStringGetCString ((CFStringRef)value, namebuf, sizeof(namebuf),
-- kCFStringEncodingASCII))
-- {
-- gl_locale_name_canonicalize (namebuf);
-- cached_localename = strdup (namebuf);
-- }
--# endif
-- if (cached_localename == NULL)
-- cached_localename = "C";
-- }
-- return cached_localename;
-- }
--
--# endif
--
--# if defined(WIN32_NATIVE) /* WIN32, not Cygwin */
-- {
-- LCID lcid;
-- LANGID langid;
-- int primary, sub;
--
-- /* Use native Win32 API locale ID. */
-- lcid = GetThreadLocale ();
--
-- /* Strip off the sorting rules, keep only the language part. */
-- langid = LANGIDFROMLCID (lcid);
--
-- /* Split into language and territory part. */
-- primary = PRIMARYLANGID (langid);
-- sub = SUBLANGID (langid);
--
-- /* Dispatch on language.
-- See also http://www.unicode.org/unicode/onlinedat/languages.html .
-- For details about languages, see http://www.ethnologue.com/ . */
-- switch (primary)
-- {
-- case LANG_AFRIKAANS: return "af_ZA";
-- case LANG_ALBANIAN: return "sq_AL";
-- case LANG_AMHARIC: return "am_ET";
-- case LANG_ARABIC:
-- switch (sub)
-- {
-- case SUBLANG_ARABIC_SAUDI_ARABIA: return "ar_SA";
-- case SUBLANG_ARABIC_IRAQ: return "ar_IQ";
-- case SUBLANG_ARABIC_EGYPT: return "ar_EG";
-- case SUBLANG_ARABIC_LIBYA: return "ar_LY";
-- case SUBLANG_ARABIC_ALGERIA: return "ar_DZ";
-- case SUBLANG_ARABIC_MOROCCO: return "ar_MA";
-- case SUBLANG_ARABIC_TUNISIA: return "ar_TN";
-- case SUBLANG_ARABIC_OMAN: return "ar_OM";
-- case SUBLANG_ARABIC_YEMEN: return "ar_YE";
-- case SUBLANG_ARABIC_SYRIA: return "ar_SY";
-- case SUBLANG_ARABIC_JORDAN: return "ar_JO";
-- case SUBLANG_ARABIC_LEBANON: return "ar_LB";
-- case SUBLANG_ARABIC_KUWAIT: return "ar_KW";
-- case SUBLANG_ARABIC_UAE: return "ar_AE";
-- case SUBLANG_ARABIC_BAHRAIN: return "ar_BH";
-- case SUBLANG_ARABIC_QATAR: return "ar_QA";
-- }
-- return "ar";
-- case LANG_ARMENIAN: return "hy_AM";
-- case LANG_ASSAMESE: return "as_IN";
-- case LANG_AZERI:
-- switch (sub)
-- {
-- /* FIXME: Adjust this when Azerbaijani locales appear on Unix. */
-- case SUBLANG_AZERI_LATIN: return "az_AZ@latin";
-- case SUBLANG_AZERI_CYRILLIC: return "az_AZ@cyrillic";
-- }
-- return "az";
-- case LANG_BASQUE:
-- switch (sub)
-- {
-- case SUBLANG_DEFAULT: return "eu_ES";
-- }
-- return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR". */
-- case LANG_BELARUSIAN: return "be_BY";
-- case LANG_BENGALI:
-- switch (sub)
-- {
-- case SUBLANG_BENGALI_INDIA: return "bn_IN";
-- case SUBLANG_BENGALI_BANGLADESH: return "bn_BD";
-- }
-- return "bn";
-- case LANG_BULGARIAN: return "bg_BG";
-- case LANG_BURMESE: return "my_MM";
-- case LANG_CAMBODIAN: return "km_KH";
-- case LANG_CATALAN: return "ca_ES";
-- case LANG_CHEROKEE: return "chr_US";
-- case LANG_CHINESE:
-- switch (sub)
-- {
-- case SUBLANG_CHINESE_TRADITIONAL: return "zh_TW";
-- case SUBLANG_CHINESE_SIMPLIFIED: return "zh_CN";
-- case SUBLANG_CHINESE_HONGKONG: return "zh_HK";
-- case SUBLANG_CHINESE_SINGAPORE: return "zh_SG";
-- case SUBLANG_CHINESE_MACAU: return "zh_MO";
-- }
-- return "zh";
-- case LANG_CROATIAN: /* LANG_CROATIAN == LANG_SERBIAN
-- * What used to be called Serbo-Croatian
-- * should really now be two separate
-- * languages because of political reasons.
-- * (Says tml, who knows nothing about Serbian
-- * or Croatian.)
-- * (I can feel those flames coming already.)
-- */
-- switch (sub)
-- {
-- case SUBLANG_DEFAULT: return "hr_HR";
-- case SUBLANG_SERBIAN_LATIN: return "sr_CS";
-- case SUBLANG_SERBIAN_CYRILLIC: return "sr_CS@cyrillic";
-- }
-- return "hr";
-- case LANG_CZECH: return "cs_CZ";
-- case LANG_DANISH: return "da_DK";
-- case LANG_DIVEHI: return "dv_MV";
-- case LANG_DUTCH:
-- switch (sub)
-- {
-- case SUBLANG_DUTCH: return "nl_NL";
-- case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE";
-- }
-- return "nl";
-- case LANG_EDO: return "bin_NG";
-- case LANG_ENGLISH:
-- switch (sub)
-- {
-- /* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought
-- * English was the language spoken in England.
-- * Oh well.
-- */
-- case SUBLANG_ENGLISH_US: return "en_US";
-- case SUBLANG_ENGLISH_UK: return "en_GB";
-- case SUBLANG_ENGLISH_AUS: return "en_AU";
-- case SUBLANG_ENGLISH_CAN: return "en_CA";
-- case SUBLANG_ENGLISH_NZ: return "en_NZ";
-- case SUBLANG_ENGLISH_EIRE: return "en_IE";
-- case SUBLANG_ENGLISH_SOUTH_AFRICA: return "en_ZA";
-- case SUBLANG_ENGLISH_JAMAICA: return "en_JM";
-- case SUBLANG_ENGLISH_CARIBBEAN: return "en_GD"; /* Grenada? */
-- case SUBLANG_ENGLISH_BELIZE: return "en_BZ";
-- case SUBLANG_ENGLISH_TRINIDAD: return "en_TT";
-- case SUBLANG_ENGLISH_ZIMBABWE: return "en_ZW";
-- case SUBLANG_ENGLISH_PHILIPPINES: return "en_PH";
-- case SUBLANG_ENGLISH_INDONESIA: return "en_ID";
-- case SUBLANG_ENGLISH_HONGKONG: return "en_HK";
-- case SUBLANG_ENGLISH_INDIA: return "en_IN";
-- case SUBLANG_ENGLISH_MALAYSIA: return "en_MY";
-- case SUBLANG_ENGLISH_SINGAPORE: return "en_SG";
-- }
-- return "en";
-- case LANG_ESTONIAN: return "et_EE";
-- case LANG_FAEROESE: return "fo_FO";
-- case LANG_FARSI: return "fa_IR";
-- case LANG_FINNISH: return "fi_FI";
-- case LANG_FRENCH:
-- switch (sub)
-- {
-- case SUBLANG_FRENCH: return "fr_FR";
-- case SUBLANG_FRENCH_BELGIAN: /* WALLOON */ return "fr_BE";
-- case SUBLANG_FRENCH_CANADIAN: return "fr_CA";
-- case SUBLANG_FRENCH_SWISS: return "fr_CH";
-- case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU";
-- case SUBLANG_FRENCH_MONACO: return "fr_MC";
-- case SUBLANG_FRENCH_WESTINDIES: return "fr"; /* Caribbean? */
-- case SUBLANG_FRENCH_REUNION: return "fr_RE";
-- case SUBLANG_FRENCH_CONGO: return "fr_CG";
-- case SUBLANG_FRENCH_SENEGAL: return "fr_SN";
-- case SUBLANG_FRENCH_CAMEROON: return "fr_CM";
-- case SUBLANG_FRENCH_COTEDIVOIRE: return "fr_CI";
-- case SUBLANG_FRENCH_MALI: return "fr_ML";
-- case SUBLANG_FRENCH_MOROCCO: return "fr_MA";
-- case SUBLANG_FRENCH_HAITI: return "fr_HT";
-- }
-- return "fr";
-- case LANG_FRISIAN: return "fy_NL";
-- case LANG_FULFULDE:
-- /* Spoken in Nigeria, Guinea, Senegal, Mali, Niger, Cameroon, Benin. */
-- return "ff_NG";
-- case LANG_GAELIC:
-- switch (sub)
-- {
-- case 0x01: /* SCOTTISH */ return "gd_GB";
-- case 0x02: /* IRISH */ return "ga_IE";
-- }
-- return "C";
-- case LANG_GALICIAN: return "gl_ES";
-- case LANG_GEORGIAN: return "ka_GE";
-- case LANG_GERMAN:
-- switch (sub)
-- {
-- case SUBLANG_GERMAN: return "de_DE";
-- case SUBLANG_GERMAN_SWISS: return "de_CH";
-- case SUBLANG_GERMAN_AUSTRIAN: return "de_AT";
-- case SUBLANG_GERMAN_LUXEMBOURG: return "de_LU";
-- case SUBLANG_GERMAN_LIECHTENSTEIN: return "de_LI";
-- }
-- return "de";
-- case LANG_GREEK: return "el_GR";
-- case LANG_GUARANI: return "gn_PY";
-- case LANG_GUJARATI: return "gu_IN";
-- case LANG_HAUSA: return "ha_NG";
-- case LANG_HAWAIIAN:
-- /* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers)
-- or Hawaii Creole English ("cpe_US", 600000 speakers)? */
-- return "cpe_US";
-- case LANG_HEBREW: return "he_IL";
-- case LANG_HINDI: return "hi_IN";
-- case LANG_HUNGARIAN: return "hu_HU";
-- case LANG_IBIBIO: return "nic_NG";
-- case LANG_ICELANDIC: return "is_IS";
-- case LANG_IGBO: return "ig_NG";
-- case LANG_INDONESIAN: return "id_ID";
-- case LANG_INUKTITUT: return "iu_CA";
-- case LANG_ITALIAN:
-- switch (sub)
-- {
-- case SUBLANG_ITALIAN: return "it_IT";
-- case SUBLANG_ITALIAN_SWISS: return "it_CH";
-- }
-- return "it";
-- case LANG_JAPANESE: return "ja_JP";
-- case LANG_KANNADA: return "kn_IN";
-- case LANG_KANURI: return "kr_NG";
-- case LANG_KASHMIRI:
-- switch (sub)
-- {
-- case SUBLANG_DEFAULT: return "ks_PK";
-- case SUBLANG_KASHMIRI_INDIA: return "ks_IN";
-- }
-- return "ks";
-- case LANG_KAZAK: return "kk_KZ";
-- case LANG_KONKANI:
-- /* FIXME: Adjust this when such locales appear on Unix. */
-- return "kok_IN";
-- case LANG_KOREAN: return "ko_KR";
-- case LANG_KYRGYZ: return "ky_KG";
-- case LANG_LAO: return "lo_LA";
-- case LANG_LATIN: return "la_VA";
-- case LANG_LATVIAN: return "lv_LV";
-- case LANG_LITHUANIAN: return "lt_LT";
-- case LANG_MACEDONIAN: return "mk_MK";
-- case LANG_MALAY:
-- switch (sub)
-- {
-- case SUBLANG_MALAY_MALAYSIA: return "ms_MY";
-- case SUBLANG_MALAY_BRUNEI_DARUSSALAM: return "ms_BN";
-- }
-- return "ms";
-- case LANG_MALAYALAM: return "ml_IN";
-- case LANG_MALTESE: return "mt_MT";
-- case LANG_MANIPURI:
-- /* FIXME: Adjust this when such locales appear on Unix. */
-- return "mni_IN";
-- case LANG_MARATHI: return "mr_IN";
-- case LANG_MONGOLIAN:
-- switch (sub)
-- {
-- case SUBLANG_DEFAULT: return "mn_MN";
-- }
-- return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN". */
-- case LANG_NEPALI:
-- switch (sub)
-- {
-- case SUBLANG_DEFAULT: return "ne_NP";
-- case SUBLANG_NEPALI_INDIA: return "ne_IN";
-- }
-- return "ne";
-- case LANG_NORWEGIAN:
-- switch (sub)
-- {
-- case SUBLANG_NORWEGIAN_BOKMAL: return "nb_NO";
-- case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO";
-- }
-- return "no";
-- case LANG_ORIYA: return "or_IN";
-- case LANG_OROMO: return "om_ET";
-- case LANG_PAPIAMENTU: return "pap_AN";
-- case LANG_PASHTO:
-- return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF". */
-- case LANG_POLISH: return "pl_PL";
-- case LANG_PORTUGUESE:
-- switch (sub)
-- {
-- case SUBLANG_PORTUGUESE: return "pt_PT";
-- /* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT.
-- Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */
-- case SUBLANG_PORTUGUESE_BRAZILIAN: return "pt_BR";
-- }
-- return "pt";
-- case LANG_PUNJABI:
-- switch (sub)
-- {
-- case SUBLANG_PUNJABI_INDIA: return "pa_IN"; /* Gurmukhi script */
-- case SUBLANG_PUNJABI_PAKISTAN: return "pa_PK"; /* Arabic script */
-- }
-- return "pa";
-- case LANG_RHAETO_ROMANCE: return "rm_CH";
-- case LANG_ROMANIAN:
-- switch (sub)
-- {
-- case SUBLANG_ROMANIAN_ROMANIA: return "ro_RO";
-- case SUBLANG_ROMANIAN_MOLDOVA: return "ro_MD";
-- }
-- return "ro";
-- case LANG_RUSSIAN:
-- switch (sub)
-- {
-- case SUBLANG_DEFAULT: return "ru_RU";
-- }
-- return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA" or "ru_MD". */
-- case LANG_SAAMI: /* actually Northern Sami */ return "se_NO";
-- case LANG_SANSKRIT: return "sa_IN";
-- case LANG_SINDHI:
-- switch (sub)
-- {
-- case SUBLANG_SINDHI_PAKISTAN: return "sd_PK";
-- case SUBLANG_SINDHI_AFGHANISTAN: return "sd_AF";
-- }
-- return "sd";
-- case LANG_SINHALESE: return "si_LK";
-- case LANG_SLOVAK: return "sk_SK";
-- case LANG_SLOVENIAN: return "sl_SI";
-- case LANG_SOMALI: return "so_SO";
-- case LANG_SORBIAN:
-- /* FIXME: Adjust this when such locales appear on Unix. */
-- return "wen_DE";
-- case LANG_SPANISH:
-- switch (sub)
-- {
-- case SUBLANG_SPANISH: return "es_ES";
-- case SUBLANG_SPANISH_MEXICAN: return "es_MX";
-- case SUBLANG_SPANISH_MODERN:
-- return "es_ES@modern"; /* not seen on Unix */
-- case SUBLANG_SPANISH_GUATEMALA: return "es_GT";
-- case SUBLANG_SPANISH_COSTA_RICA: return "es_CR";
-- case SUBLANG_SPANISH_PANAMA: return "es_PA";
-- case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: return "es_DO";
-- case SUBLANG_SPANISH_VENEZUELA: return "es_VE";
-- case SUBLANG_SPANISH_COLOMBIA: return "es_CO";
-- case SUBLANG_SPANISH_PERU: return "es_PE";
-- case SUBLANG_SPANISH_ARGENTINA: return "es_AR";
-- case SUBLANG_SPANISH_ECUADOR: return "es_EC";
-- case SUBLANG_SPANISH_CHILE: return "es_CL";
-- case SUBLANG_SPANISH_URUGUAY: return "es_UY";
-- case SUBLANG_SPANISH_PARAGUAY: return "es_PY";
-- case SUBLANG_SPANISH_BOLIVIA: return "es_BO";
-- case SUBLANG_SPANISH_EL_SALVADOR: return "es_SV";
-- case SUBLANG_SPANISH_HONDURAS: return "es_HN";
-- case SUBLANG_SPANISH_NICARAGUA: return "es_NI";
-- case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR";
-- }
-- return "es";
-- case LANG_SUTU: return "bnt_TZ"; /* or "st_LS" or "nso_ZA"? */
-- case LANG_SWAHILI: return "sw_KE";
-- case LANG_SWEDISH:
-- switch (sub)
-- {
-- case SUBLANG_DEFAULT: return "sv_SE";
-- case SUBLANG_SWEDISH_FINLAND: return "sv_FI";
-- }
-- return "sv";
-- case LANG_SYRIAC: return "syr_TR"; /* An extinct language. */
-- case LANG_TAGALOG: return "tl_PH";
-- case LANG_TAJIK: return "tg_TJ";
-- case LANG_TAMAZIGHT:
-- switch (sub)
-- {
-- /* FIXME: Adjust this when Tamazight locales appear on Unix. */
-- case SUBLANG_TAMAZIGHT_ARABIC: return "ber_MA@arabic";
-- case SUBLANG_TAMAZIGHT_ALGERIA_LATIN: return "ber_DZ@latin";
-- }
-- return "ber_MA";
-- case LANG_TAMIL:
-- switch (sub)
-- {
-- case SUBLANG_DEFAULT: return "ta_IN";
-- }
-- return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */
-- case LANG_TATAR: return "tt_RU";
-- case LANG_TELUGU: return "te_IN";
-- case LANG_THAI: return "th_TH";
-- case LANG_TIBETAN: return "bo_CN";
-- case LANG_TIGRINYA:
-- switch (sub)
-- {
-- case SUBLANG_TIGRINYA_ETHIOPIA: return "ti_ET";
-- case SUBLANG_TIGRINYA_ERITREA: return "ti_ER";
-- }
-- return "ti";
-- case LANG_TSONGA: return "ts_ZA";
-- case LANG_TSWANA: return "tn_BW";
-- case LANG_TURKISH: return "tr_TR";
-- case LANG_TURKMEN: return "tk_TM";
-- case LANG_UKRAINIAN: return "uk_UA";
-- case LANG_URDU:
-- switch (sub)
-- {
-- case SUBLANG_URDU_PAKISTAN: return "ur_PK";
-- case SUBLANG_URDU_INDIA: return "ur_IN";
-- }
-- return "ur";
-- case LANG_UZBEK:
-- switch (sub)
-- {
-- case SUBLANG_UZBEK_LATIN: return "uz_UZ";
-- case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ@cyrillic";
-- }
-- return "uz";
-- case LANG_VENDA: return "ve_ZA";
-- case LANG_VIETNAMESE: return "vi_VN";
-- case LANG_WELSH: return "cy_GB";
-- case LANG_XHOSA: return "xh_ZA";
-- case LANG_YI: return "sit_CN";
-- case LANG_YIDDISH: return "yi_IL";
-- case LANG_YORUBA: return "yo_NG";
-- case LANG_ZULU: return "zu_ZA";
-- default: return "C";
-- }
-- }
--# endif
--#endif
--}
--
--const char *
--gl_locale_name (int category, const char *categoryname)
--{
-- const char *retval;
--
-- retval = gl_locale_name_posix (category, categoryname);
-- if (retval != NULL)
-- return retval;
--
-- return gl_locale_name_default ();
--}
---- a/intl/lock.c
-+++ /dev/null
-@@ -1,922 +0,0 @@
--/* Locking in multithreaded situations.
-- Copyright (C) 2005-2006 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--/* Written by Bruno Haible <bruno@clisp.org>, 2005.
-- Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h,
-- gthr-win32.h. */
--
--#include <config.h>
--
--#include "lock.h"
--
--/* ========================================================================= */
--
--#if USE_POSIX_THREADS
--
--/* Use the POSIX threads library. */
--
--# if PTHREAD_IN_USE_DETECTION_HARD
--
--/* The function to be executed by a dummy thread. */
--static void *
--dummy_thread_func (void *arg)
--{
-- return arg;
--}
--
--int
--glthread_in_use (void)
--{
-- static int tested;
-- static int result; /* 1: linked with -lpthread, 0: only with libc */
--
-- if (!tested)
-- {
-- pthread_t thread;
--
-- if (pthread_create (&thread, NULL, dummy_thread_func, NULL) != 0)
-- /* Thread creation failed. */
-- result = 0;
-- else
-- {
-- /* Thread creation works. */
-- void *retval;
-- if (pthread_join (thread, &retval) != 0)
-- abort ();
-- result = 1;
-- }
-- tested = 1;
-- }
-- return result;
--}
--
--# endif
--
--/* -------------------------- gl_lock_t datatype -------------------------- */
--
--/* ------------------------- gl_rwlock_t datatype ------------------------- */
--
--# if HAVE_PTHREAD_RWLOCK
--
--# if !defined PTHREAD_RWLOCK_INITIALIZER
--
--void
--glthread_rwlock_init (gl_rwlock_t *lock)
--{
-- if (pthread_rwlock_init (&lock->rwlock, NULL) != 0)
-- abort ();
-- lock->initialized = 1;
--}
--
--void
--glthread_rwlock_rdlock (gl_rwlock_t *lock)
--{
-- if (!lock->initialized)
-- {
-- if (pthread_mutex_lock (&lock->guard) != 0)
-- abort ();
-- if (!lock->initialized)
-- glthread_rwlock_init (lock);
-- if (pthread_mutex_unlock (&lock->guard) != 0)
-- abort ();
-- }
-- if (pthread_rwlock_rdlock (&lock->rwlock) != 0)
-- abort ();
--}
--
--void
--glthread_rwlock_wrlock (gl_rwlock_t *lock)
--{
-- if (!lock->initialized)
-- {
-- if (pthread_mutex_lock (&lock->guard) != 0)
-- abort ();
-- if (!lock->initialized)
-- glthread_rwlock_init (lock);
-- if (pthread_mutex_unlock (&lock->guard) != 0)
-- abort ();
-- }
-- if (pthread_rwlock_wrlock (&lock->rwlock) != 0)
-- abort ();
--}
--
--void
--glthread_rwlock_unlock (gl_rwlock_t *lock)
--{
-- if (!lock->initialized)
-- abort ();
-- if (pthread_rwlock_unlock (&lock->rwlock) != 0)
-- abort ();
--}
--
--void
--glthread_rwlock_destroy (gl_rwlock_t *lock)
--{
-- if (!lock->initialized)
-- abort ();
-- if (pthread_rwlock_destroy (&lock->rwlock) != 0)
-- abort ();
-- lock->initialized = 0;
--}
--
--# endif
--
--# else
--
--void
--glthread_rwlock_init (gl_rwlock_t *lock)
--{
-- if (pthread_mutex_init (&lock->lock, NULL) != 0)
-- abort ();
-- if (pthread_cond_init (&lock->waiting_readers, NULL) != 0)
-- abort ();
-- if (pthread_cond_init (&lock->waiting_writers, NULL) != 0)
-- abort ();
-- lock->waiting_writers_count = 0;
-- lock->runcount = 0;
--}
--
--void
--glthread_rwlock_rdlock (gl_rwlock_t *lock)
--{
-- if (pthread_mutex_lock (&lock->lock) != 0)
-- abort ();
-- /* Test whether only readers are currently running, and whether the runcount
-- field will not overflow. */
-- /* POSIX says: "It is implementation-defined whether the calling thread
-- acquires the lock when a writer does not hold the lock and there are
-- writers blocked on the lock." Let's say, no: give the writers a higher
-- priority. */
-- while (!(lock->runcount + 1 > 0 && lock->waiting_writers_count == 0))
-- {
-- /* This thread has to wait for a while. Enqueue it among the
-- waiting_readers. */
-- if (pthread_cond_wait (&lock->waiting_readers, &lock->lock) != 0)
-- abort ();
-- }
-- lock->runcount++;
-- if (pthread_mutex_unlock (&lock->lock) != 0)
-- abort ();
--}
--
--void
--glthread_rwlock_wrlock (gl_rwlock_t *lock)
--{
-- if (pthread_mutex_lock (&lock->lock) != 0)
-- abort ();
-- /* Test whether no readers or writers are currently running. */
-- while (!(lock->runcount == 0))
-- {
-- /* This thread has to wait for a while. Enqueue it among the
-- waiting_writers. */
-- lock->waiting_writers_count++;
-- if (pthread_cond_wait (&lock->waiting_writers, &lock->lock) != 0)
-- abort ();
-- lock->waiting_writers_count--;
-- }
-- lock->runcount--; /* runcount becomes -1 */
-- if (pthread_mutex_unlock (&lock->lock) != 0)
-- abort ();
--}
--
--void
--glthread_rwlock_unlock (gl_rwlock_t *lock)
--{
-- if (pthread_mutex_lock (&lock->lock) != 0)
-- abort ();
-- if (lock->runcount < 0)
-- {
-- /* Drop a writer lock. */
-- if (!(lock->runcount == -1))
-- abort ();
-- lock->runcount = 0;
-- }
-- else
-- {
-- /* Drop a reader lock. */
-- if (!(lock->runcount > 0))
-- abort ();
-- lock->runcount--;
-- }
-- if (lock->runcount == 0)
-- {
-- /* POSIX recommends that "write locks shall take precedence over read
-- locks", to avoid "writer starvation". */
-- if (lock->waiting_writers_count > 0)
-- {
-- /* Wake up one of the waiting writers. */
-- if (pthread_cond_signal (&lock->waiting_writers) != 0)
-- abort ();
-- }
-- else
-- {
-- /* Wake up all waiting readers. */
-- if (pthread_cond_broadcast (&lock->waiting_readers) != 0)
-- abort ();
-- }
-- }
-- if (pthread_mutex_unlock (&lock->lock) != 0)
-- abort ();
--}
--
--void
--glthread_rwlock_destroy (gl_rwlock_t *lock)
--{
-- if (pthread_mutex_destroy (&lock->lock) != 0)
-- abort ();
-- if (pthread_cond_destroy (&lock->waiting_readers) != 0)
-- abort ();
-- if (pthread_cond_destroy (&lock->waiting_writers) != 0)
-- abort ();
--}
--
--# endif
--
--/* --------------------- gl_recursive_lock_t datatype --------------------- */
--
--# if HAVE_PTHREAD_MUTEX_RECURSIVE
--
--# if !(defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER || defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
--
--void
--glthread_recursive_lock_init (gl_recursive_lock_t *lock)
--{
-- pthread_mutexattr_t attributes;
--
-- if (pthread_mutexattr_init (&attributes) != 0)
-- abort ();
-- if (pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE) != 0)
-- abort ();
-- if (pthread_mutex_init (&lock->recmutex, &attributes) != 0)
-- abort ();
-- if (pthread_mutexattr_destroy (&attributes) != 0)
-- abort ();
-- lock->initialized = 1;
--}
--
--void
--glthread_recursive_lock_lock (gl_recursive_lock_t *lock)
--{
-- if (!lock->initialized)
-- {
-- if (pthread_mutex_lock (&lock->guard) != 0)
-- abort ();
-- if (!lock->initialized)
-- glthread_recursive_lock_init (lock);
-- if (pthread_mutex_unlock (&lock->guard) != 0)
-- abort ();
-- }
-- if (pthread_mutex_lock (&lock->recmutex) != 0)
-- abort ();
--}
--
--void
--glthread_recursive_lock_unlock (gl_recursive_lock_t *lock)
--{
-- if (!lock->initialized)
-- abort ();
-- if (pthread_mutex_unlock (&lock->recmutex) != 0)
-- abort ();
--}
--
--void
--glthread_recursive_lock_destroy (gl_recursive_lock_t *lock)
--{
-- if (!lock->initialized)
-- abort ();
-- if (pthread_mutex_destroy (&lock->recmutex) != 0)
-- abort ();
-- lock->initialized = 0;
--}
--
--# endif
--
--# else
--
--void
--glthread_recursive_lock_init (gl_recursive_lock_t *lock)
--{
-- if (pthread_mutex_init (&lock->mutex, NULL) != 0)
-- abort ();
-- lock->owner = (pthread_t) 0;
-- lock->depth = 0;
--}
--
--void
--glthread_recursive_lock_lock (gl_recursive_lock_t *lock)
--{
-- pthread_t self = pthread_self ();
-- if (lock->owner != self)
-- {
-- if (pthread_mutex_lock (&lock->mutex) != 0)
-- abort ();
-- lock->owner = self;
-- }
-- if (++(lock->depth) == 0) /* wraparound? */
-- abort ();
--}
--
--void
--glthread_recursive_lock_unlock (gl_recursive_lock_t *lock)
--{
-- if (lock->owner != pthread_self ())
-- abort ();
-- if (lock->depth == 0)
-- abort ();
-- if (--(lock->depth) == 0)
-- {
-- lock->owner = (pthread_t) 0;
-- if (pthread_mutex_unlock (&lock->mutex) != 0)
-- abort ();
-- }
--}
--
--void
--glthread_recursive_lock_destroy (gl_recursive_lock_t *lock)
--{
-- if (lock->owner != (pthread_t) 0)
-- abort ();
-- if (pthread_mutex_destroy (&lock->mutex) != 0)
-- abort ();
--}
--
--# endif
--
--/* -------------------------- gl_once_t datatype -------------------------- */
--
--static const pthread_once_t fresh_once = PTHREAD_ONCE_INIT;
--
--int
--glthread_once_singlethreaded (pthread_once_t *once_control)
--{
-- /* We don't know whether pthread_once_t is an integer type, a floating-point
-- type, a pointer type, or a structure type. */
-- char *firstbyte = (char *)once_control;
-- if (*firstbyte == *(const char *)&fresh_once)
-- {
-- /* First time use of once_control. Invert the first byte. */
-- *firstbyte = ~ *(const char *)&fresh_once;
-- return 1;
-- }
-- else
-- return 0;
--}
--
--#endif
--
--/* ========================================================================= */
--
--#if USE_PTH_THREADS
--
--/* Use the GNU Pth threads library. */
--
--/* -------------------------- gl_lock_t datatype -------------------------- */
--
--/* ------------------------- gl_rwlock_t datatype ------------------------- */
--
--/* --------------------- gl_recursive_lock_t datatype --------------------- */
--
--/* -------------------------- gl_once_t datatype -------------------------- */
--
--void
--glthread_once_call (void *arg)
--{
-- void (**gl_once_temp_addr) (void) = (void (**) (void)) arg;
-- void (*initfunction) (void) = *gl_once_temp_addr;
-- initfunction ();
--}
--
--int
--glthread_once_singlethreaded (pth_once_t *once_control)
--{
-- /* We know that pth_once_t is an integer type. */
-- if (*once_control == PTH_ONCE_INIT)
-- {
-- /* First time use of once_control. Invert the marker. */
-- *once_control = ~ PTH_ONCE_INIT;
-- return 1;
-- }
-- else
-- return 0;
--}
--
--#endif
--
--/* ========================================================================= */
--
--#if USE_SOLARIS_THREADS
--
--/* Use the old Solaris threads library. */
--
--/* -------------------------- gl_lock_t datatype -------------------------- */
--
--/* ------------------------- gl_rwlock_t datatype ------------------------- */
--
--/* --------------------- gl_recursive_lock_t datatype --------------------- */
--
--void
--glthread_recursive_lock_init (gl_recursive_lock_t *lock)
--{
-- if (mutex_init (&lock->mutex, USYNC_THREAD, NULL) != 0)
-- abort ();
-- lock->owner = (thread_t) 0;
-- lock->depth = 0;
--}
--
--void
--glthread_recursive_lock_lock (gl_recursive_lock_t *lock)
--{
-- thread_t self = thr_self ();
-- if (lock->owner != self)
-- {
-- if (mutex_lock (&lock->mutex) != 0)
-- abort ();
-- lock->owner = self;
-- }
-- if (++(lock->depth) == 0) /* wraparound? */
-- abort ();
--}
--
--void
--glthread_recursive_lock_unlock (gl_recursive_lock_t *lock)
--{
-- if (lock->owner != thr_self ())
-- abort ();
-- if (lock->depth == 0)
-- abort ();
-- if (--(lock->depth) == 0)
-- {
-- lock->owner = (thread_t) 0;
-- if (mutex_unlock (&lock->mutex) != 0)
-- abort ();
-- }
--}
--
--void
--glthread_recursive_lock_destroy (gl_recursive_lock_t *lock)
--{
-- if (lock->owner != (thread_t) 0)
-- abort ();
-- if (mutex_destroy (&lock->mutex) != 0)
-- abort ();
--}
--
--/* -------------------------- gl_once_t datatype -------------------------- */
--
--void
--glthread_once (gl_once_t *once_control, void (*initfunction) (void))
--{
-- if (!once_control->inited)
-- {
-- /* Use the mutex to guarantee that if another thread is already calling
-- the initfunction, this thread waits until it's finished. */
-- if (mutex_lock (&once_control->mutex) != 0)
-- abort ();
-- if (!once_control->inited)
-- {
-- once_control->inited = 1;
-- initfunction ();
-- }
-- if (mutex_unlock (&once_control->mutex) != 0)
-- abort ();
-- }
--}
--
--int
--glthread_once_singlethreaded (gl_once_t *once_control)
--{
-- /* We know that gl_once_t contains an integer type. */
-- if (!once_control->inited)
-- {
-- /* First time use of once_control. Invert the marker. */
-- once_control->inited = ~ 0;
-- return 1;
-- }
-- else
-- return 0;
--}
--
--#endif
--
--/* ========================================================================= */
--
--#if USE_WIN32_THREADS
--
--/* -------------------------- gl_lock_t datatype -------------------------- */
--
--void
--glthread_lock_init (gl_lock_t *lock)
--{
-- InitializeCriticalSection (&lock->lock);
-- lock->guard.done = 1;
--}
--
--void
--glthread_lock_lock (gl_lock_t *lock)
--{
-- if (!lock->guard.done)
-- {
-- if (InterlockedIncrement (&lock->guard.started) == 0)
-- /* This thread is the first one to need this lock. Initialize it. */
-- glthread_lock_init (lock);
-- else
-- /* Yield the CPU while waiting for another thread to finish
-- initializing this lock. */
-- while (!lock->guard.done)
-- Sleep (0);
-- }
-- EnterCriticalSection (&lock->lock);
--}
--
--void
--glthread_lock_unlock (gl_lock_t *lock)
--{
-- if (!lock->guard.done)
-- abort ();
-- LeaveCriticalSection (&lock->lock);
--}
--
--void
--glthread_lock_destroy (gl_lock_t *lock)
--{
-- if (!lock->guard.done)
-- abort ();
-- DeleteCriticalSection (&lock->lock);
-- lock->guard.done = 0;
--}
--
--/* ------------------------- gl_rwlock_t datatype ------------------------- */
--
--static inline void
--gl_waitqueue_init (gl_waitqueue_t *wq)
--{
-- wq->array = NULL;
-- wq->count = 0;
-- wq->alloc = 0;
-- wq->offset = 0;
--}
--
--/* Enqueues the current thread, represented by an event, in a wait queue.
-- Returns INVALID_HANDLE_VALUE if an allocation failure occurs. */
--static HANDLE
--gl_waitqueue_add (gl_waitqueue_t *wq)
--{
-- HANDLE event;
-- unsigned int index;
--
-- if (wq->count == wq->alloc)
-- {
-- unsigned int new_alloc = 2 * wq->alloc + 1;
-- HANDLE *new_array =
-- (HANDLE *) realloc (wq->array, new_alloc * sizeof (HANDLE));
-- if (new_array == NULL)
-- /* No more memory. */
-- return INVALID_HANDLE_VALUE;
-- /* Now is a good opportunity to rotate the array so that its contents
-- starts at offset 0. */
-- if (wq->offset > 0)
-- {
-- unsigned int old_count = wq->count;
-- unsigned int old_alloc = wq->alloc;
-- unsigned int old_offset = wq->offset;
-- unsigned int i;
-- if (old_offset + old_count > old_alloc)
-- {
-- unsigned int limit = old_offset + old_count - old_alloc;
-- for (i = 0; i < limit; i++)
-- new_array[old_alloc + i] = new_array[i];
-- }
-- for (i = 0; i < old_count; i++)
-- new_array[i] = new_array[old_offset + i];
-- wq->offset = 0;
-- }
-- wq->array = new_array;
-- wq->alloc = new_alloc;
-- }
-- event = CreateEvent (NULL, TRUE, FALSE, NULL);
-- if (event == INVALID_HANDLE_VALUE)
-- /* No way to allocate an event. */
-- return INVALID_HANDLE_VALUE;
-- index = wq->offset + wq->count;
-- if (index >= wq->alloc)
-- index -= wq->alloc;
-- wq->array[index] = event;
-- wq->count++;
-- return event;
--}
--
--/* Notifies the first thread from a wait queue and dequeues it. */
--static inline void
--gl_waitqueue_notify_first (gl_waitqueue_t *wq)
--{
-- SetEvent (wq->array[wq->offset + 0]);
-- wq->offset++;
-- wq->count--;
-- if (wq->count == 0 || wq->offset == wq->alloc)
-- wq->offset = 0;
--}
--
--/* Notifies all threads from a wait queue and dequeues them all. */
--static inline void
--gl_waitqueue_notify_all (gl_waitqueue_t *wq)
--{
-- unsigned int i;
--
-- for (i = 0; i < wq->count; i++)
-- {
-- unsigned int index = wq->offset + i;
-- if (index >= wq->alloc)
-- index -= wq->alloc;
-- SetEvent (wq->array[index]);
-- }
-- wq->count = 0;
-- wq->offset = 0;
--}
--
--void
--glthread_rwlock_init (gl_rwlock_t *lock)
--{
-- InitializeCriticalSection (&lock->lock);
-- gl_waitqueue_init (&lock->waiting_readers);
-- gl_waitqueue_init (&lock->waiting_writers);
-- lock->runcount = 0;
-- lock->guard.done = 1;
--}
--
--void
--glthread_rwlock_rdlock (gl_rwlock_t *lock)
--{
-- if (!lock->guard.done)
-- {
-- if (InterlockedIncrement (&lock->guard.started) == 0)
-- /* This thread is the first one to need this lock. Initialize it. */
-- glthread_rwlock_init (lock);
-- else
-- /* Yield the CPU while waiting for another thread to finish
-- initializing this lock. */
-- while (!lock->guard.done)
-- Sleep (0);
-- }
-- EnterCriticalSection (&lock->lock);
-- /* Test whether only readers are currently running, and whether the runcount
-- field will not overflow. */
-- if (!(lock->runcount + 1 > 0))
-- {
-- /* This thread has to wait for a while. Enqueue it among the
-- waiting_readers. */
-- HANDLE event = gl_waitqueue_add (&lock->waiting_readers);
-- if (event != INVALID_HANDLE_VALUE)
-- {
-- DWORD result;
-- LeaveCriticalSection (&lock->lock);
-- /* Wait until another thread signals this event. */
-- result = WaitForSingleObject (event, INFINITE);
-- if (result == WAIT_FAILED || result == WAIT_TIMEOUT)
-- abort ();
-- CloseHandle (event);
-- /* The thread which signalled the event already did the bookkeeping:
-- removed us from the waiting_readers, incremented lock->runcount. */
-- if (!(lock->runcount > 0))
-- abort ();
-- return;
-- }
-- else
-- {
-- /* Allocation failure. Weird. */
-- do
-- {
-- LeaveCriticalSection (&lock->lock);
-- Sleep (1);
-- EnterCriticalSection (&lock->lock);
-- }
-- while (!(lock->runcount + 1 > 0));
-- }
-- }
-- lock->runcount++;
-- LeaveCriticalSection (&lock->lock);
--}
--
--void
--glthread_rwlock_wrlock (gl_rwlock_t *lock)
--{
-- if (!lock->guard.done)
-- {
-- if (InterlockedIncrement (&lock->guard.started) == 0)
-- /* This thread is the first one to need this lock. Initialize it. */
-- glthread_rwlock_init (lock);
-- else
-- /* Yield the CPU while waiting for another thread to finish
-- initializing this lock. */
-- while (!lock->guard.done)
-- Sleep (0);
-- }
-- EnterCriticalSection (&lock->lock);
-- /* Test whether no readers or writers are currently running. */
-- if (!(lock->runcount == 0))
-- {
-- /* This thread has to wait for a while. Enqueue it among the
-- waiting_writers. */
-- HANDLE event = gl_waitqueue_add (&lock->waiting_writers);
-- if (event != INVALID_HANDLE_VALUE)
-- {
-- DWORD result;
-- LeaveCriticalSection (&lock->lock);
-- /* Wait until another thread signals this event. */
-- result = WaitForSingleObject (event, INFINITE);
-- if (result == WAIT_FAILED || result == WAIT_TIMEOUT)
-- abort ();
-- CloseHandle (event);
-- /* The thread which signalled the event already did the bookkeeping:
-- removed us from the waiting_writers, set lock->runcount = -1. */
-- if (!(lock->runcount == -1))
-- abort ();
-- return;
-- }
-- else
-- {
-- /* Allocation failure. Weird. */
-- do
-- {
-- LeaveCriticalSection (&lock->lock);
-- Sleep (1);
-- EnterCriticalSection (&lock->lock);
-- }
-- while (!(lock->runcount == 0));
-- }
-- }
-- lock->runcount--; /* runcount becomes -1 */
-- LeaveCriticalSection (&lock->lock);
--}
--
--void
--glthread_rwlock_unlock (gl_rwlock_t *lock)
--{
-- if (!lock->guard.done)
-- abort ();
-- EnterCriticalSection (&lock->lock);
-- if (lock->runcount < 0)
-- {
-- /* Drop a writer lock. */
-- if (!(lock->runcount == -1))
-- abort ();
-- lock->runcount = 0;
-- }
-- else
-- {
-- /* Drop a reader lock. */
-- if (!(lock->runcount > 0))
-- abort ();
-- lock->runcount--;
-- }
-- if (lock->runcount == 0)
-- {
-- /* POSIX recommends that "write locks shall take precedence over read
-- locks", to avoid "writer starvation". */
-- if (lock->waiting_writers.count > 0)
-- {
-- /* Wake up one of the waiting writers. */
-- lock->runcount--;
-- gl_waitqueue_notify_first (&lock->waiting_writers);
-- }
-- else
-- {
-- /* Wake up all waiting readers. */
-- lock->runcount += lock->waiting_readers.count;
-- gl_waitqueue_notify_all (&lock->waiting_readers);
-- }
-- }
-- LeaveCriticalSection (&lock->lock);
--}
--
--void
--glthread_rwlock_destroy (gl_rwlock_t *lock)
--{
-- if (!lock->guard.done)
-- abort ();
-- if (lock->runcount != 0)
-- abort ();
-- DeleteCriticalSection (&lock->lock);
-- if (lock->waiting_readers.array != NULL)
-- free (lock->waiting_readers.array);
-- if (lock->waiting_writers.array != NULL)
-- free (lock->waiting_writers.array);
-- lock->guard.done = 0;
--}
--
--/* --------------------- gl_recursive_lock_t datatype --------------------- */
--
--void
--glthread_recursive_lock_init (gl_recursive_lock_t *lock)
--{
-- lock->owner = 0;
-- lock->depth = 0;
-- InitializeCriticalSection (&lock->lock);
-- lock->guard.done = 1;
--}
--
--void
--glthread_recursive_lock_lock (gl_recursive_lock_t *lock)
--{
-- if (!lock->guard.done)
-- {
-- if (InterlockedIncrement (&lock->guard.started) == 0)
-- /* This thread is the first one to need this lock. Initialize it. */
-- glthread_recursive_lock_init (lock);
-- else
-- /* Yield the CPU while waiting for another thread to finish
-- initializing this lock. */
-- while (!lock->guard.done)
-- Sleep (0);
-- }
-- {
-- DWORD self = GetCurrentThreadId ();
-- if (lock->owner != self)
-- {
-- EnterCriticalSection (&lock->lock);
-- lock->owner = self;
-- }
-- if (++(lock->depth) == 0) /* wraparound? */
-- abort ();
-- }
--}
--
--void
--glthread_recursive_lock_unlock (gl_recursive_lock_t *lock)
--{
-- if (lock->owner != GetCurrentThreadId ())
-- abort ();
-- if (lock->depth == 0)
-- abort ();
-- if (--(lock->depth) == 0)
-- {
-- lock->owner = 0;
-- LeaveCriticalSection (&lock->lock);
-- }
--}
--
--void
--glthread_recursive_lock_destroy (gl_recursive_lock_t *lock)
--{
-- if (lock->owner != 0)
-- abort ();
-- DeleteCriticalSection (&lock->lock);
-- lock->guard.done = 0;
--}
--
--/* -------------------------- gl_once_t datatype -------------------------- */
--
--void
--glthread_once (gl_once_t *once_control, void (*initfunction) (void))
--{
-- if (once_control->inited <= 0)
-- {
-- if (InterlockedIncrement (&once_control->started) == 0)
-- {
-- /* This thread is the first one to come to this once_control. */
-- InitializeCriticalSection (&once_control->lock);
-- EnterCriticalSection (&once_control->lock);
-- once_control->inited = 0;
-- initfunction ();
-- once_control->inited = 1;
-- LeaveCriticalSection (&once_control->lock);
-- }
-- else
-- {
-- /* Undo last operation. */
-- InterlockedDecrement (&once_control->started);
-- /* Some other thread has already started the initialization.
-- Yield the CPU while waiting for the other thread to finish
-- initializing and taking the lock. */
-- while (once_control->inited < 0)
-- Sleep (0);
-- if (once_control->inited <= 0)
-- {
-- /* Take the lock. This blocks until the other thread has
-- finished calling the initfunction. */
-- EnterCriticalSection (&once_control->lock);
-- LeaveCriticalSection (&once_control->lock);
-- if (!(once_control->inited > 0))
-- abort ();
-- }
-- }
-- }
--}
--
--#endif
--
--/* ========================================================================= */
---- a/intl/lock.h
-+++ /dev/null
-@@ -1,1105 +0,0 @@
--/* Locking in multithreaded situations.
-- Copyright (C) 2005-2007 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--/* Written by Bruno Haible <bruno@clisp.org>, 2005.
-- Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h,
-- gthr-win32.h. */
--
--/* This file contains locking primitives for use with a given thread library.
-- It does not contain primitives for creating threads or for other
-- synchronization primitives.
--
-- Normal (non-recursive) locks:
-- Type: gl_lock_t
-- Declaration: gl_lock_define(extern, name)
-- Initializer: gl_lock_define_initialized(, name)
-- Initialization: gl_lock_init (name);
-- Taking the lock: gl_lock_lock (name);
-- Releasing the lock: gl_lock_unlock (name);
-- De-initialization: gl_lock_destroy (name);
--
-- Read-Write (non-recursive) locks:
-- Type: gl_rwlock_t
-- Declaration: gl_rwlock_define(extern, name)
-- Initializer: gl_rwlock_define_initialized(, name)
-- Initialization: gl_rwlock_init (name);
-- Taking the lock: gl_rwlock_rdlock (name);
-- gl_rwlock_wrlock (name);
-- Releasing the lock: gl_rwlock_unlock (name);
-- De-initialization: gl_rwlock_destroy (name);
--
-- Recursive locks:
-- Type: gl_recursive_lock_t
-- Declaration: gl_recursive_lock_define(extern, name)
-- Initializer: gl_recursive_lock_define_initialized(, name)
-- Initialization: gl_recursive_lock_init (name);
-- Taking the lock: gl_recursive_lock_lock (name);
-- Releasing the lock: gl_recursive_lock_unlock (name);
-- De-initialization: gl_recursive_lock_destroy (name);
--
-- Once-only execution:
-- Type: gl_once_t
-- Initializer: gl_once_define(extern, name)
-- Execution: gl_once (name, initfunction);
--*/
--
--
--#ifndef _LOCK_H
--#define _LOCK_H
--
--/* ========================================================================= */
--
--#if USE_POSIX_THREADS
--
--/* Use the POSIX threads library. */
--
--# include <pthread.h>
--# include <stdlib.h>
--
--# ifdef __cplusplus
--extern "C" {
--# endif
--
--# if PTHREAD_IN_USE_DETECTION_HARD
--
--/* The pthread_in_use() detection needs to be done at runtime. */
--# define pthread_in_use() \
-- glthread_in_use ()
--extern int glthread_in_use (void);
--
--# endif
--
--# if USE_POSIX_THREADS_WEAK
--
--/* Use weak references to the POSIX threads library. */
--
--/* Weak references avoid dragging in external libraries if the other parts
-- of the program don't use them. Here we use them, because we don't want
-- every program that uses libintl to depend on libpthread. This assumes
-- that libpthread would not be loaded after libintl; i.e. if libintl is
-- loaded first, by an executable that does not depend on libpthread, and
-- then a module is dynamically loaded that depends on libpthread, libintl
-- will not be multithread-safe. */
--
--/* The way to test at runtime whether libpthread is present is to test
-- whether a function pointer's value, such as &pthread_mutex_init, is
-- non-NULL. However, some versions of GCC have a bug through which, in
-- PIC mode, &foo != NULL always evaluates to true if there is a direct
-- call to foo(...) in the same function. To avoid this, we test the
-- address of a function in libpthread that we don't use. */
--
--# pragma weak pthread_mutex_init
--# pragma weak pthread_mutex_lock
--# pragma weak pthread_mutex_unlock
--# pragma weak pthread_mutex_destroy
--# pragma weak pthread_rwlock_init
--# pragma weak pthread_rwlock_rdlock
--# pragma weak pthread_rwlock_wrlock
--# pragma weak pthread_rwlock_unlock
--# pragma weak pthread_rwlock_destroy
--# pragma weak pthread_once
--# pragma weak pthread_cond_init
--# pragma weak pthread_cond_wait
--# pragma weak pthread_cond_signal
--# pragma weak pthread_cond_broadcast
--# pragma weak pthread_cond_destroy
--# pragma weak pthread_mutexattr_init
--# pragma weak pthread_mutexattr_settype
--# pragma weak pthread_mutexattr_destroy
--# ifndef pthread_self
--# pragma weak pthread_self
--# endif
--
--# if !PTHREAD_IN_USE_DETECTION_HARD
--# pragma weak pthread_cancel
--# define pthread_in_use() (pthread_cancel != NULL)
--# endif
--
--# else
--
--# if !PTHREAD_IN_USE_DETECTION_HARD
--# define pthread_in_use() 1
--# endif
--
--# endif
--
--/* -------------------------- gl_lock_t datatype -------------------------- */
--
--typedef pthread_mutex_t gl_lock_t;
--# define gl_lock_define(STORAGECLASS, NAME) \
-- STORAGECLASS pthread_mutex_t NAME;
--# define gl_lock_define_initialized(STORAGECLASS, NAME) \
-- STORAGECLASS pthread_mutex_t NAME = gl_lock_initializer;
--# define gl_lock_initializer \
-- PTHREAD_MUTEX_INITIALIZER
--# define gl_lock_init(NAME) \
-- do \
-- { \
-- if (pthread_in_use () && pthread_mutex_init (&NAME, NULL) != 0) \
-- abort (); \
-- } \
-- while (0)
--# define gl_lock_lock(NAME) \
-- do \
-- { \
-- if (pthread_in_use () && pthread_mutex_lock (&NAME) != 0) \
-- abort (); \
-- } \
-- while (0)
--# define gl_lock_unlock(NAME) \
-- do \
-- { \
-- if (pthread_in_use () && pthread_mutex_unlock (&NAME) != 0) \
-- abort (); \
-- } \
-- while (0)
--# define gl_lock_destroy(NAME) \
-- do \
-- { \
-- if (pthread_in_use () && pthread_mutex_destroy (&NAME) != 0) \
-- abort (); \
-- } \
-- while (0)
--
--/* ------------------------- gl_rwlock_t datatype ------------------------- */
--
--# if HAVE_PTHREAD_RWLOCK
--
--# ifdef PTHREAD_RWLOCK_INITIALIZER
--
--typedef pthread_rwlock_t gl_rwlock_t;
--# define gl_rwlock_define(STORAGECLASS, NAME) \
-- STORAGECLASS pthread_rwlock_t NAME;
--# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \
-- STORAGECLASS pthread_rwlock_t NAME = gl_rwlock_initializer;
--# define gl_rwlock_initializer \
-- PTHREAD_RWLOCK_INITIALIZER
--# define gl_rwlock_init(NAME) \
-- do \
-- { \
-- if (pthread_in_use () && pthread_rwlock_init (&NAME, NULL) != 0) \
-- abort (); \
-- } \
-- while (0)
--# define gl_rwlock_rdlock(NAME) \
-- do \
-- { \
-- if (pthread_in_use () && pthread_rwlock_rdlock (&NAME) != 0) \
-- abort (); \
-- } \
-- while (0)
--# define gl_rwlock_wrlock(NAME) \
-- do \
-- { \
-- if (pthread_in_use () && pthread_rwlock_wrlock (&NAME) != 0) \
-- abort (); \
-- } \
-- while (0)
--# define gl_rwlock_unlock(NAME) \
-- do \
-- { \
-- if (pthread_in_use () && pthread_rwlock_unlock (&NAME) != 0) \
-- abort (); \
-- } \
-- while (0)
--# define gl_rwlock_destroy(NAME) \
-- do \
-- { \
-- if (pthread_in_use () && pthread_rwlock_destroy (&NAME) != 0) \
-- abort (); \
-- } \
-- while (0)
--
--# else
--
--typedef struct
-- {
-- int initialized;
-- pthread_mutex_t guard; /* protects the initialization */
-- pthread_rwlock_t rwlock; /* read-write lock */
-- }
-- gl_rwlock_t;
--# define gl_rwlock_define(STORAGECLASS, NAME) \
-- STORAGECLASS gl_rwlock_t NAME;
--# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \
-- STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer;
--# define gl_rwlock_initializer \
-- { 0, PTHREAD_MUTEX_INITIALIZER }
--# define gl_rwlock_init(NAME) \
-- do \
-- { \
-- if (pthread_in_use ()) \
-- glthread_rwlock_init (&NAME); \
-- } \
-- while (0)
--# define gl_rwlock_rdlock(NAME) \
-- do \
-- { \
-- if (pthread_in_use ()) \
-- glthread_rwlock_rdlock (&NAME); \
-- } \
-- while (0)
--# define gl_rwlock_wrlock(NAME) \
-- do \
-- { \
-- if (pthread_in_use ()) \
-- glthread_rwlock_wrlock (&NAME); \
-- } \
-- while (0)
--# define gl_rwlock_unlock(NAME) \
-- do \
-- { \
-- if (pthread_in_use ()) \
-- glthread_rwlock_unlock (&NAME); \
-- } \
-- while (0)
--# define gl_rwlock_destroy(NAME) \
-- do \
-- { \
-- if (pthread_in_use ()) \
-- glthread_rwlock_destroy (&NAME); \
-- } \
-- while (0)
--extern void glthread_rwlock_init (gl_rwlock_t *lock);
--extern void glthread_rwlock_rdlock (gl_rwlock_t *lock);
--extern void glthread_rwlock_wrlock (gl_rwlock_t *lock);
--extern void glthread_rwlock_unlock (gl_rwlock_t *lock);
--extern void glthread_rwlock_destroy (gl_rwlock_t *lock);
--
--# endif
--
--# else
--
--typedef struct
-- {
-- pthread_mutex_t lock; /* protects the remaining fields */
-- pthread_cond_t waiting_readers; /* waiting readers */
-- pthread_cond_t waiting_writers; /* waiting writers */
-- unsigned int waiting_writers_count; /* number of waiting writers */
-- int runcount; /* number of readers running, or -1 when a writer runs */
-- }
-- gl_rwlock_t;
--# define gl_rwlock_define(STORAGECLASS, NAME) \
-- STORAGECLASS gl_rwlock_t NAME;
--# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \
-- STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer;
--# define gl_rwlock_initializer \
-- { PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, 0 }
--# define gl_rwlock_init(NAME) \
-- do \
-- { \
-- if (pthread_in_use ()) \
-- glthread_rwlock_init (&NAME); \
-- } \
-- while (0)
--# define gl_rwlock_rdlock(NAME) \
-- do \
-- { \
-- if (pthread_in_use ()) \
-- glthread_rwlock_rdlock (&NAME); \
-- } \
-- while (0)
--# define gl_rwlock_wrlock(NAME) \
-- do \
-- { \
-- if (pthread_in_use ()) \
-- glthread_rwlock_wrlock (&NAME); \
-- } \
-- while (0)
--# define gl_rwlock_unlock(NAME) \
-- do \
-- { \
-- if (pthread_in_use ()) \
-- glthread_rwlock_unlock (&NAME); \
-- } \
-- while (0)
--# define gl_rwlock_destroy(NAME) \
-- do \
-- { \
-- if (pthread_in_use ()) \
-- glthread_rwlock_destroy (&NAME); \
-- } \
-- while (0)
--extern void glthread_rwlock_init (gl_rwlock_t *lock);
--extern void glthread_rwlock_rdlock (gl_rwlock_t *lock);
--extern void glthread_rwlock_wrlock (gl_rwlock_t *lock);
--extern void glthread_rwlock_unlock (gl_rwlock_t *lock);
--extern void glthread_rwlock_destroy (gl_rwlock_t *lock);
--
--# endif
--
--/* --------------------- gl_recursive_lock_t datatype --------------------- */
--
--# if HAVE_PTHREAD_MUTEX_RECURSIVE
--
--# if defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER || defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
--
--typedef pthread_mutex_t gl_recursive_lock_t;
--# define gl_recursive_lock_define(STORAGECLASS, NAME) \
-- STORAGECLASS pthread_mutex_t NAME;
--# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \
-- STORAGECLASS pthread_mutex_t NAME = gl_recursive_lock_initializer;
--# ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER
--# define gl_recursive_lock_initializer \
-- PTHREAD_RECURSIVE_MUTEX_INITIALIZER
--# else
--# define gl_recursive_lock_initializer \
-- PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
--# endif
--# define gl_recursive_lock_init(NAME) \
-- do \
-- { \
-- if (pthread_in_use () && pthread_mutex_init (&NAME, NULL) != 0) \
-- abort (); \
-- } \
-- while (0)
--# define gl_recursive_lock_lock(NAME) \
-- do \
-- { \
-- if (pthread_in_use () && pthread_mutex_lock (&NAME) != 0) \
-- abort (); \
-- } \
-- while (0)
--# define gl_recursive_lock_unlock(NAME) \
-- do \
-- { \
-- if (pthread_in_use () && pthread_mutex_unlock (&NAME) != 0) \
-- abort (); \
-- } \
-- while (0)
--# define gl_recursive_lock_destroy(NAME) \
-- do \
-- { \
-- if (pthread_in_use () && pthread_mutex_destroy (&NAME) != 0) \
-- abort (); \
-- } \
-- while (0)
--
--# else
--
--typedef struct
-- {
-- pthread_mutex_t recmutex; /* recursive mutex */
-- pthread_mutex_t guard; /* protects the initialization */
-- int initialized;
-- }
-- gl_recursive_lock_t;
--# define gl_recursive_lock_define(STORAGECLASS, NAME) \
-- STORAGECLASS gl_recursive_lock_t NAME;
--# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \
-- STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer;
--# define gl_recursive_lock_initializer \
-- { PTHREAD_MUTEX_INITIALIZER, PTHREAD_MUTEX_INITIALIZER, 0 }
--# define gl_recursive_lock_init(NAME) \
-- do \
-- { \
-- if (pthread_in_use ()) \
-- glthread_recursive_lock_init (&NAME); \
-- } \
-- while (0)
--# define gl_recursive_lock_lock(NAME) \
-- do \
-- { \
-- if (pthread_in_use ()) \
-- glthread_recursive_lock_lock (&NAME); \
-- } \
-- while (0)
--# define gl_recursive_lock_unlock(NAME) \
-- do \
-- { \
-- if (pthread_in_use ()) \
-- glthread_recursive_lock_unlock (&NAME); \
-- } \
-- while (0)
--# define gl_recursive_lock_destroy(NAME) \
-- do \
-- { \
-- if (pthread_in_use ()) \
-- glthread_recursive_lock_destroy (&NAME); \
-- } \
-- while (0)
--extern void glthread_recursive_lock_init (gl_recursive_lock_t *lock);
--extern void glthread_recursive_lock_lock (gl_recursive_lock_t *lock);
--extern void glthread_recursive_lock_unlock (gl_recursive_lock_t *lock);
--extern void glthread_recursive_lock_destroy (gl_recursive_lock_t *lock);
--
--# endif
--
--# else
--
--/* Old versions of POSIX threads on Solaris did not have recursive locks.
-- We have to implement them ourselves. */
--
--typedef struct
-- {
-- pthread_mutex_t mutex;
-- pthread_t owner;
-- unsigned long depth;
-- }
-- gl_recursive_lock_t;
--# define gl_recursive_lock_define(STORAGECLASS, NAME) \
-- STORAGECLASS gl_recursive_lock_t NAME;
--# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \
-- STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer;
--# define gl_recursive_lock_initializer \
-- { PTHREAD_MUTEX_INITIALIZER, (pthread_t) 0, 0 }
--# define gl_recursive_lock_init(NAME) \
-- do \
-- { \
-- if (pthread_in_use ()) \
-- glthread_recursive_lock_init (&NAME); \
-- } \
-- while (0)
--# define gl_recursive_lock_lock(NAME) \
-- do \
-- { \
-- if (pthread_in_use ()) \
-- glthread_recursive_lock_lock (&NAME); \
-- } \
-- while (0)
--# define gl_recursive_lock_unlock(NAME) \
-- do \
-- { \
-- if (pthread_in_use ()) \
-- glthread_recursive_lock_unlock (&NAME); \
-- } \
-- while (0)
--# define gl_recursive_lock_destroy(NAME) \
-- do \
-- { \
-- if (pthread_in_use ()) \
-- glthread_recursive_lock_destroy (&NAME); \
-- } \
-- while (0)
--extern void glthread_recursive_lock_init (gl_recursive_lock_t *lock);
--extern void glthread_recursive_lock_lock (gl_recursive_lock_t *lock);
--extern void glthread_recursive_lock_unlock (gl_recursive_lock_t *lock);
--extern void glthread_recursive_lock_destroy (gl_recursive_lock_t *lock);
--
--# endif
--
--/* -------------------------- gl_once_t datatype -------------------------- */
--
--typedef pthread_once_t gl_once_t;
--# define gl_once_define(STORAGECLASS, NAME) \
-- STORAGECLASS pthread_once_t NAME = PTHREAD_ONCE_INIT;
--# define gl_once(NAME, INITFUNCTION) \
-- do \
-- { \
-- if (pthread_in_use ()) \
-- { \
-- if (pthread_once (&NAME, INITFUNCTION) != 0) \
-- abort (); \
-- } \
-- else \
-- { \
-- if (glthread_once_singlethreaded (&NAME)) \
-- INITFUNCTION (); \
-- } \
-- } \
-- while (0)
--extern int glthread_once_singlethreaded (pthread_once_t *once_control);
--
--# ifdef __cplusplus
--}
--# endif
--
--#endif
--
--/* ========================================================================= */
--
--#if USE_PTH_THREADS
--
--/* Use the GNU Pth threads library. */
--
--# include <pth.h>
--# include <stdlib.h>
--
--# ifdef __cplusplus
--extern "C" {
--# endif
--
--# if USE_PTH_THREADS_WEAK
--
--/* Use weak references to the GNU Pth threads library. */
--
--# pragma weak pth_mutex_init
--# pragma weak pth_mutex_acquire
--# pragma weak pth_mutex_release
--# pragma weak pth_rwlock_init
--# pragma weak pth_rwlock_acquire
--# pragma weak pth_rwlock_release
--# pragma weak pth_once
--
--# pragma weak pth_cancel
--# define pth_in_use() (pth_cancel != NULL)
--
--# else
--
--# define pth_in_use() 1
--
--# endif
--
--/* -------------------------- gl_lock_t datatype -------------------------- */
--
--typedef pth_mutex_t gl_lock_t;
--# define gl_lock_define(STORAGECLASS, NAME) \
-- STORAGECLASS pth_mutex_t NAME;
--# define gl_lock_define_initialized(STORAGECLASS, NAME) \
-- STORAGECLASS pth_mutex_t NAME = gl_lock_initializer;
--# define gl_lock_initializer \
-- PTH_MUTEX_INIT
--# define gl_lock_init(NAME) \
-- do \
-- { \
-- if (pth_in_use() && !pth_mutex_init (&NAME)) \
-- abort (); \
-- } \
-- while (0)
--# define gl_lock_lock(NAME) \
-- do \
-- { \
-- if (pth_in_use() && !pth_mutex_acquire (&NAME, 0, NULL)) \
-- abort (); \
-- } \
-- while (0)
--# define gl_lock_unlock(NAME) \
-- do \
-- { \
-- if (pth_in_use() && !pth_mutex_release (&NAME)) \
-- abort (); \
-- } \
-- while (0)
--# define gl_lock_destroy(NAME) \
-- (void)(&NAME)
--
--/* ------------------------- gl_rwlock_t datatype ------------------------- */
--
--typedef pth_rwlock_t gl_rwlock_t;
--# define gl_rwlock_define(STORAGECLASS, NAME) \
-- STORAGECLASS pth_rwlock_t NAME;
--# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \
-- STORAGECLASS pth_rwlock_t NAME = gl_rwlock_initializer;
--# define gl_rwlock_initializer \
-- PTH_RWLOCK_INIT
--# define gl_rwlock_init(NAME) \
-- do \
-- { \
-- if (pth_in_use() && !pth_rwlock_init (&NAME)) \
-- abort (); \
-- } \
-- while (0)
--# define gl_rwlock_rdlock(NAME) \
-- do \
-- { \
-- if (pth_in_use() \
-- && !pth_rwlock_acquire (&NAME, PTH_RWLOCK_RD, 0, NULL)) \
-- abort (); \
-- } \
-- while (0)
--# define gl_rwlock_wrlock(NAME) \
-- do \
-- { \
-- if (pth_in_use() \
-- && !pth_rwlock_acquire (&NAME, PTH_RWLOCK_RW, 0, NULL)) \
-- abort (); \
-- } \
-- while (0)
--# define gl_rwlock_unlock(NAME) \
-- do \
-- { \
-- if (pth_in_use() && !pth_rwlock_release (&NAME)) \
-- abort (); \
-- } \
-- while (0)
--# define gl_rwlock_destroy(NAME) \
-- (void)(&NAME)
--
--/* --------------------- gl_recursive_lock_t datatype --------------------- */
--
--/* In Pth, mutexes are recursive by default. */
--typedef pth_mutex_t gl_recursive_lock_t;
--# define gl_recursive_lock_define(STORAGECLASS, NAME) \
-- STORAGECLASS pth_mutex_t NAME;
--# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \
-- STORAGECLASS pth_mutex_t NAME = gl_recursive_lock_initializer;
--# define gl_recursive_lock_initializer \
-- PTH_MUTEX_INIT
--# define gl_recursive_lock_init(NAME) \
-- do \
-- { \
-- if (pth_in_use() && !pth_mutex_init (&NAME)) \
-- abort (); \
-- } \
-- while (0)
--# define gl_recursive_lock_lock(NAME) \
-- do \
-- { \
-- if (pth_in_use() && !pth_mutex_acquire (&NAME, 0, NULL)) \
-- abort (); \
-- } \
-- while (0)
--# define gl_recursive_lock_unlock(NAME) \
-- do \
-- { \
-- if (pth_in_use() && !pth_mutex_release (&NAME)) \
-- abort (); \
-- } \
-- while (0)
--# define gl_recursive_lock_destroy(NAME) \
-- (void)(&NAME)
--
--/* -------------------------- gl_once_t datatype -------------------------- */
--
--typedef pth_once_t gl_once_t;
--# define gl_once_define(STORAGECLASS, NAME) \
-- STORAGECLASS pth_once_t NAME = PTH_ONCE_INIT;
--# define gl_once(NAME, INITFUNCTION) \
-- do \
-- { \
-- if (pth_in_use ()) \
-- { \
-- void (*gl_once_temp) (void) = INITFUNCTION; \
-- if (!pth_once (&NAME, glthread_once_call, &gl_once_temp)) \
-- abort (); \
-- } \
-- else \
-- { \
-- if (glthread_once_singlethreaded (&NAME)) \
-- INITFUNCTION (); \
-- } \
-- } \
-- while (0)
--extern void glthread_once_call (void *arg);
--extern int glthread_once_singlethreaded (pth_once_t *once_control);
--
--# ifdef __cplusplus
--}
--# endif
--
--#endif
--
--/* ========================================================================= */
--
--#if USE_SOLARIS_THREADS
--
--/* Use the old Solaris threads library. */
--
--# include <thread.h>
--# include <synch.h>
--# include <stdlib.h>
--
--# ifdef __cplusplus
--extern "C" {
--# endif
--
--# if USE_SOLARIS_THREADS_WEAK
--
--/* Use weak references to the old Solaris threads library. */
--
--# pragma weak mutex_init
--# pragma weak mutex_lock
--# pragma weak mutex_unlock
--# pragma weak mutex_destroy
--# pragma weak rwlock_init
--# pragma weak rw_rdlock
--# pragma weak rw_wrlock
--# pragma weak rw_unlock
--# pragma weak rwlock_destroy
--# pragma weak thr_self
--
--# pragma weak thr_suspend
--# define thread_in_use() (thr_suspend != NULL)
--
--# else
--
--# define thread_in_use() 1
--
--# endif
--
--/* -------------------------- gl_lock_t datatype -------------------------- */
--
--typedef mutex_t gl_lock_t;
--# define gl_lock_define(STORAGECLASS, NAME) \
-- STORAGECLASS mutex_t NAME;
--# define gl_lock_define_initialized(STORAGECLASS, NAME) \
-- STORAGECLASS mutex_t NAME = gl_lock_initializer;
--# define gl_lock_initializer \
-- DEFAULTMUTEX
--# define gl_lock_init(NAME) \
-- do \
-- { \
-- if (thread_in_use () && mutex_init (&NAME, USYNC_THREAD, NULL) != 0) \
-- abort (); \
-- } \
-- while (0)
--# define gl_lock_lock(NAME) \
-- do \
-- { \
-- if (thread_in_use () && mutex_lock (&NAME) != 0) \
-- abort (); \
-- } \
-- while (0)
--# define gl_lock_unlock(NAME) \
-- do \
-- { \
-- if (thread_in_use () && mutex_unlock (&NAME) != 0) \
-- abort (); \
-- } \
-- while (0)
--# define gl_lock_destroy(NAME) \
-- do \
-- { \
-- if (thread_in_use () && mutex_destroy (&NAME) != 0) \
-- abort (); \
-- } \
-- while (0)
--
--/* ------------------------- gl_rwlock_t datatype ------------------------- */
--
--typedef rwlock_t gl_rwlock_t;
--# define gl_rwlock_define(STORAGECLASS, NAME) \
-- STORAGECLASS rwlock_t NAME;
--# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \
-- STORAGECLASS rwlock_t NAME = gl_rwlock_initializer;
--# define gl_rwlock_initializer \
-- DEFAULTRWLOCK
--# define gl_rwlock_init(NAME) \
-- do \
-- { \
-- if (thread_in_use () && rwlock_init (&NAME, USYNC_THREAD, NULL) != 0) \
-- abort (); \
-- } \
-- while (0)
--# define gl_rwlock_rdlock(NAME) \
-- do \
-- { \
-- if (thread_in_use () && rw_rdlock (&NAME) != 0) \
-- abort (); \
-- } \
-- while (0)
--# define gl_rwlock_wrlock(NAME) \
-- do \
-- { \
-- if (thread_in_use () && rw_wrlock (&NAME) != 0) \
-- abort (); \
-- } \
-- while (0)
--# define gl_rwlock_unlock(NAME) \
-- do \
-- { \
-- if (thread_in_use () && rw_unlock (&NAME) != 0) \
-- abort (); \
-- } \
-- while (0)
--# define gl_rwlock_destroy(NAME) \
-- do \
-- { \
-- if (thread_in_use () && rwlock_destroy (&NAME) != 0) \
-- abort (); \
-- } \
-- while (0)
--
--/* --------------------- gl_recursive_lock_t datatype --------------------- */
--
--/* Old Solaris threads did not have recursive locks.
-- We have to implement them ourselves. */
--
--typedef struct
-- {
-- mutex_t mutex;
-- thread_t owner;
-- unsigned long depth;
-- }
-- gl_recursive_lock_t;
--# define gl_recursive_lock_define(STORAGECLASS, NAME) \
-- STORAGECLASS gl_recursive_lock_t NAME;
--# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \
-- STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer;
--# define gl_recursive_lock_initializer \
-- { DEFAULTMUTEX, (thread_t) 0, 0 }
--# define gl_recursive_lock_init(NAME) \
-- do \
-- { \
-- if (thread_in_use ()) \
-- glthread_recursive_lock_init (&NAME); \
-- } \
-- while (0)
--# define gl_recursive_lock_lock(NAME) \
-- do \
-- { \
-- if (thread_in_use ()) \
-- glthread_recursive_lock_lock (&NAME); \
-- } \
-- while (0)
--# define gl_recursive_lock_unlock(NAME) \
-- do \
-- { \
-- if (thread_in_use ()) \
-- glthread_recursive_lock_unlock (&NAME); \
-- } \
-- while (0)
--# define gl_recursive_lock_destroy(NAME) \
-- do \
-- { \
-- if (thread_in_use ()) \
-- glthread_recursive_lock_destroy (&NAME); \
-- } \
-- while (0)
--extern void glthread_recursive_lock_init (gl_recursive_lock_t *lock);
--extern void glthread_recursive_lock_lock (gl_recursive_lock_t *lock);
--extern void glthread_recursive_lock_unlock (gl_recursive_lock_t *lock);
--extern void glthread_recursive_lock_destroy (gl_recursive_lock_t *lock);
--
--/* -------------------------- gl_once_t datatype -------------------------- */
--
--typedef struct
-- {
-- volatile int inited;
-- mutex_t mutex;
-- }
-- gl_once_t;
--# define gl_once_define(STORAGECLASS, NAME) \
-- STORAGECLASS gl_once_t NAME = { 0, DEFAULTMUTEX };
--# define gl_once(NAME, INITFUNCTION) \
-- do \
-- { \
-- if (thread_in_use ()) \
-- { \
-- glthread_once (&NAME, INITFUNCTION); \
-- } \
-- else \
-- { \
-- if (glthread_once_singlethreaded (&NAME)) \
-- INITFUNCTION (); \
-- } \
-- } \
-- while (0)
--extern void glthread_once (gl_once_t *once_control, void (*initfunction) (void));
--extern int glthread_once_singlethreaded (gl_once_t *once_control);
--
--# ifdef __cplusplus
--}
--# endif
--
--#endif
--
--/* ========================================================================= */
--
--#if USE_WIN32_THREADS
--
--# include <windows.h>
--
--# ifdef __cplusplus
--extern "C" {
--# endif
--
--/* We can use CRITICAL_SECTION directly, rather than the Win32 Event, Mutex,
-- Semaphore types, because
-- - we need only to synchronize inside a single process (address space),
-- not inter-process locking,
-- - we don't need to support trylock operations. (TryEnterCriticalSection
-- does not work on Windows 95/98/ME. Packages that need trylock usually
-- define their own mutex type.) */
--
--/* There is no way to statically initialize a CRITICAL_SECTION. It needs
-- to be done lazily, once only. For this we need spinlocks. */
--
--typedef struct { volatile int done; volatile long started; } gl_spinlock_t;
--
--/* -------------------------- gl_lock_t datatype -------------------------- */
--
--typedef struct
-- {
-- gl_spinlock_t guard; /* protects the initialization */
-- CRITICAL_SECTION lock;
-- }
-- gl_lock_t;
--# define gl_lock_define(STORAGECLASS, NAME) \
-- STORAGECLASS gl_lock_t NAME;
--# define gl_lock_define_initialized(STORAGECLASS, NAME) \
-- STORAGECLASS gl_lock_t NAME = gl_lock_initializer;
--# define gl_lock_initializer \
-- { { 0, -1 } }
--# define gl_lock_init(NAME) \
-- glthread_lock_init (&NAME)
--# define gl_lock_lock(NAME) \
-- glthread_lock_lock (&NAME)
--# define gl_lock_unlock(NAME) \
-- glthread_lock_unlock (&NAME)
--# define gl_lock_destroy(NAME) \
-- glthread_lock_destroy (&NAME)
--extern void glthread_lock_init (gl_lock_t *lock);
--extern void glthread_lock_lock (gl_lock_t *lock);
--extern void glthread_lock_unlock (gl_lock_t *lock);
--extern void glthread_lock_destroy (gl_lock_t *lock);
--
--/* ------------------------- gl_rwlock_t datatype ------------------------- */
--
--/* It is impossible to implement read-write locks using plain locks, without
-- introducing an extra thread dedicated to managing read-write locks.
-- Therefore here we need to use the low-level Event type. */
--
--typedef struct
-- {
-- HANDLE *array; /* array of waiting threads, each represented by an event */
-- unsigned int count; /* number of waiting threads */
-- unsigned int alloc; /* length of allocated array */
-- unsigned int offset; /* index of first waiting thread in array */
-- }
-- gl_waitqueue_t;
--typedef struct
-- {
-- gl_spinlock_t guard; /* protects the initialization */
-- CRITICAL_SECTION lock; /* protects the remaining fields */
-- gl_waitqueue_t waiting_readers; /* waiting readers */
-- gl_waitqueue_t waiting_writers; /* waiting writers */
-- int runcount; /* number of readers running, or -1 when a writer runs */
-- }
-- gl_rwlock_t;
--# define gl_rwlock_define(STORAGECLASS, NAME) \
-- STORAGECLASS gl_rwlock_t NAME;
--# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \
-- STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer;
--# define gl_rwlock_initializer \
-- { { 0, -1 } }
--# define gl_rwlock_init(NAME) \
-- glthread_rwlock_init (&NAME)
--# define gl_rwlock_rdlock(NAME) \
-- glthread_rwlock_rdlock (&NAME)
--# define gl_rwlock_wrlock(NAME) \
-- glthread_rwlock_wrlock (&NAME)
--# define gl_rwlock_unlock(NAME) \
-- glthread_rwlock_unlock (&NAME)
--# define gl_rwlock_destroy(NAME) \
-- glthread_rwlock_destroy (&NAME)
--extern void glthread_rwlock_init (gl_rwlock_t *lock);
--extern void glthread_rwlock_rdlock (gl_rwlock_t *lock);
--extern void glthread_rwlock_wrlock (gl_rwlock_t *lock);
--extern void glthread_rwlock_unlock (gl_rwlock_t *lock);
--extern void glthread_rwlock_destroy (gl_rwlock_t *lock);
--
--/* --------------------- gl_recursive_lock_t datatype --------------------- */
--
--/* The Win32 documentation says that CRITICAL_SECTION already implements a
-- recursive lock. But we need not rely on it: It's easy to implement a
-- recursive lock without this assumption. */
--
--typedef struct
-- {
-- gl_spinlock_t guard; /* protects the initialization */
-- DWORD owner;
-- unsigned long depth;
-- CRITICAL_SECTION lock;
-- }
-- gl_recursive_lock_t;
--# define gl_recursive_lock_define(STORAGECLASS, NAME) \
-- STORAGECLASS gl_recursive_lock_t NAME;
--# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \
-- STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer;
--# define gl_recursive_lock_initializer \
-- { { 0, -1 }, 0, 0 }
--# define gl_recursive_lock_init(NAME) \
-- glthread_recursive_lock_init (&NAME)
--# define gl_recursive_lock_lock(NAME) \
-- glthread_recursive_lock_lock (&NAME)
--# define gl_recursive_lock_unlock(NAME) \
-- glthread_recursive_lock_unlock (&NAME)
--# define gl_recursive_lock_destroy(NAME) \
-- glthread_recursive_lock_destroy (&NAME)
--extern void glthread_recursive_lock_init (gl_recursive_lock_t *lock);
--extern void glthread_recursive_lock_lock (gl_recursive_lock_t *lock);
--extern void glthread_recursive_lock_unlock (gl_recursive_lock_t *lock);
--extern void glthread_recursive_lock_destroy (gl_recursive_lock_t *lock);
--
--/* -------------------------- gl_once_t datatype -------------------------- */
--
--typedef struct
-- {
-- volatile int inited;
-- volatile long started;
-- CRITICAL_SECTION lock;
-- }
-- gl_once_t;
--# define gl_once_define(STORAGECLASS, NAME) \
-- STORAGECLASS gl_once_t NAME = { -1, -1 };
--# define gl_once(NAME, INITFUNCTION) \
-- glthread_once (&NAME, INITFUNCTION)
--extern void glthread_once (gl_once_t *once_control, void (*initfunction) (void));
--
--# ifdef __cplusplus
--}
--# endif
--
--#endif
--
--/* ========================================================================= */
--
--#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS)
--
--/* Provide dummy implementation if threads are not supported. */
--
--/* -------------------------- gl_lock_t datatype -------------------------- */
--
--typedef int gl_lock_t;
--# define gl_lock_define(STORAGECLASS, NAME)
--# define gl_lock_define_initialized(STORAGECLASS, NAME)
--# define gl_lock_init(NAME)
--# define gl_lock_lock(NAME)
--# define gl_lock_unlock(NAME)
--
--/* ------------------------- gl_rwlock_t datatype ------------------------- */
--
--typedef int gl_rwlock_t;
--# define gl_rwlock_define(STORAGECLASS, NAME)
--# define gl_rwlock_define_initialized(STORAGECLASS, NAME)
--# define gl_rwlock_init(NAME)
--# define gl_rwlock_rdlock(NAME)
--# define gl_rwlock_wrlock(NAME)
--# define gl_rwlock_unlock(NAME)
--
--/* --------------------- gl_recursive_lock_t datatype --------------------- */
--
--typedef int gl_recursive_lock_t;
--# define gl_recursive_lock_define(STORAGECLASS, NAME)
--# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME)
--# define gl_recursive_lock_init(NAME)
--# define gl_recursive_lock_lock(NAME)
--# define gl_recursive_lock_unlock(NAME)
--
--/* -------------------------- gl_once_t datatype -------------------------- */
--
--typedef int gl_once_t;
--# define gl_once_define(STORAGECLASS, NAME) \
-- STORAGECLASS gl_once_t NAME = 0;
--# define gl_once(NAME, INITFUNCTION) \
-- do \
-- { \
-- if (NAME == 0) \
-- { \
-- NAME = ~ 0; \
-- INITFUNCTION (); \
-- } \
-- } \
-- while (0)
--
--#endif
--
--/* ========================================================================= */
--
--#endif /* _LOCK_H */
---- a/intl/log.c
-+++ /dev/null
-@@ -1,116 +0,0 @@
--/* Log file output.
-- Copyright (C) 2003, 2005 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--/* Written by Bruno Haible <bruno@clisp.org>. */
--
--#ifdef HAVE_CONFIG_H
--# include <config.h>
--#endif
--
--#include <stdio.h>
--#include <stdlib.h>
--#include <string.h>
--
--/* Handle multi-threaded applications. */
--#ifdef _LIBC
--# include <bits/libc-lock.h>
--#else
--# include "lock.h"
--#endif
--
--/* Print an ASCII string with quotes and escape sequences where needed. */
--static void
--print_escaped (FILE *stream, const char *str)
--{
-- putc ('"', stream);
-- for (; *str != '\0'; str++)
-- if (*str == '\n')
-- {
-- fputs ("\\n\"", stream);
-- if (str[1] == '\0')
-- return;
-- fputs ("\n\"", stream);
-- }
-- else
-- {
-- if (*str == '"' || *str == '\\')
-- putc ('\\', stream);
-- putc (*str, stream);
-- }
-- putc ('"', stream);
--}
--
--static char *last_logfilename = NULL;
--static FILE *last_logfile = NULL;
--__libc_lock_define_initialized (static, lock)
--
--static inline void
--_nl_log_untranslated_locked (const char *logfilename, const char *domainname,
-- const char *msgid1, const char *msgid2, int plural)
--{
-- FILE *logfile;
--
-- /* Can we reuse the last opened logfile? */
-- if (last_logfilename == NULL || strcmp (logfilename, last_logfilename) != 0)
-- {
-- /* Close the last used logfile. */
-- if (last_logfilename != NULL)
-- {
-- if (last_logfile != NULL)
-- {
-- fclose (last_logfile);
-- last_logfile = NULL;
-- }
-- free (last_logfilename);
-- last_logfilename = NULL;
-- }
-- /* Open the logfile. */
-- last_logfilename = (char *) malloc (strlen (logfilename) + 1);
-- if (last_logfilename == NULL)
-- return;
-- strcpy (last_logfilename, logfilename);
-- last_logfile = fopen (logfilename, "a");
-- if (last_logfile == NULL)
-- return;
-- }
-- logfile = last_logfile;
--
-- fprintf (logfile, "domain ");
-- print_escaped (logfile, domainname);
-- fprintf (logfile, "\nmsgid ");
-- print_escaped (logfile, msgid1);
-- if (plural)
-- {
-- fprintf (logfile, "\nmsgid_plural ");
-- print_escaped (logfile, msgid2);
-- fprintf (logfile, "\nmsgstr[0] \"\"\n");
-- }
-- else
-- fprintf (logfile, "\nmsgstr \"\"\n");
-- putc ('\n', logfile);
--}
--
--/* Add to the log file an entry denoting a failed translation. */
--void
--_nl_log_untranslated (const char *logfilename, const char *domainname,
-- const char *msgid1, const char *msgid2, int plural)
--{
-- __libc_lock_lock (lock);
-- _nl_log_untranslated_locked (logfilename, domainname, msgid1, msgid2, plural);
-- __libc_lock_unlock (lock);
--}
---- a/intl/ngettext.c
-+++ /dev/null
-@@ -1,65 +0,0 @@
--/* Implementation of ngettext(3) function.
-- Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--#ifdef HAVE_CONFIG_H
--# include <config.h>
--#endif
--
--#ifdef _LIBC
--# define __need_NULL
--# include <stddef.h>
--#else
--# include <stdlib.h> /* Just for NULL. */
--#endif
--
--#include "gettextP.h"
--#ifdef _LIBC
--# include <libintl.h>
--#else
--# include "libgnuintl.h"
--#endif
--
--#include <locale.h>
--
--/* @@ end of prolog @@ */
--
--/* Names for the libintl functions are a problem. They must not clash
-- with existing names and they should follow ANSI C. But this source
-- code is also used in GNU C Library where the names have a __
-- prefix. So we have to make a difference here. */
--#ifdef _LIBC
--# define NGETTEXT __ngettext
--# define DCNGETTEXT __dcngettext
--#else
--# define NGETTEXT libintl_ngettext
--# define DCNGETTEXT libintl_dcngettext
--#endif
--
--/* Look up MSGID in the current default message catalog for the current
-- LC_MESSAGES locale. If not found, returns MSGID itself (the default
-- text). */
--char *
--NGETTEXT (const char *msgid1, const char *msgid2, unsigned long int n)
--{
-- return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES);
--}
--
--#ifdef _LIBC
--/* Alias for function name in GNU C Library. */
--weak_alias (__ngettext, ngettext);
--#endif
---- a/intl/os2compat.c
-+++ /dev/null
-@@ -1,98 +0,0 @@
--/* OS/2 compatibility functions.
-- Copyright (C) 2001-2002 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--#define OS2_AWARE
--#ifdef HAVE_CONFIG_H
--#include <config.h>
--#endif
--
--#include <stdlib.h>
--#include <string.h>
--#include <sys/param.h>
--
--/* A version of getenv() that works from DLLs */
--extern unsigned long DosScanEnv (const unsigned char *pszName, unsigned char **ppszValue);
--
--char *
--_nl_getenv (const char *name)
--{
-- unsigned char *value;
-- if (DosScanEnv (name, &value))
-- return NULL;
-- else
-- return value;
--}
--
--/* A fixed size buffer. */
--char libintl_nl_default_dirname[MAXPATHLEN+1];
--
--char *_nlos2_libdir = NULL;
--char *_nlos2_localealiaspath = NULL;
--char *_nlos2_localedir = NULL;
--
--static __attribute__((constructor)) void
--nlos2_initialize ()
--{
-- char *root = getenv ("UNIXROOT");
-- char *gnulocaledir = getenv ("GNULOCALEDIR");
--
-- _nlos2_libdir = gnulocaledir;
-- if (!_nlos2_libdir)
-- {
-- if (root)
-- {
-- size_t sl = strlen (root);
-- _nlos2_libdir = (char *) malloc (sl + strlen (LIBDIR) + 1);
-- memcpy (_nlos2_libdir, root, sl);
-- memcpy (_nlos2_libdir + sl, LIBDIR, strlen (LIBDIR) + 1);
-- }
-- else
-- _nlos2_libdir = LIBDIR;
-- }
--
-- _nlos2_localealiaspath = gnulocaledir;
-- if (!_nlos2_localealiaspath)
-- {
-- if (root)
-- {
-- size_t sl = strlen (root);
-- _nlos2_localealiaspath = (char *) malloc (sl + strlen (LOCALE_ALIAS_PATH) + 1);
-- memcpy (_nlos2_localealiaspath, root, sl);
-- memcpy (_nlos2_localealiaspath + sl, LOCALE_ALIAS_PATH, strlen (LOCALE_ALIAS_PATH) + 1);
-- }
-- else
-- _nlos2_localealiaspath = LOCALE_ALIAS_PATH;
-- }
--
-- _nlos2_localedir = gnulocaledir;
-- if (!_nlos2_localedir)
-- {
-- if (root)
-- {
-- size_t sl = strlen (root);
-- _nlos2_localedir = (char *) malloc (sl + strlen (LOCALEDIR) + 1);
-- memcpy (_nlos2_localedir, root, sl);
-- memcpy (_nlos2_localedir + sl, LOCALEDIR, strlen (LOCALEDIR) + 1);
-- }
-- else
-- _nlos2_localedir = LOCALEDIR;
-- }
--
-- if (strlen (_nlos2_localedir) <= MAXPATHLEN)
-- strcpy (libintl_nl_default_dirname, _nlos2_localedir);
--}
---- a/intl/os2compat.h
-+++ /dev/null
-@@ -1,46 +0,0 @@
--/* OS/2 compatibility defines.
-- This file is intended to be included from config.h
-- Copyright (C) 2001-2002 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--/* When included from os2compat.h we need all the original definitions */
--#ifndef OS2_AWARE
--
--#undef LIBDIR
--#define LIBDIR _nlos2_libdir
--extern char *_nlos2_libdir;
--
--#undef LOCALEDIR
--#define LOCALEDIR _nlos2_localedir
--extern char *_nlos2_localedir;
--
--#undef LOCALE_ALIAS_PATH
--#define LOCALE_ALIAS_PATH _nlos2_localealiaspath
--extern char *_nlos2_localealiaspath;
--
--#endif
--
--#undef HAVE_STRCASECMP
--#define HAVE_STRCASECMP 1
--#define strcasecmp stricmp
--#define strncasecmp strnicmp
--
--/* We have our own getenv() which works even if library is compiled as DLL */
--#define getenv _nl_getenv
--
--/* Older versions of gettext used -1 as the value of LC_MESSAGES */
--#define LC_MESSAGES_COMPAT (-1)
---- a/intl/osdep.c
-+++ /dev/null
-@@ -1,26 +0,0 @@
--/* OS dependent parts of libintl.
-- Copyright (C) 2001-2002, 2006 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--#if defined __CYGWIN__
--# include "intl-exports.c"
--#elif defined __EMX__
--# include "os2compat.c"
--#else
--/* Avoid AIX compiler warning. */
--typedef int dummy;
--#endif
---- a/intl/plural-exp.c
-+++ /dev/null
-@@ -1,155 +0,0 @@
--/* Expression parsing for plural form selection.
-- Copyright (C) 2000-2001, 2003, 2005-2007 Free Software Foundation, Inc.
-- Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--#ifdef HAVE_CONFIG_H
--# include <config.h>
--#endif
--
--#include <ctype.h>
--#include <stdlib.h>
--#include <string.h>
--
--#include "plural-exp.h"
--
--#if (defined __GNUC__ && !(__APPLE_CC__ > 1) && !defined __cplusplus) \
-- || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
--
--/* These structs are the constant expression for the germanic plural
-- form determination. It represents the expression "n != 1". */
--static const struct expression plvar =
--{
-- .nargs = 0,
-- .operation = var,
--};
--static const struct expression plone =
--{
-- .nargs = 0,
-- .operation = num,
-- .val =
-- {
-- .num = 1
-- }
--};
--struct expression GERMANIC_PLURAL =
--{
-- .nargs = 2,
-- .operation = not_equal,
-- .val =
-- {
-- .args =
-- {
-- [0] = (struct expression *) &plvar,
-- [1] = (struct expression *) &plone
-- }
-- }
--};
--
--# define INIT_GERMANIC_PLURAL()
--
--#else
--
--/* For compilers without support for ISO C 99 struct/union initializers:
-- Initialization at run-time. */
--
--static struct expression plvar;
--static struct expression plone;
--struct expression GERMANIC_PLURAL;
--
--static void
--init_germanic_plural ()
--{
-- if (plone.val.num == 0)
-- {
-- plvar.nargs = 0;
-- plvar.operation = var;
--
-- plone.nargs = 0;
-- plone.operation = num;
-- plone.val.num = 1;
--
-- GERMANIC_PLURAL.nargs = 2;
-- GERMANIC_PLURAL.operation = not_equal;
-- GERMANIC_PLURAL.val.args[0] = &plvar;
-- GERMANIC_PLURAL.val.args[1] = &plone;
-- }
--}
--
--# define INIT_GERMANIC_PLURAL() init_germanic_plural ()
--
--#endif
--
--void
--internal_function
--EXTRACT_PLURAL_EXPRESSION (const char *nullentry,
-- const struct expression **pluralp,
-- unsigned long int *npluralsp)
--{
-- if (nullentry != NULL)
-- {
-- const char *plural;
-- const char *nplurals;
--
-- plural = strstr (nullentry, "plural=");
-- nplurals = strstr (nullentry, "nplurals=");
-- if (plural == NULL || nplurals == NULL)
-- goto no_plural;
-- else
-- {
-- char *endp;
-- unsigned long int n;
-- struct parse_args args;
--
-- /* First get the number. */
-- nplurals += 9;
-- while (*nplurals != '\0' && isspace ((unsigned char) *nplurals))
-- ++nplurals;
-- if (!(*nplurals >= '0' && *nplurals <= '9'))
-- goto no_plural;
--#if defined HAVE_STRTOUL || defined _LIBC
-- n = strtoul (nplurals, &endp, 10);
--#else
-- for (endp = nplurals, n = 0; *endp >= '0' && *endp <= '9'; endp++)
-- n = n * 10 + (*endp - '0');
--#endif
-- if (nplurals == endp)
-- goto no_plural;
-- *npluralsp = n;
--
-- /* Due to the restrictions bison imposes onto the interface of the
-- scanner function we have to put the input string and the result
-- passed up from the parser into the same structure which address
-- is passed down to the parser. */
-- plural += 7;
-- args.cp = plural;
-- if (PLURAL_PARSE (&args) != 0)
-- goto no_plural;
-- *pluralp = args.res;
-- }
-- }
-- else
-- {
-- /* By default we are using the Germanic form: singular form only
-- for `one', the plural form otherwise. Yes, this is also what
-- English is using since English is a Germanic language. */
-- no_plural:
-- INIT_GERMANIC_PLURAL ();
-- *pluralp = &GERMANIC_PLURAL;
-- *npluralsp = 2;
-- }
--}
---- a/intl/plural-exp.h
-+++ /dev/null
-@@ -1,129 +0,0 @@
--/* Expression parsing and evaluation for plural form selection.
-- Copyright (C) 2000-2003, 2005-2007 Free Software Foundation, Inc.
-- Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
--
-- This program is free software; you can redistribute it and/or modify it
-- under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2, or (at your option)
-- any later version.
--
-- This program 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
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public
-- License along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-- USA. */
--
--#ifndef _PLURAL_EXP_H
--#define _PLURAL_EXP_H
--
--#ifndef internal_function
--# define internal_function
--#endif
--
--#ifndef attribute_hidden
--# define attribute_hidden
--#endif
--
--#ifdef __cplusplus
--extern "C" {
--#endif
--
--
--enum expression_operator
--{
-- /* Without arguments: */
-- var, /* The variable "n". */
-- num, /* Decimal number. */
-- /* Unary operators: */
-- lnot, /* Logical NOT. */
-- /* Binary operators: */
-- mult, /* Multiplication. */
-- divide, /* Division. */
-- module, /* Modulo operation. */
-- plus, /* Addition. */
-- minus, /* Subtraction. */
-- less_than, /* Comparison. */
-- greater_than, /* Comparison. */
-- less_or_equal, /* Comparison. */
-- greater_or_equal, /* Comparison. */
-- equal, /* Comparison for equality. */
-- not_equal, /* Comparison for inequality. */
-- land, /* Logical AND. */
-- lor, /* Logical OR. */
-- /* Ternary operators: */
-- qmop /* Question mark operator. */
--};
--
--/* This is the representation of the expressions to determine the
-- plural form. */
--struct expression
--{
-- int nargs; /* Number of arguments. */
-- enum expression_operator operation;
-- union
-- {
-- unsigned long int num; /* Number value for `num'. */
-- struct expression *args[3]; /* Up to three arguments. */
-- } val;
--};
--
--/* This is the data structure to pass information to the parser and get
-- the result in a thread-safe way. */
--struct parse_args
--{
-- const char *cp;
-- struct expression *res;
--};
--
--
--/* Names for the libintl functions are a problem. This source code is used
-- 1. in the GNU C Library library,
-- 2. in the GNU libintl library,
-- 3. in the GNU gettext tools.
-- The function names in each situation must be different, to allow for
-- binary incompatible changes in 'struct expression'. Furthermore,
-- 1. in the GNU C Library library, the names have a __ prefix,
-- 2.+3. in the GNU libintl library and in the GNU gettext tools, the names
-- must follow ANSI C and not start with __.
-- So we have to distinguish the three cases. */
--#ifdef _LIBC
--# define FREE_EXPRESSION __gettext_free_exp
--# define PLURAL_PARSE __gettextparse
--# define GERMANIC_PLURAL __gettext_germanic_plural
--# define EXTRACT_PLURAL_EXPRESSION __gettext_extract_plural
--#elif defined (IN_LIBINTL)
--# define FREE_EXPRESSION libintl_gettext_free_exp
--# define PLURAL_PARSE libintl_gettextparse
--# define GERMANIC_PLURAL libintl_gettext_germanic_plural
--# define EXTRACT_PLURAL_EXPRESSION libintl_gettext_extract_plural
--#else
--# define FREE_EXPRESSION free_plural_expression
--# define PLURAL_PARSE parse_plural_expression
--# define GERMANIC_PLURAL germanic_plural
--# define EXTRACT_PLURAL_EXPRESSION extract_plural_expression
--#endif
--
--extern void FREE_EXPRESSION (struct expression *exp)
-- internal_function;
--extern int PLURAL_PARSE (void *arg);
--extern struct expression GERMANIC_PLURAL attribute_hidden;
--extern void EXTRACT_PLURAL_EXPRESSION (const char *nullentry,
-- const struct expression **pluralp,
-- unsigned long int *npluralsp)
-- internal_function;
--
--#if !defined (_LIBC) && !defined (IN_LIBINTL) && !defined (IN_LIBGLOCALE)
--extern unsigned long int plural_eval (const struct expression *pexp,
-- unsigned long int n);
--#endif
--
--
--#ifdef __cplusplus
--}
--#endif
--
--#endif /* _PLURAL_EXP_H */
---- a/intl/plural.c
-+++ /dev/null
-@@ -1,1981 +0,0 @@
--
--/* A Bison parser, made by GNU Bison 2.4.1. */
--
--/* Skeleton implementation for Bison's Yacc-like parsers in C
--
-- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006