diff options
Diffstat (limited to 'src/utilities.h')
-rw-r--r-- | src/utilities.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/utilities.h b/src/utilities.h index 101ca64..be2cff4 100644 --- a/src/utilities.h +++ b/src/utilities.h @@ -99,6 +99,8 @@ // malloc() from the unwinder. This is a problem because we're // trying to use the unwinder to instrument malloc(). // +// 4) The Windows API CaptureStackTrace. +// // Note: if you add a new implementation here, make sure it works // correctly when GetStackTrace() is called with max_depth == 0. // Some code may do that. @@ -112,6 +114,8 @@ # define STACKTRACE_H "stacktrace_x86_64-inl.h" # elif (defined(__ppc__) || defined(__PPC__)) && __GNUC__ >= 2 # define STACKTRACE_H "stacktrace_powerpc-inl.h" +# elif defined(OS_WINDOWS) +# define STACKTRACE_H "stacktrace_windows-inl.h" # endif #endif @@ -129,6 +133,9 @@ #elif defined(OS_MACOSX) && defined(HAVE_DLADDR) // Use dladdr to symbolize. # define HAVE_SYMBOLIZE +#elif defined(OS_WINDOWS) +// Use DbgHelp to symbolize +# define HAVE_SYMBOLIZE #endif #ifndef ARRAYSIZE @@ -143,6 +150,9 @@ namespace glog_internal_namespace_ { #ifdef HAVE___ATTRIBUTE__ # define ATTRIBUTE_NOINLINE __attribute__ ((noinline)) # define HAVE_ATTRIBUTE_NOINLINE +#elif defined(OS_WINDOWS) +# define ATTRIBUTE_NOINLINE __declspec(noinline) +# define HAVE_ATTRIBUTE_NOINLINE #else # define ATTRIBUTE_NOINLINE #endif |