Back out Mike Hommey's patch from bug 305782 due to build bustage.
authorreed@reedloden.com
Sat, 08 Mar 2008 04:33:28 -0800
changeset 12802 681424bc169e7dbc593528b171b4231be830cbff
parent 12801 f0e5547f5eb1dccfb62147fbaaf7389e3b5e41b8
child 12803 4a8c79427b12ff96762b4292c783d4dff00aefed
push idunknown
push userunknown
push dateunknown
bugs305782
milestone1.9b5pre
Back out Mike Hommey's patch from bug 305782 due to build bustage.
config/Makefile.in
config/autoconf.mk.in
config/system-headers
configure.in
extensions/metrics/build/Makefile.in
extensions/metrics/src/Makefile.in
extensions/metrics/test/Makefile.in
other-licenses/bsdiff/Makefile.in
toolkit/mozapps/update/src/updater/Makefile.in
toolkit/mozapps/update/src/updater/updater.cpp
toolkit/toolkit-makefiles.sh
toolkit/toolkit-tiers.mk
--- a/config/Makefile.in
+++ b/config/Makefile.in
@@ -117,17 +117,16 @@ endif
 ifdef WRAP_SYSTEM_INCLUDES
 export::
 	if test ! -d system_wrappers; then mkdir system_wrappers; fi
 	$(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) \
 		-DBUILD_STATIC_LIBS=$(BUILD_STATIC_LIBS) \
 		-DMOZ_TREE_CAIRO=$(MOZ_TREE_CAIRO) \
 		-DMOZ_ENABLE_LIBXUL=$(MOZ_ENABLE_LIBXUL) \
 		-DMOZ_NATIVE_HUNSPELL=$(MOZ_NATIVE_HUNSPELL) \
-		-DMOZ_NATIVE_BZ2=$(MOZ_NATIVE_BZ2) \
 		-DMOZ_NATIVE_ZLIB=$(MOZ_NATIVE_ZLIB) \
 		-DMOZ_NATIVE_PNG=$(MOZ_NATIVE_PNG) \
 		-DMOZ_NATIVE_JPEG=$(MOZ_NATIVE_JPEG) \
 		-DMOZ_NATIVE_LCMS=$(MOZ_NATIVE_LCMS) \
 		$(srcdir)/system-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
 	$(INSTALL) system_wrappers $(DIST)/include
 
 GARBAGE_DIRS += system_wrappers
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -207,17 +207,16 @@ NECKO_SMALL_BUFFERS = @NECKO_SMALL_BUFFE
 NECKO_COOKIES = @NECKO_COOKIES@
 MOZ_AUTH_EXTENSION = @MOZ_AUTH_EXTENSION@
 
 MOZ_NATIVE_HUNSPELL = @SYSTEM_HUNSPELL@
 MOZ_HUNSPELL_LIBS = @MOZ_HUNSPELL_LIBS@
 MOZ_HUNSPELL_CFLAGS = @MOZ_HUNSPELL_CFLAGS@
 
 MOZ_NATIVE_ZLIB	= @SYSTEM_ZLIB@
-MOZ_NATIVE_BZ2	= @SYSTEM_BZ2@
 MOZ_NATIVE_JPEG	= @SYSTEM_JPEG@
 MOZ_NATIVE_PNG	= @SYSTEM_PNG@
 MOZ_TREE_CAIRO = @MOZ_TREE_CAIRO@
 
 MOZ_UPDATE_XTERM = @MOZ_UPDATE_XTERM@
 MOZ_MATHML = @MOZ_MATHML@
 MOZ_PERMISSIONS = @MOZ_PERMISSIONS@
 MOZ_XTF = @MOZ_XTF@
@@ -405,26 +404,16 @@ ZLIB_CFLAGS	= @MOZ_ZLIB_CFLAGS@
 ifdef MOZ_ENABLE_LIBXUL
 MOZ_ZLIB_LIBS = @MOZ_ZLIB_LIBS@
 else
 ZLIB_LIBS = @MOZ_ZLIB_LIBS@
 endif
 ZLIB_REQUIRES	= zlib
 endif
 
