diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' mozilla-1.9.1.orig/Makefile.in mozilla-1.9.1/Makefile.in
--- mozilla-1.9.1.orig/Makefile.in	2011-01-22 06:10:01 +0900
+++ mozilla-1.9.1/Makefile.in	2011-01-24 23:43:00 +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' mozilla-1.9.1.orig/browser/app/Makefile.in mozilla-1.9.1/browser/app/Makefile.in
--- mozilla-1.9.1.orig/browser/app/Makefile.in	2011-01-22 06:10:01 +0900
+++ mozilla-1.9.1/browser/app/Makefile.in	2011-01-24 23:43:00 +0900
@@ -169,6 +169,7 @@
 WIN32_EXE_LDFLAGS += -ENTRY:mainWCRTStartup
 else
 WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
+WIN7_MANIFEST = 1
 endif
 endif
 
@@ -348,7 +349,7 @@
 
 ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
 
-APP_NAME = $(MOZ_APP_DISPLAYNAME)
+APP_NAME = $(MOZ_APP_NAME)
 
 ifdef MOZ_DEBUG
 APP_NAME := $(APP_NAME)Debug
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' mozilla-1.9.1.orig/browser/app/profile/firefox.js mozilla-1.9.1/browser/app/profile/firefox.js
--- mozilla-1.9.1.orig/browser/app/profile/firefox.js	2011-01-22 06:10:01 +0900
+++ mozilla-1.9.1/browser/app/profile/firefox.js	2011-01-24 23:43:00 +0900
@@ -177,6 +177,7 @@
 pref("general.useragent.locale", "@AB_CD@");
 pref("general.skins.selectedSkin", "classic/1.0");
 pref("general.useragent.extra.firefox", "@APP_UA_NAME@/@APP_VERSION@");
+pref("general.useragent.extra.firefox.rayflood", "(rayflood)");
 
 pref("general.smoothScroll", false);
 #ifdef UNIX_BUT_NOT_MAC
@@ -194,7 +195,7 @@
 pref("browser.startup.page",                1);
 pref("browser.startup.homepage",            "resource:/browserconfig.properties");
 
-pref("browser.enable_automatic_image_resizing", true);
+pref("browser.enable_automatic_image_resizing", false);
 pref("browser.chrome.site_icons", true);
 pref("browser.chrome.favicons", true);
 pref("browser.formfill.enable", true);
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' mozilla-1.9.1.orig/browser/branding/nightly/configure.sh mozilla-1.9.1/browser/branding/nightly/configure.sh
--- mozilla-1.9.1.orig/browser/branding/nightly/configure.sh	2011-01-22 06:10:01 +0900
+++ mozilla-1.9.1/browser/branding/nightly/configure.sh	2011-01-24 23:43:00 +0900
@@ -1 +1 @@
-MOZ_APP_DISPLAYNAME=Minefield
+MOZ_APP_DISPLAYNAME=Firefox
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' mozilla-1.9.1.orig/browser/branding/unofficial/branding.nsi mozilla-1.9.1/browser/branding/unofficial/branding.nsi
--- mozilla-1.9.1.orig/browser/branding/unofficial/branding.nsi	2011-01-22 06:10:01 +0900
+++ mozilla-1.9.1/browser/branding/unofficial/branding.nsi	2011-01-24 23:43:00 +0900
@@ -40,7 +40,7 @@
 
 # BrandFullNameInternal is used for some registry and file system values
 # instead of BrandFullName and typically should not be modified.
