summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjulien.pierre.boogz%sun.com <devnull@localhost>2007-11-14 22:47:51 +0000
committerjulien.pierre.boogz%sun.com <devnull@localhost>2007-11-14 22:47:51 +0000
commit9eb886efbbc63ca2a0686f1d07f17902386ceafc (patch)
treec010408e56dd51a13d1545fa0afce9b89231bb4e
parente5d9fc0ab005bf22658b49e95164f8957394ac44 (diff)
downloadnss-hg-9eb886efbbc63ca2a0686f1d07f17902386ceafc.tar.gz
Fix for bug 227049 . Add Windows 64 bits (AMD64) support for NSS libraries. r=nelson, relyea
-rw-r--r--security/coreconf/WIN32.mk5
-rw-r--r--security/coreconf/WIN954.0.mk4
-rw-r--r--security/coreconf/WINNT5.2.mk4
-rw-r--r--security/coreconf/WINNT6.0.mk4
-rw-r--r--security/coreconf/arch.mk3
-rw-r--r--security/nss/lib/freebl/Makefile2
-rw-r--r--security/nss/lib/freebl/win_rand.c2
7 files changed, 24 insertions, 0 deletions
diff --git a/security/coreconf/WIN32.mk b/security/coreconf/WIN32.mk
index 9320c10e2..5e9c80ea6 100644
--- a/security/coreconf/WIN32.mk
+++ b/security/coreconf/WIN32.mk
@@ -160,7 +160,12 @@ endif
# DEFINES += -D_CRT_SECURE_NO_WARNINGS
endif # NS_USE_GCC
+ifdef USE_64
+DEFINES += -DWIN64
+else
DEFINES += -DWIN32
+endif
+
ifdef MAPFILE
ifndef NS_USE_GCC
DLLFLAGS += -DEF:$(MAPFILE)
diff --git a/security/coreconf/WIN954.0.mk b/security/coreconf/WIN954.0.mk
index 12a6652a7..46e2cbfc5 100644
--- a/security/coreconf/WIN954.0.mk
+++ b/security/coreconf/WIN954.0.mk
@@ -47,7 +47,11 @@ ifeq ($(CPU_ARCH), x386)
ifndef NS_USE_GCC
OS_CFLAGS += -W3 -nologo
endif
+ifdef USE_64
+ DEFINES += -D_AMD64_
+else
DEFINES += -D_X86_
+endif
else
ifeq ($(CPU_ARCH), MIPS)
#OS_CFLAGS += -W3 -nologo
diff --git a/security/coreconf/WINNT5.2.mk b/security/coreconf/WINNT5.2.mk
index 7423692b6..b0ab1963c 100644
--- a/security/coreconf/WINNT5.2.mk
+++ b/security/coreconf/WINNT5.2.mk
@@ -45,7 +45,11 @@ include $(CORE_DEPTH)/coreconf/WIN32.mk
ifeq ($(CPU_ARCH), x386)
OS_CFLAGS += -W3 -nologo
+ifdef USE_64
+ DEFINES += -D_AMD64_
+else
DEFINES += -D_X86_
+endif
else
ifeq ($(CPU_ARCH), MIPS)
#OS_CFLAGS += -W3 -nologo
diff --git a/security/coreconf/WINNT6.0.mk b/security/coreconf/WINNT6.0.mk
index cc3618e0d..0f4763682 100644
--- a/security/coreconf/WINNT6.0.mk
+++ b/security/coreconf/WINNT6.0.mk
@@ -46,7 +46,11 @@ include $(CORE_DEPTH)/coreconf/WIN32.mk
ifeq ($(CPU_ARCH), x386)
OS_CFLAGS += -W3 -nologo
+ifdef USE_64
+ DEFINES += -D_AMD64_
+else
DEFINES += -D_X86_
+endif
else
ifeq ($(CPU_ARCH), MIPS)
#OS_CFLAGS += -W3 -nologo
diff --git a/security/coreconf/arch.mk b/security/coreconf/arch.mk
index f53847445..fba38ff27 100644
--- a/security/coreconf/arch.mk
+++ b/security/coreconf/arch.mk
@@ -259,6 +259,9 @@ ifeq (CYGWIN_NT,$(findstring CYGWIN_NT,$(OS_ARCH)))
OS_RELEASE := $(patsubst CYGWIN_NT-%,%,$(OS_ARCH))
OS_ARCH = WINNT
ifndef CPU_ARCH
+ ifeq (WOW64,$(findstring WOW64,$(OS_RELEASE)))
+ OS_RELEASE := $(patsubst %-WOW64,%,$(OS_RELEASE))
+ endif
CPU_ARCH := $(shell uname -m)
#
# Cygwin's uname -m returns "i686" on a Pentium Pro machine.
diff --git a/security/nss/lib/freebl/Makefile b/security/nss/lib/freebl/Makefile
index b8348bf39..9709fca1f 100644
--- a/security/nss/lib/freebl/Makefile
+++ b/security/nss/lib/freebl/Makefile
@@ -88,6 +88,7 @@ ifeq ($(OS_TARGET),OSF1)
endif
ifeq (,$(filter-out WINNT WIN95,$(OS_TARGET))) #omits WIN16 and WINCE
+ifndef USE_64
ifdef NS_USE_GCC
# Ideally, we want to use assembler
# ASFILES = mpi_x86.s
@@ -106,6 +107,7 @@ else
endif
endif
endif
+endif
ifeq ($(OS_TARGET),WINCE)
DEFINES += -DMP_ARGCHK=0 # no assert in WinCE
diff --git a/security/nss/lib/freebl/win_rand.c b/security/nss/lib/freebl/win_rand.c
index 5c0eff41b..b1bcd13c8 100644
--- a/security/nss/lib/freebl/win_rand.c
+++ b/security/nss/lib/freebl/win_rand.c
@@ -554,7 +554,9 @@ void RNG_FileForRNG(const char *filename)
* functions in advapi32.dll at run time.
*/
+#ifndef WIN64
typedef unsigned long HCRYPTPROV;
+#endif
#define CRYPT_VERIFYCONTEXT 0xF0000000