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