diff --git a/include/features.h b/include/features.h index fd4420d74b..e252a0c94c 100644 --- a/include/features.h +++ b/include/features.h @@ -265,7 +265,7 @@ #endif #if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \ - && __GNUC_PREREQ (4, 0) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0 + && __GNUC_PREREQ (4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0 # if _FORTIFY_SOURCE > 1 # define __USE_FORTIFY_LEVEL 2 # else diff --git a/locale/localeinfo.h b/locale/localeinfo.h index 065ee18cf9..3b0ed4f30b 100644 --- a/locale/localeinfo.h +++ b/locale/localeinfo.h @@ -1,5 +1,5 @@ /* Declarations for internal libc locale interfaces - Copyright (C) 1995-2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1995-2001, 2002, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -31,7 +31,10 @@ #include /* For loaded_l10nfile definition. */ /* Magic number at the beginning of a locale data file for CATEGORY. */ -#define LIMAGIC(category) ((unsigned int) (0x20031115 ^ (category))) +#define LIMAGIC(category) \ + (category == LC_COLLATE \ + ? ((unsigned int) (0x20051014 ^ (category))) \ + : ((unsigned int) (0x20031115 ^ (category)))) /* Two special weight constants for the collation data. */ #define IGNORE_CHAR 2 diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c index 6d0d03c235..00ad2ee488 100644 --- a/locale/programs/ld-collate.c +++ b/locale/programs/ld-collate.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1995-2002, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. @@ -2469,14 +2469,14 @@ collate_output (struct localedef_t *locale, const struct charmap_t *charmap, runp = collate->start; while (runp != NULL) { - if (runp->mbs != NULL && runp->weights != NULL) + if (runp->mbs != NULL && runp->weights != NULL && !runp->is_character) /* Yep, the element really counts. */ ++elem_size; runp = runp->next; } /* Add 40% and find the next prime number. */ - elem_size = MIN (next_prime (elem_size * 1.4), 257); + elem_size = next_prime (elem_size * 1.4); /* Allocate the table. Each entry consists of two words: the hash value and an index in a secondary table which provides the index @@ -2496,18 +2496,20 @@ collate_output (struct localedef_t *locale, const struct charmap_t *charmap, uint32_t namelen = strlen (runp->name); uint32_t hash = elem_hash (runp->name, namelen); size_t idx = hash % elem_size; + size_t start_idx = idx; if (elem_table[idx * 2] != 0) { - /* The spot is already take. Try iterating using the value + /* The spot is already taken. Try iterating using the value from the secondary hashing function. */ - size_t iter = hash % (elem_size - 2); + size_t iter = hash % (elem_size - 2) + 1; do { idx += iter; if (idx >= elem_size) idx -= elem_size; + assert (idx != start_idx); } while (elem_table[idx * 2] != 0); } diff --git a/localedata/ChangeLog b/localedata/ChangeLog index 98380b55d3..6e94c1ef4f 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -1,5 +1,10 @@ 2005-10-14 Ulrich Drepper + * SUPPORTED (SUPPORTED-LOCALES): Add dz_BT.UTF-8. + + [BZ #368] + * locales/dz_BT: New file. + [BZ #195] * locales/hu_HU: Add some transliterations. diff --git a/localedata/SUPPORTED b/localedata/SUPPORTED index d263e91f56..55766b74ea 100644 --- a/localedata/SUPPORTED +++ b/localedata/SUPPORTED @@ -83,6 +83,7 @@ de_DE@euro/ISO-8859-15 \ de_LU.UTF-8/UTF-8 \ de_LU/ISO-8859-1 \ de_LU@euro/ISO-8859-15 \ +dz_BT/UTF-8 \ el_GR.UTF-8/UTF-8 \ el_GR/ISO-8859-7 \ en_AU.UTF-8/UTF-8 \ diff --git a/localedata/locales/dz_BT b/localedata/locales/dz_BT new file mode 100644 index 0000000000..cbc11d5010 --- /dev/null +++ b/localedata/locales/dz_BT @@ -0,0 +1,1360 @@ +comment_char % +escape_char / + +% Bhutanese(Bhutan) locale +% +% Name: dz_BT +% Author: Pema Geyleg +% Contact: Sherubtse College, Kanglung Bhutan; Pablo Saratxaga +% E-mail: pema_geyleg@druknet.bt; pablo@mandrakesoft.com +% Language: Dzongkha(dz) +% Territory: Bhutan(BT) +% Charset: UTF-8 +% Revision: 0.3 +% Date: 2004-09-03 +% + +LC_IDENTIFICATION +title "Dzongkha language locale for Bhutan" +source "Sherubtse College" +address "Kanglung, Bhutan" +contact "" +email "bug-glibc@gnu.org" +tel "" +fax "" +language "Dzongkha" +territory "Bhutan" +revision "0.3" +date "2004-09-03" +% +category "dz_BT:2004";LC_IDENTIFICATION +category "dz_BT:2004";LC_CTYPE +category "dz_BT:2004";LC_COLLATE +category "dz_BT:2004";LC_NUMERIC +category "dz_BT:2004";LC_MONETARY +category "dz_BT:2004";LC_MESSAGES +category "dz_BT:2004";LC_PAPER +category "dz_BT:2004";LC_NAME +category "dz_BT:2004";LC_ADDRESS +category "dz_BT:2004";LC_TELEPHONE + +END LC_IDENTIFICATION + +%%%%%%%%%%%%%%%% +% TODO: check LC_MONETARY, LC_NUMERIC, LC_MESSAGES, LC_TIME +% check time and date formats +%%%%%%%%%%%%%%%% + +LC_CTYPE +copy "i18n" +END LC_CTYPE + +LC_COLLATE +copy "iso14651_t1" + +script + +% 30 base letters +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol + +% 4 explicit vowels +collating-symbol +collating-symbol +collating-symbol +collating-symbol + +% pre-radicals +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol + +% nominal, subjoined or variant forms +collating-symbol +collating-symbol +collating-symbol + +% ka-radicals +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" + +% kha-radicals +collating-symbol +collating-symbol +collating-element from "" +collating-element from "" + +% ga-radicals +% as there are ambiguous, the next letter has to be added too; +% so the are in fact double elements: the ga-radical +% itself, and the following letter. +collating-symbol % ambiguous +collating-symbol % ambiguous +collating-symbol % ambiguous +collating-symbol % ambiguous +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" + +% nga-radicals +% as there are ambiguous, the next letter has to be added too; +% so the are in fact double elements: the nga-radical +% itself, and the following letter. +collating-symbol % ambiguous +collating-symbol % ambiguous +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" + +% ca-radicals +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" + +% cha-radicals +collating-symbol +collating-symbol +collating-element from "" +collating-element from "" + +% ja-radicals +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" + +% nya-radicals +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" + +% ta-radicals +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" + +% tha-radicals +collating-symbol +collating-symbol +collating-element from "" +collating-element from "" + +% da-radicals +% as there are ambiguous, the next letter has to be added too; +% so the are in fact double elements: the da-radical +% itself, and the following letter. +collating-symbol % ambiguous +collating-symbol % ambiguous +collating-symbol % ambiguous +collating-symbol % ambiguous +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" + +% na-radicals +% as there are ambiguous, the next letter has to be added too; +% so the are in fact double elements: the na-radical +% itself, and the following letter. +collating-symbol % ambiguous +collating-symbol % ambiguous +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" + +% pa-radicals +% as there are ambiguous, the next letter has to be added too; +% so the are in fact double elements: the pa-radical +% itself, and the following letter. +collating-symbol % ambiguous in Dzongkha +collating-symbol +collating-symbol +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" + +% pha-radicals +collating-symbol +collating-element from "" + +% ba-radicals +% as there are ambiguous, the next letter has to be added too; +% so the are in fact double elements: the ba-radical +% itself, and the following letter. +collating-symbol % ambiguous +collating-symbol % ambiguous +collating-symbol +collating-symbol +collating-symbol +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" + +% ma-radicals +% as there are ambiguous, the next letter has to be added too; +% so the are in fact double elements: the ma-radical +% itself, and the following letter. +collating-symbol % ambiguous +collating-symbol +collating-symbol +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" + +% tsa-radicals +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" + +% tsha-radicals +collating-symbol +collating-symbol +collating-element from "" +collating-element from "" + +% dza-radicals +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" + +% zha-radicals +collating-symbol +collating-symbol +collating-element from "" +collating-element from "" + +% za-radicals +collating-symbol +collating-symbol +collating-element from "" +collating-element from "" + +% ya-radicals +collating-symbol +collating-element from "" + +% ra-radicals +% as there are ambiguous, the next letter has to be added too; +% so the are in fact double elements: the ra-radical +% itself, and the following letter. +collating-symbol % ambiguous +collating-element from "" + +% sha-radicals +collating-symbol +collating-symbol +collating-element from "" +collating-element from "" + +% sa-radicals +% as there are ambiguous, the next letter has to be added too; +% so the are in fact double elements: the sa-radical +% itself, and the following letter. +collating-symbol % ambiguous +collating-symbol % ambiguous +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" + +% ha-radicals +collating-symbol +collating-element from "" + +% generic definitions +reorder-after + + + +reorder-after + + + + + + + + + + + + + + + +% a better place than after cyrillic ya should be defined +reorder-after + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +%order_start ;forward;forward;forward;forward,position + +% specific definitions +reorder-after +% digits + <0>;;IGNORE;IGNORE + <0>;;IGNORE;IGNORE + <1>;;IGNORE;IGNORE + <1>;;IGNORE;IGNORE + <2>;;IGNORE;IGNORE + <2>;;IGNORE;IGNORE + <3>;;IGNORE;IGNORE + <3>;;IGNORE;IGNORE + <4>;;IGNORE;IGNORE + <4>;;IGNORE;IGNORE + <5>;;IGNORE;IGNORE + <5>;;IGNORE;IGNORE + <6>;;IGNORE;IGNORE + <6>;;IGNORE;IGNORE + <7>;;IGNORE;IGNORE + <7>;;IGNORE;IGNORE + <8>;;IGNORE;IGNORE + <8>;;IGNORE;IGNORE + <9>;;IGNORE;IGNORE + <9>;;IGNORE;IGNORE + +% letters + ;;;IGNORE % ka + ;;;IGNORE + "";"";"";IGNORE % kssa + "";"";"";IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE % kha + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE % ga + ;;;IGNORE + "";"";"";IGNORE % gha + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE % nga + ;;;IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE % ca + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE % cha + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE % ja + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE % nya + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE % ta + ;;;IGNORE + ;;;IGNORE % tta + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE % tha + ;;;IGNORE + ;;;IGNORE % ttha + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE % da + ;;;IGNORE + ;;;IGNORE % dda + ;;;IGNORE + "";"";"";IGNORE % dha + "";"";"";IGNORE + "";"";"";IGNORE % ddha + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE % na + ;;;IGNORE + ;;;IGNORE % nna + ;;;IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE % pa + ;;;IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE % pha + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE % ba + ;;;IGNORE + "";"";"";IGNORE % bha + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE % ma + ;;;IGNORE + ;;;IGNORE % + ;;;IGNORE % + ;;;IGNORE % + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE % tsa + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE % tsha + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE % dza + ;;;IGNORE + "";"";"";IGNORE % dzha + "";"";"";IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE % wa + ;;;IGNORE + ;;;IGNORE % fixed wa + ;;;IGNORE % zha + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE % za + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE % -a + ;;;IGNORE + ;;;IGNORE % ya + ;;;IGNORE + ;;;IGNORE % fixed ya + ;;;IGNORE + ;;;IGNORE % ra + ;;;IGNORE + ;;;IGNORE % fixed ra + ;;;IGNORE + ;;;IGNORE % vocalic r +% FIXME; which of the two? + ;;;IGNORE % vocalic rr +% "";";";IGNORE % vocalic rr + "";"";"";IGNORE + ;;;IGNORE % la + ;;;IGNORE + ;;;IGNORE % vocalic l +% FIXME; which of the two? + ;;;IGNORE % vocalic ll +% "";";";IGNORE % vocalic ll + ;;;IGNORE % sha + ;;;IGNORE + ;;;IGNORE % ssa + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE % sa + ;;;IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + ;;;IGNORE % ha + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE % a + ;;;IGNORE + +% explicit vowels + IGNORE;;IGNORE;IGNORE % long vowel mark % FIXME + ;;;IGNORE % i + ;;;IGNORE % reversed i + ;;;IGNORE % ii + ;;;IGNORE % reversed ii + ;;;IGNORE % u + ;;;IGNORE % uu + ;;;IGNORE % e + ;;;IGNORE % ee + ;;;IGNORE % o + ;;;IGNORE % oo + +% FIXME: 0F39, 0F7F, 0F84, 0F85, 0F86, 0F87, + +% FIXME: 0F88, UF89, UF8A, 0F8B + IGNORE;;IGNORE;IGNORE + IGNORE;;IGNORE;IGNORE + IGNORE;;IGNORE;IGNORE + IGNORE;;IGNORE;IGNORE + +reorder-end + +END LC_COLLATE + +LC_MONETARY + +int_curr_symbol "BTN " +currency_symbol "" +mon_decimal_point "." +mon_thousands_sep "," +mon_grouping 3;2; +positive_sign "" +negative_sign "-" +int_frac_digits 3 +frac_digits 3 +p_cs_precedes 1 +p_sep_by_space 1 +n_cs_precedes 1 +n_sep_by_space 1 +p_sign_posn 4 +n_sign_posn 4 + +END LC_MONETARY + +LC_NUMERIC + +decimal_point "." +thousands_sep "," +grouping 3;2 + +END LC_NUMERIC + +LC_TIME +abday "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" + +day "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" + + +abmon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" + +mon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ +"";/ +"" + + + + +% Appropriate date & time representation +d_t_fmt "%y%m/ +%d%H/ +%M%S" + +% Appropriate date representation +d_fmt "%y/ +%m%d" + +% Appropriate time representation "%H:%M:%S" +t_fmt "/ +% H/ +%M%S" + +% AM/PM signs +am_pm "";"" + +% Appropriate 12-hour clock representation "%I:%M:%S %p" +t_fmt_ampm "/ +%I/ +%M%S %p" + + +END LC_TIME + +LC_MESSAGES +yesstr "" +nostr "" +yesexpr "" +noexpr "" +END LC_MESSAGES + +LC_TELEPHONE + tel_int_fmt "" +% tel_dom_fmt "" +% int_select "" +% int_prefix "" +END LC_TELEPHONE + +LC_PAPER +height 297 +width 210 +END LC_PAPER + +LC_MEASUREMENT +% FIXME +measurement 1 +END LC_MEASUREMENT + +LC_NAME +name_fmt "%p%t%g%t%m%t%f" +name_gen "" +name_miss "" +name_mr "" +name_mrs "" +END LC_NAME + +LC_ADDRESS +% "%f%N%a%N%d%N%r%t%e%t%b%N%h%t%s%N%T%N%S%N%z%c%N" +postal_fmt "/ +/ +/ +/ +" +country_name "" +%FIXME +%country_post "" +country_ab2 "" +country_ab3 "" +%country_num "" +%FIXME +%country_car "" +%FIXME +%country_isbn "" +lang_name "" +lang_ab "" +lang_term "" +lang_lib "" +END LC_ADDRESS + diff --git a/nptl/TODO b/nptl/TODO index a4a1055f46..d597176512 100644 --- a/nptl/TODO +++ b/nptl/TODO @@ -6,6 +6,10 @@ - a new attribute for mutexes: number of times we spin before calling sys_futex +- for adaptive mutexes: when releasing, determine whether somebody spins. +If yes, for a short time release lock. If someone else locks no wakeup +syscall needed. + - test with threaded process terminating and semadj (?) being applied diff --git a/posix/fnmatch_loop.c b/posix/fnmatch_loop.c index 449e5e02b4..02a4e9030c 100644 --- a/posix/fnmatch_loop.c +++ b/posix/fnmatch_loop.c @@ -1,5 +1,5 @@ -/* Copyright (C) 1991,1992,1993,1996,1997,1998,1999,2000,2001,2003,2004 - Free Software Foundation, Inc. +/* Copyright (C) 1991,1992,1993,1996,1997,1998,1999,2000,2001,2003,2004,2005 + Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -502,24 +502,31 @@ FCT (pattern, string, string_end, no_leading_period, flags) idx = 0; elem = hash % table_size; - second = hash % (table_size - 2); - while (symb_table[2 * elem] != 0) + if (symb_table[2 * elem] != 0) { - /* First compare the hashing value. */ - if (symb_table[2 * elem] == hash - && c1 == extra[symb_table[2 * elem + 1]] - && memcmp (str, - &extra[symb_table[2 * elem + 1] - + 1], c1) == 0) - { - /* Yep, this is the entry. */ - idx = symb_table[2 * elem + 1]; - idx += 1 + extra[idx]; - break; - } + second = hash % (table_size - 2) + 1; - /* Next entry. */ - elem += second; + do + { + /* First compare the hashing value. */ + if (symb_table[2 * elem] == hash + && (c1 + == extra[symb_table[2 * elem + 1]]) + && memcmp (str, + &extra[symb_table[2 * elem + + 1] + + 1], c1) == 0) + { + /* Yep, this is the entry. */ + idx = symb_table[2 * elem + 1]; + idx += 1 + extra[idx]; + break; + } + + /* Next entry. */ + elem += second; + } + while (symb_table[2 * elem] != 0); } if (symb_table[2 * elem] != 0) @@ -714,25 +721,30 @@ FCT (pattern, string, string_end, no_leading_period, flags) idx = 0; elem = hash % table_size; - second = hash % (table_size - 2); - while (symb_table[2 * elem] != 0) + if (symb_table[2 * elem] != 0) { - /* First compare the hashing value. */ - if (symb_table[2 * elem] == hash - && (c1 - == extra[symb_table[2 * elem + 1]]) - && memcmp (str, - &extra[symb_table[2 * elem + 1] - + 1], c1) == 0) - { - /* Yep, this is the entry. */ - idx = symb_table[2 * elem + 1]; - idx += 1 + extra[idx]; - break; - } + second = hash % (table_size - 2) + 1; - /* Next entry. */ - elem += second; + do + { + /* First compare the hashing value. */ + if (symb_table[2 * elem] == hash + && (c1 + == extra[symb_table[2 * elem + 1]]) + && memcmp (str, + &extra[symb_table[2 * elem + 1] + + 1], c1) == 0) + { + /* Yep, this is the entry. */ + idx = symb_table[2 * elem + 1]; + idx += 1 + extra[idx]; + break; + } + + /* Next entry. */ + elem += second; + } + while (symb_table[2 * elem] != 0); } if (symb_table[2 * elem] != 0) diff --git a/posix/regcomp.c b/posix/regcomp.c index 269d6a6b5f..d898574be1 100644 --- a/posix/regcomp.c +++ b/posix/regcomp.c @@ -2742,23 +2742,28 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, { int32_t hash = elem_hash ((const char *) name, name_len); int32_t elem = hash % table_size; - int32_t second = hash % (table_size - 2); - while (symb_table[2 * elem] != 0) + if (symb_table[2 * elem] != 0) { - /* First compare the hashing value. */ - if (symb_table[2 * elem] == hash - /* Compare the length of the name. */ - && name_len == extra[symb_table[2 * elem + 1]] - /* Compare the name. */ - && memcmp (name, &extra[symb_table[2 * elem + 1] + 1], - name_len) == 0) - { - /* Yep, this is the entry. */ - break; - } + int32_t second = hash % (table_size - 2) + 1; - /* Next entry. */ - elem += second; + do + { + /* First compare the hashing value. */ + if (symb_table[2 * elem] == hash + /* Compare the length of the name. */ + && name_len == extra[symb_table[2 * elem + 1]] + /* Compare the name. */ + && memcmp (name, &extra[symb_table[2 * elem + 1] + 1], + name_len) == 0) + { + /* Yep, this is the entry. */ + break; + } + + /* Next entry. */ + elem += second; + } + while (symb_table[2 * elem] != 0); } return elem; } @@ -3000,7 +3005,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, /* if (MB_CUR_MAX > 1) */ - collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); + collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); table_size = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_SYMB_HASH_SIZEMB); symb_table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_TABLEMB);