]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
mt_allocator.h: thread_id is unused in non threaded applications and now has a ifdef...
authorStefan Olsson <stefan@xapa.se>
Tue, 10 Feb 2004 00:31:53 +0000 (01:31 +0100)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Tue, 10 Feb 2004 00:31:53 +0000 (00:31 +0000)
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().

From-SVN: r77576

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

index 16b0f5fa4bdd9fb95b52836d7407e568170f0217..cfa8fba1182d40d9e844a45fd0d832232df61610 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 25c9cd21fd76b0fdb993d6a2c0a36b7783ed757b..0f70956f6a7e9d605c8bedb8ca0b51e44fa901f1 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