mirror of git://gcc.gnu.org/git/gcc.git
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>
|
2003-10-02 Benjamin Kosnik <bkoz@redhat.com>
|
||||||
|
|
||||||
* config/linker-map.gnu: Export _S_get_c_locale instead of
|
* config/linker-map.gnu: Export _S_get_c_locale instead of
|
||||||
|
|
|
||||||
|
|
@ -385,11 +385,14 @@ namespace std
|
||||||
locale::_S_initialize()
|
locale::_S_initialize()
|
||||||
{
|
{
|
||||||
#ifdef __GTHREADS
|
#ifdef __GTHREADS
|
||||||
__gthread_once(&_S_once, _S_initialize_once);
|
if (__gthread_active_p())
|
||||||
#else
|
__gthread_once(&_S_once, _S_initialize_once);
|
||||||
if (!_S_classic)
|
else
|
||||||
_S_initialize_once();
|
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
|
if (!_S_classic)
|
||||||
|
_S_initialize_once();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -472,11 +475,14 @@ namespace std
|
||||||
locale::facet::_S_get_c_locale()
|
locale::facet::_S_get_c_locale()
|
||||||
{
|
{
|
||||||
#ifdef __GHTREADS
|
#ifdef __GHTREADS
|
||||||
__gthread_once(&_S_once, _S_initialize_once);
|
if (__gthread_active_p())
|
||||||
#else
|
__gthread_once(&_S_once, _S_initialize_once);
|
||||||
if (!_S_c_locale)
|
else
|
||||||
_S_initialize_once();
|
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
|
if (!_S_c_locale)
|
||||||
|
_S_initialize_once();
|
||||||
|
}
|
||||||
return _S_c_locale;
|
return _S_c_locale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue