config.h 9.3 KB

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