From f254b56ec281ab276b080bae2b9947fa34ca418f Mon Sep 17 00:00:00 2001 From: "dbradley%netscape.com" Date: Wed, 30 Apr 2003 04:13:58 +0000 Subject: [PATCH] bug 203362 - Turn on building IDispatch code by default. r=bryner, sr=alecf, a=sspitzer, IsEqualGUID patch r=dbradley, sr=alecf, a=asa git-svn-id: svn://10.0.0.236/trunk@141960 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/configure.in | 22 +++++++++---------- .../browser/activex/src/plugin/Makefile.in | 4 +++- .../js/src/xpconnect/src/XPCDispTearOff.cpp | 16 +++++++++++++- 3 files changed, 28 insertions(+), 14 deletions(-) diff --git a/mozilla/configure.in b/mozilla/configure.in index 887ff2b7ba5..97b66319a95 100644 --- a/mozilla/configure.in +++ b/mozilla/configure.in @@ -3730,10 +3730,13 @@ dnl ======================================================== dnl ActiveX dnl ======================================================== MOZ_NO_ACTIVEX_SUPPORT=1 - +MOZ_ACTIVEX_SCRIPTING_SUPPORT= case "$target_os" in msvc*|mks*|cygwin*|mingw*) - MOZ_NO_ACTIVEX_SUPPORT= + if test -z "$GNU_CC"; then + MOZ_NO_ACTIVEX_SUPPORT= + MOZ_ACTIVEX_SCRIPTING_SUPPORT=1 + fi ;; esac @@ -3743,16 +3746,11 @@ MOZ_ARG_DISABLE_BOOL(activex, MOZ_NO_ACTIVEX_SUPPORT= ) AC_SUBST(MOZ_NO_ACTIVEX_SUPPORT) -MOZ_ACTIVEX_SCRIPTING_SUPPORT= - -if test -n "$_WIN32_MSVC"; then - MOZ_ARG_ENABLE_BOOL(activex-scripting, - [ --enable-activex-scripting - Enable building of ActiveX scripting - and plugin support (win32 only)], - MOZ_ACTIVEX_SCRIPTING_SUPPORT=1, - MOZ_ACTIVEX_SCRIPTING_SUPPORT=) -fi +MOZ_ARG_DISABLE_BOOL(activex-scripting, +[ --disable-activex-scripting + Disable building of ActiveX scripting support (win32)], + MOZ_ACTIVEX_SCRIPTING_SUPPORT=, + MOZ_ACTIVEX_SCRIPTING_SUPPORT=1) AC_SUBST(MOZ_ACTIVEX_SCRIPTING_SUPPORT) if test -n "$MOZ_NO_ACTIVEX_SUPPORT" -a -n "$MOZ_ACTIVEX_SCRIPTING_SUPPORT"; diff --git a/mozilla/embedding/browser/activex/src/plugin/Makefile.in b/mozilla/embedding/browser/activex/src/plugin/Makefile.in index cb3f4fcd65b..8e412405fe2 100644 --- a/mozilla/embedding/browser/activex/src/plugin/Makefile.in +++ b/mozilla/embedding/browser/activex/src/plugin/Makefile.in @@ -226,6 +226,7 @@ install-securitypolicy: nsAxSecurityPolicy.js install-prefs: activex.js $(INSTALL) $< $(DIST)/bin/defaults/pref +ifdef MOZ_USE_ACTIVEX_PLUGIN libs:: install-plugin install-prefs ifdef MOZ_ACTIVEX_PLUGIN_LIVECONNECT @@ -239,6 +240,7 @@ endif ifdef XPC_IDISPATCH_SUPPORT libs:: install-securitypolicy endif +endif ## Note: Ensure you create the redist dir containing the correct runtime dlls @@ -254,7 +256,7 @@ ifdef MOZ_ACTIVEX_PLUGIN_XPCONNECT $(ZIP) -9 -j $(DIST)/bin/$(XPIFILE) $(XPIDL_GEN_DIR)/nsIMozAxPlugin.xpt endif -$(SHARED_LIBRARY) : $(DEFFILE) copy-sources +$(SHARED_LIBRARY) : $(DEFFILE) $(DEFFILE): -rm -f $@ diff --git a/mozilla/js/src/xpconnect/src/XPCDispTearOff.cpp b/mozilla/js/src/xpconnect/src/XPCDispTearOff.cpp index 3c860d790f0..0360663557a 100644 --- a/mozilla/js/src/xpconnect/src/XPCDispTearOff.cpp +++ b/mozilla/js/src/xpconnect/src/XPCDispTearOff.cpp @@ -138,6 +138,20 @@ XPCDispatchTearOff::~XPCDispatchTearOff() NS_COM_IMPL_ADDREF(XPCDispatchTearOff) NS_COM_IMPL_RELEASE(XPCDispatchTearOff) +// See bug 127982: +// +// Microsoft's InlineIsEqualGUID global function is multiply defined +// in ATL and/or SDKs with varying namespace requirements. To save the control +// from future grief, this method is used instead. +static inline BOOL _IsEqualGUID(REFGUID rguid1, REFGUID rguid2) +{ + return ( + ((PLONG) &rguid1)[0] == ((PLONG) &rguid2)[0] && + ((PLONG) &rguid1)[1] == ((PLONG) &rguid2)[1] && + ((PLONG) &rguid1)[2] == ((PLONG) &rguid2)[2] && + ((PLONG) &rguid1)[3] == ((PLONG) &rguid2)[3]); +} + STDMETHODIMP XPCDispatchTearOff::InterfaceSupportsErrorInfo(REFIID riid) { static const IID* arr[] = @@ -147,7 +161,7 @@ STDMETHODIMP XPCDispatchTearOff::InterfaceSupportsErrorInfo(REFIID riid) for(int i=0;i