summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2002-05-25 06:52:19 +0000
committerwtc%netscape.com <devnull@localhost>2002-05-25 06:52:19 +0000
commitecc56687e88df239322f7c3b9cf9581bf82f80c2 (patch)
treedbb1b36ce19d5eb66bfb01f951f3af89e78d2013
parentadea7e0f9d9f9329f133f331cadce0e011df7ae9 (diff)
downloadnss-hg-ecc56687e88df239322f7c3b9cf9581bf82f80c2.tar.gz
Bug 142575: use the /EXPORT linker option on the command line.
Modified files: nssinit.c config.mk
-rw-r--r--security/nss/lib/nss/config.mk7
-rw-r--r--security/nss/lib/nss/nssinit.c5
2 files changed, 9 insertions, 3 deletions
diff --git a/security/nss/lib/nss/config.mk b/security/nss/lib/nss/config.mk
index c18b1c6ae..607f3a215 100644
--- a/security/nss/lib/nss/config.mk
+++ b/security/nss/lib/nss/config.mk
@@ -97,3 +97,10 @@ ifeq ($(OS_TARGET),SunOS)
# dependencies (libsoftokn3.so) in the same directory where it resides.
MKSHLIB += -R '$$ORIGIN'
endif
+
+ifeq (,$(filter-out WINNT WIN95,$(OS_TARGET)))
+# Export 'mktemp' to be backward compatible with NSS 3.2.x and 3.3.x.
+# See bug 142575.
+DEFINES += -DWIN32_NSS3_DLL_COMPAT
+DLLFLAGS += -EXPORT:mktemp=nss_mktemp
+endif
diff --git a/security/nss/lib/nss/nssinit.c b/security/nss/lib/nss/nssinit.c
index a0f3f66e4..9ef35d704 100644
--- a/security/nss/lib/nss/nssinit.c
+++ b/security/nss/lib/nss/nssinit.c
@@ -59,16 +59,15 @@
* definition (in DBM) was moved from nss3.dll to softokn3.dll
* in NSS 3.4. See bug 142575.
*/
-#ifdef WIN32
+#ifdef WIN32_NSS3_DLL_COMPAT
#include <io.h>
+/* exported as 'mktemp' */
char *
nss_mktemp(char *path)
{
return _mktemp(path);
}
-
-#pragma comment(linker, "/export:mktemp=_nss_mktemp")
#endif
#define NSS_MAX_FLAG_SIZE sizeof("readOnly")+sizeof("noCertDB")+ \