Closed
Bug 17093
Opened 26 years ago
Closed 26 years ago
Make plevent.c independent of NSPR internal headers
Categories
(NSPR :: NSPR, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: wtc, Assigned: wtc)
References
Details
Attachments
(2 files)
|
2.64 KB,
patch
|
Details | Diff | Splinter Review | |
|
28.11 KB,
text/plain
|
Details |
Right now plevent.c includes the NSPR internal header
primpl.h. This is an obstacle to moving PLEvents out
of NSPR.
The main reason that plevent.c needs to include
primpl.h is to access the 'entryCount' field of the
opaque structure PRMonitor. This can be avoided by
calling the PR_GetMonitorEntryCount() function.
The current code reads 'entryCount' only if
PR_GetMonitorEntryCount() is nonzero. If
PR_GetMonitorEntryCount() returns a nonzero
value, that value is the 'entryCount' field of the
PRMonitor. So the read of the 'entryCount' field
is not necessary.
Since primpl.h pulls in a lot of system header files,
plevent.c may indirectly depend on them. For example,
on WIN32 plevent.c gets <windows.h> through primpl.h.
If we remove the inclusion of primpl.h, we will need
to include <windows.h>.
| Assignee | ||
Comment 1•26 years ago
|
||
| Assignee | ||
Comment 2•26 years ago
|
||
| Assignee | ||
Updated•26 years ago
|
Status: NEW → ASSIGNED
| Assignee | ||
Comment 3•26 years ago
|
||
Steve, could you test the patched plevent.c
(second attachment, id=2373) on the Mac? Thanks.
Comment 4•26 years ago
|
||
Verified on Mac - no problems compiling.
| Assignee | ||
Comment 5•26 years ago
|
||
Thanks, Steve.
Now I need a code reviewer. :-)
| Assignee | ||
Updated•26 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 7•26 years ago
|
||
Thanks for the code review, Srinivas.
I just checked in the fix.
/cvsroot/mozilla/nsprpub/lib/ds/Makefile, revision 3.16
/cvsroot/mozilla/nsprpub/lib/ds/Makefile.in, revision 1.7
/cvsroot/mozilla/nsprpub/lib/ds/plevent.c, revision 3.29
You need to log in
before you can comment on or make changes to this bug.
Description
•