Bugzilla #25970: do not need to define PR_VMAJOR_STR in prinit.h. NSPRPUB_RELEASE_4_0_BRANCH
authorwtc%netscape.com
Tue, 01 Feb 2000 06:34:20 +0000
branchNSPRPUB_RELEASE_4_0_BRANCH
changeset 1131 359113e056950b96b3f14a2934a8de7d5c6f4ed9
parent 1128 1362f115230f6618e170a0d950e42bafaa17146c
child 1132 420cbc84ed14a800aed260e76cc720e2e499a441
push idunknown
push userunknown
push dateunknown
bugs25970
Bugzilla #25970: do not need to define PR_VMAJOR_STR in prinit.h. The string can be constructed from PR_VMAJOR using the C preprocessor stringize operator # and a double-macro trick. Updated copyright years to 1996-2000. Modified files: prinit.h, nspr.rc, plds.rc, prstrms.rc, plc.rc (NSPRPUB_RELEASE_4_0_BRANCH)
lib/ds/plds.rc
lib/libc/src/plc.rc
lib/prstreams/prstrms.rc
pr/include/prinit.h
pr/src/nspr.rc
--- a/lib/ds/plds.rc
+++ b/lib/ds/plds.rc
@@ -17,16 +17,20 @@
  */
 
 #include "prinit.h"
 #include <winver.h>
 
 #define MY_LIBNAME "plds"
 #define MY_FILEDESCRIPTION "PLDS Library"
 
+#define STRINGIZE(x) #x
+#define STRINGIZE2(x) STRINGIZE(x)
+#define PR_VMAJOR_STR STRINGIZE2(PR_VMAJOR)
+
 #ifdef _DEBUG
 #define MY_DEBUG_STR " (debug)"
 #define MY_FILEFLAGS_1 VS_FF_DEBUG
 #else
 #define MY_DEBUG_STR ""
 #define MY_FILEFLAGS_1 0x0L
 #endif
 #if PR_BETA
@@ -61,17 +65,17 @@ BEGIN
     BLOCK "StringFileInfo"
     BEGIN
         BLOCK "040904B0" // Lang=US English, CharSet=Unicode
         BEGIN
             VALUE "CompanyName", "Netscape Communications Corporation\0"
             VALUE "FileDescription", MY_FILEDESCRIPTION MY_DEBUG_STR "\0"
             VALUE "FileVersion", PR_VERSION "\0"
             VALUE "InternalName", MY_INTERNAL_NAME "\0"
-            VALUE "LegalCopyright", "Copyright \251 1996-1999 Netscape Communications Corporation\0"
+            VALUE "LegalCopyright", "Copyright \251 1996-2000 Netscape Communications Corporation\0"
             VALUE "OriginalFilename", MY_INTERNAL_NAME ".dll\0"
             VALUE "ProductName", "Netscape Portable Runtime\0"
             VALUE "ProductVersion", PR_VERSION "\0"
         END
     END
     BLOCK "VarFileInfo"
     BEGIN
         VALUE "Translation", 0x409, 1200
--- a/lib/libc/src/plc.rc
+++ b/lib/libc/src/plc.rc
@@ -17,16 +17,20 @@
  */
 
 #include "prinit.h"
 #include <winver.h>
 
 #define MY_LIBNAME "plc"
 #define MY_FILEDESCRIPTION "PLC Library"
 
+#define STRINGIZE(x) #x
+#define STRINGIZE2(x) STRINGIZE(x)
+#define PR_VMAJOR_STR STRINGIZE2(PR_VMAJOR)
+
 #ifdef _DEBUG
 #define MY_DEBUG_STR " (debug)"
 #define MY_FILEFLAGS_1 VS_FF_DEBUG
 #else
 #define MY_DEBUG_STR ""
 #define MY_FILEFLAGS_1 0x0L
 #endif
 #if PR_BETA
@@ -61,17 +65,17 @@ BEGIN
     BLOCK "StringFileInfo"
     BEGIN
         BLOCK "040904B0" // Lang=US English, CharSet=Unicode
         BEGIN
             VALUE "CompanyName", "Netscape Communications Corporation\0"
             VALUE "FileDescription", MY_FILEDESCRIPTION MY_DEBUG_STR "\0"
             VALUE "FileVersion", PR_VERSION "\0"
             VALUE "InternalName", MY_INTERNAL_NAME "\0"
-            VALUE "LegalCopyright", "Copyright \251 1996-1999 Netscape Communications Corporation\0"
+            VALUE "LegalCopyright", "Copyright \251 1996-2000 Netscape Communications Corporation\0"
             VALUE "OriginalFilename", MY_INTERNAL_NAME ".dll\0"
             VALUE "ProductName", "Netscape Portable Runtime\0"
             VALUE "ProductVersion", PR_VERSION "\0"
         END
     END
     BLOCK "VarFileInfo"
     BEGIN
         VALUE "Translation", 0x409, 1200
