diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/client.mk comm-1.9.1/client.mk
--- comm-1.9.1.orig/client.mk	2011-01-24 16:02:26 +0900
+++ comm-1.9.1/client.mk	2011-01-25 00:09:31 +0900
@@ -131,7 +131,7 @@
 MOZCONFIG_MODULES := mozilla/build/unix/uniq.pl
 
 run_for_side_effects := \
-  $(shell $(TOPSRCDIR)/$(MOZCONFIG_LOADER) $(TOPSRCDIR) $(TOPSRCDIR)/.mozconfig.mk > $(TOPSRCDIR)/.mozconfig.out)
+  $(shell $(CONFIG_SHELL) $(TOPSRCDIR)/$(MOZCONFIG_LOADER) $(TOPSRCDIR) $(TOPSRCDIR)/.mozconfig.mk > $(TOPSRCDIR)/.mozconfig.out)
 
 include $(TOPSRCDIR)/.mozconfig.mk
 
@@ -189,6 +189,29 @@
 # Do everything from scratch
 everything: clean build
 
+####################################
+# Profile-Guided Optimization
+#  To use this, you should set the following variables in your mozconfig
+#    mk_add_options PROFILE_GEN_SCRIPT=/path/to/profile-script
+#
+#  The profile script should exercise the functionality to be included
+#  in the profile feedback.
+#
+#  This is up here, outside of the MOZ_CURRENT_PROJECT logic so that this
+#  is usable in multi-pass builds, where you might not have a runnable
+#  application until all the build passes and postflight scripts have run.
+ifdef MOZ_OBJDIR
+  PGO_OBJDIR = $(MOZ_OBJDIR)
+else
+  PGO_OBJDIR := $(TOPSRCDIR)
+endif
+
+profiledbuild::
+	$(MAKE) -f $(TOPSRCDIR)/client.mk build MOZ_PROFILE_GENERATE=1
+	OBJDIR=${PGO_OBJDIR} $(PROFILE_GEN_SCRIPT)
+	$(MAKE) -f $(TOPSRCDIR)/client.mk maybe_clobber_profiledbuild
+	$(MAKE) -f $(TOPSRCDIR)/client.mk build MOZ_PROFILE_USE=1
+
 #####################################################
 # Build date unification
 
@@ -285,8 +308,8 @@
 endif
 	@if test ! -d $(OBJDIR); then $(MKDIR) $(OBJDIR); else true; fi
 	@echo cd $(OBJDIR);
-	@echo $(CONFIGURE) $(CONFIGURE_ARGS)
-	@cd $(OBJDIR) && $(BUILD_PROJECT_ARG) $(CONFIGURE_ENV_ARGS) $(CONFIGURE) $(CONFIGURE_ARGS) \
+	@echo $(CONFIG_SHELL) $(CONFIGURE) $(CONFIGURE_ARGS)
+	@cd $(OBJDIR) && $(BUILD_PROJECT_ARG) $(CONFIGURE_ENV_ARGS) $(CONFIG_SHELL) $(CONFIGURE) $(CONFIGURE_ARGS) \
 	  || ( echo "*** Fix above errors and then restart with\
                \"$(MAKE) -f client.mk build\"" && exit 1 )
 	@touch $(OBJDIR)/Makefile
@@ -328,7 +351,7 @@
 # Other targets
 
 # Pass these target onto the real build system
-install export libs clean realclean distclean alldep:: $(OBJDIR)/Makefile $(OBJDIR)/config.status
+install export libs clean realclean distclean alldep maybe_clobber_profiledbuild:: $(OBJDIR)/Makefile $(OBJDIR)/config.status
 	$(MOZ_MAKE) $@
 
 ####################################
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/config/config.mk comm-1.9.1/config/config.mk
--- comm-1.9.1.orig/config/config.mk	2011-01-24 16:02:26 +0900
+++ comm-1.9.1/config/config.mk	2011-01-25 00:09:31 +0900
@@ -378,8 +378,10 @@
 OS_CXXFLAGS += $(PROFILE_GEN_CFLAGS)
 OS_LDFLAGS += $(PROFILE_GEN_LDFLAGS)
 ifeq (WINNT,$(OS_ARCH))
+ifeq (,$(GNU_CC))
 AR_FLAGS += -LTCG
 endif
+endif
 endif # INTERNAL_TOOLS
 endif # MOZ_PROFILE_GENERATE
 
@@ -389,8 +391,10 @@
 OS_CXXFLAGS += $(PROFILE_USE_CFLAGS)
 OS_LDFLAGS += $(PROFILE_USE_LDFLAGS)
 ifeq (WINNT,$(OS_ARCH))
+ifeq (,$(GNU_CC))
 AR_FLAGS += -LTCG
 endif
+endif
 endif # INTERNAL_TOOLS
 endif # MOZ_PROFILE_USE
 endif # NO_PROFILE_GUIDED_OPTIMIZE
@@ -837,7 +841,6 @@
 ifdef LOCALE_MERGEDIR
 MAKE_JARS_FLAGS += -c $(LOCALE_MERGEDIR)/$(subst /locales,,$(relativesrcdir))
 endif
-MAKE_JARS_FLAGS += -c $(LOCALE_SRCDIR)
 ifdef LOCALE_MERGEDIR
 MAKE_JARS_FLAGS += -c $(topsrcdir)/$(relativesrcdir)/en-US
 endif
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/config/rules.mk comm-1.9.1/config/rules.mk
--- comm-1.9.1.orig/config/rules.mk	2011-01-24 16:02:26 +0900
+++ comm-1.9.1/config/rules.mk	2011-01-25 00:09:31 +0900
@@ -941,10 +941,15 @@
 	  $(PROGRAM:$(BIN_SUFFIX)=) $(DIST)/bin
 endif
 ifdef SHARED_LIBRARY
-	$(PYTHON) $(topsrcdir)/build/win32/pgomerge.py \
+ifdef IS_COMPONENT
+	$(PYTHON) $(MOZILLA_SRCDIR)/build/win32/pgomerge.py \
+	  $(LIBRARY_NAME) $(DIST)/bin/components
+else
+	$(PYTHON) $(MOZILLA_SRCDIR)/build/win32/pgomerge.py \
 	  $(LIBRARY_NAME) $(DIST)/bin
 endif
 endif
+endif
 endif # MOZ_PROFILE_USE
 endif # WINNT_
 endif # MOZ_PROFILE_GENERATE || MOZ_PROFILE_USE
@@ -1000,13 +1005,12 @@
 	$(LD) -NOLOGO -OUT:$@ -PDB:$(LINK_PDBFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(PROGOBJS) $(RESFILE) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
 ifdef MSMANIFEST_TOOL
 	@if test -f $@.manifest; then \
-		if test -f "$(srcdir)/$@.manifest"; then \
-			mt.exe -NOLOGO -MANIFEST "$(win_srcdir)/$@.manifest" $@.manifest -OUTPUTRESOURCE:$@\;1; \
-		else \
 			mt.exe -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
-		fi; \
-		rm -f $@.manifest; \
+		mt.exe -NOLOGO -INPUTRESOURCE:$@\;1 -MANIFEST $(WIN_TOP_SRC)/mozilla/config/uiAccess.manifest -OUTPUTRESOURCE:$@\;1; \
 	fi
+ifdef WIN7_MANIFEST
+	mt.exe -NOLOGO -INPUTRESOURCE:$@\;1 -MANIFEST $(WIN_TOP_SRC)/mozilla/config/win7.manifest -OUTPUTRESOURCE:$@\;1
+endif # WIN7_MANIFEST
 endif	# MSVC with manifest tool
 else
 ifeq ($(CPP_PROG_LINK),1)
@@ -1799,10 +1803,26 @@
 libs realchrome:: $(CHROME_DEPS) $(FINAL_TARGET)/chrome
 ifneq (,$(wildcard $(JAR_MANIFEST)))
 ifndef NO_DIST_INSTALL
+	MOZ_UI_LOCALE=".hg" ; \
+	if test "$(relativesrcdir)" ; then \
+		MOZ_UI_LOCALE="en-US `ls $(L10NBASEDIR)`" ; \
+	fi ; \
+	for AB_CD in $${MOZ_UI_LOCALE} ; do \
+		if test "$${AB_CD}" != ".hg" ; then \
+			if test "$${AB_CD}" = "en-US" ; then \
+				LOCALE_SRCDIR=$(topsrcdir)/$(relativesrcdir)/en-US ; \
+			else \
+				LOCALE_SRCDIR=$(L10NBASEDIR)/$${AB_CD}/$(subst /locales,,$(relativesrcdir)) ; \
+			fi ; \
+			MAKE_JARS_FLAGS="-c $${LOCALE_SRCDIR}" ; \
+			DAB_CD="-DAB_CD=$${AB_CD}" ; \
+		fi ; \
 	$(PYTHON) $(MOZILLA_DIR)/config/JarMaker.py \
 	  $(QUIET) -j $(FINAL_TARGET)/chrome \
+	  $${MAKE_JARS_FLAGS} \
 	  $(MAKE_JARS_FLAGS) $(XULPPFLAGS) $(DEFINES) $(ACDEFINES) \
-	  $(JAR_MANIFEST)
+	  $${DAB_CD} $(JAR_MANIFEST) ; \
+	done
 endif
 endif
 
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/configure comm-1.9.1/configure
--- comm-1.9.1.orig/configure	2011-01-24 16:07:10 +0900
+++ comm-1.9.1/configure	2011-01-25 00:09:31 +0900
@@ -3197,6 +3197,19 @@
 #define _CRT_NONSTDC_NO_WARNINGS 1
 EOF
 
+        elif test "$_CC_MAJOR_VERSION" = "16"; then
+            _CC_SUITE=10
+            CXXFLAGS="$CXXFLAGS -Zc:wchar_t-"
+            LDFLAGS="$LDFLAGS -MANIFESTUAC:NO"
+            _USE_DYNAMICBASE=1
+            cat >> confdefs.h <<\EOF
+#define _CRT_SECURE_NO_WARNINGS 1
+EOF
+
+            cat >> confdefs.h <<\EOF
+#define _CRT_NONSTDC_NO_WARNINGS 1
+EOF
+
         else
             { echo "configure: error: This version of the MSVC compiler, $CC_VERSION , is unsupported." 1>&2; exit 1; }
         fi
@@ -3468,6 +3481,7 @@
         unset _MSVC_VER_FILTER
 
     else
+        GCC_VERSION=`$CC -v 2>&1 | awk '/^gcc version/ { print $3 }'`
         # Check w32api version
         _W32API_MAJOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $1 }'`
         _W32API_MINOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $2 }'`
