Austin Schuh | 745610d | 2015-09-06 18:19:50 -0700 | [diff] [blame] | 1 | /* A manual version of config.h fit for windows machines. |
| 2 | * |
| 3 | * Use of this source code is governed by a BSD-style license that can |
| 4 | * be found in the LICENSE file. |
| 5 | */ |
| 6 | |
| 7 | /* Sometimes we accidentally #include this config.h instead of the one |
| 8 | in .. -- this is particularly true for msys/mingw, which uses the |
| 9 | unix config.h but also runs code in the windows directory. |
| 10 | */ |
| 11 | #ifdef __MINGW32__ |
| 12 | #include "../config.h" |
| 13 | #define GOOGLE_PERFTOOLS_WINDOWS_CONFIG_H_ |
| 14 | #endif |
| 15 | |
| 16 | #ifndef GOOGLE_PERFTOOLS_WINDOWS_CONFIG_H_ |
| 17 | #define GOOGLE_PERFTOOLS_WINDOWS_CONFIG_H_ |
| 18 | |
| 19 | /* define this if you are linking tcmalloc statically and overriding the |
| 20 | * default allocators. |
| 21 | * For instructions on how to use this mode, see |
| 22 | * http://groups.google.com/group/google-perftools/browse_thread/thread/41cd3710af85e57b |
| 23 | */ |
| 24 | #undef WIN32_OVERRIDE_ALLOCATORS |
| 25 | |
| 26 | /* Define to 1 if your libc has a snprintf implementation */ |
| 27 | #undef HAVE_SNPRINTF |
| 28 | |
| 29 | /* Define to 1 if compiler supports __builtin_stack_pointer */ |
| 30 | #undef HAVE_BUILTIN_STACK_POINTER |
| 31 | |
| 32 | /* Define to 1 if you have the <conflict-signal.h> header file. */ |
| 33 | #undef HAVE_CONFLICT_SIGNAL_H |
| 34 | |
| 35 | /* Define to 1 if you have the <cygwin/signal.h> header file. */ |
| 36 | #undef HAVE_CYGWIN_SIGNAL_H |
| 37 | |
| 38 | /* Define to 1 if you have the declaration of `cfree', and to 0 if you don't. |
| 39 | */ |
| 40 | #undef HAVE_DECL_CFREE |
| 41 | |
| 42 | /* Define to 1 if you have the declaration of `memalign', and to 0 if you |
| 43 | don't. */ |
| 44 | #undef HAVE_DECL_MEMALIGN |
| 45 | |
| 46 | /* Define to 1 if you have the declaration of `posix_memalign', and to 0 if |
| 47 | you don't. */ |
| 48 | #undef HAVE_DECL_POSIX_MEMALIGN |
| 49 | |
| 50 | /* Define to 1 if you have the declaration of `pvalloc', and to 0 if you |
| 51 | don't. */ |
| 52 | #undef HAVE_DECL_PVALLOC |
| 53 | |
| 54 | /* Define to 1 if you have the declaration of `uname', and to 0 if you don't. |
| 55 | */ |
| 56 | #undef HAVE_DECL_UNAME |
| 57 | |
| 58 | /* Define to 1 if you have the declaration of `valloc', and to 0 if you don't. |
| 59 | */ |
| 60 | #undef HAVE_DECL_VALLOC |
| 61 | |
| 62 | /* Define to 1 if you have the <dlfcn.h> header file. */ |
| 63 | #undef HAVE_DLFCN_H |
| 64 | |
| 65 | /* Define to 1 if the system has the type `Elf32_Versym'. */ |
| 66 | #undef HAVE_ELF32_VERSYM |
| 67 | |
| 68 | /* Define to 1 if you have the <execinfo.h> header file. */ |
| 69 | #undef HAVE_EXECINFO_H |
| 70 | |
| 71 | /* Define to 1 if you have the <fcntl.h> header file. */ |
| 72 | #undef HAVE_FCNTL_H |
| 73 | |
| 74 | /* Define to 1 if you have the <features.h> header file. */ |
| 75 | #undef HAVE_FEATURES_H |
| 76 | |
| 77 | /* Define to 1 if you have the `geteuid' function. */ |
| 78 | #undef HAVE_GETEUID |
| 79 | |
| 80 | /* Define to 1 if you have the `getpagesize' function. */ |
| 81 | #define HAVE_GETPAGESIZE 1 /* we define it in windows/port.cc */ |
| 82 | |
| 83 | /* Define to 1 if you have the <glob.h> header file. */ |
| 84 | #undef HAVE_GLOB_H |
| 85 | |
| 86 | /* Define to 1 if you have the <grp.h> header file. */ |
| 87 | #undef HAVE_GRP_H |
| 88 | |
| 89 | /* Define to 1 if you have the <inttypes.h> header file. */ |
| 90 | #undef HAVE_INTTYPES_H |
| 91 | |
| 92 | /* Define to 1 if you have the <libunwind.h> header file. */ |
| 93 | #undef HAVE_LIBUNWIND_H |
| 94 | |
| 95 | /* Define to 1 if you have the <linux/ptrace.h> header file. */ |
| 96 | #undef HAVE_LINUX_PTRACE_H |
| 97 | |
| 98 | /* Define to 1 if you have the <malloc.h> header file. */ |
| 99 | #define HAVE_MALLOC_H 1 |
| 100 | |
| 101 | /* Define to 1 if you have the <malloc/malloc.h> header file. */ |
| 102 | #undef HAVE_MALLOC_MALLOC_H |
| 103 | |
| 104 | /* Define to 1 if you have the <memory.h> header file. */ |
| 105 | #undef HAVE_MEMORY_H |
| 106 | |
| 107 | /* Define to 1 if you have a working `mmap' system call. */ |
| 108 | #undef HAVE_MMAP |
| 109 | |
| 110 | /* define if the compiler implements namespaces */ |
| 111 | #define HAVE_NAMESPACES 1 |
| 112 | |
| 113 | /* Define to 1 if you have the <poll.h> header file. */ |
| 114 | #undef HAVE_POLL_H |
| 115 | |
| 116 | /* define if libc has program_invocation_name */ |
| 117 | #undef HAVE_PROGRAM_INVOCATION_NAME |
| 118 | |
| 119 | /* Define if you have POSIX threads libraries and header files. */ |
| 120 | #undef HAVE_PTHREAD |
| 121 | |
| 122 | /* Define to 1 if you have the <pwd.h> header file. */ |
| 123 | #undef HAVE_PWD_H |
| 124 | |
| 125 | /* Define to 1 if you have the `sbrk' function. */ |
| 126 | #undef HAVE_SBRK |
| 127 | |
| 128 | /* Define to 1 if you have the <sched.h> header file. */ |
| 129 | #undef HAVE_SCHED_H |
| 130 | |
| 131 | /* Define to 1 if you have the <stdint.h> header file. */ |
| 132 | #undef HAVE_STDINT_H |
| 133 | |
| 134 | /* Define to 1 if you have the <stdlib.h> header file. */ |
| 135 | #define HAVE_STDLIB_H 1 |
| 136 | |
| 137 | /* Define to 1 if you have the <strings.h> header file. */ |
| 138 | #undef HAVE_STRINGS_H |
| 139 | |
| 140 | /* Define to 1 if you have the <string.h> header file. */ |
| 141 | #define HAVE_STRING_H 1 |
| 142 | |
| 143 | /* Define to 1 if the system has the type `struct mallinfo'. */ |
| 144 | #undef HAVE_STRUCT_MALLINFO |
| 145 | |
| 146 | /* Define to 1 if you have the <sys/cdefs.h> header file. */ |
| 147 | #undef HAVE_SYS_CDEFS_H |
| 148 | |
| 149 | /* Define to 1 if you have the <sys/malloc.h> header file. */ |
| 150 | #undef HAVE_SYS_MALLOC_H |
| 151 | |
| 152 | /* Define to 1 if you have the <sys/param.h> header file. */ |
| 153 | #undef HAVE_SYS_PARAM_H |
| 154 | |
| 155 | /* Define to 1 if you have the <sys/prctl.h> header file. */ |
| 156 | #undef HAVE_SYS_PRCTL_H |
| 157 | |
| 158 | /* Define to 1 if you have the <sys/resource.h> header file. */ |
| 159 | #undef HAVE_SYS_RESOURCE_H |
| 160 | |
| 161 | /* Define to 1 if you have the <sys/socket.h> header file. */ |
| 162 | #undef HAVE_SYS_SOCKET_H |
| 163 | |
| 164 | /* Define to 1 if you have the <sys/stat.h> header file. */ |
| 165 | #define HAVE_SYS_STAT_H 1 |
| 166 | |
| 167 | /* Define to 1 if you have the <sys/syscall.h> header file. */ |
| 168 | #undef HAVE_SYS_SYSCALL_H |
| 169 | |
| 170 | /* Define to 1 if you have the <sys/types.h> header file. */ |
| 171 | #define HAVE_SYS_TYPES_H 1 |
| 172 | |
| 173 | /* <sys/ucontext.h> is broken on redhat 7 */ |
| 174 | #undef HAVE_SYS_UCONTEXT_H |
| 175 | |
| 176 | /* Define to 1 if you have the <sys/wait.h> header file. */ |
| 177 | #undef HAVE_SYS_WAIT_H |
| 178 | |
| 179 | /* Define to 1 if compiler supports __thread */ |
| 180 | #define HAVE_TLS 1 |
| 181 | |
| 182 | /* Define to 1 if you have the <ucontext.h> header file. */ |
| 183 | #undef HAVE_UCONTEXT_H |
| 184 | |
| 185 | /* Define to 1 if you have the <unistd.h> header file. */ |
| 186 | #undef HAVE_UNISTD_H |
| 187 | |
| 188 | /* Define to 1 if you have the <unwind.h> header file. */ |
| 189 | #undef HAVE_UNWIND_H |
| 190 | |
| 191 | /* Define to 1 if you have the <valgrind.h> header file. */ |
| 192 | #undef HAVE_VALGRIND_H |
| 193 | |
| 194 | /* define if your compiler has __attribute__ */ |
| 195 | #undef HAVE___ATTRIBUTE__ |
| 196 | |
| 197 | /* Define to 1 if compiler supports __environ */ |
| 198 | #undef HAVE___ENVIRON |
| 199 | |
| 200 | /* Define to 1 if the system has the type `__int64'. */ |
| 201 | #define HAVE___INT64 1 |
| 202 | |
| 203 | /* prefix where we look for installed files */ |
| 204 | #undef INSTALL_PREFIX |
| 205 | |
| 206 | /* Define to 1 if int32_t is equivalent to intptr_t */ |
| 207 | #undef INT32_EQUALS_INTPTR |
| 208 | |
| 209 | /* Define to the sub-directory in which libtool stores uninstalled libraries. |
| 210 | */ |
| 211 | #undef LT_OBJDIR |
| 212 | |
| 213 | /* Define to 'volatile' if __malloc_hook is declared volatile */ |
| 214 | #undef MALLOC_HOOK_MAYBE_VOLATILE |
| 215 | |
| 216 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ |
| 217 | #undef NO_MINUS_C_MINUS_O |
| 218 | |
| 219 | /* Name of package */ |
| 220 | #define PACKAGE "gperftools" |
| 221 | |
| 222 | /* Define to the address where bug reports for this package should be sent. */ |
| 223 | #define PACKAGE_BUGREPORT "opensource@google.com" |
| 224 | |
| 225 | /* Define to the full name of this package. */ |
| 226 | #define PACKAGE_NAME "gperftools" |
| 227 | |
| 228 | /* Define to the full name and version of this package. */ |
| 229 | #define PACKAGE_STRING "gperftools 2.4" |
| 230 | |
| 231 | /* Define to the one symbol short name of this package. */ |
| 232 | #define PACKAGE_TARNAME "gperftools" |
| 233 | |
| 234 | /* Define to the home page for this package. */ |
| 235 | #undef PACKAGE_URL |
| 236 | |
| 237 | /* Define to the version of this package. */ |
| 238 | #define PACKAGE_VERSION "2.4" |
| 239 | |
| 240 | /* How to access the PC from a struct ucontext */ |
| 241 | #undef PC_FROM_UCONTEXT |
| 242 | |
| 243 | /* Always the empty-string on non-windows systems. On windows, should be |
| 244 | "__declspec(dllexport)". This way, when we compile the dll, we export our |
| 245 | functions/classes. It's safe to define this here because config.h is only |
| 246 | used internally, to compile the DLL, and every DLL source file #includes |
| 247 | "config.h" before anything else. */ |
| 248 | #ifndef PERFTOOLS_DLL_DECL |
| 249 | # define PERFTOOLS_IS_A_DLL 1 /* not set if you're statically linking */ |
| 250 | # define PERFTOOLS_DLL_DECL __declspec(dllexport) |
| 251 | # define PERFTOOLS_DLL_DECL_FOR_UNITTESTS __declspec(dllimport) |
| 252 | #endif |
| 253 | |
| 254 | /* printf format code for printing a size_t and ssize_t */ |
| 255 | #define PRIdS "Id" |
| 256 | |
| 257 | /* printf format code for printing a size_t and ssize_t */ |
| 258 | #define PRIuS "Iu" |
| 259 | |
| 260 | /* printf format code for printing a size_t and ssize_t */ |
| 261 | #define PRIxS "Ix" |
| 262 | |
| 263 | /* Mark the systems where we know it's bad if pthreads runs too |
| 264 | early before main (before threads are initialized, presumably). */ |
| 265 | #ifdef __FreeBSD__ |
| 266 | #define PTHREADS_CRASHES_IF_RUN_TOO_EARLY 1 |
| 267 | #endif |
| 268 | |
| 269 | /* Define to necessary symbol if this constant uses a non-standard name on |
| 270 | your system. */ |
| 271 | #undef PTHREAD_CREATE_JOINABLE |
| 272 | |
| 273 | /* Define to 1 if you have the ANSI C header files. */ |
| 274 | #define STDC_HEADERS 1 |
| 275 | |
| 276 | /* the namespace where STL code like vector<> is defined */ |
| 277 | #define STL_NAMESPACE std |
| 278 | |
| 279 | /* Version number of package */ |
| 280 | #undef VERSION |
| 281 | |
| 282 | /* C99 says: define this to get the PRI... macros from stdint.h */ |
| 283 | #ifndef __STDC_FORMAT_MACROS |
| 284 | # define __STDC_FORMAT_MACROS 1 |
| 285 | #endif |
| 286 | |
| 287 | /* Define to `__inline__' or `__inline' if that's what the C compiler |
| 288 | calls it, or to nothing if 'inline' is not supported under any name. */ |
| 289 | #ifndef __cplusplus |
| 290 | #undef inline |
| 291 | #endif |
| 292 | |
| 293 | // --------------------------------------------------------------------- |
| 294 | // Extra stuff not found in config.h.in |
| 295 | |
| 296 | // This must be defined before the windows.h is included. We need at |
| 297 | // least 0x0400 for mutex.h to have access to TryLock, and at least |
| 298 | // 0x0501 for patch_functions.cc to have access to GetModuleHandleEx. |
| 299 | // (This latter is an optimization we could take out if need be.) |
| 300 | #ifndef _WIN32_WINNT |
| 301 | # define _WIN32_WINNT 0x0501 |
| 302 | #endif |
| 303 | |
| 304 | // We want to make sure not to ever try to #include heap-checker.h |
| 305 | #define NO_HEAP_CHECK 1 |
| 306 | |
| 307 | // TODO(csilvers): include windows/port.h in every relevant source file instead? |
| 308 | #include "windows/port.h" |
| 309 | |
| 310 | #endif /* GOOGLE_PERFTOOLS_WINDOWS_CONFIG_H_ */ |