From 4db9ead7931b61b6a5fc08c7c8c5db6184dd3fd3 Mon Sep 17 00:00:00 2001 From: William Chen Date: Mon, 2 Dec 2013 02:26:11 -0800 Subject: [PATCH] Bug 942217 - Undefine LoadImage to prevent naming conflict on Windows. r=ehsan --- content/base/public/nsContentUtils.h | 5 +++++ content/base/src/nsImageLoadingContent.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/content/base/public/nsContentUtils.h b/content/base/public/nsContentUtils.h index f54e5a173f41..a33f0d2ff16c 100644 --- a/content/base/public/nsContentUtils.h +++ b/content/base/public/nsContentUtils.h @@ -27,6 +27,11 @@ #include "nsMathUtils.h" #include "Units.h" +#if defined(XP_WIN) +// Undefine LoadImage to prevent naming conflict with Windows. +#undef LoadImage +#endif + class imgICache; class imgIContainer; class imgINotificationObserver; diff --git a/content/base/src/nsImageLoadingContent.cpp b/content/base/src/nsImageLoadingContent.cpp index 50e2c7614f2c..8cf824e9912f 100644 --- a/content/base/src/nsImageLoadingContent.cpp +++ b/content/base/src/nsImageLoadingContent.cpp @@ -48,6 +48,11 @@ #include "mozAutoDocUpdate.h" #include "mozilla/dom/Element.h" +#if defined(XP_WIN) +// Undefine LoadImage to prevent naming conflict with Windows. +#undef LoadImage +#endif + using namespace mozilla; #ifdef DEBUG_chb