@@ -6905,7 +6919,7 @@
         DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/lib -lxpcom -lxpcom_core'
         XPCOM_FROZEN_LDOPTS='-L$(LIBXUL_DIST)/lib -lxpcom'
         DLL_PREFIX=
-        IMPORT_LIB_SUFFIX=dll.a
+        IMPORT_LIB_SUFFIX=a
     else
         TARGET_COMPILER_ABI=msvc
         HOST_CC='$(CC)'
@@ -16397,9 +16411,6 @@
 #define MOZ_MEMORY_WINDOWS 1
 EOF
 
-        if test "$CC_VERSION" != "14.00.50727.762"; then
-        { echo "configure: error: Building jemalloc requires exactly Visual C++ 2005 SP1 currently." 1>&2; exit 1; }
-    fi
     if test "$MOZILLA_1_9_1_BRANCH" = "1"; then
       if test -z "$WIN32_CRT_SRC_DIR" -a -z "$WIN32_CUSTOM_CRT_DIR"; then
         if test -z "$VCINSTALLDIR" -o ! -d "$VCINSTALLDIR"; then
@@ -17286,7 +17297,7 @@
 
 
 _SAVE_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -fprofile-generate"
+CFLAGS="$CFLAGS -fprofile-generate -fprofile-arcs -ftest-coverage"
 
 echo $ac_n "checking whether C compiler supports -fprofile-generate""... $ac_c" 1>&6
 echo "configure:17293: checking whether C compiler supports -fprofile-generate" >&5
