From e8114f1b53765d79760ade77c8d3f736a1efc2d4 Mon Sep 17 00:00:00 2001 From: Benjamin Smedberg Date: Mon, 19 Oct 2009 09:55:03 -0400 Subject: [PATCH] Bug 523097 - Turn off MOZ_IPC for platforms where we currently don't build, and fix up ifdefs so that everything builds --HG-- extra : rebase_source : 9da68ad54e7c378a4c9bbaac7b2166630827ec60 --- configure.in | 13 ++++++++----- js/src/xpconnect/shell/xpcshell.cpp | 2 ++ netwerk/build/Makefile.in | 8 +++++++- netwerk/protocol/http/src/Makefile.in | 11 +++++++++-- toolkit/xre/nsEmbedFunctions.cpp | 19 +++++++++++++------ 5 files changed, 39 insertions(+), 14 deletions(-) diff --git a/configure.in b/configure.in index c501c40e2a6e..61b1add2f080 100644 --- a/configure.in +++ b/configure.in @@ -5246,7 +5246,10 @@ dnl ======================================================== MOZ_IPC=1 case "${target}" in -powerpc-apple-darwin*) +*-apple-darwin*) + MOZ_IPC= + ;; +*wince) MOZ_IPC= ;; esac @@ -5256,10 +5259,6 @@ MOZ_ARG_DISABLE_BOOL(ipc, 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 @@ -7271,6 +7270,10 @@ 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 diff --git a/js/src/xpconnect/shell/xpcshell.cpp b/js/src/xpconnect/shell/xpcshell.cpp index dc7945c0d450..c80a266531e7 100644 --- a/js/src/xpconnect/shell/xpcshell.cpp +++ b/js/src/xpconnect/shell/xpcshell.cpp @@ -117,8 +117,10 @@ #include "nsICrashReporter.h" #endif +#ifdef MOZ_IPC using mozilla::dom::ContentProcessParent; using mozilla::ipc::TestShellParent; +#endif class XPCShellDirProvider : public nsIDirectoryServiceProvider2 { diff --git a/netwerk/build/Makefile.in b/netwerk/build/Makefile.in index 0c41be8b9fea..11d690a1a348 100644 --- a/netwerk/build/Makefile.in +++ b/netwerk/build/Makefile.in @@ -63,7 +63,13 @@ SHARED_LIBRARY_LIBS = \ ../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) diff --git a/netwerk/protocol/http/src/Makefile.in b/netwerk/protocol/http/src/Makefile.in index 09c111042071..5bab0bc77093 100644 --- a/netwerk/protocol/http/src/Makefile.in +++ b/netwerk/protocol/http/src/Makefile.in @@ -46,12 +46,14 @@ 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 \ @@ -72,10 +74,15 @@ CPPSRCS = \ 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 diff --git a/toolkit/xre/nsEmbedFunctions.cpp b/toolkit/xre/nsEmbedFunctions.cpp index 3a2f7fd45bfc..c0e15990fd73 100644 --- a/toolkit/xre/nsEmbedFunctions.cpp +++ b/toolkit/xre/nsEmbedFunctions.cpp @@ -35,7 +35,9 @@ * * ***** END LICENSE BLOCK ***** */ +#ifdef MOZ_IPC #include "base/basictypes.h" +#endif #include "nsXULAppAPI.h" @@ -323,12 +325,6 @@ XRE_InitChildProcess(int aArgc, return NS_OK; } -GeckoProcessType -XRE_GetProcessType() -{ - return sChildProcessType; -} - MessageLoop* XRE_GetIOMessageLoop() { @@ -521,4 +517,15 @@ XRE_SendTestShellCommand(JSContext* aCx, return true; } +#endif // MOZ_IPC + +GeckoProcessType +XRE_GetProcessType() +{ +#ifdef MOZ_IPC + return sChildProcessType; +#else + return GeckoProcessType_Default; #endif +} +