Closed Bug 3615 Opened 26 years ago Closed 25 years ago

[PP]NSPR exports private & obsolete headers on Mac

Categories

(NSPR :: NSPR, defect, P3)

PowerPC
Mac System 8.5
defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: sfraser_bugs, Assigned: gordon)

Details

The NSPR manifest, at mozilla/nsprpub/pr/include/MANIFEST, exports private and obsolete files. Some of the types in these files conflict with those in prtypes.h, which is bad. obsolete/protypes.h obsolete/prsem.h obsolete/probslet.h private/prpriv.h private/pprio.h private/pprthred.h
These obsolete and private headers are intentionally exported. These three private headers should really be called "friend". They can be included under special circumstances. The obsolete headers must be exported until it is okay for us to break backward compatibility (NSPR 4.0). What types in these files conflict with those in prtypes.h?
Target Milestone: M6
Changed target milestone to M6.
The xpidl project is picking up uint64 & friends from obsolete/protypes.h instead of prtypes.h. There may be other examples. Recall that we can't control the order in which the build tools find header files when scanning include paths.
uint64 and friends are defined in obsolete/protypes.h, not prtypes.h. The types defined in prtypes.h are PRUint64 and friends, with the PR prefix. uint64 and friends are also defined in the system header files on some operating systems. Maybe this is what's happening? You can see all the ugly workarounds we have in obsolete/protypes.h.
Uh, OK. I was confused. libxpt was using those uint64 types, instead of PR types, and seeing them resolved via an obsolete header scared me.
If libxpt is new code written by Netscape or mozilla.org developers, it should not use the obsolete uint64 types. Our own new code should use the PR types. Some time we need to go through our old code and convert all the obsolete uint64 types to the PR types.
Status: NEW → ASSIGNED
Summary: NSPR exports private & obsolete headers on Mac → [PP]NSPR exports private & obsolete headers on Mac
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → INVALID
Marked the bug resolved-invalid. The three obsolete and three private headers that Simon Fraser listed need to be exported. New code should not use the obsolete headers, and old code should be rewritten to not use the obsolete headers. The three private headers may be included under special circumstances, i.e., their privateness is comparable to C++'s "friend" classes and functions. Be sure to check with the NSPR group before using any of those three private headers. NSPR also has some truly private headers (private/primpl.h and md/*.h) that are not exported and should never be included.
Status: RESOLVED → VERIFIED
sounds good to me.
Status: VERIFIED → REOPENED
If we need to rewrite old code to stop using the obsolete headers, then we should leave this bug open as a placeholder until we can investigate and identify the code that needs to be rewritten. Then we can write up bugs for that code, rewrite it, stop exporting the headers, and close all the bugs.
Gordon, that would be a separate bug with the description "Remove use of obsolete NSPR types and functions in SeaMonkey". That task is not Mac-specific.
Status: REOPENED → ASSIGNED
Great! When you submit that bug, put me on the cc list. Then I'll close this one. I thought only the Mac was exporting these files, because the Mac is the only one using the MANIFEST file.
NSPR now has its own Bugzilla product. Moving this bug to the NSPR product.
Target Milestone: M6 → M8
Target Milestone: M8 → M9
Resolution: INVALID → ---
Clearing resolution.
Target Milestone: M9 → M11
Target Milestone: M11 → M14
phillip gone, removing him from qa contact, sorry for spam
Status: ASSIGNED → RESOLVED
Closed: 26 years ago25 years ago
Resolution: --- → INVALID
Okay, these files aren't going away anytime soon, and it doesn't look like they really need to. Marking bug resolved - invalid, as wtc did originally.
Target Milestone: M14 → ---
You need to log in before you can comment on or make changes to this bug.