summaryrefslogtreecommitdiffstats
path: root/third_party/tcmalloc
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-20 22:08:33 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-20 22:08:33 +0000
commit541b8ce2a4aa437fb73b805ec7c351cfad7a6050 (patch)
tree2962bd3291cd88a7fcf84cb279c58ac2801570a2 /third_party/tcmalloc
parent2211999633e869ea1b7586d965897c07af30c926 (diff)
downloadchromium_src-541b8ce2a4aa437fb73b805ec7c351cfad7a6050.zip
chromium_src-541b8ce2a4aa437fb73b805ec7c351cfad7a6050.tar.gz
chromium_src-541b8ce2a4aa437fb73b805ec7c351cfad7a6050.tar.bz2
Clang: Fix TCMalloc's broken externs.
pthread_once's signature doesn't match the /usr/include/pthread.h signature. __THROW is incorrect. Review URL: http://codereview.chromium.org/1719001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45091 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/tcmalloc')
-rw-r--r--third_party/tcmalloc/chromium/src/maybe_threads.cc2
-rw-r--r--third_party/tcmalloc/chromium/src/profile-handler.cc5
2 files changed, 2 insertions, 5 deletions
diff --git a/third_party/tcmalloc/chromium/src/maybe_threads.cc b/third_party/tcmalloc/chromium/src/maybe_threads.cc
index 6b7d7b9..cda1d63 100644
--- a/third_party/tcmalloc/chromium/src/maybe_threads.cc
+++ b/third_party/tcmalloc/chromium/src/maybe_threads.cc
@@ -63,7 +63,7 @@ extern "C" {
int pthread_setspecific(pthread_key_t, const void*)
__THROW ATTRIBUTE_WEAK;
int pthread_once(pthread_once_t *, void (*)(void))
- __THROW ATTRIBUTE_WEAK;
+ ATTRIBUTE_WEAK;
}
#define MAX_PERTHREAD_VALS 16
diff --git a/third_party/tcmalloc/chromium/src/profile-handler.cc b/third_party/tcmalloc/chromium/src/profile-handler.cc
index cf65740..1946f7c 100644
--- a/third_party/tcmalloc/chromium/src/profile-handler.cc
+++ b/third_party/tcmalloc/chromium/src/profile-handler.cc
@@ -215,11 +215,8 @@ const int32 ProfileHandler::kDefaultFrequency;
// pthread_once won't be defined. We declare it here, for that
// case (with weak linkage) which will cause the non-definition to
// resolve to NULL. We can then check for NULL or not in Instance.
-#ifndef __THROW // I guess we're not on a glibc system
-# define __THROW // __THROW is just an optimization, so ok to make it ""
-#endif
extern "C" int pthread_once(pthread_once_t *, void (*)(void))
- __THROW ATTRIBUTE_WEAK;
+ ATTRIBUTE_WEAK;
void ProfileHandler::Init() {
instance_ = new ProfileHandler();