This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Solaris failures, again. was Re: [v3] more static linkage cleanups
- From: Andreas Tobler <toa at pop dot agri dot ch>
- To: Benjamin Kosnik <bkoz at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Sat, 18 Oct 2003 17:25:15 +0200
- Subject: Solaris failures, again. was Re: [v3] more static linkage cleanups
- References: <20031016223315.249b134e.bkoz@redhat.com>
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