-ifdef MOZ_NATIVE_BZ2
-BZ2_CFLAGS	= @BZ2_CFLAGS@
-BZ2_LIBS	= @BZ2_LIBS@
-BZ2_REQUIRES	=
-else
-BZ2_CFLAGS	= @MOZ_BZ2_CFLAGS@
-BZ2_LIBS	= @MOZ_BZ2_LIBS@
-BZ2_REQUIRES	= libbz2
-endif
-
 ifdef MOZ_NATIVE_PNG
 PNG_CFLAGS	= @PNG_CFLAGS@
 PNG_LIBS	= @PNG_LIBS@
 PNG_REQUIRES	=
 else
 PNG_CFLAGS	= @MOZ_PNG_CFLAGS@
 PNG_LIBS	= @MOZ_PNG_LIBS@
 PNG_REQUIRES	= png
--- a/config/system-headers
+++ b/config/system-headers
@@ -966,11 +966,8 @@ libsn/sn-common.h
 libsn/sn-launchee.h
 libsn/sn-launcher.h
 libsn/sn-monitor.h
 libsn/sn-util.h
 #endif
 #if MOZ_NATIVE_HUNSPELL==1
 hunspell.hxx
 #endif
-#if MOZ_NATIVE_BZ2==1
-bzlib.h
-#endif
--- a/configure.in
+++ b/configure.in
@@ -916,18 +916,16 @@ WIN_TOP_SRC=
 MOZ_USER_DIR=".mozilla"
 HOST_AR='$(AR)'
 HOST_AR_FLAGS='$(AR_FLAGS)'
 
 MOZ_JPEG_CFLAGS=
 MOZ_JPEG_LIBS='$(call EXPAND_LIBNAME_PATH,mozjpeg,$(DEPTH)/jpeg)'
 MOZ_ZLIB_CFLAGS=
 MOZ_ZLIB_LIBS='$(call EXPAND_LIBNAME_PATH,mozz,$(DEPTH)/modules/zlib/src)'
-MOZ_BZ2_CFLAGS=
-MOZ_BZ2_LIBS='$(call EXPAND_LIBNAME_PATH,bz2,$(DEPTH)/modules/libbz2/src)'
 MOZ_PNG_CFLAGS=
 MOZ_PNG_LIBS='$(call EXPAND_LIBNAME_PATH,mozpng,$(DEPTH)/modules/libimg/png)'
 
 MOZ_JS_LIBS='-L$(LIBXUL_DIST)/bin -lmozjs'
 DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/bin -lxpcom -lxpcom_core'
 MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin'
 XPCOM_FROZEN_LDOPTS='-L$(LIBXUL_DIST)/bin -lxpcom'
 LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS) -lxul'
@@ -4057,45 +4055,16 @@ CFLAGS=$_SAVE_CFLAGS
 LDFLAGS=$_SAVE_LDFLAGS
 LIBS=$_SAVE_LIBS
 
 if test "${ZLIB_DIR}" -a -d "${ZLIB_DIR}" -a "$SYSTEM_ZLIB" = 1; then
     ZLIB_CFLAGS="-I${ZLIB_DIR}/include"
     ZLIB_LIBS="-L${ZLIB_DIR}/lib ${ZLIB_LIBS}"
 fi
 
