From 1ef0031284e5e24798f893641a16b81d675a6f40 Mon Sep 17 00:00:00 2001 From: Stefan Olsson Date: Tue, 10 Feb 2004 01:31:53 +0100 Subject: [PATCH] mt_allocator.h: thread_id is unused in non threaded applications and now has a ifdef to remove... 2004-02-09 Stefan Olsson * 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 | 7 +++++++ libstdc++-v3/include/ext/mt_allocator.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 16b0f5fa4bdd..cfa8fba1182d 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2004-02-09 Stefan Olsson + + * 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 * 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 25c9cd21fd76..0f70956f6a7e 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 +#include #include #include #include @@ -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 -- 2.47.2