diff options
author | gcc <gcc@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2006-08-20 07:23:19 +0000 |
---|---|---|
committer | gcc <gcc@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2006-08-20 07:23:19 +0000 |
commit | 9b363c0896efd160c63bed3f7ab2a91929d618f2 (patch) | |
tree | 9844277419e8d0e4964130f1c61c2e8203c8fb7b /libc | |
parent | eb697f7064d66386974cd5f64295d9b437b675b3 (diff) |
Import glibc-mainline for 2006-08-20
git-svn-id: svn://svn.eglibc.org/fsf/trunk@28 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc')
-rw-r--r-- | libc/ChangeLog | 16 | ||||
-rw-r--r-- | libc/iconv/iconv_prog.c | 4 | ||||
-rw-r--r-- | libc/locale/programs/charmap.c | 5 | ||||
-rw-r--r-- | libc/locale/programs/charmap.h | 5 | ||||
-rw-r--r-- | libc/locale/programs/localedef.c | 2 | ||||
-rw-r--r-- | libc/localedata/ChangeLog | 10 | ||||
-rw-r--r-- | libc/localedata/locales/bn_IN | 17 | ||||
-rw-r--r-- | libc/localedata/locales/ml_IN | 2 | ||||
-rw-r--r-- | libc/malloc/malloc.c | 8 | ||||
-rw-r--r-- | libc/nis/nss_nis/nis-rpc.c | 4 | ||||
-rw-r--r-- | libc/nis/nss_nis/nis-service.c | 4 |
11 files changed, 62 insertions, 15 deletions
diff --git a/libc/ChangeLog b/libc/ChangeLog index e54bd15b9..4647b9e48 100644 --- a/libc/ChangeLog +++ b/libc/ChangeLog @@ -1,3 +1,19 @@ +2006-08-19 Ulrich Drepper <drepper@redhat.com> + + * malloc/malloc.c (_int_malloc): Limit number of unsorted blocks + to sort in each call. + + * nis/nss_nis/nis-service.c (internal_nis_getservent_r): . If map + is empty simply return and use next service. + * nis/nss_nis/nis-rpc.c (internal_nis_getrpcent_r): Likewise. + + * locale/programs/charmap.c (charmap_read): Add new parameter. It + tells us when not finding a charmap file is an error. + * locale/programs/charmap.h: Adjust charmap_read prototype. + * iconv/iconv_prog.c (main): Tell charmap_read it's no error if we + cannot find a charmap. + * locale/programs/localedef.c (main): Adjust charmap_read call. + 2006-08-15 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/sparc/sparc64/pause.c: Use diff --git a/libc/iconv/iconv_prog.c b/libc/iconv/iconv_prog.c index 033cd93f2..fabdd001e 100644 --- a/libc/iconv/iconv_prog.c +++ b/libc/iconv/iconv_prog.c @@ -183,12 +183,12 @@ main (int argc, char *argv[]) if (strchr (from_code, '/') != NULL) /* The from-name might be a charmap file name. Try reading the file. */ - from_charmap = charmap_read (from_code, /*0, 1*/1, 0, 0); + from_charmap = charmap_read (from_code, /*0, 1*/1, 0, 0, 0); if (strchr (orig_to_code, '/') != NULL) /* The to-name might be a charmap file name. Try reading the file. */ - to_charmap = charmap_read (orig_to_code, /*0, 1,*/1,0, 0); + to_charmap = charmap_read (orig_to_code, /*0, 1,*/1, 0, 0, 0); /* Determine output file. */ diff --git a/libc/locale/programs/charmap.c b/libc/locale/programs/charmap.c index e56b0be81..52a69de4b 100644 --- a/libc/locale/programs/charmap.c +++ b/libc/locale/programs/charmap.c @@ -86,7 +86,8 @@ cmlr_open (const char *directory, const char *name, kw_hash_fct_t hf) } struct charmap_t * -charmap_read (const char *filename, int verbose, int be_quiet, int use_default) +charmap_read (const char *filename, int verbose, int error_not_found, + int be_quiet, int use_default) { struct charmap_t *result = NULL; @@ -132,7 +133,7 @@ charmap_read (const char *filename, int verbose, int be_quiet, int use_default) if (cmfile != NULL) result = parse_charmap (cmfile, verbose, be_quiet); - if (result == NULL && !be_quiet) + if (result == NULL && error_not_found) WITH_CUR_LOCALE (error (0, errno, _("\ character map file `%s' not found"), filename)); } diff --git a/libc/locale/programs/charmap.h b/libc/locale/programs/charmap.h index a3f31d633..fd711f2d1 100644 --- a/libc/locale/programs/charmap.h +++ b/libc/locale/programs/charmap.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-1999, 2001, 2003, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1996-1999,2001,2003,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.org>, 1996. @@ -69,7 +69,8 @@ extern bool enc_not_ascii_compatible; /* Prototypes for charmap handling functions. */ extern struct charmap_t *charmap_read (const char *filename, int verbose, - int be_quiet, int use_default); + int error_not_found, int be_quiet, + int use_default); /* Return the value stored under the given key in the hashing table. */ extern struct charseq *charmap_find_value (const struct charmap_t *charmap, diff --git a/libc/locale/programs/localedef.c b/libc/locale/programs/localedef.c index f705f34a7..5df07e94c 100644 --- a/libc/locale/programs/localedef.c +++ b/libc/locale/programs/localedef.c @@ -243,7 +243,7 @@ main (int argc, char *argv[]) FATAL: system does not define `_POSIX2_LOCALEDEF'"))); /* Process charmap file. */ - charmap = charmap_read (charmap_file, verbose, be_quiet, 1); + charmap = charmap_read (charmap_file, verbose, 1, be_quiet, 1); /* Add the first entry in the locale list. */ memset (&global, '\0', sizeof (struct localedef_t)); diff --git a/libc/localedata/ChangeLog b/libc/localedata/ChangeLog index 80adc0406..b7ec81b99 100644 --- a/libc/localedata/ChangeLog +++ b/libc/localedata/ChangeLog @@ -1,3 +1,13 @@ +2006-08-19 Ulrich Drepper <drepper@redhat.com> + + [BZ #3034] + * locales/ml_IN (abmon): Fix June entry. + * locales/bn_IN: (abday): Fix Tuesday entry. + (day): Likewise. + (abmon): Fix January and February entries. + (mon): Likewise. + Patches by Mayank Jain <majain@redhat.com>. + 2006-08-13 Ulrich Drepper <drepper@redhat.com> [BZ #935] diff --git a/libc/localedata/locales/bn_IN b/libc/localedata/locales/bn_IN index 0869782f6..1a792acd8 100644 --- a/libc/localedata/locales/bn_IN +++ b/libc/localedata/locales/bn_IN @@ -1,6 +1,8 @@ comment_char % escape_char / +% Last Update by Runa Bhattacharjee <runab@redhat.com> + LC_IDENTIFICATION % This is the ISO_IEC TR14652 Locale definition for the LC_IDENTIFICATION % category generated by IBM Basic CountryPack Transformer. @@ -14,7 +16,7 @@ fax "" language "Bengali" territory "India" revision "1.0" -date "2000, October" +date "2006-05-29" % category "bn_IN:2000";LC_IDENTIFICATION category "bn_IN:2000";LC_CTYPE @@ -87,21 +89,21 @@ LC_TIME % % Abbreviated weekday names (%a) abday "<U09B0><U09AC><U09BF>";"<U09B8><U09CB><U09AE>";/ - "<U09AE><U0999><U0997><U09B2>";"<U09AC><U09C1><U09A7>";/ + "<U09AE><U0999><U09CD><U0997><U09B2>";"<U09AC><U09C1><U09A7>";/ "<U09AC><U09C3><U09B9><U09B8><U09CD><U09AA><U09A4><U09BF>";"<U09B6><U09C1><U0995><U09CD><U09B0>";/ "<U09B6><U09A8><U09BF>" % % Full weekday names (%A) day "<U09B0><U09AC><U09BF><U09AC><U09BE><U09B0>";"<U09B8><U09CB><U09AE><U09AC><U09BE><U09B0>";/ - "<U09AE><U0999><U0997><U09B2><U09AC><U09BE><U09B0>";"<U09AC><U09C1><U09A7><U09AC><U09BE><U09B0>";/ + "<U09AE><U0999><U09CD><U0997><U09B2><U09AC><U09BE><U09B0>";"<U09AC><U09C1><U09A7><U09AC><U09BE><U09B0>";/ "<U09AC><U09C3><U09B9><U09B8><U09CD><U09AA><U09A4><U09BF><U09AC><U09BE><U09B0>";/ "<U09B6><U09C1><U0995><U09CD><U09B0><U09AC><U09BE><U09B0>";"<U09B6><U09A8><U09BF><U09AC><U09BE><U09B0>" % % Abbreviated month names (%b) -abmon "<U099C><U09BE><U09A8><U09C1><U09DF><U09BE><U09B0><U09C0>";/ - "<U09AB><U09C7><U09AC><U09CD><U09B0><U09C1><U09DF><U09BE><U09B0><U09C0>";/ +abmon "<U099C><U09BE><U09A8><U09C1><U09DF><U09BE><U09B0><U09BF>";/ + "<U09AB><U09C7><U09AC><U09CD><U09B0><U09C1><U09DF><U09BE><U09B0><U09BF>";/ "<U09AE><U09BE><U09B0><U09CD><U099A>";"<U098F><U09AA><U09CD><U09B0><U09BF><U09B2>";/ "<U09AE><U09C7>";"<U099C><U09C1><U09A8>";/ "<U099C><U09C1><U09B2><U09BE><U0987>";"<U0986><U0997><U09B8><U09CD><U099F>";/ @@ -112,8 +114,8 @@ abmon "<U099C><U09BE><U09A8><U09C1><U09DF><U09BE><U09B0><U09C0>";/ % % Full month names (%B) -mon "<U099C><U09BE><U09A8><U09C1><U09DF><U09BE><U09B0><U09C0>";/ - "<U09AB><U09C7><U09AC><U09CD><U09B0><U09C1><U09DF><U09BE><U09B0><U09C0>";/ +mon "<U099C><U09BE><U09A8><U09C1><U09DF><U09BE><U09B0><U09BF>";/ + "<U09AB><U09C7><U09AC><U09CD><U09B0><U09C1><U09DF><U09BE><U09B0><U09BF>";/ "<U09AE><U09BE><U09B0><U09CD><U099A>";"<U098F><U09AA><U09CD><U09B0><U09BF><U09B2>";/ "<U09AE><U09C7>";"<U099C><U09C1><U09A8>";/ "<U099C><U09C1><U09B2><U09BE><U0987>";"<U0986><U0997><U09B8><U09CD><U099F>";/ @@ -151,6 +153,7 @@ copy "bn_BD" END LC_MESSAGES +% Default paper: A4 LC_PAPER copy "hi_IN" END LC_PAPER diff --git a/libc/localedata/locales/ml_IN b/libc/localedata/locales/ml_IN index 30f25e1d3..1f5784581 100644 --- a/libc/localedata/locales/ml_IN +++ b/libc/localedata/locales/ml_IN @@ -104,7 +104,7 @@ abmon "<U0D1C><U0D28><U0D41>";/ "<U0D2E><U0D3E><U0D30><U0D4D><U200D>";/ "<U0D0F><U0D2A><U0D4D><U0D30>";/ "<U0D2E><U0D46>";/ -"<U0D1C><U0D42><U0D7B><U0D23><U0D4D><U200D>";/ +"<U0D1C><U0D42><U0D23><U0D4D><U200D>";/ "<U0D1C><U0D42><U0D32><U0D48>";/ "<U0D06><U0D17><U0D4D>";/ "<U0D38><U0D46><U0D2A><U0D4D>";/ diff --git a/libc/malloc/malloc.c b/libc/malloc/malloc.c index 890d3669e..3f4ddcd7f 100644 --- a/libc/malloc/malloc.c +++ b/libc/malloc/malloc.c @@ -4055,6 +4055,8 @@ _int_malloc(mstate av, size_t bytes) for(;;) { + int iters = 0; + bool any_larger = false; while ( (victim = unsorted_chunks(av)->bk) != unsorted_chunks(av)) { bck = victim->bk; if (__builtin_expect (victim->size <= 2 * SIZE_SZ, 0) @@ -4145,6 +4147,12 @@ _int_malloc(mstate av, size_t bytes) } } + if (size >= nb) + any_larger = true; +#define MAX_ITERS 10000 + if (++iters == MAX_ITERS) + break; + mark_bin(av, victim_index); victim->bk = bck; victim->fd = fwd; diff --git a/libc/nis/nss_nis/nis-rpc.c b/libc/nis/nss_nis/nis-rpc.c index e7049ffa9..2fdb16ddd 100644 --- a/libc/nis/nss_nis/nis-rpc.c +++ b/libc/nis/nss_nis/nis-rpc.c @@ -117,6 +117,10 @@ internal_nis_getrpcent_r (struct rpcent *rpc, char *buffer, size_t buflen, if (intern->start == NULL) internal_nis_setrpcent (intern); + if (intern->next == NULL) + /* Not one entry in the map. */ + return NSS_STATUS_NOTFOUND; + /* Get the next entry until we found a correct one. */ do { diff --git a/libc/nis/nss_nis/nis-service.c b/libc/nis/nss_nis/nis-service.c index c0e064d9a..0c176095c 100644 --- a/libc/nis/nss_nis/nis-service.c +++ b/libc/nis/nss_nis/nis-service.c @@ -188,6 +188,10 @@ internal_nis_getservent_r (struct servent *serv, char *buffer, if (intern.start == NULL) internal_nis_setservent (); + if (intern.next == NULL) + /* Not one entry in the map. */ + return NSS_STATUS_NOTFOUND; + /* Get the next entry until we found a correct one. */ do { |