-!define BrandFullNameInternal "Shiretoko"
+!define BrandFullNameInternal "firefox"
 !define CompanyName           "mozilla.org"
 !define URLInfoAbout          "http://www.mozilla.org"
 !define URLUpdateInfo         "http://www.mozilla.org/projects/firefox"
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' mozilla-1.9.1.orig/browser/branding/unofficial/configure.sh mozilla-1.9.1/browser/branding/unofficial/configure.sh
--- mozilla-1.9.1.orig/browser/branding/unofficial/configure.sh	2011-01-22 06:10:01 +0900
+++ mozilla-1.9.1/browser/branding/unofficial/configure.sh	2011-01-24 23:43:00 +0900
@@ -1 +1 @@
-MOZ_APP_DISPLAYNAME="Shiretoko"
+MOZ_APP_DISPLAYNAME="Firefox"
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' mozilla-1.9.1.orig/browser/branding/unofficial/locales/en-US/brand.dtd mozilla-1.9.1/browser/branding/unofficial/locales/en-US/brand.dtd
--- mozilla-1.9.1.orig/browser/branding/unofficial/locales/en-US/brand.dtd	2011-01-22 06:10:01 +0900
+++ mozilla-1.9.1/browser/branding/unofficial/locales/en-US/brand.dtd	2011-01-24 23:43:00 +0900
@@ -1,5 +1,5 @@
-<!ENTITY  brandShortName        "Shiretoko">
-<!ENTITY  brandFullName         "Shiretoko">
+<!ENTITY  brandShortName        "firefox">
+<!ENTITY  brandFullName         "firefox">
 <!ENTITY  vendorShortName       "mozilla.org">
 <!ENTITY  logoCopyright         " ">
 
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' mozilla-1.9.1.orig/browser/branding/unofficial/locales/en-US/brand.properties mozilla-1.9.1/browser/branding/unofficial/locales/en-US/brand.properties
--- mozilla-1.9.1.orig/browser/branding/unofficial/locales/en-US/brand.properties	2011-01-22 06:10:01 +0900
+++ mozilla-1.9.1/browser/branding/unofficial/locales/en-US/brand.properties	2011-01-24 23:43:00 +0900
@@ -1,3 +1,3 @@
-brandShortName=Shiretoko
-brandFullName=Shiretoko
+brandShortName=firefox
+brandFullName=firefox
 vendorShortName=mozilla.org
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' mozilla-1.9.1.orig/browser/installer/Makefile.in mozilla-1.9.1/browser/installer/Makefile.in
--- mozilla-1.9.1.orig/browser/installer/Makefile.in	2011-01-22 06:10:01 +0900
+++ mozilla-1.9.1/browser/installer/Makefile.in	2011-01-24 23:43:00 +0900
@@ -67,8 +67,6 @@
 MOZ_PKG_MANIFEST_P = $(srcdir)/unix/packages-static
 endif
 endif
-else
-$(error you need a "--enable-static or --enable-libxul" build to package a build)
 endif
 
 MOZ_NONLOCALIZED_PKG_LIST = \
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' mozilla-1.9.1.orig/browser/installer/windows/nsis/defines.nsi.in mozilla-1.9.1/browser/installer/windows/nsis/defines.nsi.in
--- mozilla-1.9.1.orig/browser/installer/windows/nsis/defines.nsi.in	2011-01-22 06:10:01 +0900
+++ mozilla-1.9.1/browser/installer/windows/nsis/defines.nsi.in	2011-01-24 23:43:00 +0900
@@ -9,7 +9,7 @@
 !define AppRegName            "Firefox"
 !define MinUnsupportedVer     "Microsoft Windows 2000"
 
