The default bug view has changed. See this FAQ.

lib/base/whatnspr.c is obsolete

RESOLVED FIXED in 3.12

Status

NSS
Libraries
RESOLVED FIXED
12 years ago
11 years ago

People

(Reporter: Wan-Teh Chang, Assigned: Wan-Teh Chang)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

12 years ago
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.
(Assignee)

Comment 1

12 years ago
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.
Attachment #203582 - Flags: review?(rrelyea)
(Assignee)

Comment 2

12 years ago
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.
Attachment #203586 - Flags: review?(rrelyea)
(Assignee)

Updated

12 years ago
Blocks: 282994
(Assignee)

Comment 3

12 years ago
I forgot to note that I am in favor of CVS
removing lib/base/whatnspr.c.

Comment 4

12 years ago
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+

Updated

12 years ago
Attachment #203582 - Flags: review?(rrelyea) → review-
(Assignee)

Comment 5

11 years ago
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
Last Resolved: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.12
Wan-Teh: Is there any reason not to do this for NSS 3.11.1 ?
(Assignee)

Comment 7

11 years ago
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.