Bugzilla bug #4736: added dummy references to rcsid and sccsid so NSPRPUB_RELEASE_3_1_BRANCH NSPRPUB_RELEASE_3_1_1_BETA
authorwtc%netscape.com
Thu, 08 Apr 1999 01:42:50 +0000
branchNSPRPUB_RELEASE_3_1_BRANCH
changeset 542 3b900934e43a9bd23dbee1aaf3078a025f4b025c
parent 541 af002cd286101bb82fe797d8913485171b1f6ac6
child 543 0d14ae9715be6018afb10050006c58c8b7768243
push idunknown
push userunknown
push dateunknown
bugs4736
Bugzilla bug #4736: added dummy references to rcsid and sccsid so that they aren't optimized away as unused variables. (NSPRPUB_RELEASE_3_1_BRANCH)
lib/libc/src/plvrsion.c
pr/src/prvrsion.c
--- a/lib/libc/src/plvrsion.c
+++ b/lib/libc/src/plvrsion.c
@@ -55,25 +55,35 @@ static PRVersionDescription prVersionDes
     /* filename         */  _PRODUCTION,        /* the produced library name */
     /* description      */ "Portable runtime",  /* what we are */
     /* security         */ "N/A",               /* not applicable here */
     /* copywrite        */  "Copyright (c) 1998 Netscape Communications Corporation. All Rights Reserved",
     /* comment          */  "http://www.mozilla.org/NPL/",
     /* specialString    */ ""
 };
 
-PR_IMPLEMENT(const PRVersionDescription*) libVersionPoint()
-{
-    return &prVersionDescription_libplc21;
-}  /* versionEntryPointType */
-
 #ifdef XP_UNIX
 
 /*
  * Version information for the 'ident' and 'what commands
  */
 static char rcsid[] = "$Version: NSPR " PR_VERSION "  " _BUILD_STRING " $";
 static char sccsid[] = "@(#)NSPR " PR_VERSION "  " _BUILD_STRING;
 
 #endif /* XP_UNIX */
 
+PR_IMPLEMENT(const PRVersionDescription*) libVersionPoint()
+{
+#ifdef XP_UNIX
+    /*
+     * Add dummy references to rcsid and sccsid to prevent them
+     * from being optimized away as unused variables.
+     */
+    const char *dummy;
+    
+    dummy = rcsid;
+    dummy = sccsid;
+#endif
+    return &prVersionDescription_libplc21;
+}  /* versionEntryPointType */
+
 /* plvrsion.c */
 
--- a/pr/src/prvrsion.c
+++ b/pr/src/prvrsion.c
@@ -55,25 +55,35 @@ static PRVersionDescription prVersionDes
     /* filename         */  _PRODUCTION,        /* the produced library name */
     /* description      */ "Portable runtime",  /* what we are */
     /* security         */ "N/A",               /* not applicable here */
     /* copywrite        */  "Copyright (c) 1998 Netscape Communications Corporation. All Rights Reserved",
     /* comment          */  "License information: http://www.mozilla.org/NPL/",
     /* specialString    */ ""
 };
 
-PR_IMPLEMENT(const PRVersionDescription*) libVersionPoint(void)
-{
-    return &prVersionDescription_libnsrp21;
-}  /* versionEntryPointType */
-
 #ifdef XP_UNIX
 
 /*
  * Version information for the 'ident' and 'what commands
  */
 static char rcsid[] = "$Version: NSPR " PR_VERSION "  " _BUILD_STRING " $";
 static char sccsid[] = "@(#)NSPR " PR_VERSION "  " _BUILD_STRING;
 
 #endif /* XP_UNIX */
 
+PR_IMPLEMENT(const PRVersionDescription*) libVersionPoint(void)
+{
+#ifdef XP_UNIX
+    /*
+     * Add dummy references to rcsid and sccsid to prevent them
+     * from being optimized away as unused variables.
+     */ 
+    const char *dummy;
+
+    dummy = rcsid;
+    dummy = sccsid;
+#endif
+    return &prVersionDescription_libnsrp21;
+}  /* versionEntryPointType */
+
 /* prvrsion.c */