-!define BrandShortName        "@MOZ_APP_DISPLAYNAME@"
+!define BrandShortName        "@MOZ_APP_NAME@"
 !define PreReleaseSuffix      "@PRE_RELEASE_SUFFIX@"
 !define BrandFullName         "${BrandFullNameInternal}${PreReleaseSuffix}"
 
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' mozilla-1.9.1.orig/browser/locales/en-US/chrome/branding/brand.dtd mozilla-1.9.1/browser/locales/en-US/chrome/branding/brand.dtd
--- mozilla-1.9.1.orig/browser/locales/en-US/chrome/branding/brand.dtd	2011-01-22 06:10:01 +0900
+++ mozilla-1.9.1/browser/locales/en-US/chrome/branding/brand.dtd	2011-01-24 23:43:00 +0900
@@ -1,4 +1,4 @@
-<!ENTITY  brandShortName        "Minefield">
-<!ENTITY  brandFullName         "Minefield">            
+<!ENTITY  brandShortName        "firefox">
+<!ENTITY  brandFullName         "firefox">            
 <!ENTITY  vendorShortName       "Mozilla">
 <!ENTITY  logoCopyright         " ">
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' mozilla-1.9.1.orig/browser/locales/en-US/chrome/branding/brand.properties mozilla-1.9.1/browser/locales/en-US/chrome/branding/brand.properties
--- mozilla-1.9.1.orig/browser/locales/en-US/chrome/branding/brand.properties	2011-01-22 06:10:01 +0900
+++ mozilla-1.9.1/browser/locales/en-US/chrome/branding/brand.properties	2011-01-24 23:43:00 +0900
@@ -1,3 +1,3 @@
-brandShortName=Minefield
-brandFullName=Minefield
+brandShortName=firefox
+brandFullName=firefox
 vendorShortName=Mozilla
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' mozilla-1.9.1.orig/build/automation-build.mk mozilla-1.9.1/build/automation-build.mk
--- mozilla-1.9.1.orig/build/automation-build.mk	2011-01-22 06:10:02 +0900
+++ mozilla-1.9.1/build/automation-build.mk	2011-01-24 23:43:00 +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' mozilla-1.9.1.orig/client.mk mozilla-1.9.1/client.mk
--- mozilla-1.9.1.orig/client.mk	2011-01-22 06:10:02 +0900
+++ mozilla-1.9.1/client.mk	2011-01-24 23:43:00 +0900
@@ -136,7 +136,7 @@
 
 
 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
 
@@ -316,8 +316,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
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' mozilla-1.9.1.orig/config/config.mk mozilla-1.9.1/config/config.mk
--- mozilla-1.9.1.orig/config/config.mk	2011-01-22 06:10:02 +0900
+++ mozilla-1.9.1/config/config.mk	2011-01-24 23:43:00 +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' mozilla-1.9.1.orig/config/rules.mk mozilla-1.9.1/config/rules.mk
--- mozilla-1.9.1.orig/config/rules.mk	2011-01-22 06:10:02 +0900
+++ mozilla-1.9.1/config/rules.mk	2011-01-24 23:43:01 +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' mozilla-1.9.1.orig/config/uiAccess.manifest mozilla-1.9.1/config/uiAccess.manifest
--- mozilla-1.9.1.orig/config/uiAccess.manifest	1970-01-01 09:00:00 +0900
+++ mozilla-1.9.1/config/uiAccess.manifest	2011-01-24 23:43:02 +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' mozilla-1.9.1.orig/config/win7.manifest mozilla-1.9.1/config/win7.manifest
--- mozilla-1.9.1.orig/config/win7.manifest	1970-01-01 09:00:00 +0900
+++ mozilla-1.9.1/config/win7.manifest	2011-01-24 23:43:02 +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' mozilla-1.9.1.orig/configure mozilla-1.9.1/configure
--- mozilla-1.9.1.orig/configure	2011-01-22 06:16:27 +0900
+++ mozilla-1.9.1/configure	2011-01-24 23:43:01 +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' mozilla-1.9.1.orig/embedding/browser/activex/src/common/StdAfx.h mozilla-1.9.1/embedding/browser/activex/src/common/StdAfx.h
--- mozilla-1.9.1.orig/embedding/browser/activex/src/common/StdAfx.h	2011-01-22 06:10:05 +0900
+++ mozilla-1.9.1/embedding/browser/activex/src/common/StdAfx.h	2011-01-24 23:43:01 +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' mozilla-1.9.1.orig/embedding/browser/activex/src/control/DropTarget.cpp mozilla-1.9.1/embedding/browser/activex/src/control/DropTarget.cpp
--- mozilla-1.9.1.orig/embedding/browser/activex/src/control/DropTarget.cpp	2011-01-22 06:10:05 +0900
+++ mozilla-1.9.1/embedding/browser/activex/src/control/DropTarget.cpp	2011-01-24 23:43:01 +0900
@@ -216,7 +216,7 @@
     FORMATETC formatetc;
     STGMEDIUM stgmedium;
     memset(&formatetc, 0, sizeof(formatetc));
