lib/base/whatnspr.c calls PR_dtoa and attempts to use its return value to determine whether we are running with the old NSPR 1 or the current NSPR. It needs this knowledge to handle the differences in NSPR 1 and current NSPR's thread private data functions. Since we don't use NSPR 1 any more, most of the code in lib/base/whatnspr.c is obsolete. We can even CVS remove that file. One reason I'm filing this bug is that the PR_dtoa (which is third-party code) crashes on ARM (bug 282994). Since the PR_dtoa call in lib/base/whatnspr.c isn't necessary, this is one more reason to remove it.
Created attachment 203582 [details] [diff] [review] Simple patch: just remove the PR_dtoa call This simple patch has a downside: the file name whatnspr.c would be confusing because it would not describe the little remaining code.
Created attachment 203586 [details] [diff] [review] Full patch: CVS remove whatnspr.c Bob, please indicate which patch you like better and mark the other one review-. It is fine to remove #include "prthread.h" from base.h because base.h already indirectly includes nspr.h, which includes prthread.h.
I forgot to note that I am in favor of CVS removing lib/base/whatnspr.c.
Comment on attachment 203586 [details] [diff] [review] Full patch: CVS remove whatnspr.c The only question is do we care about loading ckfw modules into NSS 1.0 programs (like old Netscape Apps)? I think that Communicator was nspr2 already, so it probably isn't an issue, but I would like to verify that (pre-Communicator could load pkcs #11 modules). bob
In NSS 3.11, we've made the decision that lib/ckfw requires the current NSPR shared libraries/DLLs (bug 302416). I checked in the full patch (cvs remove whatnspr.c) on the NSS trunk (NSS 3.12). Checking in base.h; /cvsroot/mozilla/security/nss/lib/base/base.h,v <-- base.h new revision: 1.18; previous revision: 1.17 done Checking in error.c; /cvsroot/mozilla/security/nss/lib/base/error.c,v <-- error.c new revision: 1.7; previous revision: 1.6 done Checking in manifest.mn; /cvsroot/mozilla/security/nss/lib/base/manifest.mn,v <-- manifest.mn new revision: 1.9; previous revision: 1.8 done Removing whatnspr.c; /cvsroot/mozilla/security/nss/lib/base/whatnspr.c,v <-- whatnspr.c new revision: delete; previous revision: 1.4 done
Wan-Teh: Is there any reason not to do this for NSS 3.11.1 ?
You can check in the full patch on the NSS_3_11_BRANCH. (The reason I didn't check it in on the NSS_3_11_BRANCH is that the bug isn't severe enough.)