OSDN Git Service

2004-02-09 Stefan Olsson <stefan@xapa.se>
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 10 Feb 2004 00:31:53 +0000 (00:31 +0000)
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 10 Feb 2004 00:31:53 +0000 (00:31 +0000)
* include/ext/mt_allocator.h: thread_id is unused in non threaded
applications and now has a ifdef to remove it completely on
compilers without thread support. Include stdlib.h due to a
compiler warning on getenv().

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77576 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/include/ext/mt_allocator.h

index 16b0f5f..cfa8fba 100644 (file)
@@ -1,3 +1,10 @@
+2004-02-09  Stefan Olsson  <stefan@xapa.se>
+
+       * include/ext/mt_allocator.h: thread_id is unused in non threaded
+       applications and now has a ifdef to remove it completely on
+       compilers without thread support. Include stdlib.h due to a
+       compiler warning on getenv().
+
 2004-02-09  Paul Brook  <paul@codesourcery.com>
 
        * libstdc++-v3/configure.host: Explicitly check for atomicity.h file.
index 25c9cd2..0f70956 100644 (file)
@@ -36,6 +36,7 @@
 #define _MT_ALLOCATOR_H 1
 
 #include <new>
+#include <cstdlib>
 #include <bits/functexcept.h>
 #include <bits/gthr.h>
 #include <bits/atomicity.h>
@@ -188,7 +189,9 @@ namespace __gnu_cxx
         /*
          * The thread id of the thread which has requested this block.
          */
+#ifdef __GTHREADS
         size_t thread_id;
+#endif
       };
 
       struct bin_record