From 7386551ac262463351e20de147aad0f8c93baa9c Mon Sep 17 00:00:00 2001 From: "tor%cs.brown.edu" Date: Fri, 26 Sep 2003 19:31:18 +0000 Subject: [PATCH] Bug 208461 - midl semantics changed (VC++ .NET 2003). r=bryner --- accessible/public/msaa/Makefile.in | 6 ++--- config/autoconf.mk.in | 1 + configure.in | 22 +++++++++++++++++-- .../browser/activex/src/control/Makefile.in | 2 +- .../extensions/palmsync/build/Makefile.in | 2 +- mailnews/mapi/mapihook/build/Makefile.in | 4 ++-- 6 files changed, 28 insertions(+), 9 deletions(-) diff --git a/accessible/public/msaa/Makefile.in b/accessible/public/msaa/Makefile.in index 6dd5594f10e1..9b50d38055d2 100755 --- a/accessible/public/msaa/Makefile.in +++ b/accessible/public/msaa/Makefile.in @@ -94,9 +94,9 @@ OS_LIBS = \ $(MIDL_GENERATED_FILES): done_gen done_gen: ISimpleDOMNode.idl ISimpleDOMDocument.idl ISimpleDOMText.idl - $(MIDL) $(srcdir)/ISimpleDOMNode.idl - $(MIDL) $(srcdir)/ISimpleDOMDocument.idl - $(MIDL) $(srcdir)/ISimpleDOMText.idl + $(MIDL) $(MIDL_FLAGS) $(srcdir)/ISimpleDOMNode.idl + $(MIDL) $(MIDL_FLAGS) $(srcdir)/ISimpleDOMDocument.idl + $(MIDL) $(MIDL_FLAGS) $(srcdir)/ISimpleDOMText.idl touch $@ EXPORTS = \ diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in index e7802c6207fc..8be81c9f924b 100644 --- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -202,6 +202,7 @@ IMPLIB = @IMPLIB@ FILTER = @FILTER@ BIN_FLAGS = @BIN_FLAGS@ MIDL = @MIDL@ +MIDL_FLAGS = @MIDL_FLAGS@ DLL_PREFIX = @DLL_PREFIX@ LIB_PREFIX = @LIB_PREFIX@ diff --git a/configure.in b/configure.in index f563da7bdb21..05fbf095594c 100644 --- a/configure.in +++ b/configure.in @@ -361,8 +361,24 @@ case "$target" in _MIDL_MAJOR_VERSION=`echo ${_MIDL_FULL_VERSION} | $AWK -F\. '{ print $ 1 }'` _MIDL_MINOR_VERSION=`echo ${_MIDL_FULL_VERSION} | $AWK -F\. '{ print $ 2 }'` _MIDL_REV_VERSION=`echo ${_MIDL_FULL_VERSION} | $AWK -F\. '{ print $ 3 }'` - if test "$_MIDL_MAJOR_VERSION" != "5" -a "$_MIDL_FULL_VERSION" != "6.00.0347"; then - AC_MSG_ERROR([Midl version $_MIDL_FULL_VERSION was found. Midl version must be 5.x.x (VC6*) or 6.00.0347 (VC7).]) + if test "$_MIDL_MAJOR_VERSION" != "5" -a "$_MIDL_FULL_VERSION" != "6.00.0347" -a "$_MIDL_FULL_VERSION" != "6.00.0361"; then + AC_MSG_ERROR([Midl version $_MIDL_FULL_VERSION was found. Midl version must be 5.x.x (VC6*) or 6.00.0347 (VC7) or 6.00.0361 (VC.net 2003).]) + fi + + # Add flags if necessary + AC_MSG_CHECKING([for midl flags]) + if test \( "$_MIDL_MAJOR_VERSION" -gt "6" \) -o \( "$_MIDL_MAJOR_VERSION" = "6" -a "$_MIDL_MINOR_VERSION" -gt "0" \) -o \( "$_MIDL_MAJOR_VERSION" = "6" -a "$_MIDL_MINOR_VERSION" = "00" -a "$_MIDL_REV_VERSION" -gt "359" \); then + # Starting with MIDL version 6.0.359, the MIDL compiler + # generates /Oicf /robust stubs by default, which is not + # compatible with versions of Windows older than Win2k. + # This switches us back to the old behaviour. When we drop + # support for Windows older than Win2k, we should remove + # this. + MIDL_FLAGS="${MIDL_FLAGS} /no_robust" + AC_MSG_RESULT([need /no_robust]) + else + MIDL_FLAGS="${MIDL_FLAGS}" + AC_MSG_RESULT([none needed]) fi else # Check w32api version @@ -403,6 +419,8 @@ case "$target" in ;; esac +AC_SUBST(MIDL_FLAGS) + if test -n "$_WIN32_MSVC"; then SKIP_PATH_CHECKS=1 SKIP_COMPILER_CHECKS=1 diff --git a/embedding/browser/activex/src/control/Makefile.in b/embedding/browser/activex/src/control/Makefile.in index b2a555d77521..cdce31d0319c 100644 --- a/embedding/browser/activex/src/control/Makefile.in +++ b/embedding/browser/activex/src/control/Makefile.in @@ -112,7 +112,7 @@ $(DEFFILE): mkctldef.sh $(srcdir)/mkctldef.sh $@ done_gen: MozillaControl.idl - $(MIDL) /Oicf /h MozillaControl.h /iid MozillaControl_i.c $(srcdir)/MozillaControl.idl + $(MIDL) $(MIDL_FLAGS) /Oicf /h MozillaControl.h /iid MozillaControl_i.c $(srcdir)/MozillaControl.idl touch $@ $(MIDL_GENERATED_FILES): done_gen diff --git a/mailnews/extensions/palmsync/build/Makefile.in b/mailnews/extensions/palmsync/build/Makefile.in index 19bb7d7d1676..2a1b521f2efb 100644 --- a/mailnews/extensions/palmsync/build/Makefile.in +++ b/mailnews/extensions/palmsync/build/Makefile.in @@ -60,7 +60,7 @@ $(MIDL_GENERATED_FILES): done_gen done_gen: IPalmSync.idl $(RM) $(SRCDIR_CSRCS) - $(MIDL) $(UNICODE_FLAGS) $(srcdir)/IPalmSync.idl + $(MIDL) $(MIDL_FLAGS) $(UNICODE_FLAGS) $(srcdir)/IPalmSync.idl touch $@ export:: done_gen diff --git a/mailnews/mapi/mapihook/build/Makefile.in b/mailnews/mapi/mapihook/build/Makefile.in index ea200a561f2e..6e611c12f6b6 100644 --- a/mailnews/mapi/mapihook/build/Makefile.in +++ b/mailnews/mapi/mapihook/build/Makefile.in @@ -55,13 +55,13 @@ SRCS_IN_OBJDIR = 1 include $(topsrcdir)/config/rules.mk -DEFINES += -DREGISTER_PROXY_DLL -DUNICODE -D_UNICODE +DEFINES += -DREGISTER_PROXY_DLL -DUNICODE -D_UNICODE -D_WIN32_WINNT=0x400 $(MIDL_GENERATED_FILES): done_gen done_gen: msgMapi.idl $(RM) $(SRCDIR_CSRCS) - $(MIDL) $(UNICODE_FLAGS) $(srcdir)/msgMapi.idl + $(MIDL) $(MIDL_FLAGS) $(UNICODE_FLAGS) $(srcdir)/msgMapi.idl touch $@ export:: done_gen