@@ -17300,7 +17311,7 @@
 EOF
 if { (eval echo configure:17302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-   PROFILE_GEN_CFLAGS="-fprofile-generate"
+   PROFILE_GEN_CFLAGS="-fprofile-generate -fprofile-arcs -ftest-coverage"
                  result="yes" 
 else
   echo "configure: failed program was:" >&5
@@ -17312,9 +17323,17 @@
 echo "$ac_t""$result" 1>&6
 
 if test $result = "yes"; then
-  PROFILE_GEN_LDFLAGS="-fprofile-generate"
+  PROFILE_GEN_LDFLAGS="-fprofile-generate -fprofile-arcs -ftest-coverage"
   PROFILE_USE_CFLAGS="-fprofile-use"
   PROFILE_USE_LDFLAGS="-fprofile-use"
+  case "$GCC_VERSION" in
+  4.4.*|4.5.*)
+    PROFILE_GEN_CFLAGS="$PROFILE_GEN_CFLAGS -fprofile-correction"
+    PROFILE_GEN_LDFLAGS="$PROFILE_GEN_LDFLAGS -fprofile-correction"
+    PROFILE_USE_CFLAGS="$PROFILE_USE_CFLAGS -fprofile-correction"
+    PROFILE_USE_LDFLAGS="$PROFILE_USE_LDFLAGS -fprofile-correction"
+  ;;
+  esac
 else
   CFLAGS="$_SAVE_CFLAGS -fprofile-arcs"
   echo $ac_n "checking whether C compiler supports -fprofile-arcs""... $ac_c" 1>&6
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/directory/c-sdk/config/WIN32.mk comm-1.9.1/directory/c-sdk/config/WIN32.mk
--- comm-1.9.1.orig/directory/c-sdk/config/WIN32.mk	2009-03-25 22:04:18 +0900
+++ comm-1.9.1/directory/c-sdk/config/WIN32.mk	2011-01-25 00:09:31 +0900
@@ -51,7 +51,7 @@
 
 CC = cl
 CCC = cl
-LINK = link
+LD = link
 AR = lib -NOLOGO -OUT:"$@"
 RANLIB = echo
 BSDECHO = echo
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/directory/c-sdk/config/config.mk comm-1.9.1/directory/c-sdk/config/config.mk
--- comm-1.9.1.orig/directory/c-sdk/config/config.mk	2008-02-16 01:21:01 +0900
+++ comm-1.9.1/directory/c-sdk/config/config.mk	2011-01-25 00:09:31 +0900
@@ -158,7 +158,7 @@
 AS		= $(CC)
 ASFLAGS		= $(CFLAGS)
 PURIFY		= purify $(PURIFYOPTIONS)
-LINK_DLL	= $(LINK) $(OS_DLLFLAGS) $(DLLFLAGS)
+LINK_DLL	= $(LD) $(OS_DLLFLAGS) $(DLLFLAGS)
 NFSPWD		= $(MOD_DEPTH)/config/nfspwd
 
 CFLAGS		= $(CC_ONLY_FLAGS) $(OPTIMIZER) $(OS_CFLAGS)\
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/directory/c-sdk/config/rules.mk comm-1.9.1/directory/c-sdk/config/rules.mk
--- comm-1.9.1.orig/directory/c-sdk/config/rules.mk	2008-12-24 18:39:55 +0900
+++ comm-1.9.1/directory/c-sdk/config/rules.mk	2011-01-25 00:09:31 +0900
@@ -356,7 +356,7 @@
 	echo $(W16LIBS) >>w16link
 	echo $(W16_EXPORTS) >>w16link
 	echo libfile libentry >>w16link
-	$(LINK) @w16link.
+	$(LD) @w16link.
 	rm w16link
 else	# WIN16
 	$(LINK_DLL) -MAP $(DLLBASE) $(OS_LIBS) $(EXTRA_LIBS) $(OBJS)
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/directory/c-sdk/config/win16.mk comm-1.9.1/directory/c-sdk/config/win16.mk
--- comm-1.9.1.orig/directory/c-sdk/config/win16.mk	2003-10-11 00:03:43 +0900
+++ comm-1.9.1/directory/c-sdk/config/win16.mk	2011-01-25 00:09:31 +0900
@@ -70,7 +70,7 @@
 
 CC = wcc
 CCC = wcl
-LINK = wlink
+LD = wlink
 AR = wlib -q $@
 RC = wrc.exe /r /dWIN16=1 /bt=windows
 RANLIB = echo
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/directory/c-sdk/ldap/examples/win32.mak comm-1.9.1/directory/c-sdk/ldap/examples/win32.mak
--- comm-1.9.1.orig/directory/c-sdk/ldap/examples/win32.mak	2006-10-06 08:01:43 +0900
+++ comm-1.9.1/directory/c-sdk/ldap/examples/win32.mak	2011-01-25 00:09:31 +0900
@@ -103,7 +103,7 @@
 CC=cl
 OPTFLAGS=-MD
 CFLAGS=$(OPTFLAGS) $(EXTRACFLAGS) -I$(INCDIR) -I$(NSPRINCDIR)
-LINK=link
+LD=link
 LDFLAGS=$(EXTRALDFLAGS)
 
 
@@ -176,4 +176,4 @@
 
 
 %.exe : %.obj
-		$(LINK) -OUT:$@ $(LDFLAGS) $(SYSLIBS) $< $(LIBS)
+		$(LD) -OUT:$@ $(LDFLAGS) $(SYSLIBS) $< $(LIBS)
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mailnews/mailnews.js comm-1.9.1/mailnews/mailnews.js
--- comm-1.9.1.orig/mailnews/mailnews.js	2011-01-24 16:02:29 +0900
+++ comm-1.9.1/mailnews/mailnews.js	2011-01-25 00:09:31 +0900
@@ -62,7 +62,7 @@
 
 pref("mail.wrap_long_lines",                true);
 pref("news.wrap_long_lines",                true);
-pref("mail.inline_attachments",             true);
+pref("mail.inline_attachments",             false);
 pref("mail.reply_quote_inline",             false);
 pref("mailnews.auto_unzip_saved_attachments", false);
 
@@ -178,8 +178,8 @@
 pref("mail.citation_color",                 "#000000"); // quoted color
 pref("mail.quoted_style",                   0); // 0=plain, 1=bold, 2=italic, 3=bolditalic
 pref("mail.quoted_size",                    0); // 0=normal, 1=big, 2=small
-pref("mail.quoted_graphical",               true); // use HTML-style quoting for displaying plain text
-pref("mail.quoteasblock",                   true); // use HTML-style quoting for quoting plain text
+pref("mail.quoted_graphical",               false); // use HTML-style quoting for displaying plain text
+pref("mail.quoteasblock",                   false); // use HTML-style quoting for quoting plain text
 pref("mail.identity.organization",          "");
 pref("mail.identity.reply_to",              "");
 pref("mail.identity.username",              "");
@@ -424,7 +424,7 @@
 pref("mail.identity.default.directoryServer", "");
 pref("mail.identity.default.overrideGlobal_Pref", false);
 pref("mail.identity.default.auto_quote", true);
-pref("mail.identity.default.reply_on_top", 0); // 0=bottom 1=top 2=select
+pref("mail.identity.default.reply_on_top", 1); // 0=bottom 1=top 2=select
 pref("mail.identity.default.sig_bottom", true); // true=below quoted false=above quoted
 pref("mail.identity.default.sig_on_fwd", false); // Include signature on fwd?
 pref("mail.identity.default.sig_on_reply", true); // Include signature on re?
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozconfig comm-1.9.1/mozconfig
--- comm-1.9.1.orig/mozconfig	1970-01-01 09:00:00 +0900
+++ comm-1.9.1/mozconfig	2011-01-25 00:09:32 +0900
@@ -0,0 +1,6 @@
+if [ -e ${topsrcdir}/../../mozconfig ] ; then
+	RF_MOZCONFIG=${topsrcdir}/../../mozconfig
+elif [ -e ${topsrcdir}/../../../mozconfig ] ; then
+	RF_MOZCONFIG=${topsrcdir}/../../../mozconfig
+fi
+. ${RF_MOZCONFIG}/mozconfig.sh
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/Makefile.in comm-1.9.1/mozilla/Makefile.in
--- comm-1.9.1.orig/mozilla/Makefile.in	2011-01-24 16:05:46 +0900
+++ comm-1.9.1/mozilla/Makefile.in	2011-01-25 00:09:31 +0900
@@ -82,7 +82,6 @@
 	$(RM) -rf $(DIST)/include
 	$(RM) -rf $(DIST)/private
 	$(RM) -rf $(DIST)/public
-	$(RM) -rf $(DIST)/bin/components
 	$(RM) -rf _tests
 
 # Build pseudo-external modules first when export is explicitly called
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/build/automation-build.mk comm-1.9.1/mozilla/build/automation-build.mk
--- comm-1.9.1.orig/mozilla/build/automation-build.mk	2011-01-24 16:05:48 +0900
+++ comm-1.9.1/mozilla/build/automation-build.mk	2011-01-25 00:09:31 +0900
@@ -12,9 +12,9 @@
 else
 ifeq ($(OS_ARCH),Darwin)
 ifdef MOZ_DEBUG
-browser_path = \"$(TARGET_DIST)/$(MOZ_APP_DISPLAYNAME)Debug.app/Contents/MacOS/$(PROGRAM)\"
+browser_path = \"$(TARGET_DIST)/$(MOZ_APP_NAME)Debug.app/Contents/MacOS/$(PROGRAM)\"
 else
-browser_path = \"$(TARGET_DIST)/$(MOZ_APP_DISPLAYNAME).app/Contents/MacOS/$(PROGRAM)\"
+browser_path = \"$(TARGET_DIST)/$(MOZ_APP_NAME).app/Contents/MacOS/$(PROGRAM)\"
 endif
 else
 browser_path = \"$(TARGET_DIST)/bin/$(PROGRAM)\"
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/config/config.mk comm-1.9.1/mozilla/config/config.mk
--- comm-1.9.1.orig/mozilla/config/config.mk	2011-01-24 16:05:48 +0900
+++ comm-1.9.1/mozilla/config/config.mk	2011-01-25 00:09:31 +0900
@@ -373,8 +373,10 @@
 OS_CXXFLAGS += $(PROFILE_GEN_CFLAGS)
 OS_LDFLAGS += $(PROFILE_GEN_LDFLAGS)
 ifeq (WINNT,$(OS_ARCH))
+ifeq (,$(GNU_CC))
 AR_FLAGS += -LTCG
 endif
+endif
 endif # INTERNAL_TOOLS
 endif # MOZ_PROFILE_GENERATE
 
@@ -384,8 +386,10 @@
 OS_CXXFLAGS += $(PROFILE_USE_CFLAGS)
 OS_LDFLAGS += $(PROFILE_USE_LDFLAGS)
 ifeq (WINNT,$(OS_ARCH))
+ifeq (,$(GNU_CC))
 AR_FLAGS += -LTCG
 endif
+endif
 endif # INTERNAL_TOOLS
 endif # MOZ_PROFILE_USE
 endif # NO_PROFILE_GUIDED_OPTIMIZE
@@ -836,7 +840,6 @@
 ifdef LOCALE_MERGEDIR
 MAKE_JARS_FLAGS += -c $(LOCALE_MERGEDIR)/$(subst /locales,,$(relativesrcdir))
 endif
-MAKE_JARS_FLAGS += -c $(LOCALE_SRCDIR)
 ifdef LOCALE_MERGEDIR
 MAKE_JARS_FLAGS += -c $(topsrcdir)/$(relativesrcdir)/en-US
 endif
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/config/rules.mk comm-1.9.1/mozilla/config/rules.mk
--- comm-1.9.1.orig/mozilla/config/rules.mk	2011-01-24 16:05:48 +0900
+++ comm-1.9.1/mozilla/config/rules.mk	2011-01-25 00:09:31 +0900
@@ -956,10 +956,15 @@
 	  $(PROGRAM:$(BIN_SUFFIX)=) $(DIST)/bin
 endif
 ifdef SHARED_LIBRARY
+ifdef IS_COMPONENT
+	$(PYTHON) $(topsrcdir)/build/win32/pgomerge.py \
+	  $(LIBRARY_NAME) $(DIST)/bin/components
+else
 	$(PYTHON) $(topsrcdir)/build/win32/pgomerge.py \
 	  $(LIBRARY_NAME) $(DIST)/bin
 endif
 endif
+endif
 endif # MOZ_PROFILE_USE
 endif # WINNT_
 endif # MOZ_PROFILE_GENERATE || MOZ_PROFILE_USE
@@ -1015,13 +1020,12 @@
 	$(LD) -NOLOGO -OUT:$@ -PDB:$(LINK_PDBFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(PROGOBJS) $(RESFILE) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
 ifdef MSMANIFEST_TOOL
 	@if test -f $@.manifest; then \
-		if test -f "$(srcdir)/$@.manifest"; then \
-			mt.exe -NOLOGO -MANIFEST "$(win_srcdir)/$@.manifest" $@.manifest -OUTPUTRESOURCE:$@\;1; \
-		else \
 			mt.exe -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
-		fi; \
-		rm -f $@.manifest; \
+		mt.exe -NOLOGO -INPUTRESOURCE:$@\;1 -MANIFEST $(WIN_TOP_SRC)/config/uiAccess.manifest -OUTPUTRESOURCE:$@\;1; \
 	fi
+ifdef WIN7_MANIFEST
+	mt.exe -NOLOGO -INPUTRESOURCE:$@\;1 -MANIFEST $(WIN_TOP_SRC)/config/win7.manifest -OUTPUTRESOURCE:$@\;1
+endif # WIN7_MANIFEST
 endif	# MSVC with manifest tool
 else
 ifeq ($(CPP_PROG_LINK),1)
@@ -1922,10 +1926,26 @@
 libs realchrome:: $(CHROME_DEPS) $(FINAL_TARGET)/chrome
 ifneq (,$(wildcard $(JAR_MANIFEST)))
 ifndef NO_DIST_INSTALL
+	MOZ_UI_LOCALE=".hg" ; \
+	if test "$(relativesrcdir)" ; then \
+		MOZ_UI_LOCALE="en-US `ls $(L10NBASEDIR)`" ; \
+	fi ; \
+	for AB_CD in $${MOZ_UI_LOCALE} ; do \
+		if test "$${AB_CD}" != ".hg" ; then \
+			if test "$${AB_CD}" = "en-US" ; then \
+				LOCALE_SRCDIR=$(topsrcdir)/$(relativesrcdir)/en-US ; \
+			else \
+				LOCALE_SRCDIR=$(L10NBASEDIR)/$${AB_CD}/$(subst /locales,,$(relativesrcdir)) ; \
+			fi ; \
+			MAKE_JARS_FLAGS="-c $${LOCALE_SRCDIR}" ; \
+			DAB_CD="-DAB_CD=$${AB_CD}" ; \
+		fi ; \
 	$(PYTHON) $(MOZILLA_DIR)/config/JarMaker.py \
 	  $(QUIET) -j $(FINAL_TARGET)/chrome \
+	  $${MAKE_JARS_FLAGS} \
 	  $(MAKE_JARS_FLAGS) $(XULPPFLAGS) $(DEFINES) $(ACDEFINES) \
-	  $(JAR_MANIFEST)
+	  $${DAB_CD} $(JAR_MANIFEST) ; \
+	done
 endif
 endif
 
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/config/uiAccess.manifest comm-1.9.1/mozilla/config/uiAccess.manifest
--- comm-1.9.1.orig/mozilla/config/uiAccess.manifest	1970-01-01 09:00:00 +0900
+++ comm-1.9.1/mozilla/config/uiAccess.manifest	2011-01-25 00:09:32 +0900
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+  <ms_asmv3:trustInfo xmlns:ms_asmv3="urn:schemas-microsoft-com:asm.v3">
+    <ms_asmv3:security>
+      <ms_asmv3:requestedPrivileges>
+        <ms_asmv3:requestedExecutionLevel level="asInvoker" uiAccess="false">
+        </ms_asmv3:requestedExecutionLevel>
+      </ms_asmv3:requestedPrivileges>
+    </ms_asmv3:security>
+  </ms_asmv3:trustInfo>
+</assembly>
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/config/win7.manifest comm-1.9.1/mozilla/config/win7.manifest
--- comm-1.9.1.orig/mozilla/config/win7.manifest	1970-01-01 09:00:00 +0900
+++ comm-1.9.1/mozilla/config/win7.manifest	2011-01-25 00:09:32 +0900
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+    <application>
+      <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
+      <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />
+    </application>
+  </compatibility>
+</assembly>
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/configure comm-1.9.1/mozilla/configure
--- comm-1.9.1.orig/mozilla/configure	2011-01-24 16:07:11 +0900
+++ comm-1.9.1/mozilla/configure	2011-01-25 00:09:31 +0900
@@ -3112,6 +3112,19 @@
 #define _CRT_NONSTDC_NO_WARNINGS 1
 EOF
 
+        elif test "$_CC_MAJOR_VERSION" = "16"; then
+            _CC_SUITE=10
+            CXXFLAGS="$CXXFLAGS -Zc:wchar_t-"
+            LDFLAGS="$LDFLAGS -MANIFESTUAC:NO"
+            _USE_DYNAMICBASE=1
+            cat >> confdefs.h <<\EOF
+#define _CRT_SECURE_NO_WARNINGS 1
+EOF
+
+            cat >> confdefs.h <<\EOF
+#define _CRT_NONSTDC_NO_WARNINGS 1
+EOF
+
         else
             { echo "configure: error: This version of the MSVC compiler, $CC_VERSION , is unsupported." 1>&2; exit 1; }
         fi
@@ -3180,6 +3193,7 @@
         unset _MSVC_VER_FILTER
 
     else
+        GCC_VERSION=`$CC -v 2>&1 | awk '/^gcc version/ { print $3 }'`
         # Check w32api version
         _W32API_MAJOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $1 }'`
         _W32API_MINOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $2 }'`