-    memset(&stgmedium, 0, sizeof(formatetc));
+    memset(&stgmedium, 0, sizeof(stgmedium));
 
     formatetc.dwAspect = DVASPECT_CONTENT;
     formatetc.lindex = -1;
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' mozilla-1.9.1.orig/embedding/browser/activex/src/control/StdAfx.h mozilla-1.9.1/embedding/browser/activex/src/control/StdAfx.h
--- mozilla-1.9.1.orig/embedding/browser/activex/src/control/StdAfx.h	2011-01-22 06:10:05 +0900
+++ mozilla-1.9.1/embedding/browser/activex/src/control/StdAfx.h	2011-01-24 23:43:01 +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' mozilla-1.9.1.orig/embedding/browser/activex/src/plugin/StdAfx.h mozilla-1.9.1/embedding/browser/activex/src/plugin/StdAfx.h
--- mozilla-1.9.1.orig/embedding/browser/activex/src/plugin/StdAfx.h	2011-01-22 06:10:05 +0900
+++ mozilla-1.9.1/embedding/browser/activex/src/plugin/StdAfx.h	2011-01-24 23:43:01 +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' mozilla-1.9.1.orig/embedding/browser/activex/src/pluginhostctrl/StdAfx.h mozilla-1.9.1/embedding/browser/activex/src/pluginhostctrl/StdAfx.h
--- mozilla-1.9.1.orig/embedding/browser/activex/src/pluginhostctrl/StdAfx.h	2011-01-22 06:10:05 +0900
+++ mozilla-1.9.1/embedding/browser/activex/src/pluginhostctrl/StdAfx.h	2011-01-24 23:43:01 +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' mozilla-1.9.1.orig/embedding/browser/activex/src/pluginhostctrl/pluginhostctrlps.mk mozilla-1.9.1/embedding/browser/activex/src/pluginhostctrl/pluginhostctrlps.mk
--- mozilla-1.9.1.orig/embedding/browser/activex/src/pluginhostctrl/pluginhostctrlps.mk	2011-01-22 06:10:05 +0900
+++ mozilla-1.9.1/embedding/browser/activex/src/pluginhostctrl/pluginhostctrlps.mk	2011-01-24 23:43:01 +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' mozilla-1.9.1.orig/embedding/browser/activex/src/xml/StdAfx.h mozilla-1.9.1/embedding/browser/activex/src/xml/StdAfx.h
--- mozilla-1.9.1.orig/embedding/browser/activex/src/xml/StdAfx.h	2011-01-22 06:10:05 +0900
+++ mozilla-1.9.1/embedding/browser/activex/src/xml/StdAfx.h	2011-01-24 23:43:01 +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' mozilla-1.9.1.orig/extensions/python/dom/src/Makefile.in mozilla-1.9.1/extensions/python/dom/src/Makefile.in
--- mozilla-1.9.1.orig/extensions/python/dom/src/Makefile.in	2011-01-22 06:10:05 +0900
+++ mozilla-1.9.1/extensions/python/dom/src/Makefile.in	2011-01-24 23:43:01 +0900
@@ -47,5 +47,9 @@
 
 include $(topsrcdir)/config/rules.mk
 
+ifneq (,$(filter 1600,$(_MSC_VER)))
+COMPILE_CXXFLAGS += -UHAVE_STDINT_H
+endif
+
 clobber::
 	rm -f *.ilk
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' mozilla-1.9.1.orig/extensions/python/dom/src/nsPyContext.cpp mozilla-1.9.1/extensions/python/dom/src/nsPyContext.cpp
--- mozilla-1.9.1.orig/extensions/python/dom/src/nsPyContext.cpp	2011-01-22 06:10:05 +0900
+++ mozilla-1.9.1/extensions/python/dom/src/nsPyContext.cpp	2011-01-24 23:43:01 +0900
@@ -52,9 +52,15 @@
 
 #include "nsPyDOM.h"
 #include "nsPyContext.h"
