---  misc/build/nss-3.13.5/mozilla/security/coreconf/rules.mk	2010-04-26 01:37:40.000000000 +0200
+++  misc/build/nss-3.13.5/mozilla/security/coreconf/rules.mk	2011-11-11 21:39:26.576273015 +0100
@@ -400,7 +400,7 @@
 PWD := $(shell pwd)
 ifeq (,$(findstring ;,$(PATH)))
 ifndef USE_MSYS
-PWD := $(subst \,/,$(shell cygpath -w $(PWD)))
+#PWD := $(subst \,/,$(shell cygpath -w $(PWD)))
 endif
 endif
 
---  misc/build/nss-3.13.5/mozilla/security/coreconf/WIN32.mk	2011-09-14 19:59:43.000000000 +0200
+++  misc/build/nss-3.13.5/mozilla/security/coreconf/WIN32.mk	2011-11-11 21:41:44.941584692 +0100
@@ -124,7 +124,7 @@
     # The -mnop-fun-dllimport flag allows us to avoid a drawback of
     # the dllimport attribute that a pointer to a function marked as
     # dllimport cannot be used as as a constant address.
-    OS_CFLAGS += -mwindows -mms-bitfields -mnop-fun-dllimport
+    OS_CFLAGS += -mwindows -mms-bitfields -mnop-fun-dllimport -D_WIN32_IE=0x0501 -U__MMX__ -U__SSE__ -U__SSE2__
     _GEN_IMPORT_LIB=-Wl,--out-implib,$(IMPORT_LIBRARY)
     DLLFLAGS  += -mwindows -o $@ -shared -Wl,--export-all-symbols $(if $(IMPORT_LIBRARY),$(_GEN_IMPORT_LIB))
     ifdef BUILD_OPT
---  misc/build/nss-3.13.5/mozilla/security/coreconf/WINNT.mk	2009-02-14 06:51:10.000000000 +0100
+++  misc/build/nss-3.13.5/mozilla/security/coreconf/WINNT.mk	2011-11-11 21:39:26.580272977 +0100
@@ -46,7 +46,7 @@
 #
 # Win NT needs -GT so that fibers can work
 #
-OS_CFLAGS += -GT
+#OS_CFLAGS += -GT
 
 # WINNT uses the lib prefix, Win95 and WinCE don't
 NSPR31_LIB_PREFIX = lib
---  misc/build/nss-3.13.5/mozilla/security/nss/cmd/crmftest/Makefile	2005-11-14 01:17:21.000000000 +0100
+++  misc/build/nss-3.13.5/mozilla/security/nss/cmd/crmftest/Makefile	2011-11-11 21:39:26.596273012 +0100
@@ -90,7 +90,7 @@
 LDDIST = $(DIST)/lib
 
 ifeq (,$(filter-out WIN%,$(OS_TARGET)))
-EXTRA_LIBS += $(LDDIST)/sectool.lib
+#EXTRA_LIBS += $(LDDIST)/sectool.lib
 endif
 
 include ../platrules.mk
---  misc/build/nss-3.13.5/mozilla/security/nss/cmd/pk11mode/Makefile	2009-03-31 01:40:52.000000000 +0200
+++  misc/build/nss-3.13.5/mozilla/security/nss/cmd/pk11mode/Makefile	2011-11-11 21:39:26.596273012 +0100
@@ -61,9 +61,9 @@
 ifeq ($(OS_ARCH), WINNT)
 
 EXTRA_LIBS += \
-	$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.$(LIB_SUFFIX) \
-	$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.$(LIB_SUFFIX) \
-	$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.$(LIB_SUFFIX) \
+	$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.$(IMPORT_LIB_SUFFIX) \
+	$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.$(IMPORT_LIB_SUFFIX) \
+	$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.$(IMPORT_LIB_SUFFIX) \
 	$(NULL)
 
 else
---  misc/build/nss-3.13.5/mozilla/security/nss/cmd/shlibsign/Makefile	2009-08-07 21:06:37.000000000 +0200
+++  misc/build/nss-3.13.5/mozilla/security/nss/cmd/shlibsign/Makefile	2011-11-11 21:39:26.596273012 +0100
@@ -59,9 +59,9 @@
 ifeq ($(OS_ARCH), WINNT)
 
 EXTRA_LIBS += \
-	$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.$(LIB_SUFFIX) \
-	$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.$(LIB_SUFFIX) \
-	$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.$(LIB_SUFFIX) \
+	$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.$(IMPORT_LIB_SUFFIX) \
+	$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.$(IMPORT_LIB_SUFFIX) \
+	$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.$(IMPORT_LIB_SUFFIX) \
 	$(NULL)
 
 else
@@ -85,8 +85,8 @@
 endif
 CHECKLOC = $(CHECKLIBS:.$(DLL_SUFFIX)=.chk)
 
