aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Olsson <stefan@xapa.se>2004-02-10 01:31:53 +0100
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2004-02-10 00:31:53 +0000
commit1ef0031284e5e24798f893641a16b81d675a6f40 (patch)
treec3da2d6c187aae5adde3bdcbeed5ca0a821de619
parentf0c4dd0010016a1b4a137b34b87b5802eaf29a9f (diff)
downloadgcc-1ef0031284e5e24798f893641a16b81d675a6f40.zip
gcc-1ef0031284e5e24798f893641a16b81d675a6f40.tar.gz
gcc-1ef0031284e5e24798f893641a16b81d675a6f40.tar.bz2
mt_allocator.h: thread_id is unused in non threaded applications and now has a ifdef to remove...
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
-rw-r--r--libstdc++-v3/ChangeLog7
-rw-r--r--libstdc++-v3/include/ext/mt_allocator.h3
2 files changed, 10 insertions, 0 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 16b0f5f..cfa8fba 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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.
diff --git a/libstdc++-v3/include/ext/mt_allocator.h b/libstdc++-v3/include/ext/mt_allocator.h
index 25c9cd2..0f70956 100644
--- a/libstdc++-v3/include/ext/mt_allocator.h
+++ b/libstdc++-v3/include/ext/mt_allocator.h
@@ -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