Bug 523097 - Turn off MOZ_IPC for platforms where we currently don't build, and fix up ifdefs so that everything builds
authorBenjamin Smedberg <benjamin@smedbergs.us>
Mon, 19 Oct 2009 09:55:03 -0400
changeset 35993 b4e0340c74be42a0680bb816c5bc471d811718d9
parent 35992 aa582e9900eff046e024c554c449279f892bf757
child 35994 a8076123b234fb7a8601083502ea1ca003a58c3e
push idunknown
push userunknown
push dateunknown
bugs523097
milestone1.9.3a1pre
Bug 523097 - Turn off MOZ_IPC for platforms where we currently don't build, and fix up ifdefs so that everything builds
configure.in
js/src/xpconnect/shell/xpcshell.cpp
netwerk/build/Makefile.in
netwerk/protocol/http/src/Makefile.in
toolkit/xre/nsEmbedFunctions.cpp
--- a/configure.in
+++ b/configure.in
@@ -5241,30 +5241,29 @@ MOZ_ARG_DISABLE_BOOL(jsd,
 
 
 dnl ========================================================
 dnl = Disable IPC support for tabs and plugins
 dnl ========================================================
 MOZ_IPC=1
 
 case "${target}" in
-powerpc-apple-darwin*)
+*-apple-darwin*)
+    MOZ_IPC=
+    ;;
+*wince)
     MOZ_IPC=
     ;;
 esac
 
 MOZ_ARG_DISABLE_BOOL(ipc,
 [  --disable-ipc           Disable IPC supports for tabs and plugins],
     MOZ_IPC=,
     MOZ_IPC=1)
 
-if test -n "$MOZ_IPC" -a -z "$MOZ_ENABLE_LIBXUL"; then
-    AC_MSG_ERROR([--enable-ipc requires --enable-libxul])
-fi
-
 if test -n "$MOZ_IPC"; then
     AC_DEFINE(MOZ_IPC)
 fi
 
 AC_SUBST(MOZ_IPC)
 
 dnl ========================================================
 dnl = Enable IPDL's "expensive" unit tests
