diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2010-05-03 17:13:13 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2012-02-02 17:02:40 +0100 |
commit | c28feba2c8d94b22ff17a65066e694385b04e6a9 (patch) | |
tree | 114b3d890d3e52df1948da50c2a496751bba1ce1 | |
parent | 6e98e27480301596b7910950ac5550d811da24c7 (diff) | |
download | localedef-patches.tar.gz localedef-patches.tar.xz |
add patchespatches
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r-- | patches/enable-compress-charmaps.diff | 33 | ||||
-rw-r--r-- | patches/fix-cross-endianess-problem-segfault.diff | 36 | ||||
-rw-r--r-- | patches/series | 2 |
3 files changed, 71 insertions, 0 deletions
diff --git a/patches/enable-compress-charmaps.diff b/patches/enable-compress-charmaps.diff new file mode 100644 index 0000000..1aa75bc --- /dev/null +++ b/patches/enable-compress-charmaps.diff @@ -0,0 +1,33 @@ +From: Marc Kleine-Budde <mkl@pengutronix.de> +Subject: Enable support for compressed charmaps + +This patch enables support for compress charmaps. +It's a little bit hacky defining environ, but it works :) + +Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> + +--- + Makefile.in | 1 - + eglibc/locale/programs/charmap-dir.c | 1 + + 2 files changed, 1 insertion(+), 1 deletion(-) + +--- a/Makefile.in ++++ b/Makefile.in +@@ -19,7 +19,6 @@ localepath = "$(localedir):$(i18ndir)" + inst_localedir = $(install_root)$(localedir) + + DEFINES = -DNO_SYSCONF \ +- -DNO_UNCOMPRESS \ + -DLOCALE_PATH='$(localepath)' \ + -DLOCALEDIR='"$(localedir)"' \ + -DLOCALE_ALIAS_PATH='"$(msgcatdir)"' \ +--- a/eglibc/locale/programs/charmap-dir.c ++++ b/eglibc/locale/programs/charmap-dir.c +@@ -161,6 +161,7 @@ charmap_closedir (CHARMAP_DIR *cdir) + } + + #ifndef NO_UNCOMPRESS ++extern char **environ; + /* Creates a subprocess decompressing the given pathname, and returns + a stream reading its output (the decompressed data). */ + static diff --git a/patches/fix-cross-endianess-problem-segfault.diff b/patches/fix-cross-endianess-problem-segfault.diff new file mode 100644 index 0000000..f9133b8 --- /dev/null +++ b/patches/fix-cross-endianess-problem-segfault.diff @@ -0,0 +1,36 @@ +From: Marc Kleine-Budde <mkl@pengutronix.de> +Subject: fix cross endianess segfault + +This patch fixes a segfault that occurs if the generated locale +archive endianess does not equal the hosts endianess. + +Without this patch the offset in filedata->strindex is in the +wrong endianess which means a quite big offset pointing beyond +the allocated data, which causes the later strlen to segfault. +This patch swaps the offset to the correct endianess. + +Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> + +--- + eglibc/locale/programs/locarchive.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/eglibc/locale/programs/locarchive.c ++++ b/eglibc/locale/programs/locarchive.c +@@ -43,6 +43,7 @@ + #include "../localeinfo.h" + #include "../locarchive.h" + #include "localedef.h" ++#include "locfile.h" + + /* Define the hash function. We define the function as static inline. + We must change the name so as not to conflict with simple-hash.h. */ +@@ -1112,7 +1113,7 @@ add_locale_to_archive (ah, name, data, r + } *filedata = data[LC_CTYPE].addr; + char *normalized_codeset_name = NULL; + codeset = (char *) filedata +- + filedata->strindex[_NL_ITEM_INDEX (_NL_CTYPE_CODESET_NAME)]; ++ + maybe_swap_uint32(filedata->strindex[_NL_ITEM_INDEX (_NL_CTYPE_CODESET_NAME)]); + + normalized_codeset = _nl_normalize_codeset (codeset, strlen (codeset)); + mask |= XPG_NORM_CODESET; diff --git a/patches/series b/patches/series new file mode 100644 index 0000000..781a2c1 --- /dev/null +++ b/patches/series @@ -0,0 +1,2 @@ +enable-compress-charmaps.diff +fix-cross-endianess-problem-segfault.diff |