Bug 506804: Add SCCS and RCS version strings to libnssdbm3.so. r=emaldona. SOFTOKEN_3_13_BRANCH
authorwtc%google.com
Wed, 10 Feb 2010 18:01:45 +0000
branchSOFTOKEN_3_13_BRANCH
changeset 9554 bbc4cd17b1ce72767e58a0bbb62d073658d815c1
parent 9546 c356e1505a87c27629b7a5da25c0ff1a694eb9c3
child 9558 d4b0ac291ae0ba6e926209df13b430a5a4c37308
push idunknown
push userunknown
push dateunknown
reviewersemaldona
bugs506804
Bug 506804: Add SCCS and RCS version strings to libnssdbm3.so. r=emaldona. Tag: SOFTOKEN_3_13_BRANCH
security/nss/lib/softoken/legacydb/lginit.c
--- a/security/nss/lib/softoken/legacydb/lginit.c
+++ b/security/nss/lib/softoken/legacydb/lginit.c
@@ -39,16 +39,36 @@
 /* $Id$ */
 
 #include "lowkeyi.h"
 #include "pcert.h"
 #include "keydbi.h"
 #include "lgdb.h"
 #include "secoid.h"
 #include "prenv.h"
+#include "softkver.h"
+
+/* Library identity and versioning */
+
+#if defined(DEBUG)
+#define _DEBUG_STRING " (debug)"
+#else
+#define _DEBUG_STRING ""
+#endif
+
+/*
+ * Version information for the 'ident' and 'what commands
+ *
+ * NOTE: the first component of the concatenated rcsid string
+ * must not end in a '$' to prevent rcs keyword substitution.
+ */
+const char __nss_dbm_rcsid[] = "$Header: NSS " SOFTOKEN_VERSION _DEBUG_STRING
+        "  " __DATE__ " " __TIME__ " $";
+const char __nss_dbm_sccsid[] = "@(#)NSS " SOFTOKEN_VERSION _DEBUG_STRING
+        "  " __DATE__ " " __TIME__;
 
 typedef struct LGPrivateStr {
     NSSLOWCERTCertDBHandle *certDB;
     NSSLOWKEYDBHandle *keyDB;
     PRLock *dbLock;
     PLHashTable *hashTable;
 } LGPrivate;
 
@@ -599,16 +619,19 @@ loser:
 CK_RV
 legacy_Open(const char *configdir, const char *certPrefix, 
 	    const char *keyPrefix, int certVersion, int keyVersion,
 	    int flags, SDB **certDB, SDB **keyDB)
 {
     CK_RV crv = CKR_OK;
     SECStatus rv;
     PRBool readOnly = (flags == SDB_RDONLY)? PR_TRUE: PR_FALSE;
+    volatile char c; /* force a reference that won't get optimized away */
+
+    c = __nss_dbm_rcsid[0] + __nss_dbm_sccsid[0];
 
     rv = SECOID_Init();
     if (SECSuccess != rv) {
         return CKR_DEVICE_ERROR;
     }
     nsslowcert_InitLocks();
 
     if (keyDB) *keyDB = NULL;