summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrelyea%netscape.com <devnull@localhost>2001-02-21 22:18:42 +0000
committerrelyea%netscape.com <devnull@localhost>2001-02-21 22:18:42 +0000
commitb5d42d36725b56605038c79b79d913ba2fa08559 (patch)
tree472a0e5b821275c66bc2485b7f75b503f8959f5b
parent9808a1fb2e521c73c3d5ac45da3b9525143cc745 (diff)
downloadnss-hg-b5d42d36725b56605038c79b79d913ba2fa08559.tar.gz
Leave a reference to the static version strings so agressive linkers linkers
like AIS won't optimize the id strings away.
-rw-r--r--security/nss/lib/nss/nssinit.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/security/nss/lib/nss/nssinit.c b/security/nss/lib/nss/nssinit.c
index fb1ccdf12..d450fdb41 100644
--- a/security/nss/lib/nss/nssinit.c
+++ b/security/nss/lib/nss/nssinit.c
@@ -374,6 +374,10 @@ NSS_Shutdown(void)
SECKEY_SetDefaultKeyDB(NULL);
}
+
+extern const char __nss_base_rcsid[];
+extern const char __nss_base_sccsid[];
+
PRBool
NSS_VersionCheck(const char *importedVersion)
{
@@ -388,6 +392,9 @@ NSS_VersionCheck(const char *importedVersion)
*/
int vmajor = 0, vminor = 0, vpatch = 0;
const char *ptr = importedVersion;
+ volatile char c; /* force a reference that won't get optimized away */
+
+ c = __nss_base_rcsid[0] + __nss_base_sccsid[0];
while (isdigit(*ptr)) {
vmajor = 10 * vmajor + *ptr - '0';
@@ -423,3 +430,5 @@ NSS_VersionCheck(const char *importedVersion)
}
return PR_TRUE;
}
+
+