@@ -6627,7 +6641,7 @@
         DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/lib -lxpcom -lxpcom_core'
         XPCOM_FROZEN_LDOPTS='-L$(LIBXUL_DIST)/lib -lxpcom'
         DLL_PREFIX=
-        IMPORT_LIB_SUFFIX=dll.a
+        IMPORT_LIB_SUFFIX=a
     else
         TARGET_COMPILER_ABI=msvc
         HOST_CC='$(CC)'
@@ -18784,7 +18798,7 @@
 
 
 _SAVE_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -fprofile-generate"
+CFLAGS="$CFLAGS -fprofile-generate -fprofile-arcs -ftest-coverage"
 
 echo $ac_n "checking whether C compiler supports -fprofile-generate""... $ac_c" 1>&6
 echo "configure:18791: checking whether C compiler supports -fprofile-generate" >&5
@@ -18798,7 +18812,7 @@
 EOF
 if { (eval echo configure:18800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-   PROFILE_GEN_CFLAGS="-fprofile-generate"
+   PROFILE_GEN_CFLAGS="-fprofile-generate -fprofile-arcs -ftest-coverage"
                  result="yes" 
 else
   echo "configure: failed program was:" >&5
@@ -18810,9 +18824,17 @@
 echo "$ac_t""$result" 1>&6
 
 if test $result = "yes"; then
-  PROFILE_GEN_LDFLAGS="-fprofile-generate"
+  PROFILE_GEN_LDFLAGS="-fprofile-generate -fprofile-arcs -ftest-coverage"
   PROFILE_USE_CFLAGS="-fprofile-use"
   PROFILE_USE_LDFLAGS="-fprofile-use"
+  case "$GCC_VERSION" in
+  4.4.*|4.5.*)
+    PROFILE_GEN_CFLAGS="$PROFILE_GEN_CFLAGS -fprofile-correction"
+    PROFILE_GEN_LDFLAGS="$PROFILE_GEN_LDFLAGS -fprofile-correction"
+    PROFILE_USE_CFLAGS="$PROFILE_USE_CFLAGS -fprofile-correction"
+    PROFILE_USE_LDFLAGS="$PROFILE_USE_LDFLAGS -fprofile-correction"
+  ;;
+  esac
 else
   CFLAGS="$_SAVE_CFLAGS -fprofile-arcs"
   echo $ac_n "checking whether C compiler supports -fprofile-arcs""... $ac_c" 1>&6
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/embedding/browser/activex/src/common/StdAfx.h comm-1.9.1/mozilla/embedding/browser/activex/src/common/StdAfx.h
--- comm-1.9.1.orig/mozilla/embedding/browser/activex/src/common/StdAfx.h	2011-01-24 16:05:54 +0900
+++ comm-1.9.1/mozilla/embedding/browser/activex/src/common/StdAfx.h	2011-01-25 00:09:31 +0900
@@ -79,7 +79,7 @@
 #include "nsIDOMElement.h"
 
 #undef _WIN32_WINNT
-#define _WIN32_WINNT 0x0400
+#define _WIN32_WINNT 0x0403
 #define _ATL_APARTMENT_THREADED
 #define _ATL_STATIC_REGISTRY
 // #define _ATL_DEBUG_INTERFACES
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/embedding/browser/activex/src/control/StdAfx.h comm-1.9.1/mozilla/embedding/browser/activex/src/control/StdAfx.h
--- comm-1.9.1.orig/mozilla/embedding/browser/activex/src/control/StdAfx.h	2011-01-24 16:05:54 +0900
+++ comm-1.9.1/mozilla/embedding/browser/activex/src/control/StdAfx.h	2011-01-25 00:09:31 +0900
@@ -113,7 +113,7 @@
 #include "nsIDOMEventTarget.h"
 
 #undef _WIN32_WINNT
-#define _WIN32_WINNT 0x0400
+#define _WIN32_WINNT 0x0403
 #define _ATL_APARTMENT_THREADED
 #define _ATL_STATIC_REGISTRY
 // #define _ATL_DEBUG_INTERFACES
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/embedding/browser/activex/src/plugin/StdAfx.h comm-1.9.1/mozilla/embedding/browser/activex/src/plugin/StdAfx.h
--- comm-1.9.1.orig/mozilla/embedding/browser/activex/src/plugin/StdAfx.h	2011-01-24 16:05:54 +0900
+++ comm-1.9.1/mozilla/embedding/browser/activex/src/plugin/StdAfx.h	2011-01-25 00:09:31 +0900
@@ -50,7 +50,7 @@
 #define STRICT
 
 #undef _WIN32_WINNT
-#define _WIN32_WINNT 0x0400
+#define _WIN32_WINNT 0x0403
 #define _ATL_APARTMENT_THREADED
 #define _ATL_STATIC_REGISTRY
 
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/embedding/browser/activex/src/pluginhostctrl/StdAfx.h comm-1.9.1/mozilla/embedding/browser/activex/src/pluginhostctrl/StdAfx.h
--- comm-1.9.1.orig/mozilla/embedding/browser/activex/src/pluginhostctrl/StdAfx.h	2011-01-24 16:05:54 +0900
+++ comm-1.9.1/mozilla/embedding/browser/activex/src/pluginhostctrl/StdAfx.h	2011-01-25 00:09:31 +0900
@@ -48,7 +48,7 @@
 
 #define STRICT
 #ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0400
+#define _WIN32_WINNT 0x0403
 #endif
 #define _ATL_APARTMENT_THREADED
 
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/embedding/browser/activex/src/pluginhostctrl/pluginhostctrlps.mk comm-1.9.1/mozilla/embedding/browser/activex/src/pluginhostctrl/pluginhostctrlps.mk
--- comm-1.9.1.orig/mozilla/embedding/browser/activex/src/pluginhostctrl/pluginhostctrlps.mk	2011-01-24 16:05:54 +0900
+++ comm-1.9.1/mozilla/embedding/browser/activex/src/pluginhostctrl/pluginhostctrlps.mk	2011-01-25 00:09:31 +0900
@@ -4,7 +4,7 @@
 		kernel32.lib rpcndr.lib rpcns4.lib rpcrt4.lib oleaut32.lib uuid.lib \
 
 .c.obj:
-	cl /c /Ox /DWIN32 /D_WIN32_WINNT=0x0400 /DREGISTER_PROXY_DLL \
+	cl /c /Ox /DWIN32 /D_WIN32_WINNT=0x0403 /DREGISTER_PROXY_DLL \
 		$<
 
 clean:
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/embedding/browser/activex/src/xml/StdAfx.h comm-1.9.1/mozilla/embedding/browser/activex/src/xml/StdAfx.h
--- comm-1.9.1.orig/mozilla/embedding/browser/activex/src/xml/StdAfx.h	2011-01-24 16:05:54 +0900
+++ comm-1.9.1/mozilla/embedding/browser/activex/src/xml/StdAfx.h	2011-01-25 00:09:31 +0900
@@ -11,7 +11,7 @@
 
 #define STRICT
 #ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0400
+#define _WIN32_WINNT 0x0403
 #endif
 #define _ATL_APARTMENT_THREADED
 
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/gfx/cairo/cairo/src/Makefile.in comm-1.9.1/mozilla/gfx/cairo/cairo/src/Makefile.in
--- comm-1.9.1.orig/mozilla/gfx/cairo/cairo/src/Makefile.in	2011-01-24 16:05:56 +0900
+++ comm-1.9.1/mozilla/gfx/cairo/cairo/src/Makefile.in	2011-01-25 00:09:31 +0900
@@ -59,11 +59,6 @@
 ifeq ($(OS_ARCH),SunOS)
 MODULE_OPTIMIZE_FLAGS = -xO5
 endif
-ifeq ($(OS_ARCH),WINNT)
-# FIXME: bug 413019
-OS_COMPILE_CFLAGS += -GL-
-MODULE_OPTIMIZE_FLAGS = -O2
-endif
 endif
 
 REQUIRES        = $(PNG_REQUIRES) \
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/gfx/ots/include/opentype-sanitiser.h comm-1.9.1/mozilla/gfx/ots/include/opentype-sanitiser.h
--- comm-1.9.1.orig/mozilla/gfx/ots/include/opentype-sanitiser.h	2011-01-24 16:05:56 +0900
+++ comm-1.9.1/mozilla/gfx/ots/include/opentype-sanitiser.h	2011-01-25 00:09:31 +0900
@@ -26,6 +26,25 @@
 #include <cassert>
 #include <cstring>
 
+#ifdef _MSC_VER
+#if _MSC_VER < 1400
+#ifndef _CPPLIB_VER
+_STD_BEGIN
+#define max _cpp_max
+#define min _cpp_min
+using ::size_t; using ::memchr; using ::memcmp;
+using ::memcpy; using ::memmove; using ::memset;
+using ::strcat; using ::strchr; using ::strcmp;
+using ::strcoll; using ::strcpy; using ::strcspn;
+using ::strerror; using ::strlen; using ::strncat;
+using ::strncmp; using ::strncpy; using ::strpbrk;
+using ::strrchr; using ::strspn; using ::strstr;
+using ::strtok; using ::strxfrm;
+_STD_END
+#endif
+#endif
+#endif
+
 namespace ots {
 
 // -----------------------------------------------------------------------------
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/jpeg/Makefile.in comm-1.9.1/mozilla/jpeg/Makefile.in
--- comm-1.9.1.orig/mozilla/jpeg/Makefile.in	2011-01-24 16:05:58 +0900
+++ comm-1.9.1/mozilla/jpeg/Makefile.in	2011-01-25 00:09:31 +0900
@@ -47,10 +47,6 @@
 
 ifeq ($(OS_ARCH),WINNT)
 LIBRARY_NAME	= jpeg$(MOZ_BITS)$(VERSION_NUMBER)
-# FIXME: bug 413019
-ifndef GNU_CC
-OS_COMPILE_CFLAGS += -GL-
-endif
 endif
 
 GRE_MODULE	= 1
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/js/src/Makefile.in comm-1.9.1/mozilla/js/src/Makefile.in
--- comm-1.9.1.orig/mozilla/js/src/Makefile.in	2011-01-24 16:05:58 +0900
+++ comm-1.9.1/mozilla/js/src/Makefile.in	2011-01-25 00:09:31 +0900
@@ -50,7 +50,9 @@
 LIBRARY_NAME	= mozjs
 GRE_MODULE	= 1
 
+ifneq (,$(findstring --enable-application=xulrunner,$(ac_configure_args)))
 PROGRAM         = js$(BIN_SUFFIX)
+endif
 # The shell uses some 'HIDDEN' symbols to produce statistics, so we
 # link directly against the .o files, not against the JS shared
 # library.
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/js/src/config/rules.mk comm-1.9.1/mozilla/js/src/config/rules.mk
--- comm-1.9.1.orig/mozilla/js/src/config/rules.mk	2011-01-24 16:05:58 +0900
+++ comm-1.9.1/mozilla/js/src/config/rules.mk	2011-01-25 00:09:31 +0900
@@ -1015,12 +1015,8 @@
 	$(LD) -NOLOGO -OUT:$@ -PDB:$(LINK_PDBFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(PROGOBJS) $(RESFILE) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
 ifdef MSMANIFEST_TOOL
 	@if test -f $@.manifest; then \
-		if test -f "$(srcdir)/$@.manifest"; then \
-			mt.exe -NOLOGO -MANIFEST "$(win_srcdir)/$@.manifest" $@.manifest -OUTPUTRESOURCE:$@\;1; \
-		else \
 			mt.exe -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
-		fi; \
-		rm -f $@.manifest; \
+		mt.exe -NOLOGO -INPUTRESOURCE:$@\;1 -MANIFEST $(WIN_TOP_SRC)/../../config/uiAccess.manifest -OUTPUTRESOURCE:$@\;1; \
 	fi
 endif	# MSVC with manifest tool
 else
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/js/src/configure comm-1.9.1/mozilla/js/src/configure
--- comm-1.9.1.orig/mozilla/js/src/configure	2011-01-24 16:07:12 +0900
+++ comm-1.9.1/mozilla/js/src/configure	2011-01-25 00:09:31 +0900
@@ -2714,6 +2714,19 @@
 #define _CRT_NONSTDC_NO_WARNINGS 1
 EOF
 
+        elif test "$_CC_MAJOR_VERSION" = "16"; then
+            _CC_SUITE=10
+            CXXFLAGS="$CXXFLAGS -Zc:wchar_t-"
+            LDFLAGS="$LDFLAGS -MANIFESTUAC:NO"
+            _USE_DYNAMICBASE=1
+            cat >> confdefs.h <<\EOF
+#define _CRT_SECURE_NO_WARNINGS 1
+EOF
+
+            cat >> confdefs.h <<\EOF
+#define _CRT_NONSTDC_NO_WARNINGS 1
+EOF
+
         else
             { echo "configure: error: This version of the MSVC compiler, $CC_VERSION , is unsupported." 1>&2; exit 1; }
         fi
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/memory/jemalloc/Makefile.in comm-1.9.1/mozilla/memory/jemalloc/Makefile.in
--- comm-1.9.1.orig/mozilla/memory/jemalloc/Makefile.in	2011-01-24 16:06:10 +0900
+++ comm-1.9.1/mozilla/memory/jemalloc/Makefile.in	2011-01-25 00:09:31 +0900
@@ -63,7 +63,13 @@
 	$(INSTALL) $< $(FINAL_TARGET)
 
 # patch if necessary
-$(CRT_OBJ_DIR)/jemalloc.c: $(srcdir)/crtsp1.diff
+ifeq ($(CC_VERSION), 14.00.50727.762)
+CRTDIFF=crtsp1.diff
+else
+CRTDIFF=crtvc9sp1.diff
+endif
+
+$(CRT_OBJ_DIR)/jemalloc.c: $(srcdir)/$(CRTDIFF)
 	rm -rf $(CRT_OBJ_DIR)
 	cp -R "$(WIN32_CRT_SRC_DIR)" .
 	# per http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1189363&SiteID=1
@@ -72,7 +78,7 @@
 	done
 	# truly awful
 	#XXX: get ed into mozillabuild, bug 415123
-	$(PERL) $(srcdir)/apply-ed-patches.pl $(srcdir)/crtsp1.diff \
+	$(PERL) $(srcdir)/apply-ed-patches.pl $(srcdir)/$(CRTDIFF) \
 	$(CRT_OBJ_DIR) $(srcdir)/ed.exe
 
 $(CRT_OBJ_DIR)/build/intel/mozcrt19.dll: \
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/memory/jemalloc/crtvc9sp1.diff comm-1.9.1/mozilla/memory/jemalloc/crtvc9sp1.diff
--- comm-1.9.1.orig/mozilla/memory/jemalloc/crtvc9sp1.diff	1970-01-01 09:00:00 +0900
+++ comm-1.9.1/mozilla/memory/jemalloc/crtvc9sp1.diff	2011-01-25 00:09:32 +0900
@@ -0,0 +1,216 @@
+# The Microsoft C Runtime source code to which this document refers is available
+# directly from Microsoft Corporation, under a separate license.
+# Please ensure that if you are using that source code, you have appropriate
+# rights to use it.  By providing you access to this file, Mozilla Corporation
+# and its affiliates do not purport to grant any rights in that source code. 
+# Binaries are available under separate licenses at 
+# http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en
+diff -re crt/src/_sample_.rc crtsrc/_sample_.rc
+41c
+            VALUE "ProductName", "Mozilla Custom C Runtime"
+.
+39c
+            VALUE "OriginalFilename", "MOZCRT19.DLL"
+.
+37c
+            VALUE "OriginalFilename", "MOZCRT19D.DLL"
+.
+33c
+            VALUE "InternalName", "MOZCRT19.DLL"
+.
+31c
+            VALUE "InternalName", "MOZCRT19D.DLL"
+.
+27c
+            VALUE "CompanyName", "Mozilla Foundation"
+.
+diff -re crt/src/crt0.c crtsrc/crt0.c
+212c
+        /*
+         * this used to happen in _mtinit, but we need it before malloc
+         */
+        _init_pointers();       /* initialize global function pointers */
+
+        if ( malloc_init_hard() )                /* initialize heap */
+.
+87a
+extern BOOL malloc_init_hard(void);
+.
+diff -re crt/src/crt0dat.c crtsrc/crt0dat.c
+837d
+826d
+diff -re crt/src/crtdll.c crtsrc/crtdll.c
+31,40d
+diff -re crt/src/crtexe.c crtsrc/crtexe.c
+322,324d
+35,45d
+diff -re crt/src/crtheap.c crtsrc/crtheap.c
+61c
+    pv = calloc(count, size);
+.
+58,59d
+diff -re crt/src/crtlib.c crtsrc/crtlib.c
+686,693d
+355d
+339a
+                 malloc_shutdown();
+
+.
+298d
+279d
+249,250d
+239d
+226c
+            /*
+             * this used to happen in _mtinit, but we need it before malloc
+             */
+            _init_pointers();       /* initialize global function pointers */
+
+            if ( malloc_init_hard() )   /* initialize heap */
+.
+43a
+extern BOOL malloc_init_hard(void);
+extern void malloc_shutdown(void);
+
+.
+diff -re crt/src/dllcrt0.c crtsrc/dllcrt0.c
+189,190d
+136d
+126d
+111d
+106,108d
+diff -re crt/src/intel/_sample_.def crtsrc/intel/_sample_.def
+1198d
+718,719d
+664a
+    posix_memalign
+.
+638a
+    memalign
+.
+495a
+    malloc_usable_size
+.
+331,336d
+319d
+313,314d
+81d
+9c
+LIBRARY MOZCRT19
+.
+diff -re crt/src/internal.h crtsrc/internal.h
+413a
+#endif
+.
+409c
+#if 0
+.
+diff -re crt/src/makefile crtsrc/makefile
+1873c
+-def:$(DEFFILE2_DIR)\sample_p.def
+.
+1841c
+ $(DEFFILE2_DIR)\sample_p.def $(CPPSRC_OBJS_DLL:*=dll) \
+.
+1771a
+$(DEFFILE_DIR)\$(RETAIL_LIB_NAME).def : $(DEFFILE_DIR)\_sample_.def
+	copy $** $@
+.
+1290d
+1235,1237d
+760c
+dll_ :: $(OBJROOT) $(OBJCPUDIR) $(OBJDIR_DLL) $(OBJDIR_DLL)\$(PURE_OBJ_DIR) \
+   	$(OBJDIR_DLL)\$(CPP_OBJ_DIR) \
+   	$(RELDIR_CPU) $(PDBDIR_CPU_DLL) $(MAKE_DIRS_DLL)
+.
+340c
+CC_OPTS_BASE=-c -nologo -Zlp8 -W3 -GFy -DWIND32
+.
+213d
+21,24c
+RETAIL_DLL_NAME=MOZCRT19
+RETAIL_DLLCPP_NAME=MOZCPP19
+.
+diff -re crt/src/makefile.inc crtsrc/makefile.inc
+1636a
+$(OBJDIR)\unhandld.obj: $(PREOBJDIR)\unhandld.obj
+        copy $(PREOBJDIR)\unhandld.obj $@
+
+.
+623d
+621d
+405d
+344,356c
+        $(OBJDIR)\jemalloc.obj  \
+.
+336,337d
+331,332d
+329d
+325d
+321,322d
+diff -re crt/src/makefile.sub crtsrc/makefile.sub
+66c
+CFLAGS=$(CFLAGS) -O2 -DMOZ_MEMORY=1 -DMOZ_MEMORY_WINDOWS=1
+.
+diff -re crt/src/malloc.h crtsrc/malloc.h
+189a
+#endif
+.
+177a
+
+#if 0
+.
+83a
+#endif
+.
+70a
+#if 0
+.
+diff -re crt/src/mlock.c crtsrc/mlock.c
+274c
+#endif
+.
+262a
+#if 0
+.
+diff -re crt/src/new.cpp crtsrc/new.cpp
+60d
+52,55d
+37,38c
+        break;
+.
+diff -re crt/src/nothrownew.cpp crtsrc/nothrownew.cpp
+38c
+#endif
+.
+31a
+#if 1
+        break;
+#else
+
+.
+diff -re crt/src/sample_p.def crtsrc/sample_p.def
+8c
+LIBRARY mozcpp19
+.
+diff -re crt/src/sample_p.rc crtsrc/sample_p.rc
+41c
+            VALUE "ProductName", "Mozilla Custom C++ Runtime"
+.
+39c
+            VALUE "OriginalFilename", "MOZCPP19.DLL"
+.
+37c
+            VALUE "OriginalFilename", "MOZCPP19D.DLL"
+.
+33c
+            VALUE "InternalName", "MOZCPP19.DLL"
+.
+31c
+            VALUE "InternalName", "MOZCPP19D.DLL"
+.
+27c
+            VALUE "CompanyName", "Mozilla Foundation"
+.
+diff -re crt/src/tidtable.c crtsrc/tidtable.c
+360,361d
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/modules/libimg/png/Makefile.in comm-1.9.1/mozilla/modules/libimg/png/Makefile.in
--- comm-1.9.1.orig/mozilla/modules/libimg/png/Makefile.in	2011-01-24 16:06:10 +0900
+++ comm-1.9.1/mozilla/modules/libimg/png/Makefile.in	2011-01-25 00:09:31 +0900
@@ -49,13 +49,6 @@
 endif
 LIBXUL_LIBRARY = 1
 
-ifndef GNU_CC
-ifeq ($(OS_ARCH),WINNT)
-# FIXME: bug 413019
-OS_COMPILE_CFLAGS += -GL-
-endif
-endif
-
 REQUIRES	= $(ZLIB_REQUIRES) \
 		  $(NULL)
 
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/modules/libpref/src/init/all.js comm-1.9.1/mozilla/modules/libpref/src/init/all.js
--- comm-1.9.1.orig/mozilla/modules/libpref/src/init/all.js	2011-01-24 16:06:11 +0900
+++ comm-1.9.1/mozilla/modules/libpref/src/init/all.js	2011-01-25 00:09:32 +0900
@@ -206,7 +206,7 @@
 // use Mac OS X Appearance panel text smoothing setting when rendering text, disabled by default
 pref("gfx.use_text_smoothing_setting", false);
 
-pref("browser.history_expire_days", 9);
+pref("browser.history_expire_days", 7);
 
 // loading and rendering of framesets and iframes
 pref("browser.frames.enabled", true);
@@ -248,7 +248,7 @@
 pref("application.use_ns_plugin_finder", false);
 
 // URI fixup prefs
-pref("browser.fixup.alternate.enabled", true);
+pref("browser.fixup.alternate.enabled", false);
 pref("browser.fixup.alternate.prefix", "www.");
 pref("browser.fixup.alternate.suffix", ".com");
 pref("browser.fixup.hide_user_pass", true);
@@ -501,11 +501,11 @@
 
 // Scripts & Windows prefs
 pref("dom.disable_image_src_set",           false);
-pref("dom.disable_window_flip",             false);
-pref("dom.disable_window_move_resize",      false);
-pref("dom.disable_window_status_change",    false);
+pref("dom.disable_window_flip",             true);
+pref("dom.disable_window_move_resize",      true);
+pref("dom.disable_window_status_change",    true);
 
-pref("dom.disable_window_open_feature.titlebar",    false);
+pref("dom.disable_window_open_feature.titlebar",    true);
 pref("dom.disable_window_open_feature.close",       false);
 pref("dom.disable_window_open_feature.toolbar",     false);
 pref("dom.disable_window_open_feature.location",    false);
@@ -519,7 +519,7 @@
 
 pref("dom.allow_scripts_to_close_windows",          false);
 
-pref("dom.disable_open_during_load",                false);
+pref("dom.disable_open_during_load",                true);
 pref("dom.popup_maximum",                           20);
 pref("dom.popup_allowed_events", "change click dblclick mouseup reset submit");
 pref("dom.disable_open_click_delay", 1000);
@@ -539,17 +539,17 @@
 //   2 = openAbused
 pref("privacy.popups.disable_from_plugins", 2);
 
-pref("dom.event.contextmenu.enabled",       true);
+pref("dom.event.contextmenu.enabled",       false);
 
 pref("javascript.enabled",                  true);
 pref("javascript.allow.mailnews",           false);
 pref("javascript.options.strict",           false);
 pref("javascript.options.relimit",          false);
 pref("javascript.options.jit.content",      true);
-pref("javascript.options.jit.chrome",       false);
+pref("javascript.options.jit.chrome",       true);
 
 // advanced prefs
-pref("security.enable_java",                true);
+pref("security.enable_java",                false);
 pref("advanced.mailftp",                    false);
 pref("image.animation_mode",                "normal");
 
@@ -817,7 +817,7 @@
 pref("network.dir.format", 2);
 
 // enables the prefetch service (i.e., prefetching of <link rel="next"> URLs).
-pref("network.prefetch-next", true);
+pref("network.prefetch-next", false);
 
 
 // The following prefs pertain to the negotiate-auth extension (see bug 17578),
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/security/coreconf/Darwin.mk comm-1.9.1/mozilla/security/coreconf/Darwin.mk
--- comm-1.9.1.orig/mozilla/security/coreconf/Darwin.mk	2011-01-24 16:06:16 +0900
+++ comm-1.9.1/mozilla/security/coreconf/Darwin.mk	2011-01-25 00:09:32 +0900
@@ -108,11 +108,15 @@
 OS_CFLAGS	= $(DSO_CFLAGS) $(OS_REL_CFLAGS) -Wmost -fpascal-strings -fno-common -pipe -DDARWIN -DHAVE_STRERROR -DHAVE_BSD_FLOCK $(DARWIN_SDK_CFLAGS)
 
 ifdef BUILD_OPT
+ifeq ($(MOZ_OPTIMIZE),2)
+	OPTIMIZER	= $(MOZ_OPTIMIZE_FLAGS)
+else
 ifeq (11,$(ALLOW_OPT_CODE_SIZE)$(OPT_CODE_SIZE))
 	OPTIMIZER       = -Oz
 else
 	OPTIMIZER	= -O2
 endif
+endif
 ifdef MOZ_DEBUG_SYMBOLS
 	ifdef MOZ_DEBUG_FLAGS
 		OPTIMIZER += $(MOZ_DEBUG_FLAGS)
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/security/coreconf/Linux.mk comm-1.9.1/mozilla/security/coreconf/Linux.mk
--- comm-1.9.1.orig/mozilla/security/coreconf/Linux.mk	2011-01-24 16:06:16 +0900
+++ comm-1.9.1/mozilla/security/coreconf/Linux.mk	2011-01-25 00:09:32 +0900
@@ -112,11 +112,15 @@
 endif
 
 ifdef BUILD_OPT
+ifeq ($(MOZ_OPTIMIZE),2)
+	OPTIMIZER = $(MOZ_OPTIMIZE_FLAGS)
+else
 ifeq (11,$(ALLOW_OPT_CODE_SIZE)$(OPT_CODE_SIZE))
 	OPTIMIZER = -Os
 else
 	OPTIMIZER = -O2
 endif
+endif
 ifdef MOZ_DEBUG_SYMBOLS
 	ifdef MOZ_DEBUG_FLAGS
 		OPTIMIZER += $(MOZ_DEBUG_FLAGS)
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/security/coreconf/WIN32.mk comm-1.9.1/mozilla/security/coreconf/WIN32.mk
--- comm-1.9.1.orig/mozilla/security/coreconf/WIN32.mk	2011-01-24 16:06:16 +0900
+++ comm-1.9.1/mozilla/security/coreconf/WIN32.mk	2011-01-25 00:09:32 +0900
@@ -45,7 +45,7 @@
 ifdef NS_USE_GCC
 	CC           = gcc
 	CCC          = g++
-	LINK         = ld
+	LD           = ld
 	AR           = ar
 	AR          += cr $@
 	RANLIB       = ranlib
@@ -55,7 +55,7 @@
 else
 	CC           = cl
 	CCC          = cl
-	LINK         = link
+	LD           = link
 	AR           = lib
 	AR          += -NOLOGO -OUT:"$@"
 	RANLIB       = echo
@@ -128,11 +128,15 @@
     _GEN_IMPORT_LIB=-Wl,--out-implib,$(IMPORT_LIBRARY)
     DLLFLAGS  += -mno-cygwin -o $@ -shared -Wl,--export-all-symbols $(if $(IMPORT_LIBRARY),$(_GEN_IMPORT_LIB))
     ifdef BUILD_OPT
+	ifeq ($(MOZ_OPTIMIZE),2)
+		OPTIMIZER += $(MOZ_OPTIMIZE_FLAGS)
+	else
 	ifeq (11,$(ALLOW_OPT_CODE_SIZE)$(OPT_CODE_SIZE))
 		OPTIMIZER += -Os
 	else
 		OPTIMIZER += -O2
 	endif
+	endif
 	DEFINES    += -UDEBUG -U_DEBUG -DNDEBUG
     else
 	OPTIMIZER  += -g
@@ -155,11 +159,15 @@
     endif
     ifdef BUILD_OPT
 	OS_CFLAGS  += -MD
+	ifeq ($(MOZ_OPTIMIZE),2)
+		OPTIMIZER += $(MOZ_OPTIMIZE_FLAGS)
+	else
 	ifeq (11,$(ALLOW_OPT_CODE_SIZE)$(OPT_CODE_SIZE))
 		OPTIMIZER += -O1
 	else
 		OPTIMIZER += -O2
 	endif
+	endif
 	DEFINES    += -UDEBUG -U_DEBUG -DNDEBUG
 	DLLFLAGS   += -OUT:"$@"
 	ifdef MOZ_DEBUG_SYMBOLS
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/security/coreconf/WINCE.mk comm-1.9.1/mozilla/security/coreconf/WINCE.mk
--- comm-1.9.1.orig/mozilla/security/coreconf/WINCE.mk	2011-01-24 16:06:16 +0900
+++ comm-1.9.1/mozilla/security/coreconf/WINCE.mk	2011-01-25 00:09:32 +0900
@@ -54,7 +54,7 @@
 endif
 endif
 
-LINK         = link
+LD           = link
 AR           = lib
 AR          += -NOLOGO -OUT:"$@"
 RANLIB       = echo
@@ -87,7 +87,11 @@
 
 ifdef BUILD_OPT
 #   OS_CFLAGS  += -MD
+    ifeq ($(MOZ_OPTIMIZE),2)
+    OPTIMIZER  += $(MOZ_OPTIMIZE_FLAGS)
+    else
     OPTIMIZER  += -O2
+    endif
     DEFINES    += -UDEBUG -U_DEBUG -DNDEBUG
     DLLFLAGS   += -OUT:"$@"
 else
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/security/coreconf/command.mk comm-1.9.1/mozilla/security/coreconf/command.mk
--- comm-1.9.1.orig/mozilla/security/coreconf/command.mk	2011-01-24 16:06:16 +0900
+++ comm-1.9.1/mozilla/security/coreconf/command.mk	2011-01-25 00:09:32 +0900
@@ -43,8 +43,8 @@
 AS            = $(CC)
 ASFLAGS      += $(CFLAGS)
 CCF           = $(CC) $(CFLAGS)
-LINK_DLL      = $(LINK) $(OS_DLLFLAGS) $(DLLFLAGS)
-LINK_EXE      = $(LINK) $(OS_LFLAGS) $(LFLAGS)
+LINK_DLL      = $(LD) $(OS_DLLFLAGS) $(DLLFLAGS)
+LINK_EXE      = $(LD) $(OS_LFLAGS) $(LFLAGS)
 CFLAGS        = $(OPTIMIZER) $(OS_CFLAGS) $(XP_DEFINE) $(DEFINES) $(INCLUDES) \
 		$(XCFLAGS)
 PERL          = perl
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/security/manager/Makefile.in comm-1.9.1/mozilla/security/manager/Makefile.in
--- comm-1.9.1.orig/mozilla/security/manager/Makefile.in	2011-01-24 16:06:16 +0900
+++ comm-1.9.1/mozilla/security/manager/Makefile.in	2011-01-25 00:09:32 +0900
@@ -43,6 +43,8 @@
 
 include $(DEPTH)/config/autoconf.mk
 
+export MOZ_OPTIMIZE MOZ_OPTIMIZE_FLAGS MOZ_OPTIMIZE_LDFLAGS MOZ_OPTIMIZE_SIZE_TWEAK
+
 MODULE = psm
 
 ifndef MOZ_NATIVE_NSS
@@ -239,7 +241,7 @@
 	NATIVE_CC="$(HOST_CC)" \
 	CC="$(CC)" \
 	CCC="$(CXX)" \
-	LINK="$(LD)" \
+	LD="$(LD)" \
 	AS="$(AS)" \
 	AR='$(AR) $(AR_FLAGS:$@=$$@)' \
 	RANLIB="$(RANLIB)" \
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/security/nss/lib/freebl/config.mk comm-1.9.1/mozilla/security/nss/lib/freebl/config.mk
--- comm-1.9.1.orig/mozilla/security/nss/lib/freebl/config.mk	2011-01-24 16:06:18 +0900
+++ comm-1.9.1/mozilla/security/nss/lib/freebl/config.mk	2011-01-25 00:09:32 +0900
@@ -88,6 +88,7 @@
 ifndef WINCE
 ifdef NS_USE_GCC
 OS_LIBS += -lshell32
+DEFINES += -D_WIN32_IE=0x0500
 else
 OS_LIBS += shell32.lib
 endif
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/toolkit/components/places/src/Makefile.in comm-1.9.1/mozilla/toolkit/components/places/src/Makefile.in
--- comm-1.9.1.orig/mozilla/toolkit/components/places/src/Makefile.in	2011-01-24 16:06:24 +0900
+++ comm-1.9.1/mozilla/toolkit/components/places/src/Makefile.in	2011-01-25 00:09:32 +0900
@@ -43,8 +43,10 @@
 
 include $(DEPTH)/config/autoconf.mk
 
+ifneq (1_WINNT,$(GNU_CC)_$(OS_ARCH))
 # FIXME: bug 419893
 NO_PROFILE_GUIDED_OPTIMIZE = 1
+endif
 
 MODULE = places
 LIBRARY_NAME  = places
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/mozilla/toolkit/mozapps/update/src/updater/updater.cpp comm-1.9.1/mozilla/toolkit/mozapps/update/src/updater/updater.cpp
--- comm-1.9.1.orig/mozilla/toolkit/mozapps/update/src/updater/updater.cpp	2011-01-24 16:06:26 +0900
+++ comm-1.9.1/mozilla/toolkit/mozapps/update/src/updater/updater.cpp	2011-01-25 00:09:32 +0900
@@ -1561,3 +1561,15 @@
   list.Finish(rv);
   return rv;
 }
+
+#if defined( XP_WIN ) && defined(__GNUC__)
+int main(int argc, char **argv){
+	wchar_t **argv_ = new wchar_t*[argc];
+	for(int i = 0; i < argc; i++){
+		int ws = MultiByteToWideChar(0, 0, argv[i], -1, NULL, 0);
+		argv_[i] = new wchar_t[ws];
+		MultiByteToWideChar(0, 0, argv[i], -1, argv_[i], ws);
+	}
+	return wmain(argc, argv_);
+}
+#endif
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/suite/app/Makefile.in comm-1.9.1/suite/app/Makefile.in
--- comm-1.9.1.orig/suite/app/Makefile.in	2011-01-24 16:02:30 +0900
+++ comm-1.9.1/suite/app/Makefile.in	2011-01-25 00:09:32 +0900
@@ -151,6 +151,7 @@
 
 ifdef _MSC_VER
 WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
+WIN7_MANIFEST = 1
 endif
 
 ifdef BUILD_STATIC_LIBS
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/suite/browser/browser-prefs.js comm-1.9.1/suite/browser/browser-prefs.js
--- comm-1.9.1.orig/suite/browser/browser-prefs.js	2011-01-24 16:02:30 +0900
+++ comm-1.9.1/suite/browser/browser-prefs.js	2011-01-25 00:09:32 +0900
@@ -42,7 +42,7 @@
  */
 
 pref("startup.homepage_override_url","chrome://navigator-region/locale/region.properties");
-pref("general.skins.selectedSkin", "classic/1.0");
+pref("general.skins.selectedSkin", "modern/1.0");
 
 pref("browser.chromeURL","chrome://navigator/content/navigator.xul");
 pref("browser.hiddenWindowChromeURL", "chrome://navigator/content/hiddenWindow.xul");
@@ -64,6 +64,7 @@
 pref("general.autoScroll", true);
 
 #expand pref("general.useragent.extra.__MOZ_APP_NAME__", "__MOZ_APP_DISPLAYNAME__/__MOZ_APP_VERSION__");
+#expand pref("general.useragent.extra.__MOZ_APP_NAME__.rayflood", "(rayflood)");
 
 // 0 = blank, 1 = home (browser.startup.homepage), 2 = last
 pref("browser.startup.page",                1);
@@ -112,7 +113,7 @@
 
 // various default search settings
 pref("browser.search.defaulturl", "chrome://navigator-region/locale/region.properties");
-pref("browser.search.opensidebarsearchpanel", true);
+pref("browser.search.opensidebarsearchpanel", false);
 pref("browser.search.opentabforcontextsearch", false);
 pref("browser.search.last_search_category", "NC:SearchCategory?category=urn:search:category:1");
 pref("browser.search.mode", 0);
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/suite/installer/Makefile.in comm-1.9.1/suite/installer/Makefile.in
--- comm-1.9.1.orig/suite/installer/Makefile.in	2011-01-24 16:02:30 +0900
+++ comm-1.9.1/suite/installer/Makefile.in	2011-01-25 00:09:32 +0900
@@ -55,6 +55,7 @@
 
 MOZ_PKG_REMOVALS = $(srcdir)/removed-files.in
 
+ifneq (,$(BUILD_STATIC_LIBS)$(MOZ_ENABLE_LIBXUL))
 ifeq (WINNT,$(OS_ARCH))
 MOZ_PKG_MANIFEST_P = $(srcdir)/windows/packages
 else
@@ -62,6 +63,7 @@
 MOZ_PKG_MANIFEST_P = $(srcdir)/unix/packages
 endif
 endif
+endif
 
 MOZ_NONLOCALIZED_PKG_LIST = \
 	xpcom \
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/suite/themes/classic/communicator/toolbar.css comm-1.9.1/suite/themes/classic/communicator/toolbar.css
--- comm-1.9.1.orig/suite/themes/classic/communicator/toolbar.css	2011-01-24 16:02:31 +0900
+++ comm-1.9.1/suite/themes/classic/communicator/toolbar.css	2011-01-25 00:09:32 +0900
@@ -62,6 +62,7 @@
   width: 10px;
   padding: 2px 1px;
   list-style-image: url("chrome://communicator/skin/toolbar/tbgrip-arrow.gif");
+  display: none !important;
 }
 
 toolbargrippy:hover {
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/suite/themes/classic/mac/communicator/toolbar.css comm-1.9.1/suite/themes/classic/mac/communicator/toolbar.css
--- comm-1.9.1.orig/suite/themes/classic/mac/communicator/toolbar.css	2011-01-24 16:02:31 +0900
+++ comm-1.9.1/suite/themes/classic/mac/communicator/toolbar.css	2011-01-25 00:09:32 +0900
@@ -58,6 +58,7 @@
   width: 10px;
   padding: 2px 1px;
   list-style-image: url("chrome://communicator/skin/toolbar/tbgrip-arrow.gif");
+  display: none !important;
 }
 
 toolbargrippy:hover {
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/suite/themes/classic/messenger/messageHeader.css comm-1.9.1/suite/themes/classic/messenger/messageHeader.css
--- comm-1.9.1.orig/suite/themes/classic/messenger/messageHeader.css	2011-01-24 16:02:31 +0900
+++ comm-1.9.1/suite/themes/classic/messenger/messageHeader.css	2011-01-25 00:09:32 +0900
@@ -73,6 +73,8 @@
 #msgHeaderView {
   border-right: 1px solid ThreeDShadow;
   border-left: 1px solid ThreeDShadow;
+  max-height: 8em !important;
+  overflow: auto !important;
 }
 
 #collapsedHeaderView,
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/suite/themes/classic/os2/communicator/toolbar.css comm-1.9.1/suite/themes/classic/os2/communicator/toolbar.css
--- comm-1.9.1.orig/suite/themes/classic/os2/communicator/toolbar.css	2011-01-24 16:02:31 +0900
+++ comm-1.9.1/suite/themes/classic/os2/communicator/toolbar.css	2011-01-25 00:09:32 +0900
@@ -59,6 +59,7 @@
   width: 10px;
   padding: 2px 1px;
   list-style-image: url("chrome://communicator/skin/toolbar/tbgrip-arrow.gif");
+  display: none !important;
 }
 
 toolbargrippy:hover {
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/suite/themes/modern/communicator/toolbar.css comm-1.9.1/suite/themes/modern/communicator/toolbar.css
--- comm-1.9.1.orig/suite/themes/modern/communicator/toolbar.css	2011-01-24 16:02:31 +0900
+++ comm-1.9.1/suite/themes/modern/communicator/toolbar.css	2011-01-25 00:09:32 +0900
@@ -88,6 +88,10 @@
 }
 
 /* ::::: toolbargrippy ::::: */