-MD_LIB_RELEASE_FILES = $(CHECKLOC)
-ALL_TRASH += $(CHECKLOC)
+MD_LIB_RELEASE_FILES = # $(CHECKLOC)
+#ALL_TRASH += $(CHECKLOC)
 
 
 #######################################################################
@@ -120,5 +120,5 @@
 	$(call core_abspath,$(NSPR_LIB_DIR)) $(call core_abspath,$<)
 endif
 
-libs install :: $(CHECKLOC)
+libs install :: #$(CHECKLOC)
 
---  misc/build/nss-3.13.5/mozilla/security/nss/cmd/shlibsign/mangle/Makefile	2008-11-20 16:44:24.000000000 +0100
+++  misc/build/nss-3.13.5/mozilla/security/nss/cmd/shlibsign/mangle/Makefile	2011-11-11 21:39:26.600273013 +0100
@@ -59,9 +59,9 @@
 ifeq ($(OS_ARCH), WINNT)
 
 EXTRA_LIBS += \
-	$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.$(LIB_SUFFIX) \
-	$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.$(LIB_SUFFIX) \
-	$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.$(LIB_SUFFIX) \
+	$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.$(IMPORT_LIB_SUFFIX) \
+	$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.$(IMPORT_LIB_SUFFIX) \
+	$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.$(IMPORT_LIB_SUFFIX) \
 	$(NULL)
 
 else
---  misc/build/nss-3.13.5/mozilla/security/nss/lib/ckfw/builtins/config.mk	2009-06-11 02:55:34.000000000 +0200
+++  misc/build/nss-3.13.5/mozilla/security/nss/lib/ckfw/builtins/config.mk	2011-11-11 21:39:26.600273013 +0100
@@ -48,7 +48,7 @@
 
 ifeq (,$(filter-out WIN%,$(OS_TARGET)))
     SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
-    RES = $(OBJDIR)/$(LIBRARY_NAME).res
+    RES = $(OBJDIR)/$(LIBRARY_NAME).res.o
     RESNAME = $(LIBRARY_NAME).rc
 endif
 
---  misc/build/nss-3.13.5/mozilla/security/nss/lib/ckfw/capi/Makefile	2009-07-29 22:15:19.000000000 +0200
+++  misc/build/nss-3.13.5/mozilla/security/nss/lib/ckfw/capi/Makefile	2011-11-11 21:39:26.608273006 +0100
@@ -75,6 +75,9 @@
 	-lplc4 \
 	-lplds4 \
 	-lnspr4 \
+        -lcrypt32 \
+        -ladvapi32 \
+        -lrpcrt4 \
 	$(NULL)
 endif
 
---  misc/build/nss-3.13.5/mozilla/security/nss/lib/freebl/config.mk	2010-08-18 00:27:12.000000000 +0200
+++  misc/build/nss-3.13.5/mozilla/security/nss/lib/freebl/config.mk	2011-11-11 21:39:26.608273006 +0100
@@ -82,7 +82,7 @@
 # don't want the 32 in the shared library name
 SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
 
-RES     = $(OBJDIR)/$(LIBRARY_NAME).res
+RES     = $(OBJDIR)/$(LIBRARY_NAME).res.o
 RESNAME = freebl.rc
 
 ifndef WINCE
---  misc/build/nss-3.13.5/mozilla/security/nss/lib/freebl/Makefile	2011-02-06 11:13:27.000000000 +0100
+++  misc/build/nss-3.13.5/mozilla/security/nss/lib/freebl/Makefile	2011-11-11 21:39:26.608273006 +0100
@@ -167,6 +167,17 @@
     endif
 endif
 else
+# 64-bit Windows
+ifdef NS_USE_GCC
+    # win64/gcc - use the x86 code for now, skipping optimization
+    ifdef BUILD_OPT
+	OPTIMIZER += -Os
+    endif
+    ASFILES  =
+    DEFINES += -DMPI_AMD64 -DMP_USE_UINT_DIGIT
+    DEFINES += -DMP_CHAR_STORE_SLOW -DMP_IS_LITTLE_ENDIAN
+else
+# MSVC
     # -DMP_NO_MP_WORD
     ifdef BUILD_OPT
 	OPTIMIZER += -Ox  # maximum optimization for freebl
@@ -178,6 +189,7 @@
     MPI_SRCS += mpi_amd64.c
 endif
 endif
+endif
 
 ifeq ($(OS_TARGET),WINCE)
     DEFINES += -DMP_ARGCHK=0	# no assert in WinCE
---  misc/build/nss-3.13.5/mozilla/security/nss/lib/freebl/mpi/mpi-priv.h	2010-07-20 03:26:02.000000000 +0200
+++  misc/build/nss-3.13.5/mozilla/security/nss/lib/freebl/mpi/mpi-priv.h	2011-11-11 21:39:26.632273000 +0100
@@ -254,7 +254,7 @@
 #define MPI_ASM_DECL
 #endif
 
