summaryrefslogtreecommitdiff
path: root/libc/locale
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2011-11-17 21:56:08 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2011-11-17 21:56:08 +0000
commit913a0f6c362c8c9aac72f800485678845a60ed06 (patch)
tree227afb2373db8f9494b69c20069cce6a03ab0914 /libc/locale
parent86abb02796d5bfc0c71d46ad9923ff8737e03280 (diff)
Merge changes between r15584 and r15868 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@15869 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/locale')
-rw-r--r--libc/locale/findlocale.c3
-rw-r--r--libc/locale/loadarchive.c7
-rw-r--r--libc/locale/loadlocale.c6
3 files changed, 9 insertions, 7 deletions
diff --git a/libc/locale/findlocale.c b/libc/locale/findlocale.c
index 2fec9a70d..6c888f00c 100644
--- a/libc/locale/findlocale.c
+++ b/libc/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/libc/locale/loadarchive.c b/libc/locale/loadarchive.c
index 663202e54..47a6127a5 100644
--- a/libc/locale/loadarchive.c
+++ b/libc/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/libc/locale/loadlocale.c b/libc/locale/loadlocale.c
index 61e6f7f0a..d33a49413 100644
--- a/libc/locale/loadlocale.c
+++ b/libc/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;