This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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>;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]