diff options
author | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2010-01-26 11:27:38 +0000 |
---|---|---|
committer | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2010-01-26 11:27:38 +0000 |
commit | 75a8dd396d88f79e8e2660fefe5bd93cbff71f55 (patch) | |
tree | e7ff701c0888ad2e6d527fd0b3302bcc3663d3dd /libc/locale/loadlocale.c | |
parent | 42bc5058cebfefa9329005e1b3bc0525f7f7b67b (diff) |
Merge changes between r9569 and r9736 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@9737 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/locale/loadlocale.c')
-rw-r--r-- | libc/locale/loadlocale.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libc/locale/loadlocale.c b/libc/locale/loadlocale.c index 467dff157..61e6f7f0a 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 Free Software Foundation, Inc. + Copyright (C) 1996-2004, 2005, 2006, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -61,7 +61,7 @@ static const enum value_type *const _nl_value_types[] = }; -struct locale_data * +struct __locale_data * internal_function _nl_intern_locale_data (int category, const void *data, size_t datasize) { @@ -71,7 +71,7 @@ _nl_intern_locale_data (int category, const void *data, size_t datasize) unsigned int nstrings; unsigned int strindex[0]; } *const filedata = data; - struct locale_data *newdata; + struct __locale_data *newdata; size_t cnt; if (__builtin_expect (datasize < sizeof *filedata, 0) @@ -166,7 +166,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category) int fd; void *filedata; struct stat64 st; - struct locale_data *newdata; + struct __locale_data *newdata; int save_err; int alloc = ld_mapped; @@ -187,7 +187,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category) if (__builtin_expect (S_ISDIR (st.st_mode), 0)) { /* LOCALE/LC_foo is a directory; open LOCALE/LC_foo/SYS_LC_foo - instead. */ + instead. */ char *newp; size_t filenamelen; @@ -224,6 +224,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category) PROT_READ, MAP_FILE|MAP_COPY, fd, 0); if (__builtin_expect (filedata == MAP_FAILED, 0)) { + filedata = NULL; if (__builtin_expect (errno, ENOSYS) == ENOSYS) { #endif /* _POSIX_MAPPED_FILES */ @@ -282,7 +283,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category) void internal_function -_nl_unload_locale (struct locale_data *locale) +_nl_unload_locale (struct __locale_data *locale) { if (locale->private.cleanup) (*locale->private.cleanup) (locale); |