aboutsummaryrefslogtreecommitdiff
path: root/iconv
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-07-24 06:43:01 +0000
committerUlrich Drepper <drepper@redhat.com>2007-07-24 06:43:01 +0000
commitb5f13526e21cbca3f1359a32292fbbfa3515de59 (patch)
tree0586cb4ddd2dd5cab7b49bdfced7373f2457f499 /iconv
parentc1bf9f14ab383737ff4d6668d6118f44528a3965 (diff)
downloadglibc-b5f13526e21cbca3f1359a32292fbbfa3515de59.zip
glibc-b5f13526e21cbca3f1359a32292fbbfa3515de59.tar.gz
glibc-b5f13526e21cbca3f1359a32292fbbfa3515de59.tar.bz2
* sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
(__lll_private_flag): Define. (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait. (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use __lll_private_flag. (lll_private_futex_wait, lll_private_futex_timedwait, lll_private_futex_wake): Define as wrapper around non-_private macros. * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag): Define. (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag. (lll_private_futex_wait, lll_private_futex_timedwait, lll_private_futex_wake): Define as wrapper around non-_private macros.
Diffstat (limited to 'iconv')
-rw-r--r--iconv/iconvconfig.c55
1 files changed, 28 insertions, 27 deletions
diff --git a/iconv/iconvconfig.c b/iconv/iconvconfig.c
index de39864..ed72a5d 100644
--- a/iconv/iconvconfig.c
+++ b/iconv/iconvconfig.c
@@ -1012,6 +1012,34 @@ next_prime (uint32_t seed)
module name offset
(following last entry with step count 0)
*/
+
+static struct hash_entry *hash_table;
+static 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)
{
@@ -1019,8 +1047,6 @@ write_output (void)
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;
@@ -1033,31 +1059,6 @@ write_output (void)
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)
{