-dnl system BZIP2 Support
-dnl ========================================================
-MOZ_ARG_WITH_STRING(system-bz2,
-[  --with-system-bz2[=PFX]
-                          Use system libbz2 [installed at prefix PFX]],
-    BZ2_DIR=$withval)
-
-_SAVE_CFLAGS=$CFLAGS
-_SAVE_LDFLAGS=$LDFLAGS
-_SAVE_LIBS=$LIBS
-if test -n "${BZ2_DIR}" -a "${BZ2_DIR}" != "yes"; then
-    CFLAGS="-I${BZ2_DIR}/include $CFLAGS"
-    LDFLAGS="-L${BZ2_DIR}/lib $LDFLAGS"
-fi
-if test -z "$BZ2_DIR" -o "$BZ2_DIR" = no; then
-    SYSTEM_BZ2=
-else
-    AC_CHECK_LIB(bz2, BZ2_bzread, [SYSTEM_BZ2=1 BZ2_LIBS="-lbz2"],
-	[SYSTEM_BZ2= BZ2_CFLAGS= BZ2_LIBS=], $BZ2_LIBS)
-fi
-CFLAGS=$_SAVE_CFLAGS
-LDFLAGS=$_SAVE_LDFLAGS
-LIBS=$_SAVE_LIBS
-
-if test "${BZ2_DIR}" -a -d "${BZ2_DIR}" -a "$SYSTEM_BZ2" = 1; then
-    BZ2_CFLAGS="-I${BZ2_DIR}/include"
-    BZ2_LIBS="-L${BZ2_DIR}/lib ${MOZ_BZ2_LIBS}"
-fi
-
 dnl system PNG Support
 dnl ========================================================
 MOZ_ARG_WITH_STRING(system-png, 
 [  --with-system-png[=PFX]
                           Use system libpng [installed at prefix PFX]],
     PNG_DIR=$withval)
 
 _SAVE_CFLAGS=$CFLAGS
@@ -7710,33 +7679,28 @@ COMPILE_CXXFLAGS=`echo \
     $_DEFINES_CXXFLAGS \
 	$_DEPEND_CFLAGS \
     $COMPILE_CXXFLAGS`
 
 AC_SUBST(SYSTEM_MAKEDEPEND)
 AC_SUBST(SYSTEM_JPEG)
 AC_SUBST(SYSTEM_PNG)
 AC_SUBST(SYSTEM_ZLIB)
-AC_SUBST(SYSTEM_BZ2)
 
 AC_SUBST(JPEG_CFLAGS)
 AC_SUBST(JPEG_LIBS)
 AC_SUBST(ZLIB_CFLAGS)
 AC_SUBST(ZLIB_LIBS)
-AC_SUBST(BZ2_CFLAGS)
-AC_SUBST(BZ2_LIBS)
 AC_SUBST(PNG_CFLAGS)
 AC_SUBST(PNG_LIBS)
 
 AC_SUBST(MOZ_JPEG_CFLAGS)
 AC_SUBST(MOZ_JPEG_LIBS)
 AC_SUBST(MOZ_ZLIB_CFLAGS)
 AC_SUBST(MOZ_ZLIB_LIBS)
-AC_SUBST(MOZ_BZ2_CFLAGS)
-AC_SUBST(MOZ_BZ2_LIBS)
 AC_SUBST(MOZ_PNG_CFLAGS)
 AC_SUBST(MOZ_PNG_LIBS)
 
 AC_SUBST(NSPR_CFLAGS)
 AC_SUBST(NSPR_LIBS)
 AC_SUBST(MOZ_NATIVE_NSPR)
 
 AC_SUBST(NSS_CFLAGS)
--- a/extensions/metrics/build/Makefile.in
+++ b/extensions/metrics/build/Makefile.in
@@ -56,28 +56,28 @@ REQUIRES	= \
 		$(NULL)
 
 CPPSRCS		= \
 		nsMetricsModule.cpp \
 		$(NULL)
 
 SHARED_LIBRARY_LIBS = \
 		../src/$(LIB_PREFIX)metrics_s.$(LIB_SUFFIX) \
+		$(DEPTH)/modules/libbz2/src/$(LIB_PREFIX)bz2.$(LIB_SUFFIX) \
 		$(NULL)
 
 EXTRA_DSO_LDOPTS = $(XPCOM_GLUE_LDOPTS) \
 		   $(NSPR_LIBS) \
