This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[libstdc++ PATCH] allocator threads assumption fix
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Fri, 30 Jan 2004 12:26:01 -0500
- Subject: [libstdc++ PATCH] allocator threads assumption fix
allocator.cc does not protect its references to thread functions
to match the mt_allocator.h header file.
Okay for mainline?
Thanks, David
* src/allocator.cc: Protect _S_get_thread_id() and
_S_thread_key_destr() with #ifdef __GTHREADS.
Index: allocator.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/src/allocator.cc,v
retrieving revision 1.1
diff -c -p -r1.1 allocator.cc
*** allocator.cc 29 Jan 2004 00:18:39 -0000 1.1
--- allocator.cc 30 Jan 2004 17:20:44 -0000
*************** namespace __gnu_cxx
*** 46,56 ****
--- 46,58 ----
template
void __mt_alloc<char>::_S_init();
+ #ifdef __GTHREADS
template
size_t __mt_alloc<char>::_S_get_thread_id();
template
void __mt_alloc<char>::_S_thread_key_destr(void*);
+ #endif
// Static members of __pool_alloc.
template class __pool_alloc<true, 0>;