Solaris failures, again. was Re: [v3] more static linkage cleanups
Andreas Tobler
toa@pop.agri.ch
Sat Oct 18 15:25:00 GMT 2003
Benjamin Kosnik wrote:
> This is part one of two.
>
> This is a refined organization of locale and io code for static linkage.
> What's being attempted is to keep the io and locale initialization code
> separate from the non-initialization, functional code.
- void
- locale::_S_initialize()
- {
- #ifdef __GTHREADS
- if (__gthread_active_p())
- __gthread_once(&_S_once, _S_initialize_once);
- #endif
- if (!_S_classic)
- _S_initialize_once();
- }
-
RCS file: src/locale_init.cc
diff -N src/locale_init.cc
+ void
+ locale::_S_initialize()
+ {
+ #ifdef __GTHREADS
+ if (__gthread_active_p())
+ __gthread_once(&_S_once, _S_initialize_once);
+ else
+ #endif
+ {
+ if (!_S_classic)
+ _S_initialize_once();
+ }
+ }
Can I remove the else again? Causes libstdc++ failures on solaris......
Test in progress on solaris2.9 32 and 64 bit.
Andreas
2003-10-18 Andreas Tobler <a.tobler@schweiz.ch>
* src/locale.cc (locale::_S_initialize): Re-apply workaround a
confusion of the use of the gthr API when __gthread_active_p()
returns true.
RCS file: /cvs/gcc/gcc/libstdc++-v3/src/locale_init.cc,v
retrieving revision 1.1
diff -u -r1.1 locale_init.cc
--- src/locale_init.cc 17 Oct 2003 14:47:30 -0000 1.1
+++ src/locale_init.cc 18 Oct 2003 14:50:55 -0000
@@ -143,12 +143,9 @@
#ifdef __GTHREADS
if (__gthread_active_p())
__gthread_once(&_S_once, _S_initialize_once);
- else
#endif
- {
- if (!_S_classic)
- _S_initialize_once();
- }
+ if (!_S_classic)
+ _S_initialize_once();
}
// Definitions for static const data members of locale::_Impl
More information about the Libstdc++
mailing list