Closed Bug 317052 Opened 19 years ago Closed 19 years ago

lib/base/whatnspr.c is obsolete

Categories

(NSS :: Libraries, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wtc, Assigned: wtc)

References

Details

Attachments

(2 files)

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.
This simple patch has a downside: the file name whatnspr.c would be confusing because it would not describe the little remaining code.
Attachment #203582 - Flags: review?(rrelyea)
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.
Attachment #203586 - Flags: review?(rrelyea)
Blocks: 282994
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
Attachment #203586 - Flags: review?(rrelyea) → review+
Attachment #203582 - Flags: review?(rrelyea) → review-
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
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.12
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.)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: