mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-02 16:23:56 +08:00
locale.cc (locale::_S_initialize): Use __gthread_active_p.
2003-10-02 Benjamin Kosnik <bkoz@redhat.com> * src/locale.cc (locale::_S_initialize): Use __gthread_active_p. (locale::facet::_S_get_c_locale): Same. From-SVN: r72045
This commit is contained in:
parent
b59b508138
commit
5c109a1758
@ -1,3 +1,8 @@
|
||||
2003-10-02 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
* src/locale.cc (locale::_S_initialize): Use __gthread_active_p.
|
||||
(locale::facet::_S_get_c_locale): Same.
|
||||
|
||||
2003-10-02 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
* config/linker-map.gnu: Export _S_get_c_locale instead of
|
||||
|
@ -385,11 +385,14 @@ namespace std
|
||||
locale::_S_initialize()
|
||||
{
|
||||
#ifdef __GTHREADS
|
||||
if (__gthread_active_p())
|
||||
__gthread_once(&_S_once, _S_initialize_once);
|
||||
#else
|
||||
else
|
||||
#endif
|
||||
{
|
||||
if (!_S_classic)
|
||||
_S_initialize_once();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@ -472,11 +475,14 @@ namespace std
|
||||
locale::facet::_S_get_c_locale()
|
||||
{
|
||||
#ifdef __GHTREADS
|
||||
if (__gthread_active_p())
|
||||
__gthread_once(&_S_once, _S_initialize_once);
|
||||
#else
|
||||
else
|
||||
#endif
|
||||
{
|
||||
if (!_S_c_locale)
|
||||
_S_initialize_once();
|
||||
#endif
|
||||
}
|
||||
return _S_c_locale;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user