+
+toolbargrippy {
+  display: none !important;
+}
  
 .toolbar-primary-grippy { 
   -moz-binding: url("chrome://communicator/skin/toolbar/toolbarBindings.xml#toolbargrippy-primary");
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/suite/themes/modern/global/toolbar.css comm-1.9.1/suite/themes/modern/global/toolbar.css
--- comm-1.9.1.orig/suite/themes/modern/global/toolbar.css	2011-01-24 16:02:31 +0900
+++ comm-1.9.1/suite/themes/modern/global/toolbar.css	2011-01-25 00:09:32 +0900
@@ -98,6 +98,7 @@
   border-bottom: 1px solid #86929E;
   border-left: 1px solid #EEF0F3;
   list-style-image: url("chrome://global/skin/toolbar/tbgrip-arrow.gif");
+  display: none !important;
 }
 
 toolbargrippy:hover:active {
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' comm-1.9.1.orig/suite/themes/modern/messenger/messageHeader.css comm-1.9.1/suite/themes/modern/messenger/messageHeader.css
--- comm-1.9.1.orig/suite/themes/modern/messenger/messageHeader.css	2011-01-24 16:02:31 +0900
+++ comm-1.9.1/suite/themes/modern/messenger/messageHeader.css	2011-01-25 00:09:32 +0900
@@ -77,6 +77,8 @@
   border-right: 1px solid #7B969C;
   border-bottom: 1px solid #000000;
   border-left: 1px solid #7B969C;
+  max-height: 8em !important;
+  overflow: auto !important;
 }
 
 #collapsedHeaderView,