--- a/lib/prstreams/prstrms.rc
+++ b/lib/prstreams/prstrms.rc
@@ -17,16 +17,20 @@
  */
 
 #include "prinit.h"
 #include <winver.h>
 
 #define MY_LIBNAME "prstrms"
 #define MY_FILEDESCRIPTION "PRSTRMS Library"
 
+#define STRINGIZE(x) #x
+#define STRINGIZE2(x) STRINGIZE(x)
+#define PR_VMAJOR_STR STRINGIZE2(PR_VMAJOR)
+
 #ifdef _DEBUG
 #define MY_DEBUG_STR " (debug)"
 #define MY_FILEFLAGS_1 VS_FF_DEBUG
 #else
 #define MY_DEBUG_STR ""
 #define MY_FILEFLAGS_1 0x0L
 #endif
 #if PR_BETA
@@ -61,17 +65,17 @@ BEGIN
     BLOCK "StringFileInfo"
     BEGIN
         BLOCK "040904B0" // Lang=US English, CharSet=Unicode
         BEGIN
             VALUE "CompanyName", "Netscape Communications Corporation\0"
             VALUE "FileDescription", MY_FILEDESCRIPTION MY_DEBUG_STR "\0"
             VALUE "FileVersion", PR_VERSION "\0"
             VALUE "InternalName", MY_INTERNAL_NAME "\0"
-            VALUE "LegalCopyright", "Copyright \251 1996-1999 Netscape Communications Corporation\0"
+            VALUE "LegalCopyright", "Copyright \251 1996-2000 Netscape Communications Corporation\0"
             VALUE "OriginalFilename", MY_INTERNAL_NAME ".dll\0"
             VALUE "ProductName", "Netscape Portable Runtime\0"
             VALUE "ProductVersion", PR_VERSION "\0"
         END
     END
     BLOCK "VarFileInfo"
     BEGIN
         VALUE "Translation", 0x409, 1200
--- a/pr/include/prinit.h
+++ b/pr/include/prinit.h
@@ -41,17 +41,16 @@ PR_BEGIN_EXTERN_C
 ** used to build your component is anywhere close to being compatible with
 ** what is in the underlying library.
 **
 ** The format of the version string is
 **     "<major version>.<minor version> <build date>"
 */
 #define PR_VERSION  "4.0 Beta"
 #define PR_VMAJOR   4
-#define PR_VMAJOR_STR "4"
 #define PR_VMINOR   0
 #define PR_VPATCH   0
 #define PR_BETA     PR_TRUE
 
 /*
 ** PRVersionCheck
 **
 ** The basic signature of the function that is called to provide version
--- a/pr/src/nspr.rc
+++ b/pr/src/nspr.rc
@@ -17,16 +17,20 @@
  */
 
 #include "prinit.h"
 #include <winver.h>
 
 #define MY_LIBNAME "nspr"
 #define MY_FILEDESCRIPTION "NSPR Library"
 
+#define STRINGIZE(x) #x
+#define STRINGIZE2(x) STRINGIZE(x)
+#define PR_VMAJOR_STR STRINGIZE2(PR_VMAJOR)
+
 #ifdef _DEBUG
 #define MY_DEBUG_STR " (debug)"
 #define MY_FILEFLAGS_1 VS_FF_DEBUG
 #else
 #define MY_DEBUG_STR ""
 #define MY_FILEFLAGS_1 0x0L
 #endif
 #if PR_BETA
@@ -61,17 +65,17 @@ BEGIN
     BLOCK "StringFileInfo"
     BEGIN
         BLOCK "040904B0" // Lang=US English, CharSet=Unicode
         BEGIN
             VALUE "CompanyName", "Netscape Communications Corporation\0"
             VALUE "FileDescription", MY_FILEDESCRIPTION MY_DEBUG_STR "\0"
             VALUE "FileVersion", PR_VERSION "\0"
             VALUE "InternalName", MY_INTERNAL_NAME "\0"
-            VALUE "LegalCopyright", "Copyright \251 1996-1999 Netscape Communications Corporation\0"
+            VALUE "LegalCopyright", "Copyright \251 1996-2000 Netscape Communications Corporation\0"
             VALUE "OriginalFilename", MY_INTERNAL_NAME ".dll\0"
             VALUE "ProductName", "Netscape Portable Runtime\0"
             VALUE "ProductVersion", PR_VERSION "\0"
         END
     END
     BLOCK "VarFileInfo"
     BEGIN
         VALUE "Translation", 0x409, 1200