-#ifdef MPI_AMD64
+#if defined(MPI_AMD64) && defined(MP_ASSEMBLY_MULTIPLY)
 
 mp_digit MPI_ASM_DECL s_mpv_mul_set_vec64(mp_digit*, mp_digit *, mp_size, mp_digit);
 mp_digit MPI_ASM_DECL s_mpv_mul_add_vec64(mp_digit*, const mp_digit*, mp_size, mp_digit);
---  misc/build/nss-3.13.5/mozilla/security/nss/lib/nss/config.mk	2009-12-15 23:22:31.000000000 +0100
+++  misc/build/nss-3.13.5/mozilla/security/nss/lib/nss/config.mk	2011-11-11 21:39:26.632273000 +0100
@@ -42,7 +42,7 @@
 SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
 IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
 
-RES = $(OBJDIR)/$(LIBRARY_NAME).res
+RES = $(OBJDIR)/$(LIBRARY_NAME).res.o
 RESNAME = $(LIBRARY_NAME).rc
 
 ifdef NS_USE_GCC
---  misc/build/nss-3.13.5/mozilla/security/nss/lib/smime/config.mk	2009-06-11 02:55:47.000000000 +0200
+++  misc/build/nss-3.13.5/mozilla/security/nss/lib/smime/config.mk	2011-11-11 21:39:26.632273000 +0100
@@ -43,7 +43,7 @@
 SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
 IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
 
-RES = $(OBJDIR)/smime.res
+RES = $(OBJDIR)/smime.res.o
 RESNAME = smime.rc
 
 ifdef NS_USE_GCC
---  misc/build/nss-3.13.5/mozilla/security/nss/lib/softoken/config.mk	2010-06-12 02:58:33.000000000 +0200
+++  misc/build/nss-3.13.5/mozilla/security/nss/lib/softoken/config.mk	2011-11-11 21:39:26.632273000 +0100
@@ -49,7 +49,7 @@
 SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
 IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
 
-RES = $(OBJDIR)/$(LIBRARY_NAME).res
+RES = $(OBJDIR)/$(LIBRARY_NAME).res.o
 RESNAME = $(LIBRARY_NAME).rc
 
 ifdef NS_USE_GCC
---  misc/build/nss-3.13.5/mozilla/security/nss/lib/softoken/legacydb/config.mk	2009-06-11 02:55:49.000000000 +0200
+++  misc/build/nss-3.13.5/mozilla/security/nss/lib/softoken/legacydb/config.mk	2011-11-11 21:39:26.632273000 +0100
@@ -51,7 +51,7 @@
 SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
 IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
 
-RES = $(OBJDIR)/$(LIBRARY_NAME).res
+RES = $(OBJDIR)/$(LIBRARY_NAME).res.o
 RESNAME = $(LIBRARY_NAME).rc
 
 ifdef NS_USE_GCC
---  misc/build/nss-3.13.5/mozilla/security/nss/lib/ssl/config.mk	2010-02-04 20:09:08.000000000 +0100
+++  misc/build/nss-3.13.5/mozilla/security/nss/lib/ssl/config.mk	2011-11-11 21:39:26.632273000 +0100
@@ -55,7 +55,7 @@
 SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
 IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
 
-RES = $(OBJDIR)/ssl.res
+RES = $(OBJDIR)/ssl.res.o
 RESNAME = ssl.rc
 
 ifdef NS_USE_GCC
---  misc/build/nss-3.13.5/mozilla/security/nss/lib/sysinit/config.mk	2010-02-16 20:38:42.000000000 +0100
+++  misc/build/nss-3.13.5/mozilla/security/nss/lib/sysinit/config.mk	2011-11-11 21:39:26.636273000 +0100
@@ -47,8 +47,8 @@
 SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
 IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
 
-RES = $(OBJDIR)/$(LIBRARY_NAME).res
-RESNAME = $(LIBRARY_NAME).rc
+#RES = $(OBJDIR)/$(LIBRARY_NAME).res
+#RESNAME = $(LIBRARY_NAME).rc
 
 ifdef NS_USE_GCC
 EXTRA_SHARED_LIBS += \
---  misc/build/nss-3.13.5/mozilla/security/nss/lib/util/config.mk	2009-12-15 23:22:31.000000000 +0100
+++  misc/build/nss-3.13.5/mozilla/security/nss/lib/util/config.mk	2011-11-11 21:39:26.636273000 +0100
@@ -42,7 +42,7 @@
 SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
 IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
 
-RES = $(OBJDIR)/$(LIBRARY_NAME).res
+RES = $(OBJDIR)/$(LIBRARY_NAME).res.o
 RESNAME = $(LIBRARY_NAME).rc
 
 ifdef NS_USE_GCC
