]> git.pld-linux.org Git - packages/glibc.git/blob - glibc-pax_iconvconfig.patch
- alpha update: tls builds now, nptl is possible (but untested)
[packages/glibc.git] / glibc-pax_iconvconfig.patch
1 --- glibc-2.3.3/iconv/iconvconfig.c.orig        2003-09-14 18:31:53.000000000 +0200
2 +++ glibc-2.3.3/iconv/iconvconfig.c     2004-03-18 16:08:13.270818328 +0100
3 @@ -988,6 +988,34 @@
4                                module name offset
5                           (following last entry with step count 0)
6  */
7 +
8 +static struct hash_entry *hash_table;
9 +static size_t hash_size;
10 +
11 +/* Function to insert the names.  */
12 +static void name_insert (const void *nodep, VISIT value, int level)
13 +{
14 +  struct name *name;
15 +  unsigned int idx;
16 +  unsigned int hval2;
17 +
18 +  if (value != leaf && value != postorder)
19 +    return;
20 +
21 +  name = *(struct name **) nodep;
22 +  idx = name->hashval % hash_size;
23 +  hval2 = 1 + name->hashval % (hash_size - 2);
24 +
25 +  while (hash_table[idx].string_offset != 0)
26 +    if ((idx += hval2) >= hash_size)
27 +      idx -= hash_size;
28 +
29 +  hash_table[idx].string_offset = strtaboffset (name->strent);
30 +
31 +  assert (name->module_idx != -1);
32 +  hash_table[idx].module_idx = name->module_idx;
33 +}
34 +
35  static int
36  write_output (void)
37  {
38 @@ -995,8 +1023,6 @@
39    char *string_table;
40    size_t string_table_size;
41    struct gconvcache_header header;
42 -  struct hash_entry *hash_table;
43 -  size_t hash_size;
44    struct module_entry *module_table;
45    char *extra_table;
46    char *cur_extra_table;
47 @@ -1009,30 +1035,6 @@
48                 + strlen (".XXXXXX")];
49    char finalname[prefix_len + sizeof (GCONV_MODULES_CACHE)];
50  
51 -  /* Function to insert the names.  */
52 -  static void name_insert (const void *nodep, VISIT value, int level)
53 -    {
54 -      struct name *name;
55 -      unsigned int idx;
56 -      unsigned int hval2;
57 -
58 -      if (value != leaf && value != postorder)
59 -       return;
60 -
61 -      name = *(struct name **) nodep;
62 -      idx = name->hashval % hash_size;
63 -      hval2 = 1 + name->hashval % (hash_size - 2);
64 -
65 -      while (hash_table[idx].string_offset != 0)
66 -       if ((idx += hval2) >= hash_size)
67 -         idx -= hash_size;
68 -
69 -      hash_table[idx].string_offset = strtaboffset (name->strent);
70 -
71 -      assert (name->module_idx != -1);
72 -      hash_table[idx].module_idx = name->module_idx;
73 -    }
74 -
75    /* Open the output file.  */
76    assert (GCONV_MODULES_CACHE[0] == '/');
77    strcpy (stpcpy (mempcpy (tmpfname, prefix, prefix_len), GCONV_MODULES_CACHE),
This page took 0.043521 seconds and 3 git commands to generate.