mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-01 10:06:57 +03:00
Update.
This commit is contained in:
@ -4,8 +4,6 @@
|
|||||||
* intl/dcigettext.c (_nl_find_msg): Call _nl_load_domain also if
|
* intl/dcigettext.c (_nl_find_msg): Call _nl_load_domain also if
|
||||||
decided < 0.
|
decided < 0.
|
||||||
* intl/finddomain.c (_nl_find_domain): Likewise.
|
* 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
|
* intl/loadmsgcat.c (_nl_load_domain): Set decided to 1 only once we
|
||||||
are done. First set to -1 to signal initialization is ongoing.
|
are done. First set to -1 to signal initialization is ongoing.
|
||||||
Protect against concurrent callers with recursive lock.
|
Protect against concurrent callers with recursive lock.
|
||||||
|
@ -280,7 +280,6 @@ _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
|
|||||||
|| ((mask & XPG_CODESET) != 0
|
|| ((mask & XPG_CODESET) != 0
|
||||||
&& (mask & XPG_NORM_CODESET) != 0));
|
&& (mask & XPG_NORM_CODESET) != 0));
|
||||||
retval->data = NULL;
|
retval->data = NULL;
|
||||||
__libc_lock_init_recursive (retval->lock);
|
|
||||||
|
|
||||||
if (last == NULL)
|
if (last == NULL)
|
||||||
{
|
{
|
||||||
|
@ -20,8 +20,6 @@
|
|||||||
#ifndef _LOADINFO_H
|
#ifndef _LOADINFO_H
|
||||||
#define _LOADINFO_H 1
|
#define _LOADINFO_H 1
|
||||||
|
|
||||||
#include <bits/libc-lock.h>
|
|
||||||
|
|
||||||
/* Declarations of locale dependent catalog lookup functions.
|
/* Declarations of locale dependent catalog lookup functions.
|
||||||
Implemented in
|
Implemented in
|
||||||
|
|
||||||
@ -63,7 +61,6 @@ struct loaded_l10nfile
|
|||||||
{
|
{
|
||||||
const char *filename;
|
const char *filename;
|
||||||
int decided;
|
int decided;
|
||||||
__libc_lock_define_recursive (, lock);
|
|
||||||
|
|
||||||
const void *data;
|
const void *data;
|
||||||
|
|
||||||
|
@ -88,6 +88,7 @@ char *alloca ();
|
|||||||
#ifdef _LIBC
|
#ifdef _LIBC
|
||||||
# include "../locale/localeinfo.h"
|
# include "../locale/localeinfo.h"
|
||||||
# include <not-cancel.h>
|
# include <not-cancel.h>
|
||||||
|
# include <bits/libc-lock.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Provide fallback values for macros that ought to be defined in <inttypes.h>.
|
/* Provide fallback values for macros that ought to be defined in <inttypes.h>.
|
||||||
@ -899,6 +900,7 @@ _nl_load_domain (domain_file, domainbinding)
|
|||||||
struct loaded_l10nfile *domain_file;
|
struct loaded_l10nfile *domain_file;
|
||||||
struct binding *domainbinding;
|
struct binding *domainbinding;
|
||||||
{
|
{
|
||||||
|
__libc_lock_define_initialized_recursive (static, lock);
|
||||||
int fd = -1;
|
int fd = -1;
|
||||||
size_t size;
|
size_t size;
|
||||||
#ifdef _LIBC
|
#ifdef _LIBC
|
||||||
@ -912,7 +914,7 @@ _nl_load_domain (domain_file, domainbinding)
|
|||||||
int revision;
|
int revision;
|
||||||
const char *nullentry;
|
const char *nullentry;
|
||||||
|
|
||||||
__libc_lock_lock_recursive (domain_file->lock);
|
__libc_lock_lock_recursive (lock);
|
||||||
if (domain_file->decided != 0)
|
if (domain_file->decided != 0)
|
||||||
{
|
{
|
||||||
/* There are two possibilities:
|
/* There are two possibilities:
|
||||||
@ -925,7 +927,7 @@ _nl_load_domain (domain_file, domainbinding)
|
|||||||
Not necessary anymore since if the lock is available this
|
Not necessary anymore since if the lock is available this
|
||||||
is finished.
|
is finished.
|
||||||
*/
|
*/
|
||||||
__libc_lock_unlock_recursive (domain_file->lock);
|
__libc_lock_unlock_recursive (lock);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1400,7 +1402,7 @@ _nl_load_domain (domain_file, domainbinding)
|
|||||||
|
|
||||||
domain_file->decided = 1;
|
domain_file->decided = 1;
|
||||||
|
|
||||||
__libc_lock_unlock_recursive (domain_file->lock);
|
__libc_lock_unlock_recursive (lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user