about summary refs log tree commit diff
path: root/intl/l10nflist.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-09-26 04:45:24 +0000
committerUlrich Drepper <drepper@redhat.com>2004-09-26 04:45:24 +0000
commitce7265c7438e18f2e4ea81582131a783a1cdd601 (patch)
treede765fda756af9cf90b3d7d3c528ac0c11f93de9 /intl/l10nflist.c
parentf6b90f42997f98bdd91dac713d610b66edc55c7c (diff)
downloadglibc-ce7265c7438e18f2e4ea81582131a783a1cdd601.tar.gz
glibc-ce7265c7438e18f2e4ea81582131a783a1cdd601.tar.xz
glibc-ce7265c7438e18f2e4ea81582131a783a1cdd601.zip
[BZ #322]
Update.
	* intl/dcigettext.c (DCIGETTEXT): Protect tfind/tsearch calls.
	* intl/dcigettext.c (_nl_find_msg): Call _nl_load_domain also if
	decided < 0.
	* intl/finddomain.c (_nl_find_domain): Likewise.
	* intl/l10nflist.c (_nl_make_l10nflist): Initialize lock.
	* intl/loadinfo.h (struct loaded_l10nfile): Add lock element.
	* intl/loadmsgcat.c (_nl_load_domain): Set decided to 1 only once we
	are done.  First set to -1 to signal initialization is ongoing.
	Protect against concurrent callers with recursive lock.
	duplicate address recognition does not copy junk.  [BZ #322]
Diffstat (limited to 'intl/l10nflist.c')
-rw-r--r--intl/l10nflist.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/intl/l10nflist.c b/intl/l10nflist.c
index 31760bdaaa..5a366e59fb 100644
--- a/intl/l10nflist.c
+++ b/intl/l10nflist.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2002, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
 
@@ -273,10 +273,14 @@ _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
     return NULL;
 
   retval->filename = abs_filename;
+  /* If more than one directory is in the list this is a pseudo-entry
+     which just references others.  We do not try to load data for it,
+     ever.  */
   retval->decided = (__argz_count (dirlist, dirlist_len) != 1
 		     || ((mask & XPG_CODESET) != 0
 			 && (mask & XPG_NORM_CODESET) != 0));
   retval->data = NULL;
+  __libc_lock_init_recursive (retval->lock);
 
   if (last == NULL)
     {