diff options
Diffstat (limited to 'locale')
-rw-r--r-- | locale/localeinfo.h | 3 | ||||
-rw-r--r-- | locale/programs/linereader.c | 3 | ||||
-rw-r--r-- | locale/setlocale.c | 10 |
3 files changed, 12 insertions, 4 deletions
diff --git a/locale/localeinfo.h b/locale/localeinfo.h index e7b8f84..065ee18 100644 --- a/locale/localeinfo.h +++ b/locale/localeinfo.h @@ -315,6 +315,9 @@ extern struct locale_data *_nl_load_locale_from_archive (int category, /* Subroutine of setlocale's __libc_subfreeres hook. */ extern void _nl_archive_subfreeres (void) attribute_hidden; +/* Subroutine of gconv-db's __libc_subfreeres hook. */ +extern void _nl_locale_subfreeres (void) attribute_hidden; + /* Validate the contents of a locale file and set up the in-core data structure to point into the data. This leaves the `alloc' and `name' fields uninitialized, for the caller to fill in. diff --git a/locale/programs/linereader.c b/locale/programs/linereader.c index c3865e4..233799a 100644 --- a/locale/programs/linereader.c +++ b/locale/programs/linereader.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1996-2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.org>, 1996. @@ -80,6 +80,7 @@ lr_create (FILE *fp, const char *fname, kw_hash_fct_t hf) result->comment_char = '#'; result->escape_char = '\\'; result->translate_strings = 1; + result->return_widestr = 0; n = getdelim (&result->buf, &result->bufsize, '\n', result->fp); if (n < 0) diff --git a/locale/setlocale.c b/locale/setlocale.c index d012d02..e6db70d 100644 --- a/locale/setlocale.c +++ b/locale/setlocale.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1991, 92, 1995-2000, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1995-2000, 2002, 2003, 2004 + 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 @@ -444,7 +445,7 @@ setlocale (int category, const char *locale) } libc_hidden_def (setlocale) -static void +static void __libc_freeres_fn_section free_category (int category, struct locale_data *here, struct locale_data *c_data) { @@ -472,7 +473,10 @@ free_category (int category, } } -libc_freeres_fn (free_mem) +/* This is called from iconv/gconv_db.c's free_mem, as locales must + be freed before freeing gconv steps arrays. */ +void __libc_freeres_fn_section +_nl_locale_subfreeres (void) { #ifdef NL_CURRENT_INDIRECT /* We don't use the loop because we want to have individual weak |