summaryrefslogtreecommitdiff
path: root/locale
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-08-04 21:58:10 +0000
committerUlrich Drepper <drepper@redhat.com>2004-08-04 21:58:10 +0000
commit7c11c4a14684f23babd5060931529f095b8f81d3 (patch)
tree1376da71d6f5dc84720637524c52f902c23c4681 /locale
parent01f7e9281469ade588b61111eac9911d9a48a1ff (diff)
(do_release_all): Add __libc_freeres_fn_section.
Diffstat (limited to 'locale')
-rw-r--r--locale/localeinfo.h3
-rw-r--r--locale/programs/linereader.c3
-rw-r--r--locale/setlocale.c10
3 files changed, 12 insertions, 4 deletions
diff --git a/locale/localeinfo.h b/locale/localeinfo.h
index e7b8f84da8..065ee18cf9 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 c3865e4dd5..233799a87d 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 d012d0265f..e6db70d4c7 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