diff options
author | Thomas Schwinge <thomas@schwinge.name> | 2012-04-03 00:37:48 +0200 |
---|---|---|
committer | Thomas Schwinge <thomas@schwinge.name> | 2012-04-03 00:37:48 +0200 |
commit | 4f25816d7562e74a474eed95e81290dea2702008 (patch) | |
tree | d3df6a52f9b88b9bf1e902419c2110c3cec0b01a /locale | |
parent | 7c7480b7428eda63f3bfabd7e5586326769480f9 (diff) | |
parent | b013040f3a878efa578969a3006469220c9a3fd5 (diff) |
Merge branch 'baseline' into refs/top-bases/tschwinge/Roger_Whittaker
Conflicts:
sysdeps/i386/configure
Diffstat (limited to 'locale')
-rw-r--r-- | locale/findlocale.c | 3 | ||||
-rw-r--r-- | locale/iso-639.def | 1 | ||||
-rw-r--r-- | locale/loadarchive.c | 7 | ||||
-rw-r--r-- | locale/loadlocale.c | 6 | ||||
-rw-r--r-- | locale/weight.h | 11 | ||||
-rw-r--r-- | locale/weightwc.h | 9 |
6 files changed, 21 insertions, 16 deletions
diff --git a/locale/findlocale.c b/locale/findlocale.c index 2fec9a70d5..6c888f00c9 100644 --- a/locale/findlocale.c +++ b/locale/findlocale.c @@ -258,7 +258,8 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len, } /* Determine whether the user wants transliteration or not. */ - if (modifier != NULL && __strcasecmp (modifier, "TRANSLIT") == 0) + if (modifier != NULL + && __strcasecmp_l (modifier, "TRANSLIT", _nl_C_locobj_ptr) == 0) ((struct __locale_data *) locale_file->data)->use_translit = 1; /* Increment the usage count. */ diff --git a/locale/iso-639.def b/locale/iso-639.def index f62559439c..17bb9f2ae0 100644 --- a/locale/iso-639.def +++ b/locale/iso-639.def @@ -70,6 +70,7 @@ DEFINE_LANGUAGE_CODE3 ("Bikol", bik, bik) DEFINE_LANGUAGE_CODE3 ("Bini", bin, bin) DEFINE_LANGUAGE_CODE ("Bislama", bi, bis, bis) DEFINE_LANGUAGE_CODE3 ("Blin; Bilin", byn, byn) +DEFINE_LANGUAGE_CODE3 ("Bodo", brx, brx) DEFINE_LANGUAGE_CODE ("Bosnian", bs, bos, bos) DEFINE_LANGUAGE_CODE3 ("Braj", bra, bra) DEFINE_LANGUAGE_CODE ("Breton", br, bre, bre) diff --git a/locale/loadarchive.c b/locale/loadarchive.c index 663202e54e..47a6127a52 100644 --- a/locale/loadarchive.c +++ b/locale/loadarchive.c @@ -1,5 +1,5 @@ /* Code to load locale data from the locale archive file. - Copyright (C) 2002, 2003, 2005, 2010 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2005, 2010, 2011 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 @@ -203,7 +203,7 @@ _nl_load_locale_from_archive (int category, const char **namep) archmapped = &headmap; /* The archive has never been opened. */ - fd = open_not_cancel_2 (archfname, O_RDONLY|O_LARGEFILE); + fd = open_not_cancel_2 (archfname, O_RDONLY|O_LARGEFILE|O_CLOEXEC); if (fd < 0) /* Cannot open the archive, for whatever reason. */ return NULL; @@ -394,7 +394,8 @@ _nl_load_locale_from_archive (int category, const char **namep) if (fd == -1) { struct stat64 st; - fd = open_not_cancel_2 (archfname, O_RDONLY|O_LARGEFILE); + fd = open_not_cancel_2 (archfname, + O_RDONLY|O_LARGEFILE|O_CLOEXEC); if (fd == -1) /* Cannot open the archive, for whatever reason. */ return NULL; diff --git a/locale/loadlocale.c b/locale/loadlocale.c index 61e6f7f0a6..d33a494134 100644 --- a/locale/loadlocale.c +++ b/locale/loadlocale.c @@ -1,5 +1,5 @@ /* Functions to read locale data files. - Copyright (C) 1996-2004, 2005, 2006, 2010 Free Software Foundation, Inc. + Copyright (C) 1996-2004, 2005, 2006, 2010, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -173,7 +173,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category) file->decided = 1; file->data = NULL; - fd = open_not_cancel_2 (file->filename, O_RDONLY); + fd = open_not_cancel_2 (file->filename, O_RDONLY | O_CLOEXEC); if (__builtin_expect (fd, 0) < 0) /* Cannot open the file. */ return; @@ -201,7 +201,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category) _nl_category_names.str + _nl_category_name_idxs[category], _nl_category_name_sizes[category] + 1); - fd = open_not_cancel_2 (newp, O_RDONLY); + fd = open_not_cancel_2 (newp, O_RDONLY | O_CLOEXEC); if (__builtin_expect (fd, 0) < 0) return; diff --git a/locale/weight.h b/locale/weight.h index dc70a00be5..967e176ca6 100644 --- a/locale/weight.h +++ b/locale/weight.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996,1997,1998,1999,2000,2003,2004 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,1998,1999,2000,2003,2004,2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Ulrich Drepper, <drepper@cygnus.com>. @@ -20,7 +20,7 @@ /* Find index of weight. */ auto inline int32_t __attribute ((always_inline)) -findidx (const unsigned char **cpp) +findidx (const unsigned char **cpp, size_t len) { int_fast32_t i = table[*(*cpp)++]; const unsigned char *cp; @@ -34,6 +34,7 @@ findidx (const unsigned char **cpp) Search for the correct one. */ cp = &extra[-i]; usrc = *cpp; + --len; while (1) { size_t nhere; @@ -56,7 +57,7 @@ findidx (const unsigned char **cpp) already. */ size_t cnt; - for (cnt = 0; cnt < nhere; ++cnt) + for (cnt = 0; cnt < nhere && cnt < len; ++cnt) if (cp[cnt] != usrc[cnt]) break; @@ -79,13 +80,13 @@ findidx (const unsigned char **cpp) size_t cnt; size_t offset = 0; - for (cnt = 0; cnt < nhere; ++cnt) + for (cnt = 0; cnt < nhere && cnt < len; ++cnt) if (cp[cnt] != usrc[cnt]) break; if (cnt != nhere) { - if (cp[cnt] > usrc[cnt]) + if (cnt == len || cp[cnt] > usrc[cnt]) { /* Cannot be in this range. */ cp += 2 * nhere; diff --git a/locale/weightwc.h b/locale/weightwc.h index 9ea1126a24..7862091426 100644 --- a/locale/weightwc.h +++ b/locale/weightwc.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2001,2003,2004,2005,2007 Free Software Foundation, Inc. +/* Copyright (C) 1996-2001,2003,2004,2005,2007,2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Ulrich Drepper, <drepper@cygnus.com>. @@ -20,7 +20,7 @@ /* Find index of weight. */ auto inline int32_t __attribute ((always_inline)) -findidx (const wint_t **cpp) +findidx (const wint_t **cpp, size_t len) { wint_t ch = *(*cpp)++; int32_t i = __collidx_table_lookup ((const char *) table, ch); @@ -32,6 +32,7 @@ findidx (const wint_t **cpp) /* Oh well, more than one sequence starting with this byte. Search for the correct one. */ const int32_t *cp = (const int32_t *) &extra[-i]; + --len; while (1) { size_t nhere; @@ -54,7 +55,7 @@ findidx (const wint_t **cpp) already. */ size_t cnt; - for (cnt = 0; cnt < nhere; ++cnt) + for (cnt = 0; cnt < nhere && cnt < len; ++cnt) if (cp[cnt] != usrc[cnt]) break; @@ -75,7 +76,7 @@ findidx (const wint_t **cpp) size_t cnt; size_t offset; - for (cnt = 0; cnt < nhere - 1; ++cnt) + for (cnt = 0; cnt < nhere - 1 && cnt < len; ++cnt) if (cp[cnt] != usrc[cnt]) break; |