@@ -7266,16 +7265,20 @@ MOZ_ARG_ENABLE_BOOL(libxul,
 if test -n "$MOZ_STATIC_BUILD_UNSUPPORTED" -a -n "$BUILD_STATIC_LIBS"; then
 	AC_MSG_ERROR([--enable-static is not supported for building $MOZ_APP_NAME. You probably want --enable-libxul.])
 fi
 
 if test -n "$MOZ_ENABLE_LIBXUL" -a -n "$BUILD_STATIC_LIBS"; then
 	AC_MSG_ERROR([--enable-libxul is not compatible with --enable-static])
 fi
 
+if test -n "$MOZ_IPC" -a -z "$MOZ_ENABLE_LIBXUL"; then
+    AC_MSG_ERROR([--enable-ipc requires --enable-libxul])
+fi
+
 AC_SUBST(LIBXUL_LIBS)
 
 if test -n "$MOZ_ENABLE_LIBXUL"; then
     XPCOM_LIBS="$LIBXUL_LIBS"
     AC_DEFINE(MOZ_ENABLE_LIBXUL)
 else
     if test -n "$BUILD_STATIC_LIBS"; then
         AC_DEFINE(MOZ_STATIC_BUILD)
--- a/js/src/xpconnect/shell/xpcshell.cpp
+++ b/js/src/xpconnect/shell/xpcshell.cpp
@@ -112,18 +112,20 @@
 #endif
 
 #include "nsIJSContextStack.h"
 
 #ifdef MOZ_CRASHREPORTER
 #include "nsICrashReporter.h"
 #endif
 
+#ifdef MOZ_IPC
 using mozilla::dom::ContentProcessParent;
 using mozilla::ipc::TestShellParent;
+#endif
 
 class XPCShellDirProvider : public nsIDirectoryServiceProvider2
 {
 public:
     NS_DECL_ISUPPORTS_INHERITED
     NS_DECL_NSIDIRECTORYSERVICEPROVIDER
     NS_DECL_NSIDIRECTORYSERVICEPROVIDER2
 
--- a/netwerk/build/Makefile.in
+++ b/netwerk/build/Makefile.in
@@ -58,17 +58,23 @@ SHARED_LIBRARY_LIBS = \
 		../base/src/$(LIB_PREFIX)neckobase_s.$(LIB_SUFFIX) \
 		../dns/src/$(LIB_PREFIX)neckodns_s.$(LIB_SUFFIX) \
 		../socket/base/$(LIB_PREFIX)neckosocket_s.$(LIB_SUFFIX) \
 		../streamconv/src/$(LIB_PREFIX)nkconv_s.$(LIB_SUFFIX) \
 		../streamconv/converters/$(LIB_PREFIX)nkcnvts_s.$(LIB_SUFFIX) \
 		../mime/src/$(LIB_PREFIX)nkmime_s.$(LIB_SUFFIX) \
 		../cache/src/$(LIB_PREFIX)nkcache_s.$(LIB_SUFFIX) \
 		../protocol/about/src/$(LIB_PREFIX)nkabout_s.$(LIB_SUFFIX) \
-		../ipc/$(LIB_PREFIX)neckoipc_s.$(LIB_SUFFIX) \
+		$(NULL)
+
+ifdef MOZ_IPC
+SHARED_LIBRARY_LIBS += ../ipc/$(LIB_PREFIX)neckoipc_s.$(LIB_SUFFIX)
+endif
+
+SHARED_LIBRARY_LIBS += \
 		$(foreach d,$(filter-out about,$(NECKO_PROTOCOLS)), \
 			../protocol/$(d)/src/$(LIB_PREFIX)nk$(d)_s.$(LIB_SUFFIX)) \
 		$(NULL)
 
 ifeq ($(OS_ARCH),WINNT)
     SHARED_LIBRARY_LIBS += \
         ../system/win32/$(LIB_PREFIX)neckosystem_s.$(LIB_SUFFIX)
 endif
--- a/netwerk/protocol/http/src/Makefile.in
+++ b/netwerk/protocol/http/src/Makefile.in
@@ -41,22 +41,24 @@ srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE		= necko
 LIBRARY_NAME = nkhttp_s
 LIBXUL_LIBRARY  = 1
 
+ifdef MOZ_IPC
 EXPORTS_NAMESPACES = mozilla/net
 
 EXPORTS_mozilla/net = \
   HttpChannelParent.h \
   HttpChannelChild.h  \
   $(NULL)
+endif
 
 CPPSRCS		= \
 		nsHttp.cpp \
 		nsHttpHeaderArray.cpp \
 		nsHttpConnectionInfo.cpp \
 		nsHttpConnection.cpp \
 		nsHttpConnectionMgr.cpp \
 		nsHttpRequestHead.cpp \
@@ -67,20 +69,25 @@ CPPSRCS		= \
 		nsHttpBasicAuth.cpp \
 		nsHttpDigestAuth.cpp \
 		nsHttpNTLMAuth.cpp \
 		nsHttpTransaction.cpp \
 		nsHttpHandler.cpp \
 		nsHttpChannel.cpp \
 		nsHttpPipeline.cpp \
 		nsHttpActivityDistributor.cpp \
-		HttpChannelParent.cpp \
-		HttpChannelChild.cpp  \
 		$(NULL)
 
+ifdef MOZ_IPC
+CPPSRCS += \
+  HttpChannelParent.cpp \
+  HttpChannelChild.cpp \
+  $(NULL)
+endif
+
 LOCAL_INCLUDES=-I$(srcdir)/../../../base/src -I$(topsrcdir)/xpcom/ds
 
 # we don't want the shared lib, but we want to force the creation of a
 # static lib.
 FORCE_STATIC_LIB = 1
 
 include $(topsrcdir)/config/config.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
--- a/toolkit/xre/nsEmbedFunctions.cpp
+++ b/toolkit/xre/nsEmbedFunctions.cpp
@@ -30,17 +30,19 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
+#ifdef MOZ_IPC
 #include "base/basictypes.h"
+#endif
 
 #include "nsXULAppAPI.h"
 
 #include <stdlib.h>
 #if defined(MOZ_WIDGET_GTK2)
 #include <glib.h>
 #endif
 
@@ -318,22 +320,16 @@ XRE_InitChildProcess(int aArgc,
     sIOMessageLoop->Run();
 
     sIOMessageLoop = nsnull;
   }
 
   return NS_OK;
 }
 
-GeckoProcessType
-XRE_GetProcessType()
-{
-  return sChildProcessType;
-}
-
 MessageLoop*
 XRE_GetIOMessageLoop()
 {
   if (sChildProcessType == GeckoProcessType_Default) {
     NS_ASSERTION(!sIOMessageLoop, "Shouldn't be set on parent process!");
     return BrowserProcessSubThread::GetMessageLoop(BrowserProcessSubThread::IO);
   }
   return sIOMessageLoop;
@@ -516,9 +512,20 @@ XRE_SendTestShellCommand(JSContext* aCx,
     NS_ENSURE_TRUE(callback, false);
 
     jsval callbackVal = *reinterpret_cast<jsval*>(aCallback);
     NS_ENSURE_TRUE(callback->SetCallback(aCx, callbackVal), false);
 
     return true;
 }
 
+#endif // MOZ_IPC
+
+GeckoProcessType
+XRE_GetProcessType()
+{
+#ifdef MOZ_IPC
+  return sChildProcessType;
+#else
+  return GeckoProcessType_Default;
 #endif
+}
+