aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-11 20:04:08 +0000
committerGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-11 20:04:08 +0000
commit85302969fcf0860d451b0748da372571b2fc9f88 (patch)
tree3f04bf525f8a73dfdea2ca923c5324f85877e54a /src
parent72e8324f0edca547c72e7e1fc548e9f72b612eb2 (diff)
Try to work around VS2010 intsafe/stdint multiple define issues.
git-svn-id: http://skia.googlecode.com/svn/trunk@11744 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r--src/ports/SkImageDecoder_WIC.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/ports/SkImageDecoder_WIC.cpp b/src/ports/SkImageDecoder_WIC.cpp
index 7b2ae9e7ed..5a94b2d1e8 100644
--- a/src/ports/SkImageDecoder_WIC.cpp
+++ b/src/ports/SkImageDecoder_WIC.cpp
@@ -6,9 +6,27 @@
* found in the LICENSE file.
*/
+#include "SkTypes.h"
+
+// Workaround for:
+// http://connect.microsoft.com/VisualStudio/feedback/details/621653/
+// http://crbug.com/225822
+// In VS2010 both intsafe.h and stdint.h define the following without guards.
+// SkTypes brought in windows.h and stdint.h and the following defines are
+// not used by this file. However, they may be re-introduced by wincodec.h.
+#undef INT8_MIN
+#undef INT16_MIN
+#undef INT32_MIN
+#undef INT64_MIN
+#undef INT8_MAX
+#undef UINT8_MAX
+#undef INT16_MAX
+#undef UINT16_MAX
+#undef INT32_MAX
+#undef UINT32_MAX
+#undef INT64_MAX
+#undef UINT64_MAX
-#define WIN32_LEAN_AND_MEAN
-#include <Windows.h>
#include <wincodec.h>
#include "SkAutoCoInitialize.h"
#include "SkImageDecoder.h"