+#if defined(__GNUC__) && __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
 #include "compile.h"
 #include "eval.h"
 #include "marshal.h"
+#if defined(__GNUC__) && __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
 
 #ifdef NS_DEBUG
 nsPyDOMObjectLeakStats gLeakStats;
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' mozilla-1.9.1.orig/extensions/python/dom/test/pyxultest/Makefile.in mozilla-1.9.1/extensions/python/dom/test/pyxultest/Makefile.in
--- mozilla-1.9.1.orig/extensions/python/dom/test/pyxultest/Makefile.in	2011-01-22 06:10:05 +0900
+++ mozilla-1.9.1/extensions/python/dom/test/pyxultest/Makefile.in	2011-01-24 23:43:01 +0900
@@ -55,6 +55,8 @@
 #INSTALL_EXTENSION_ID   = pyxultest@mozilla.org
 #XPI_PKGNAME            = pyxultest-$(MOZ_APP_VERSION)
 DIST_FILES      = application.ini
+BUILD_ID = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID)
+DEFINES += -DBUILD_ID=$(BUILD_ID)
 endif
 
 PREF_JS_EXPORTS = $(srcdir)/pyxultest-prefs.js
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' mozilla-1.9.1.orig/gfx/cairo/cairo/src/Makefile.in mozilla-1.9.1/gfx/cairo/cairo/src/Makefile.in
--- mozilla-1.9.1.orig/gfx/cairo/cairo/src/Makefile.in	2011-01-22 06:10:06 +0900
+++ mozilla-1.9.1/gfx/cairo/cairo/src/Makefile.in	2011-01-24 23:43:01 +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' mozilla-1.9.1.orig/gfx/ots/include/opentype-sanitiser.h mozilla-1.9.1/gfx/ots/include/opentype-sanitiser.h
--- mozilla-1.9.1.orig/gfx/ots/include/opentype-sanitiser.h	2011-01-22 06:10:06 +0900
+++ mozilla-1.9.1/gfx/ots/include/opentype-sanitiser.h	2011-01-24 23:43:01 +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' mozilla-1.9.1.orig/jpeg/Makefile.in mozilla-1.9.1/jpeg/Makefile.in
--- mozilla-1.9.1.orig/jpeg/Makefile.in	2011-01-22 06:10:07 +0900
+++ mozilla-1.9.1/jpeg/Makefile.in	2011-01-24 23:43:01 +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' mozilla-1.9.1.orig/js/src/Makefile.in mozilla-1.9.1/js/src/Makefile.in
--- mozilla-1.9.1.orig/js/src/Makefile.in	2011-01-22 06:10:08 +0900
+++ mozilla-1.9.1/js/src/Makefile.in	2011-01-24 23:43:01 +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' mozilla-1.9.1.orig/js/src/config/rules.mk mozilla-1.9.1/js/src/config/rules.mk
--- mozilla-1.9.1.orig/js/src/config/rules.mk	2011-01-22 06:10:08 +0900
+++ mozilla-1.9.1/js/src/config/rules.mk	2011-01-24 23:43:01 +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' mozilla-1.9.1.orig/js/src/configure mozilla-1.9.1/js/src/configure
--- mozilla-1.9.1.orig/js/src/configure	2011-01-22 06:16:27 +0900
+++ mozilla-1.9.1/js/src/configure	2011-01-24 23:43:01 +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' mozilla-1.9.1.orig/memory/jemalloc/Makefile.in mozilla-1.9.1/memory/jemalloc/Makefile.in
--- mozilla-1.9.1.orig/memory/jemalloc/Makefile.in	2011-01-22 06:10:18 +0900
+++ mozilla-1.9.1/memory/jemalloc/Makefile.in	2011-01-24 23:43:01 +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' mozilla-1.9.1.orig/memory/jemalloc/crtvc9sp1.diff mozilla-1.9.1/memory/jemalloc/crtvc9sp1.diff
--- mozilla-1.9.1.orig/memory/jemalloc/crtvc9sp1.diff	1970-01-01 09:00:00 +0900
+++ mozilla-1.9.1/memory/jemalloc/crtvc9sp1.diff	2011-01-24 23:43:02 +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' mozilla-1.9.1.orig/modules/libimg/png/Makefile.in mozilla-1.9.1/modules/libimg/png/Makefile.in
--- mozilla-1.9.1.orig/modules/libimg/png/Makefile.in	2011-01-22 06:10:18 +0900
+++ mozilla-1.9.1/modules/libimg/png/Makefile.in	2011-01-24 23:43:01 +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' mozilla-1.9.1.orig/modules/libpref/src/init/all.js mozilla-1.9.1/modules/libpref/src/init/all.js
--- mozilla-1.9.1.orig/modules/libpref/src/init/all.js	2011-01-22 06:10:18 +0900
+++ mozilla-1.9.1/modules/libpref/src/init/all.js	2011-01-24 23:43:01 +0900
@@ -546,7 +546,7 @@
 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);
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' mozilla-1.9.1.orig/mozconfig mozilla-1.9.1/mozconfig
--- mozilla-1.9.1.orig/mozconfig	1970-01-01 09:00:00 +0900
+++ mozilla-1.9.1/mozconfig	2011-01-24 23:43:02 +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' mozilla-1.9.1.orig/security/coreconf/Darwin.mk mozilla-1.9.1/security/coreconf/Darwin.mk
--- mozilla-1.9.1.orig/security/coreconf/Darwin.mk	2011-01-22 06:10:24 +0900
+++ mozilla-1.9.1/security/coreconf/Darwin.mk	2011-01-24 23:43:01 +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' mozilla-1.9.1.orig/security/coreconf/Linux.mk mozilla-1.9.1/security/coreconf/Linux.mk
--- mozilla-1.9.1.orig/security/coreconf/Linux.mk	2011-01-22 06:10:24 +0900
+++ mozilla-1.9.1/security/coreconf/Linux.mk	2011-01-24 23:43:01 +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' mozilla-1.9.1.orig/security/coreconf/WIN32.mk mozilla-1.9.1/security/coreconf/WIN32.mk
--- mozilla-1.9.1.orig/security/coreconf/WIN32.mk	2011-01-22 06:10:24 +0900
+++ mozilla-1.9.1/security/coreconf/WIN32.mk	2011-01-24 23:43:01 +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' mozilla-1.9.1.orig/security/coreconf/WINCE.mk mozilla-1.9.1/security/coreconf/WINCE.mk
--- mozilla-1.9.1.orig/security/coreconf/WINCE.mk	2011-01-22 06:10:24 +0900
+++ mozilla-1.9.1/security/coreconf/WINCE.mk	2011-01-24 23:43:01 +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' mozilla-1.9.1.orig/security/coreconf/command.mk mozilla-1.9.1/security/coreconf/command.mk
--- mozilla-1.9.1.orig/security/coreconf/command.mk	2011-01-22 06:10:24 +0900
+++ mozilla-1.9.1/security/coreconf/command.mk	2011-01-24 23:43:01 +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' mozilla-1.9.1.orig/security/manager/Makefile.in mozilla-1.9.1/security/manager/Makefile.in
--- mozilla-1.9.1.orig/security/manager/Makefile.in	2011-01-22 06:10:24 +0900
+++ mozilla-1.9.1/security/manager/Makefile.in	2011-01-24 23:43:01 +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' mozilla-1.9.1.orig/security/nss/lib/freebl/config.mk mozilla-1.9.1/security/nss/lib/freebl/config.mk
--- mozilla-1.9.1.orig/security/nss/lib/freebl/config.mk	2011-01-22 06:10:25 +0900
+++ mozilla-1.9.1/security/nss/lib/freebl/config.mk	2011-01-24 23:43:01 +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' mozilla-1.9.1.orig/toolkit/components/places/src/Makefile.in mozilla-1.9.1/toolkit/components/places/src/Makefile.in
--- mozilla-1.9.1.orig/toolkit/components/places/src/Makefile.in	2011-01-22 06:10:28 +0900
+++ mozilla-1.9.1/toolkit/components/places/src/Makefile.in	2011-01-24 23:43:01 +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' mozilla-1.9.1.orig/toolkit/mozapps/installer/packager.mk mozilla-1.9.1/toolkit/mozapps/installer/packager.mk
--- mozilla-1.9.1.orig/toolkit/mozapps/installer/packager.mk	2011-01-22 06:10:29 +0900
+++ mozilla-1.9.1/toolkit/mozapps/installer/packager.mk	2011-01-24 23:43:01 +0900
@@ -140,9 +140,9 @@
 ifeq ($(MOZ_PKG_FORMAT),DMG)
 ifndef _APPNAME
 ifdef MOZ_DEBUG
