diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-07-31 17:46:17 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-07-31 17:46:17 +0000 |
commit | 8833066b122427710a9e14a888ce6cfa862332d3 (patch) | |
tree | 29591019d695919417b3698618d6a342e97381d6 /intl | |
parent | fedca46896bdb702cb988837a0c2c5447e72ba2b (diff) | |
download | glibc-8833066b122427710a9e14a888ce6cfa862332d3.tar.gz glibc-8833066b122427710a9e14a888ce6cfa862332d3.tar.xz glibc-8833066b122427710a9e14a888ce6cfa862332d3.zip |
Updated to fedora-glibc-20070731T1624 cvs/fedora-glibc-2_6_90-1
Diffstat (limited to 'intl')
-rw-r--r-- | intl/dcigettext.c | 4 | ||||
-rw-r--r-- | intl/explodename.c | 6 | ||||
-rw-r--r-- | intl/finddomain.c | 5 | ||||
-rw-r--r-- | intl/gettextP.h | 5 | ||||
-rw-r--r-- | intl/loadmsgcat.c | 2 | ||||
-rw-r--r-- | intl/plural-eval.c | 6 | ||||
-rw-r--r-- | intl/plural-exp.c | 4 | ||||
-rw-r--r-- | intl/plural-exp.h | 11 |
8 files changed, 24 insertions, 19 deletions
diff --git a/intl/dcigettext.c b/intl/dcigettext.c index cb2b1813a7..23e019ab32 100644 --- a/intl/dcigettext.c +++ b/intl/dcigettext.c @@ -1,5 +1,5 @@ /* Implementation of the internal dcigettext function. - Copyright (C) 1995-2005, 2006 Free Software Foundation, Inc. + Copyright (C) 1995-2005, 2006, 2007 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 @@ -948,7 +948,7 @@ _nl_find_msg (domain_file, domainbinding, msgid, convert, lengthp) /* If the output encoding is the same there is nothing to do. Otherwise do not use the translation at all. */ - if (__builtin_expect (r != __GCONV_NOCONV, 1)) + if (__builtin_expect (r != __GCONV_NULCONV, 1)) return NULL; convd->conv = (__gconv_t) -1; diff --git a/intl/explodename.c b/intl/explodename.c index 8e326ead53..321204d8df 100644 --- a/intl/explodename.c +++ b/intl/explodename.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2002, 2003, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1995-2002, 2003, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. @@ -108,7 +108,9 @@ _nl_explode_name (name, language, modifier, territory, codeset, { *normalized_codeset = _nl_normalize_codeset (*codeset, cp - *codeset); - if (strcmp (*codeset, *normalized_codeset) == 0) + if (*normalized_codeset == NULL) + return -1; + else if (strcmp (*codeset, *normalized_codeset) == 0) free ((char *) *normalized_codeset); else mask |= XPG_NORM_CODESET; diff --git a/intl/finddomain.c b/intl/finddomain.c index 9806ba12cd..54e617ca99 100644 --- a/intl/finddomain.c +++ b/intl/finddomain.c @@ -1,5 +1,5 @@ /* Handle list of needed message catalogs - Copyright (C) 1995-1999, 2000, 2001, 2002, 2004, 2006 + Copyright (C) 1995-1999, 2000, 2001, 2002, 2004, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Ulrich Drepper <drepper@gnu.org>, 1995. @@ -126,6 +126,9 @@ _nl_find_domain (dirname, locale, domainname, domainbinding) we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */ mask = _nl_explode_name (locale, &language, &modifier, &territory, &codeset, &normalized_codeset); + if (mask == -1) + /* This means we are out of core. */ + return NULL; /* We need to protect modifying the _NL_LOADED_DOMAINS data. */ __libc_rwlock_wrlock (lock); diff --git a/intl/gettextP.h b/intl/gettextP.h index f18535a5b3..f680a9a0a1 100644 --- a/intl/gettextP.h +++ b/intl/gettextP.h @@ -1,5 +1,6 @@ /* Header describing internals of libintl library. - Copyright (C) 1995-1999, 2000, 2001, 2004-2005 Free Software Foundation, Inc. + Copyright (C) 1995-1999, 2000, 2001, 2004-2005, 2007 + Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Ulrich Drepper <drepper@cygnus.com>, 1995. @@ -147,7 +148,7 @@ struct loaded_domain struct converted_domain *conversions; size_t nconversions; - struct expression *plural; + const struct expression *plural; unsigned long int nplurals; }; diff --git a/intl/loadmsgcat.c b/intl/loadmsgcat.c index 1f55531097..1c47475ec6 100644 --- a/intl/loadmsgcat.c +++ b/intl/loadmsgcat.c @@ -1276,7 +1276,7 @@ _nl_unload_domain (domain) size_t i; if (domain->plural != &__gettext_germanic_plural) - __gettext_free_exp (domain->plural); + __gettext_free_exp ((struct expression *) domain->plural); for (i = 0; i < domain->nconversions; i++) { diff --git a/intl/plural-eval.c b/intl/plural-eval.c index ed29e201b2..3f01688c2e 100644 --- a/intl/plural-eval.c +++ b/intl/plural-eval.c @@ -1,5 +1,5 @@ /* Plural expression evaluation. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2007 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 @@ -17,14 +17,14 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -static unsigned long int plural_eval (struct expression *pexp, +static unsigned long int plural_eval (const struct expression *pexp, unsigned long int n) internal_function; static unsigned long int internal_function plural_eval (pexp, n) - struct expression *pexp; + const struct expression *pexp; unsigned long int n; { switch (pexp->nargs) diff --git a/intl/plural-exp.c b/intl/plural-exp.c index 9cb7a4540a..b3eee6b432 100644 --- a/intl/plural-exp.c +++ b/intl/plural-exp.c @@ -1,5 +1,5 @@ /* Expression parsing for plural form selection. - Copyright (C) 2000, 2001, 2005 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2005, 2007 Free Software Foundation, Inc. Written by Ulrich Drepper <drepper@cygnus.com>, 2000. This file is part of the GNU C Library. @@ -99,7 +99,7 @@ void internal_function EXTRACT_PLURAL_EXPRESSION (nullentry, pluralp, npluralsp) const char *nullentry; - struct expression **pluralp; + const struct expression **pluralp; unsigned long int *npluralsp; { if (nullentry != NULL) diff --git a/intl/plural-exp.h b/intl/plural-exp.h index f8a5c87ff0..4a7336e26b 100644 --- a/intl/plural-exp.h +++ b/intl/plural-exp.h @@ -1,5 +1,5 @@ /* Expression parsing and evaluation for plural form selection. - Copyright (C) 2000, 2001, 2002, 2005 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002, 2005, 2007 Free Software Foundation, Inc. Written by Ulrich Drepper <drepper@cygnus.com>, 2000. This file is part of the GNU C Library. @@ -114,13 +114,12 @@ extern void FREE_EXPRESSION PARAMS ((struct expression *exp)) internal_function; extern int PLURAL_PARSE PARAMS ((void *arg)); extern const struct expression GERMANIC_PLURAL attribute_hidden; -extern void EXTRACT_PLURAL_EXPRESSION PARAMS ((const char *nullentry, - struct expression **pluralp, - unsigned long int *npluralsp)) - internal_function; +extern void EXTRACT_PLURAL_EXPRESSION PARAMS + ((const char *nullentry, const struct expression **pluralp, + unsigned long int *npluralsp)) internal_function; #if !defined (_LIBC) && !defined (IN_LIBINTL) -extern unsigned long int plural_eval PARAMS ((struct expression *pexp, +extern unsigned long int plural_eval PARAMS ((const struct expression *pexp, unsigned long int n)); #endif |