On Sun, Jan 22, 2012 at 12:29:48AM +0100, Bernhard Walle wrote:
This patch is by far the most ugly part of all of the Darwin patches.
At least the md5sum of a locale-archive when generating a de_DE.UTF-8
locale is identical...
A first review, please.
We're creating the localedef package anyway, so I'd like to create a new
tarball with all the paches included.
I've pushed my current WIP to git://git.pengutronix.de/git/mol/localedef.git
please test. This contains most of your patches (or modified versions). For
the gettext stuff: we already have getttext-dummy package[1]. We can create
a host-getttext-dummy package from that.
Michael
[1]
http://www.pengutronix.de/software/gettext-dummy/download/gettext-dummy-1.0.1.tar.bz2
Signed-off-by: Bernhard Walle bernh...@bwalle.de
---
...n-Fix-problem-with-__block-parameter-name.patch | 33
...ide-dummy-implementation-of-gettext-funct.patch | 45 +
...-some-locale-related-definitions-from-Lin.patch | 182
...004-Darwin-Compile-with-fnested-functions.patch | 37
...005-Use-own-implementation-of-__rawmemchr.patch | 40 +
patches/localedef-eglibc-2.11.90-ptx1/autogen.sh |1 +
patches/localedef-eglibc-2.11.90-ptx1/series |8 +
7 files changed, 346 insertions(+), 0 deletions(-)
create mode 100644
patches/localedef-eglibc-2.11.90-ptx1/0001-Darwin-Fix-problem-with-__block-parameter-name.patch
create mode 100644
patches/localedef-eglibc-2.11.90-ptx1/0002-Darwin-Provide-dummy-implementation-of-gettext-funct.patch
create mode 100644
patches/localedef-eglibc-2.11.90-ptx1/0003-Darwin-Copy-some-locale-related-definitions-from-Lin.patch
create mode 100644
patches/localedef-eglibc-2.11.90-ptx1/0004-Darwin-Compile-with-fnested-functions.patch
create mode 100644
patches/localedef-eglibc-2.11.90-ptx1/0005-Use-own-implementation-of-__rawmemchr.patch
create mode 12 patches/localedef-eglibc-2.11.90-ptx1/autogen.sh
create mode 100644 patches/localedef-eglibc-2.11.90-ptx1/series
diff --git
a/patches/localedef-eglibc-2.11.90-ptx1/0001-Darwin-Fix-problem-with-__block-parameter-name.patch
b/patches/localedef-eglibc-2.11.90-ptx1/0001-Darwin-Fix-problem-with-__block-parameter-name.patch
new file mode 100644
index 000..a80321e
--- /dev/null
+++
b/patches/localedef-eglibc-2.11.90-ptx1/0001-Darwin-Fix-problem-with-__block-parameter-name.patch
@@ -0,0 +1,33 @@
+From: Bernhard Walle bernh...@bwalle.de
+Date: Sat, 21 Jan 2012 22:00:14 +0100
+Subject: [PATCH] Darwin: Fix problem with __block parameter name
+
+This fixes the following compile error:
+
+ 8 ---
+./glibc/malloc/obstack.h:190: error: __block attribute can be specified
+on variables only
+In file included from glibc/locale/programs/charmap.c:32:
+ 8 ---
+
+Compiler war gcc-4.2 [i686-apple-darwin11-gcc-4.2.1 (GCC) 4.2.1 (Apple
+Inc. build 5666) (dot 3)].
+
+Signed-off-by: Bernhard Walle bernh...@bwalle.de
+---
+ eglibc/malloc/obstack.h |2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/eglibc/malloc/obstack.h b/eglibc/malloc/obstack.h
+index 449070e..0c4f2e4 100644
+--- a/eglibc/malloc/obstack.h
b/eglibc/malloc/obstack.h
+@@ -187,7 +187,7 @@ extern int _obstack_begin_1 (struct obstack *, int, int,
+ void (*) (void *, void *), void *);
+ extern int _obstack_memory_used (struct obstack *);
+
+-void obstack_free (struct obstack *__obstack, void *__block);
++void obstack_free (struct obstack *__obstack, void *);
+
+
+ /* Error handler called when `obstack_chunk_alloc' failed to allocate
diff --git
a/patches/localedef-eglibc-2.11.90-ptx1/0002-Darwin-Provide-dummy-implementation-of-gettext-funct.patch
b/patches/localedef-eglibc-2.11.90-ptx1/0002-Darwin-Provide-dummy-implementation-of-gettext-funct.patch
new file mode 100644
index 000..9c3f005
--- /dev/null
+++
b/patches/localedef-eglibc-2.11.90-ptx1/0002-Darwin-Provide-dummy-implementation-of-gettext-funct.patch
@@ -0,0 +1,45 @@
+From: Bernhard Walle bernh...@bwalle.de
+Date: Sat, 21 Jan 2012 23:00:43 +0100
+Subject: [PATCH] Darwin: Provide dummy implementation of gettext functions
+
+It's just not worth the effort requiring gettext for building locales in
+a cross build system. English error messages are sufficient.
+
+Signed-off-by: Bernhard Walle bernh...@bwalle.de
+---
+ include/libintl.h | 23 ++-
+ 1 files changed, 22 insertions(+), 1 deletions(-)
+
+diff --git a/include/libintl.h b/include/libintl.h
+index 096aa8c..edf34eb 100644
+--- a/include/libintl.h
b/include/libintl.h
+@@ -1,6 +1,27 @@
+ #ifdef HAVE_LIBINTL_H
+ #include_next libintl.h
+-#endif
++#else
++
++#ifndef LIBINTL_H_
++#define LIBINTL_H_ 1
++
++// dummy implementations of gettext() and textdomain()
++//
++static inline char *gettext(const char