summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch')
-rw-r--r--meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch74
1 files changed, 34 insertions, 40 deletions
diff --git a/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch b/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch
index c46021a478..a9ff8e92ea 100644
--- a/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch
+++ b/meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch
@@ -1,14 +1,14 @@
-From be382b4e0c6de52573f7e037f2d4ff9b1b5bbb6b Mon Sep 17 00:00:00 2001
+From 4e5de801a39d66b8bd93d09f5912dcbe5db4ef04 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:33:49 +0000
-Subject: [PATCH 22/28] eglibc: Forward port cross locale generation support
+Subject: [PATCH] eglibc: Forward port cross locale generation support
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
locale/Makefile | 3 +-
- locale/catnames.c | 48 ++++++++++++++++++++++++++++
+ locale/catnames.c | 46 +++++++++++++++++++++++++++
locale/localeinfo.h | 2 +-
locale/programs/charmap-dir.c | 6 ++++
locale/programs/ld-collate.c | 17 +++++-----
@@ -18,12 +18,12 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
locale/programs/localedef.c | 8 +++++
locale/programs/locfile.c | 5 ++-
locale/programs/locfile.h | 59 +++++++++++++++++++++++++++++++++--
- locale/setlocale.c | 30 ------------------
- 12 files changed, 169 insertions(+), 69 deletions(-)
+ locale/setlocale.c | 29 -----------------
+ 12 files changed, 167 insertions(+), 68 deletions(-)
create mode 100644 locale/catnames.c
diff --git a/locale/Makefile b/locale/Makefile
-index d78cf9b83a..e166f5252e 100644
+index b7c60681fa..07c606cde3 100644
--- a/locale/Makefile
+++ b/locale/Makefile
@@ -26,7 +26,8 @@ headers = langinfo.h locale.h bits/locale.h \
@@ -34,14 +34,14 @@ index d78cf9b83a..e166f5252e 100644
+ newlocale duplocale freelocale uselocale \
+ catnames
tests = tst-C-locale tst-locname tst-duplocale
+ tests-container = tst-localedef-path-norm
categories = ctype messages monetary numeric time paper name \
- address telephone measurement identification collate
diff --git a/locale/catnames.c b/locale/catnames.c
new file mode 100644
-index 0000000000..9fad357db1
+index 0000000000..538f3f5edb
--- /dev/null
+++ b/locale/catnames.c
-@@ -0,0 +1,48 @@
+@@ -0,0 +1,46 @@
+/* Copyright (C) 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
@@ -63,20 +63,18 @@ index 0000000000..9fad357db1
+#include "localeinfo.h"
+
+/* Define an array of category names (also the environment variable names). */
-+const union catnamestr_t _nl_category_names attribute_hidden =
++const struct catnamestr_t _nl_category_names attribute_hidden =
+ {
-+ {
+#define DEFINE_CATEGORY(category, category_name, items, a) \
-+ category_name,
++ category_name,
+#include "categories.def"
+#undef DEFINE_CATEGORY
-+ }
+ };
+
+const uint8_t _nl_category_name_idxs[__LC_LAST] attribute_hidden =
+ {
+#define DEFINE_CATEGORY(category, category_name, items, a) \
-+ [category] = offsetof (union catnamestr_t, CATNAMEMF (__LINE__)),
++ [category] = offsetof (struct catnamestr_t, CATNAMEMF (__LINE__)),
+#include "categories.def"
+#undef DEFINE_CATEGORY
+ };
@@ -91,10 +89,10 @@ index 0000000000..9fad357db1
+ [LC_ALL] = sizeof ("LC_ALL") - 1
+ };
diff --git a/locale/localeinfo.h b/locale/localeinfo.h
-index 53cb8bfc59..92c466200c 100644
+index 22f9dc1140..fa31b3c5ea 100644
--- a/locale/localeinfo.h
+++ b/locale/localeinfo.h
-@@ -224,7 +224,7 @@ __libc_tsd_define (extern, locale_t, LOCALE)
+@@ -230,7 +230,7 @@ __libc_tsd_define (extern, locale_t, LOCALE)
unused. We can manage this playing some tricks with weak references.
But with thread-local locale settings, it becomes quite ungainly unless
we can use __thread variables. So only in that case do we attempt this. */
@@ -104,7 +102,7 @@ index 53cb8bfc59..92c466200c 100644
# define NL_CURRENT_INDIRECT 1
#endif
diff --git a/locale/programs/charmap-dir.c b/locale/programs/charmap-dir.c
-index 94c122df68..80e53e12c8 100644
+index 4841bfd05d..ffcba1fd79 100644
--- a/locale/programs/charmap-dir.c
+++ b/locale/programs/charmap-dir.c
@@ -18,7 +18,9 @@
@@ -150,7 +148,7 @@ index 94c122df68..80e53e12c8 100644
return NULL;
}
diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c
-index 6baab6cfb0..b12a2fceab 100644
+index b6406b775d..bfa4adba9c 100644
--- a/locale/programs/ld-collate.c
+++ b/locale/programs/ld-collate.c
@@ -349,7 +349,7 @@ new_element (struct locale_collate_t *collate, const char *mbs, size_t mbslen,
@@ -162,7 +160,7 @@ index 6baab6cfb0..b12a2fceab 100644
uint32_t zero = 0;
/* Handle <U0000> as a single character. */
if (nwcs == 0)
-@@ -1772,8 +1772,7 @@ symbol `%s' has the same encoding as"), (*eptr)->name);
+@@ -1775,8 +1775,7 @@ symbol `%s' has the same encoding as"), (*eptr)->name);
if ((*eptr)->nwcs == runp->nwcs)
{
@@ -172,7 +170,7 @@ index 6baab6cfb0..b12a2fceab 100644
if (c == 0)
{
-@@ -2000,9 +1999,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
+@@ -2003,9 +2002,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
one consecutive entry. */
if (runp->wcnext != NULL
&& runp->nwcs == runp->wcnext->nwcs
@@ -185,7 +183,7 @@ index 6baab6cfb0..b12a2fceab 100644
&& (runp->wcs[runp->nwcs - 1]
== runp->wcnext->wcs[runp->nwcs - 1] + 1))
{
-@@ -2026,9 +2025,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
+@@ -2029,9 +2028,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
runp = runp->wcnext;
while (runp->wcnext != NULL
&& runp->nwcs == runp->wcnext->nwcs
@@ -199,7 +197,7 @@ index 6baab6cfb0..b12a2fceab 100644
== runp->wcnext->wcs[runp->nwcs - 1] + 1));
diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
-index cfc9c43fd5..6572cc199c 100644
+index 2fb579bbbf..d0be99581c 100644
--- a/locale/programs/ld-ctype.c
+++ b/locale/programs/ld-ctype.c
@@ -915,7 +915,7 @@ ctype_output (struct localedef_t *locale, const struct charmap_t *charmap,
@@ -281,7 +279,7 @@ index cfc9c43fd5..6572cc199c 100644
srunp = srunp->next;
}
diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c
-index 8e9849fdba..028d3efa9f 100644
+index dcd2a2386d..6814740325 100644
--- a/locale/programs/ld-time.c
+++ b/locale/programs/ld-time.c
@@ -220,8 +220,10 @@ No definition for %s category found"), "LC_TIME");
@@ -350,7 +348,7 @@ index 8e9849fdba..028d3efa9f 100644
diff --git a/locale/programs/linereader.c b/locale/programs/linereader.c
-index ed3a9731d0..3178ea057a 100644
+index 96d3ab66db..3af379d2c3 100644
--- a/locale/programs/linereader.c
+++ b/locale/programs/linereader.c
@@ -595,7 +595,7 @@ get_string (struct linereader *lr, const struct charmap_t *charmap,
@@ -363,7 +361,7 @@ index ed3a9731d0..3178ea057a 100644
size_t bufmax = 56;
diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c
-index b7bcef8248..efeced1e0f 100644
+index 832c8fd1fc..fe689b3ae1 100644
--- a/locale/programs/localedef.c
+++ b/locale/programs/localedef.c
@@ -109,6 +109,7 @@ void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version;
@@ -383,7 +381,7 @@ index b7bcef8248..efeced1e0f 100644
{ NULL, 0, NULL, 0, NULL }
};
-@@ -242,12 +245,14 @@ main (int argc, char *argv[])
+@@ -243,12 +246,14 @@ main (int argc, char *argv[])
ctype locale. (P1003.2 4.35.5.2) */
setlocale (LC_CTYPE, "POSIX");
@@ -398,7 +396,7 @@ index b7bcef8248..efeced1e0f 100644
/* Process charmap file. */
charmap = charmap_read (charmap_file, verbose, 1, be_quiet, 1);
-@@ -399,6 +404,9 @@ parse_opt (int key, char *arg, struct argp_state *state)
+@@ -400,6 +405,9 @@ parse_opt (int key, char *arg, struct argp_state *state)
/* Do not hard link to other locales. */
hard_links = false;
break;
@@ -409,7 +407,7 @@ index b7bcef8248..efeced1e0f 100644
force_output = 1;
break;
diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c
-index e4ba48e968..e7b0efe887 100644
+index 0f1affa1d4..7d86fae801 100644
--- a/locale/programs/locfile.c
+++ b/locale/programs/locfile.c
@@ -544,6 +544,9 @@ compare_files (const char *filename1, const char *filename2, size_t size,
@@ -432,7 +430,7 @@ index e4ba48e968..e7b0efe887 100644
/* Record that FILE's next element is the 32-bit integer VALUE. */
diff --git a/locale/programs/locfile.h b/locale/programs/locfile.h
-index c063fc097d..4e7465e55a 100644
+index c986d599ec..222a779176 100644
--- a/locale/programs/locfile.h
+++ b/locale/programs/locfile.h
@@ -71,6 +71,8 @@ extern void write_all_categories (struct localedef_t *definitions,
@@ -521,28 +519,27 @@ index c063fc097d..4e7465e55a 100644
+
#endif /* locfile.h */
diff --git a/locale/setlocale.c b/locale/setlocale.c
-index 9bd35454b9..2a67dc6589 100644
+index 19ed85ae8e..f28ca11446 100644
--- a/locale/setlocale.c
+++ b/locale/setlocale.c
-@@ -64,36 +64,6 @@ static char *const _nl_current_used[] =
- #endif
+@@ -63,35 +63,6 @@ static char *const _nl_current_used[] =
+ #endif
+-
-/* Define an array of category names (also the environment variable names). */
--const union catnamestr_t _nl_category_names attribute_hidden =
+-const struct catnamestr_t _nl_category_names attribute_hidden =
- {
-- {
-#define DEFINE_CATEGORY(category, category_name, items, a) \
-- category_name,
+- category_name,
-#include "categories.def"
-#undef DEFINE_CATEGORY
-- }
- };
-
-const uint8_t _nl_category_name_idxs[__LC_LAST] attribute_hidden =
- {
-#define DEFINE_CATEGORY(category, category_name, items, a) \
-- [category] = offsetof (union catnamestr_t, CATNAMEMF (__LINE__)),
+- [category] = offsetof (struct catnamestr_t, CATNAMEMF (__LINE__)),
-#include "categories.def"
-#undef DEFINE_CATEGORY
- };
@@ -561,6 +558,3 @@ index 9bd35454b9..2a67dc6589 100644
#ifdef NL_CURRENT_INDIRECT
# define WEAK_POSTLOAD(postload) weak_extern (postload)
#else
---
-2.22.0
-