-_APPNAME	= $(MOZ_APP_DISPLAYNAME)Debug.app
+_APPNAME	= $(MOZ_APP_NAME)Debug.app
 else
-_APPNAME	= $(MOZ_APP_DISPLAYNAME).app
+_APPNAME	= $(MOZ_APP_NAME).app
 endif
 endif
 ifndef _BINPATH
@@ -174,7 +174,7 @@
 endif
 MAKE_PACKAGE	= $(_ABS_MOZSRCDIR)/build/package/mac_osx/pkg-dmg \
   --source "$(PKG_DMG_SOURCE)" --target "$(PACKAGE)" \
-  --volname "$(MOZ_APP_DISPLAYNAME)" $(PKG_DMG_FLAGS)
+  --volname "$(MOZ_APP_NAME)" $(PKG_DMG_FLAGS)
 _ABS_DIST = $(shell cd $(DIST) && pwd)
 UNMAKE_PACKAGE	= \
   set -ex; \
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' mozilla-1.9.1.orig/toolkit/mozapps/update/src/updater/updater.cpp mozilla-1.9.1/toolkit/mozapps/update/src/updater/updater.cpp
--- mozilla-1.9.1.orig/toolkit/mozapps/update/src/updater/updater.cpp	2011-01-22 06:10:29 +0900
+++ mozilla-1.9.1/toolkit/mozapps/update/src/updater/updater.cpp	2011-01-24 23:43:01 +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' mozilla-1.9.1.orig/xulrunner/app/Makefile.in mozilla-1.9.1/xulrunner/app/Makefile.in
--- mozilla-1.9.1.orig/xulrunner/app/Makefile.in	2011-01-22 06:10:34 +0900
+++ mozilla-1.9.1/xulrunner/app/Makefile.in	2011-01-24 23:43:01 +0900
@@ -151,6 +151,7 @@
 WIN32_EXE_LDFLAGS += -ENTRY:mainWCRTStartup
 else
 WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
+WIN7_MANIFEST = 1
 endif
 endif
 
diff -urN --strip-trailing-cr -x CVS -x '*.pyc' -x '*.stackdump' mozilla-1.9.1.orig/xulrunner/stub/Makefile.in mozilla-1.9.1/xulrunner/stub/Makefile.in
--- mozilla-1.9.1.orig/xulrunner/stub/Makefile.in	2011-01-22 06:10:34 +0900
+++ mozilla-1.9.1/xulrunner/stub/Makefile.in	2011-01-24 23:43:01 +0900
@@ -98,6 +98,7 @@
 WIN32_EXE_LDFLAGS += -ENTRY:mainWCRTStartup
 else
 WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
+WIN7_MANIFEST = 1
 endif
 endif
 

