Add function to obtain version of NSPR at runtime.

RESOLVED FIXED in 4.8.9

Status

P2
enhancement
RESOLVED FIXED
8 years ago
7 years ago

People

(Reporter: kaie, Assigned: kaie)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

(Assignee)

Description

8 years ago
See bug 673115 for the reasoning.

In short, allow the application to obtain the version number string from NSPR, so it can be displayed in the user interface.

This should be a runtime function, NOT compile time.
This allows us to produce correct results when e.g. using system NSPR libraries on Linux.
(Assignee)

Comment 1

8 years ago
Created attachment 547498 [details] [diff] [review]
Patch v1

I notice that nspr.def uses new second-level version numbers whenever adding new functions, so I've added this as version 4.9
Attachment #547498 - Flags: review?(wtc)

Comment 2

8 years ago
Comment on attachment 547498 [details] [diff] [review]
Patch v1

Kai, thank you for the patch.  I suggest some changes.

1. mozilla/nsprpub/pr/include/prinit.h

>+NSPR_API(const char*) PR_GetLibraryVersion(void);

The function's name is PR_GetVersion.

Please add a short comment.

Please declare the function immediately after the
closely-related PR_VersionCheck function:

http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/nsprpub/pr/include/prinit.h&rev=3.70&mark=98#90

2. mozilla/nsprpub/pr/src/nspr.def

> ;+} NSPR_4.7;
>+;+NSPR_4.9 {
>+;+      global:
>+                PR_GetLibraryVersion;
>+;+} NSPR_4.8;

The next NSPR release is NSPR_4.8.9.  The last line should
say NSPR_4.7.
Attachment #547498 - Flags: review?(wtc) → review-
(Assignee)

Comment 3

8 years ago
Created attachment 547650 [details] [diff] [review]
Patch v2

Thanks for your comments, I addressed your comments.
I'm not sure I correctly understood the version number requirements in nspr.def, please let me know if another change is necessary.
Attachment #547498 - Attachment is obsolete: true
Attachment #547650 - Flags: review?(wtc)
(Assignee)

Comment 4

8 years ago
Created attachment 547652 [details] [diff] [review]
Pach v3
Attachment #547650 - Attachment is obsolete: true
Attachment #547650 - Flags: review?(wtc)
Attachment #547652 - Flags: review?(wtc)

Comment 5

8 years ago
Comment on attachment 547652 [details] [diff] [review]
Pach v3

Thank you for the patch.  I made a wrong suggestion about nspr.def.
Sorry about that.

> ;+NSPR_4.8 {
> ;+	global:
> 		PR_AssertCurrentThreadOwnsLock;
> 		PR_AssertCurrentThreadInMonitor;
> ;+} NSPR_4.7;
>+;+NSPR_4.8.9 {
>+;+      global:
>+                PR_GetVersion;
>+;+} NSPR_4.7;

The last line should say NSPR_4.8.  That was my mistake.  These
symbol versions should be "chained".
Attachment #547652 - Flags: review?(wtc) → review-
(Assignee)

Comment 6

8 years ago
Created attachment 547787 [details] [diff] [review]
Patch v4

no problem, nspr.def fixed.
thanks for reviewing
Attachment #547652 - Attachment is obsolete: true
Attachment #547787 - Flags: review?(wtc)

Comment 7

8 years ago
Comment on attachment 547787 [details] [diff] [review]
Patch v4

r=wtc.  Thanks!
Attachment #547787 - Flags: review?(wtc) → review+
(Assignee)

Comment 8

8 years ago
Checking in pr/include/prinit.h;
/cvsroot/mozilla/nsprpub/pr/include/prinit.h,v  <--  prinit.h
new revision: 3.71; previous revision: 3.70
done
Checking in pr/src/nspr.def;
/cvsroot/mozilla/nsprpub/pr/src/nspr.def,v  <--  nspr.def
new revision: 1.16; previous revision: 1.15
done
Checking in pr/src/misc/prinit.c;
/cvsroot/mozilla/nsprpub/pr/src/misc/prinit.c,v  <--  prinit.c
new revision: 3.58; previous revision: 3.57
done
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → 4.8.9

Updated

7 years ago
Severity: normal → enhancement
Priority: -- → P2
You need to log in before you can comment on or make changes to this bug.