| Index: third_party/tcmalloc/chromium/src/config_win.h
|
| diff --git a/third_party/tcmalloc/chromium/src/config.h.in b/third_party/tcmalloc/chromium/src/config_win.h
|
| similarity index 73%
|
| copy from third_party/tcmalloc/chromium/src/config.h.in
|
| copy to third_party/tcmalloc/chromium/src/config_win.h
|
| index 9112951d8b41056a9be5e0f64a45792b78d35899..db4c51886c036691c73957fa3786293abd28c290 100644
|
| --- a/third_party/tcmalloc/chromium/src/config.h.in
|
| +++ b/third_party/tcmalloc/chromium/src/config_win.h
|
| @@ -1,9 +1,35 @@
|
| -/* src/config.h.in. Generated from configure.ac by autoheader. */
|
| +/* A manual version of config.h fit for windows machines. */
|
|
|
| +/* Sometimes we accidentally #include this config.h instead of the one
|
| + in .. -- this is particularly true for msys/mingw, which uses the
|
| + unix config.h but also runs code in the windows directory.
|
| + */
|
| +#ifdef __MINGW32__
|
| +#include "../config.h"
|
| +#define GOOGLE_PERFTOOLS_WINDOWS_CONFIG_H_
|
| +#endif
|
| +
|
| +#ifndef GOOGLE_PERFTOOLS_WINDOWS_CONFIG_H_
|
| +#define GOOGLE_PERFTOOLS_WINDOWS_CONFIG_H_
|
|
|
| -#ifndef GOOGLE_PERFTOOLS_CONFIG_H_
|
| -#define GOOGLE_PERFTOOLS_CONFIG_H_
|
| +/* define this if you are linking tcmalloc statically and overriding the
|
| + * default allocators.
|
| + * For instructions on how to use this mode, see
|
| + * http://groups.google.com/group/google-perftools/browse_thread/thread/41cd3710af85e57b
|
| + */
|
| +#define WIN32_OVERRIDE_ALLOCATORS
|
|
|
| +/* the location of <hash_map> */
|
| +#define HASH_MAP_H <hash_map>
|
| +
|
| +/* the namespace of hash_map/hash_set */
|
| +#define HASH_NAMESPACE stdext
|
| +
|
| +/* the location of <hash_set> */
|
| +#define HASH_SET_H <hash_set>
|
| +
|
| +/* Define to 1 if your libc has a snprintf implementation */
|
| +#undef HAVE_SNPRINTF
|
|
|
| /* Define to 1 if compiler supports __builtin_stack_pointer */
|
| #undef HAVE_BUILTIN_STACK_POINTER
|
| @@ -57,7 +83,7 @@
|
| #undef HAVE_GETEUID
|
|
|
| /* Define to 1 if you have the `getpagesize' function. */
|
| -#undef HAVE_GETPAGESIZE
|
| +#define HAVE_GETPAGESIZE 1 /* we define it in windows/port.cc */
|
|
|
| /* Define to 1 if you have the <glob.h> header file. */
|
| #undef HAVE_GLOB_H
|
| @@ -65,6 +91,12 @@
|
| /* Define to 1 if you have the <grp.h> header file. */
|
| #undef HAVE_GRP_H
|
|
|
| +/* define if the compiler has hash_map */
|
| +#define HAVE_HASH_MAP 1
|
| +
|
| +/* define if the compiler has hash_set */
|
| +#define HAVE_HASH_SET 1
|
| +
|
| /* Define to 1 if you have the <inttypes.h> header file. */
|
| #undef HAVE_INTTYPES_H
|
|
|
| @@ -87,7 +119,7 @@
|
| #undef HAVE_MMAP
|
|
|
| /* define if the compiler implements namespaces */
|
| -#undef HAVE_NAMESPACES
|
| +#define HAVE_NAMESPACES 1
|
|
|
| /* Define to 1 if you have the <poll.h> header file. */
|
| #undef HAVE_POLL_H
|
| @@ -103,7 +135,6 @@
|
|
|
| /* Define to 1 if you have the `sbrk' function. */
|
| #undef HAVE_SBRK
|
| -
|
| /* Define to 1 if you have the <sched.h> header file. */
|
| #undef HAVE_SCHED_H
|
|
|
| @@ -111,13 +142,13 @@
|
| #undef HAVE_STDINT_H
|
|
|
| /* Define to 1 if you have the <stdlib.h> header file. */
|
| -#undef HAVE_STDLIB_H
|
| +#define HAVE_STDLIB_H 1
|
|
|
| /* Define to 1 if you have the <strings.h> header file. */
|
| #undef HAVE_STRINGS_H
|
|
|
| /* Define to 1 if you have the <string.h> header file. */
|
| -#undef HAVE_STRING_H
|
| +#define HAVE_STRING_H 1
|
|
|
| /* Define to 1 if the system has the type `struct mallinfo'. */
|
| #undef HAVE_STRUCT_MALLINFO
|
| @@ -141,13 +172,16 @@
|
| #undef HAVE_SYS_SOCKET_H
|
|
|
| /* Define to 1 if you have the <sys/stat.h> header file. */
|
| -#undef HAVE_SYS_STAT_H
|
| +#define HAVE_SYS_STAT_H 1
|
|
|
| /* Define to 1 if you have the <sys/syscall.h> header file. */
|
| #undef HAVE_SYS_SYSCALL_H
|
|
|
| +/* Define to 1 if you have the <sys/time.h> header file. */
|
| +#undef HAVE_SYS_TIME_H
|
| +
|
| /* Define to 1 if you have the <sys/types.h> header file. */
|
| -#undef HAVE_SYS_TYPES_H
|
| +#define HAVE_SYS_TYPES_H 1
|
|
|
| /* <sys/ucontext.h> is broken on redhat 7 */
|
| #undef HAVE_SYS_UCONTEXT_H
|
| @@ -167,9 +201,6 @@
|
| /* Define to 1 if you have the <unwind.h> header file. */
|
| #undef HAVE_UNWIND_H
|
|
|
| -/* Define to 1 if you have the <valgrind.h> header file. */
|
| -#undef HAVE_VALGRIND_H
|
| -
|
| /* define if your compiler has __attribute__ */
|
| #undef HAVE___ATTRIBUTE__
|
|
|
| @@ -177,7 +208,7 @@
|
| #undef HAVE___ENVIRON
|
|
|
| /* Define to 1 if the system has the type `__int64'. */
|
| -#undef HAVE___INT64
|
| +#define HAVE___INT64 1
|
|
|
| /* prefix where we look for installed files */
|
| #undef INSTALL_PREFIX
|
| @@ -221,26 +252,30 @@
|
| functions/classes. It's safe to define this here because config.h is only
|
| used internally, to compile the DLL, and every DLL source file #includes
|
| "config.h" before anything else. */
|
| -#undef PERFTOOLS_DLL_DECL
|
| +#ifndef PERFTOOLS_DLL_DECL
|
| +# define PERFTOOLS_IS_A_DLL 1 /* not set if you're statically linking */
|
| +# define PERFTOOLS_DLL_DECL __declspec(dllexport)
|
| +# define PERFTOOLS_DLL_DECL_FOR_UNITTESTS __declspec(dllimport)
|
| +#endif
|
|
|
| /* printf format code for printing a size_t and ssize_t */
|
| -#undef PRIdS
|
| +#define PRIdS "Id"
|
|
|
| /* printf format code for printing a size_t and ssize_t */
|
| -#undef PRIuS
|
| +#define PRIuS "Iu"
|
|
|
| /* printf format code for printing a size_t and ssize_t */
|
| -#undef PRIxS
|
| +#define PRIxS "Ix"
|
|
|
| /* Define to necessary symbol if this constant uses a non-standard name on
|
| your system. */
|
| #undef PTHREAD_CREATE_JOINABLE
|
|
|
| /* Define to 1 if you have the ANSI C header files. */
|
| -#undef STDC_HEADERS
|
| +#define STDC_HEADERS 1
|
|
|
| /* the namespace where STL code like vector<> is defined */
|
| -#undef STL_NAMESPACE
|
| +#define STL_NAMESPACE std
|
|
|
| /* Version number of package */
|
| #undef VERSION
|
| @@ -256,10 +291,21 @@
|
| #undef inline
|
| #endif
|
|
|
| +// ---------------------------------------------------------------------
|
| +// Extra stuff not found in config.h.in
|
|
|
| -#ifdef __MINGW32__
|
| -#include "windows/mingw.h"
|
| +// 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
|
|
|
| -#endif /* #ifndef GOOGLE_PERFTOOLS_CONFIG_H_ */
|
| +// We want to make sure not to ever try to #include heap-checker.h
|
| +#define NO_HEAP_CHECK 1
|
| +
|
| +// TODO(csilvers): include windows/port.h in every relevant source file instead?
|
| +#include "windows/port.h"
|
|
|
| +#endif /* GOOGLE_PERFTOOLS_WINDOWS_CONFIG_H_ */
|
|
|