Commit f48a28d1 by Wink Saville Committed by Dominic Hamon

Do not let StrCat be renamed to lstrcatA (#546)

On Windows the Shlwapi.h file has a macro: #define StrCat lstrcatA And benchmark/src/string_util.h defines StrCat and it is renamed to lstrcatA if we don't undef the macro in Shlwapi.h. This is an innocuous bug if string_util.h is included after Shlwapi.h, but it is a compile error if string_util.h is included before Shlwapi.h. This fixes issue #545.
parent 69a52cff
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#ifdef BENCHMARK_OS_WINDOWS #ifdef BENCHMARK_OS_WINDOWS
#include <Shlwapi.h> #include <Shlwapi.h>
#undef StrCat // Don't let StrCat in string_util.h be renamed to lstrcatA
#include <VersionHelpers.h> #include <VersionHelpers.h>
#include <Windows.h> #include <Windows.h>
#else #else
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#ifdef BENCHMARK_OS_WINDOWS #ifdef BENCHMARK_OS_WINDOWS
#include <Shlwapi.h> #include <Shlwapi.h>
#undef StrCat // Don't let StrCat in string_util.h be renamed to lstrcatA
#include <VersionHelpers.h> #include <VersionHelpers.h>
#include <Windows.h> #include <Windows.h>
#else #else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment