diff options
Diffstat (limited to 'third_party/tcmalloc/chromium/src/windows/mingw.h')
| -rw-r--r-- | third_party/tcmalloc/chromium/src/windows/mingw.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/third_party/tcmalloc/chromium/src/windows/mingw.h b/third_party/tcmalloc/chromium/src/windows/mingw.h index e69b5da..747b285 100644 --- a/third_party/tcmalloc/chromium/src/windows/mingw.h +++ b/third_party/tcmalloc/chromium/src/windows/mingw.h @@ -45,10 +45,23 @@ # define PERFTOOLS_NO_ALIGNED_MALLOC 1 #endif +// This must be defined before the windows.h is included. We need at +// least 0x0400 for mutex.h to have access to TryLock, and at least +// 0x0501 for patch_functions.cc to have access to GetModuleHandleEx. +// (This latter is an optimization we could take out if need be.) +#ifndef _WIN32_WINNT +# define _WIN32_WINNT 0x0501 +#endif + #include "windows/port.h" #define HAVE_SNPRINTF 1 +// Some mingw distributions have a pthreads wrapper, but it doesn't +// work as well as native windows spinlocks (at least for us). So +// pretend the pthreads wrapper doesn't exist, even when it does. +#undef HAVE_PTHREAD + #endif /* __MINGW32__ */ #endif /* GOOGLE_PERFTOOLS_WINDOWS_MINGW_H_ */ |
