aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/glibc/glibc-2.5/nios2-iconv.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/glibc/glibc-2.5/nios2-iconv.patch')
-rw-r--r--recipes/glibc/glibc-2.5/nios2-iconv.patch85
1 files changed, 85 insertions, 0 deletions
diff --git a/recipes/glibc/glibc-2.5/nios2-iconv.patch b/recipes/glibc/glibc-2.5/nios2-iconv.patch
new file mode 100644
index 0000000000..7aa574816f
--- /dev/null
+++ b/recipes/glibc/glibc-2.5/nios2-iconv.patch
@@ -0,0 +1,85 @@
+*** glibc-2.5/iconv/iconvconfig.c 2006-09-21 05:57:30.000000000 +0200
+--- /home/frans/workspace/nios2/wrs-linux-4.1-176-nios2-wrs-linux-gnu/glibc-2.5/iconv/iconvconfig.c 2008-11-18 18:43:02.000000000 +0100
+***************
+*** 1011,1016 ****
+--- 1011,1045 ----
+ module name offset
+ (following last entry with step count 0)
+ */
++
++ struct hash_entry *hash_table;
++ size_t hash_size;
++
++ /* Function to insert the names. */
++ static void
++ name_insert (const void *nodep, VISIT value, int level)
++ {
++ struct name *name;
++ unsigned int idx;
++ unsigned int hval2;
++
++ if (value != leaf && value != postorder)
++ return;
++
++ name = *(struct name **) nodep;
++ idx = name->hashval % hash_size;
++ hval2 = 1 + name->hashval % (hash_size - 2);
++
++ while (hash_table[idx].string_offset != 0)
++ if ((idx += hval2) >= hash_size)
++ idx -= hash_size;
++
++ hash_table[idx].string_offset = strtaboffset (name->strent);
++
++ assert (name->module_idx != -1);
++ hash_table[idx].module_idx = name->module_idx;
++ }
++
+ static int
+ write_output (void)
+ {
+***************
+*** 1018,1025 ****
+ char *string_table;
+ size_t string_table_size;
+ struct gconvcache_header header;
+- struct hash_entry *hash_table;
+- size_t hash_size;
+ struct module_entry *module_table;
+ char *extra_table;
+ char *cur_extra_table;
+--- 1047,1052 ----
+***************
+*** 1032,1062 ****
+ char tmpfname[(output_file == NULL ? sizeof finalname : output_file_len + 1)
+ + strlen (".XXXXXX")];
+
+- /* Function to insert the names. */
+- auto void
+- name_insert (const void *nodep, VISIT value, int level)
+- {
+- struct name *name;
+- unsigned int idx;
+- unsigned int hval2;
+-
+- if (value != leaf && value != postorder)
+- return;
+-
+- name = *(struct name **) nodep;
+- idx = name->hashval % hash_size;
+- hval2 = 1 + name->hashval % (hash_size - 2);
+-
+- while (hash_table[idx].string_offset != 0)
+- if ((idx += hval2) >= hash_size)
+- idx -= hash_size;
+-
+- hash_table[idx].string_offset = strtaboffset (name->strent);
+-
+- assert (name->module_idx != -1);
+- hash_table[idx].module_idx = name->module_idx;
+- }
+-
+ /* Open the output file. */
+ if (output_file == NULL)
+ {
+--- 1059,1064 ----