-		   $(BZ2_LIBS) \
 		   $(NULL)
 
 LOCAL_INCLUDES	= \
 		-I$(srcdir)/../src \
 		-I$(DIST)/public/nss \
 		-I$(DIST)/private/nss \
 		$(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
 ifeq ($(OS_ARCH)_$(GNU_CC), WINNT_)
   LDFLAGS += -NODEFAULTLIB:MSVCRT
 endif
 
-CXXFLAGS += $(BZ2_CFLAGS)
+
--- a/extensions/metrics/src/Makefile.in
+++ b/extensions/metrics/src/Makefile.in
@@ -52,17 +52,17 @@ REQUIRES	= xpcom \
 		  string \
 		  necko \
 		  pref \
 		  uriloader \
 		  dom \
 		  docshell \
 		  layout \
 		  widget \
-		  $(BZ2_REQUIRES) \
+		  libbz2 \
 		  xulapp \
 		  extensions \
 		  rdf \
 		  plugin \
 		  content \
 		  autocomplete \
 		  places \
 		  toolkitcomps \
--- a/extensions/metrics/test/Makefile.in
+++ b/extensions/metrics/test/Makefile.in
@@ -62,27 +62,25 @@ LOCAL_INCLUDES	= \
 		-I$(srcdir)/../src \
 		-I$(srcdir)/../build \
 		-I$(DIST)/public/nss \
 		-I$(DIST)/private/nss \
 		$(NULL)
 
 LIBS		= \
 		../src/$(LIB_PREFIX)metrics_s.$(LIB_SUFFIX) \
-		$(BZ2_LIBS) \
+		$(DEPTH)/modules/libbz2/src/$(LIB_PREFIX)bz2.$(LIB_SUFFIX) \
 		$(XPCOM_GLUE_LDOPTS) \
 		$(NSPR_LIBS) \
 		$(NULL)
 
 XPCSHELL_TESTS = unit
 
 include $(topsrcdir)/config/rules.mk
 
-CXXFLAGS += $(BZ2_CFLAGS)
-
 # Give the unit tests absolute paths to the data and temp directories.
 # For cygwin, we need to convert the paths to native Windows paths.
 ifdef CYGWIN_WRAPPER
 TESTDATA_DIR := `cygpath -wa $(srcdir)/data`
 TEST_TMPDIR := `cygpath -wa .`
 else
 TESTDATA_DIR := `cd $(srcdir)/data; pwd`
 TEST_TMPDIR := `pwd`
--- a/other-licenses/bsdiff/Makefile.in
+++ b/other-licenses/bsdiff/Makefile.in
@@ -42,19 +42,17 @@ srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 # This program is output to dist/host/bin because it is only needed by the
 # build system and is not intended to be included in Mozilla distributions.
 HOST_PROGRAM = mbsdiff$(BIN_SUFFIX)
 HOST_CSRCS = bsdiff.c
-HOST_LIBS += $(BZ2_LIBS)
+HOST_LIBS += $(DEPTH)/modules/libbz2/src/$(LIB_PREFIX)bz2.$(LIB_SUFFIX)
 
 ifeq (WINNT,$(OS_ARCH))
 HOST_EXTRA_LIBS += $(call EXPAND_LIBNAME,Ws2_32)
 endif
 
 LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/mozapps/update/src/updater
 
 include $(topsrcdir)/config/rules.mk
-
-CXXFLAGS += $(BZ2_CFLAGS)
--- a/toolkit/mozapps/update/src/updater/Makefile.in
+++ b/toolkit/mozapps/update/src/updater/Makefile.in
@@ -49,22 +49,22 @@ CPPSRCS = \
 	bspatch.cpp \
 	archivereader.cpp \
 	$(NULL)
 
 PROGRAM = updater$(BIN_SUFFIX)
 
 REQUIRES	= \
 		libmar \
-		$(BZ2_REQUIRES) \
+		libbz2 \
 		$(NULL)
 
 LIBS += \
 	$(DEPTH)/modules/libmar/src/$(LIB_PREFIX)mar.$(LIB_SUFFIX) \
-	$(BZ2_LIBS) \
+	$(DEPTH)/modules/libbz2/src/$(LIB_PREFIX)bz2.$(LIB_SUFFIX) \
 	$(NULL)
 
 ifeq ($(OS_ARCH),WINNT)
 USE_STATIC_LIBS = 1
 HAVE_PROGRESSUI = 1
 RCINCLUDE = updater.rc
 CPPSRCS += progressui_win.cpp
 OS_LIBS += $(call EXPAND_LIBNAME,comctl32 ws2_32 shell32)
@@ -125,10 +125,8 @@ libs::
 	rm -f $(DIST)/bin/updater
 endif
 
 ifeq ($(OS_ARCH),WINNT)
 # Pick up nsWindowsRestart.cpp
 LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
 REQUIRES += string
 endif
-
-CXXFLAGS += $(BZ2_CFLAGS)
--- a/toolkit/mozapps/update/src/updater/updater.cpp
+++ b/toolkit/mozapps/update/src/updater/updater.cpp
@@ -133,21 +133,17 @@ void LaunchChild(int argc, char **argv);
 #if defined(XP_UNIX) && !defined(XP_MACOSX)
 #define USE_EXECV
 #endif
 
 //-----------------------------------------------------------------------------
 
 // This variable lives in libbz2.  It's declared in bzlib_private.h, so we just
 // declare it here to avoid including that entire header file.
-#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
-extern "C"  __attribute__((visibility("default"))) unsigned int BZ2_crc32Table[256];
-#else
 extern "C" unsigned int BZ2_crc32Table[256];
-#endif
 
 static unsigned int
 crc32(const unsigned char *buf, unsigned int len)
 {
   unsigned int crc = 0xffffffffL;
 
   const unsigned char *end = buf + len;
   for (; buf != end; ++buf)
--- a/toolkit/toolkit-makefiles.sh
+++ b/toolkit/toolkit-makefiles.sh
@@ -743,21 +743,25 @@ MAKEFILES_accessible="
   accessible/src/base/Makefile
   accessible/src/html/Makefile
   accessible/src/xul/Makefile
   accessible/src/msaa/Makefile
   accessible/src/atk/Makefile
   accessible/src/mac/Makefile
   accessible/build/Makefile
 "
-
 MAKEFILES_zlib="
   modules/zlib/standalone/Makefile
 "
 
+MAKEFILES_libbz2="
+  modules/libbz2/Makefile
+  modules/libbz2/src/Makefile
+"
+
 MAKEFILES_libmar="
   modules/libmar/Makefile
   modules/libmar/src/Makefile
   modules/libmar/tool/Makefile
 "
 
 add_makefiles "
   $MAKEFILES_db
@@ -796,16 +800,17 @@ add_makefiles "
   $MAKEFILES_xpcom_tests
   $MAKEFILES_xpinstall
   $MAKEFILES_xpfe
   $MAKEFILES_embedding
   $MAKEFILES_xulapp
   $MAKEFILES_libpr0n
   $MAKEFILES_accessible
   $MAKEFILES_zlib
+  $MAKEFILES_libbz2
   $MAKEFILES_libmar
 "
 
 #
 # Conditional makefiles
 #
 
 if [ "$MOZ_COMPOSER" ]; then
@@ -969,23 +974,16 @@ fi
 
 if [ ! "$SYSTEM_ZLIB" ]; then
   add_makefiles "
     modules/zlib/Makefile
     modules/zlib/src/Makefile
   "
 fi
 
-if [ ! "$SYSTEM_BZ2" ]; then
-  add_makefiles "
-    modules/libbz2/Makefile
-    modules/libbz2/src/Makefile
-  "
-fi
-
 if test -n "$MOZ_UPDATE_PACKAGING"; then
   add_makefiles "
     tools/update-packaging/Makefile
     other-licenses/bsdiff/Makefile
   "
 fi
 
 if [ ! "$SYSTEM_PNG" ]; then
--- a/toolkit/toolkit-tiers.mk
+++ b/toolkit/toolkit-tiers.mk
@@ -59,19 +59,17 @@ tier_external_dirs	+= jpeg
 endif
 
 # Installer needs standalone libjar, hence standalone zlib
 ifdef MOZ_INSTALLER
 tier_external_dirs	+= modules/zlib/standalone
 endif
 
 ifdef MOZ_UPDATER
-ifndef MOZ_NATIVE_BZ2
 tier_external_dirs += modules/libbz2
-endif
 tier_external_dirs += modules/libmar
 endif
 
 ifndef MOZ_NATIVE_LCMS
 tier_external_dirs	+= modules/lcms
 endif
 
 #