blob: 030955a6da9684505632725f0a1fd6a1c043d735 [file] [log] [blame]
Brian Silverman20350ac2021-11-17 18:19:55 -08001/* Sometimes we accidentally #include this config.h instead of the one
2 in .. -- this is particularly true for msys/mingw, which uses the
3 unix config.h but also runs code in the windows directory.
4 */
5#ifdef __MINGW32__
6#include "../config.h"
7#define GOOGLE_PERFTOOLS_WINDOWS_CONFIG_H_
8#endif
9
10#ifndef GOOGLE_PERFTOOLS_WINDOWS_CONFIG_H_
11#define GOOGLE_PERFTOOLS_WINDOWS_CONFIG_H_
12/* used by tcmalloc.h */
13#define GPERFTOOLS_CONFIG_H_
14
15/* Enable aggressive decommit by default */
16#cmakedefine ENABLE_AGGRESSIVE_DECOMMIT_BY_DEFAULT
17
18/* Build new/delete operators for overaligned types */
19#cmakedefine ENABLE_ALIGNED_NEW_DELETE
20
21/* Build runtime detection for sized delete */
22#cmakedefine ENABLE_DYNAMIC_SIZED_DELETE
23
24/* Report large allocation */
25#cmakedefine ENABLE_LARGE_ALLOC_REPORT
26
27/* Build sized deletion operators */
28#cmakedefine ENABLE_SIZED_DELETE
29
30/* Define to 1 if you have the <asm/ptrace.h> header file. */
31#cmakedefine HAVE_ASM_PTRACE_H
32
33/* Define to 1 if you have the <cygwin/signal.h> header file. */
34#cmakedefine HAVE_CYGWIN_SIGNAL_H
35
36/* Define to 1 if you have the declaration of `backtrace', and to 0 if you
37 don't. */
38#cmakedefine01 HAVE_DECL_BACKTRACE
39
40/* Define to 1 if you have the declaration of `cfree', and to 0 if you don't.
41 */
42#cmakedefine01 HAVE_DECL_CFREE
43
44/* Define to 1 if you have the declaration of `memalign', and to 0 if you
45 don't. */
46#cmakedefine01 HAVE_DECL_MEMALIGN
47
48/* Define to 1 if you have the declaration of `nanosleep', and to 0 if you
49 don't. */
50#cmakedefine01 HAVE_DECL_NANOSLEEP
51
52/* Define to 1 if you have the declaration of `posix_memalign', and to 0 if
53 you don't. */
54#cmakedefine01 HAVE_DECL_POSIX_MEMALIGN
55
56/* Define to 1 if you have the declaration of `pvalloc', and to 0 if you
57 don't. */
58#cmakedefine01 HAVE_DECL_PVALLOC
59
60/* Define to 1 if you have the declaration of `sleep', and to 0 if you don't.
61 */
62#cmakedefine01 HAVE_DECL_SLEEP
63
64/* Define to 1 if you have the declaration of `valloc', and to 0 if you don't.
65 */
66#cmakedefine01 HAVE_DECL_VALLOC
67
68/* Define to 1 if you have the <dlfcn.h> header file. */
69#cmakedefine HAVE_DLFCN_H
70
71/* Define to 1 if the system has the type `Elf32_Versym'. */
72#cmakedefine HAVE_ELF32_VERSYM
73
74/* Define to 1 if you have the <execinfo.h> header file. */
75#cmakedefine HAVE_EXECINFO_H
76
77/* Define to 1 if you have the <fcntl.h> header file. */
78#cmakedefine HAVE_FCNTL_H
79
80/* Define to 1 if you have the <features.h> header file. */
81#cmakedefine HAVE_FEATURES_H
82
83/* Define to 1 if you have the `fork' function. */
84#cmakedefine HAVE_FORK
85
86/* Define to 1 if you have the `geteuid' function. */
87#cmakedefine HAVE_GETEUID
88
89/* Define to 1 if you have the <glob.h> header file. */
90#cmakedefine HAVE_GLOB_H
91
92/* Define to 1 if you have the <grp.h> header file. */
93#cmakedefine HAVE_GRP_H
94
95/* Define to 1 if you have the <inttypes.h> header file. */
96#cmakedefine HAVE_INTTYPES_H
97
98/* Define to 1 if you have the <libunwind.h> header file. */
99#cmakedefine HAVE_LIBUNWIND_H
100
101/* Define to 1 if you have the <linux/ptrace.h> header file. */
102#cmakedefine HAVE_LINUX_PTRACE_H
103
104/* Define if this is Linux that has SIGEV_THREAD_ID */
105#cmakedefine01 HAVE_LINUX_SIGEV_THREAD_ID
106
107/* Define to 1 if you have the <malloc.h> header file. */
108#cmakedefine HAVE_MALLOC_H
109
110/* Define to 1 if you have the <malloc/malloc.h> header file. */
111#cmakedefine HAVE_MALLOC_MALLOC_H
112
113/* Define to 1 if you have the <memory.h> header file. */
114#cmakedefine HAVE_MEMORY_H
115
116/* Define to 1 if you have a working `mmap' system call. */
117#cmakedefine HAVE_MMAP
118
119/* Define to 1 if you have the <poll.h> header file. */
120#cmakedefine HAVE_POLL_H
121
122/* define if libc has program_invocation_name */
123#cmakedefine HAVE_PROGRAM_INVOCATION_NAME
124
125/* Define if you have POSIX threads libraries and header files. */
126#cmakedefine HAVE_PTHREAD
127
128/* defined to 1 if pthread symbols are exposed even without include pthread.h
129 */
130#cmakedefine HAVE_PTHREAD_DESPITE_ASKING_FOR
131
132/* Define to 1 if you have the <pwd.h> header file. */
133#cmakedefine HAVE_PWD_H
134
135/* Define to 1 if you have the `sbrk' function. */
136#cmakedefine HAVE_SBRK
137
138/* Define to 1 if you have the <sched.h> header file. */
139#cmakedefine HAVE_SCHED_H
140
141/* Define to 1 if you have the <stdint.h> header file. */
142#cmakedefine HAVE_STDINT_H
143
144/* Define to 1 if you have the <stdlib.h> header file. */
145#cmakedefine HAVE_STDLIB_H 1
146
147/* Define to 1 if you have the <strings.h> header file. */
148#cmakedefine HAVE_STRINGS_H
149
150/* Define to 1 if you have the <string.h> header file. */
151#cmakedefine HAVE_STRING_H
152
153/* Define to 1 if the system has the type `struct mallinfo'. */
154#cmakedefine HAVE_STRUCT_MALLINFO
155
156/* Define to 1 if you have the <sys/cdefs.h> header file. */
157#cmakedefine HAVE_SYS_CDEFS_H
158
159/* Define to 1 if you have the <sys/malloc.h> header file. */
160#cmakedefine HAVE_SYS_MALLOC_H
161
162/* Define to 1 if you have the <sys/prctl.h> header file. */
163#cmakedefine HAVE_SYS_PRCTL_H
164
165/* Define to 1 if you have the <sys/resource.h> header file. */
166#cmakedefine HAVE_SYS_RESOURCE_H
167
168/* Define to 1 if you have the <sys/socket.h> header file. */
169#cmakedefine HAVE_SYS_SOCKET_H
170
171/* Define to 1 if you have the <sys/stat.h> header file. */
172#cmakedefine HAVE_SYS_STAT_H
173
174/* Define to 1 if you have the <sys/syscall.h> header file. */
175#cmakedefine HAVE_SYS_SYSCALL_H
176
177/* Define to 1 if you have the <sys/types.h> header file. */
178#cmakedefine HAVE_SYS_TYPES_H
179
180/* Define to 1 if you have the <sys/ucontext.h> header file. */
181#cmakedefine HAVE_SYS_UCONTEXT_H
182
183/* Define to 1 if you have the <sys/wait.h> header file. */
184#cmakedefine HAVE_SYS_WAIT_H
185
186/* Define to 1 if compiler supports __thread */
187#cmakedefine HAVE_TLS
188
189/* Define to 1 if you have the <ucontext.h> header file. */
190#cmakedefine HAVE_UCONTEXT_H
191
192/* Define to 1 if you have the <unistd.h> header file. */
193#cmakedefine HAVE_UNISTD_H
194
195/* Whether <unwind.h> contains _Unwind_Backtrace */
196#cmakedefine HAVE_UNWIND_BACKTRACE
197
198/* Define to 1 if you have the <unwind.h> header file. */
199#cmakedefine HAVE_UNWIND_H
200
201/* define if your compiler has __attribute__ */
202#cmakedefine HAVE___ATTRIBUTE__
203
204/* define if your compiler supports alignment of functions */
205#cmakedefine HAVE___ATTRIBUTE__ALIGNED_FN
206
207/* Define to 1 if compiler supports __environ */
208#cmakedefine HAVE___ENVIRON
209
210/* Define to 1 if you have the `__sbrk' function. */
211#cmakedefine HAVE___SBRK
212
213/* prefix where we look for installed files */
214#cmakedefine INSTALL_PREFIX
215
216/* Define to 1 if int32_t is equivalent to intptr_t */
217#cmakedefine INT32_EQUALS_INTPTR
218
219/* Define to the sub-directory where libtool stores uninstalled libraries. */
220#cmakedefine LT_OBJDIR
221
222/* Name of package */
223#define PACKAGE "@PROJECT_NAME@"
224
225/* Define to the address where bug reports for this package should be sent. */
226#define PACKAGE_BUGREPORT "gperftools@googlegroups.com"
227
228/* Define to the full name of this package. */
229#define PACKAGE_NAME "@PROJECT_NAME@"
230
231/* Define to the full name and version of this package. */
232#define PACKAGE_STRING "@PROJECT_NAME@ @PROJECT_VERSION@"
233
234/* Define to the one symbol short name of this package. */
235#define PACKAGE_TARNAME "@PROJECT_NAME@"
236
237/* Define to the home page for this package. */
238#cmakedefine PACKAGE_URL
239
240/* Define to the version of this package. */
241#define PACKAGE_VERSION "@PROJECT_VERSION@"
242
243/* How to access the PC from a struct ucontext */
244#define PC_FROM_UCONTEXT @PC_FROM_UCONTEXT_DEF@
245
246/* Always the empty-string on non-windows systems. On windows, should be
247 "__declspec(dllexport)". This way, when we compile the dll, we export our
248 functions/classes. It's safe to define this here because config.h is only
249 used internally, to compile the DLL, and every DLL source file #includes
250 "config.h" before anything else. */
251#ifndef WIN32
252#cmakedefine WIN32
253#endif
254#if defined(WIN32)
255#ifndef PERFTOOLS_DLL_DECL
256# define PERFTOOLS_IS_A_DLL 1
257# define PERFTOOLS_DLL_DECL __declspec(dllexport)
258# define PERFTOOLS_DLL_DECL_FOR_UNITTESTS __declspec(dllimport)
259#endif
260#else
261#ifndef PERFTOOLS_DLL_DECL
262# define PERFTOOLS_DLL_DECL
263# define PERFTOOLS_DLL_DECL_FOR_UNITTESTS
264#endif
265#endif
266
267/* Mark the systems where we know it's bad if pthreads runs too
268 early before main (before threads are initialized, presumably). */
269#ifdef __FreeBSD__
270#define PTHREADS_CRASHES_IF_RUN_TOO_EARLY 1
271#endif
272
273/* Define to necessary symbol if this constant uses a non-standard name on
274 your system. */
275#define PTHREAD_CREATE_JOINABLE @PTHREAD_CREATE_JOINABLE@
276
277/* Define to 1 if you have the ANSI C header files. */
278#define STDC_HEADERS 1
279
280/* Define 8 bytes of allocation alignment for tcmalloc */
281#cmakedefine TCMALLOC_ALIGN_8BYTES
282
283/* Define internal page size for tcmalloc as number of left bitshift */
284#cmakedefine TCMALLOC_PAGE_SIZE_SHIFT
285
286/* Version number of package */
287#define VERSION @PROJECT_VERSION@
288
289/* C99 says: define this to get the PRI... macros from stdint.h */
290#ifndef __STDC_FORMAT_MACROS
291# define __STDC_FORMAT_MACROS 1
292#endif
293
294// ---------------------------------------------------------------------
295// Extra stuff not found in config.h.in
296#if defined(WIN32)
297
298// This must be defined before the windows.h is included. We need at
299// least 0x0400 for mutex.h to have access to TryLock, and at least
300// 0x0501 for patch_functions.cc to have access to GetModuleHandleEx.
301// (This latter is an optimization we could take out if need be.)
302#ifndef _WIN32_WINNT
303# define _WIN32_WINNT 0x0501
304#endif
305
306// We want to make sure not to ever try to #include heap-checker.h
307#define NO_HEAP_CHECK 1
308
309// TODO(csilvers): include windows/port.h in every relevant source file instead?
310#include "windows/port.h"
311
312#endif
313#endif /* GOOGLE_PERFTOOLS_WINDOWS_CONFIG_H_ */