Closed Bug 27121 Opened 26 years ago Closed 26 years ago

Including plevent.h gives me compilation errors

Categories

(NSPR :: NSPR, defect, P3)

x86
Windows NT
defect

Tracking

(Not tracked)

VERIFIED INVALID

People

(Reporter: jonas.utterstrom, Assigned: srinivas)

Details

If I include plevent.h in a .cpp file I get the following compilation errors: d:\program files\microsoft visual studio\vc98\include\winnt.h(3143) : error C2146: syntax error : missing ';' before identifier 'ContextRecord' d:\program files\microsoft visual studio\vc98\include\winnt.h(3143) : error C2501: 'PCONTEXT' : missing storage-class or type specifiers d:\program files\microsoft visual studio\vc98\include\winnt.h(3143) : error C2501: 'ContextRecord' : missing storage-class or type specifiers This because plevent.h includes winbase.h. I must include windows.h before plevent.h to get it to compile. Wouldn't it be better to include windows.h instead of winbase.h in plevent.h? I actually don't know which version of NSPR I use. It's the one that is included with SeaMonkeyAll.
Status: NEW → ASSIGNED
(It's windef.h, not winbase.h.) The reason plevent.h includes windef.h as opposed to windows.h is to avoid the following macro definitions in winbase.h (included by windows.h): #define CreateFile CreateFileA #define CreateDirectory CreateDirectoryA ... Some class member functions in mozilla are named CreateFile and CreateDirectory. If we include windows.h, they are #define'd to be CreateFileA and CreateDirectoryA. It's rather difficult to work around such macro defines in system headers.
Also, plevent.h is no longer part of NSPR; it has been moved to the browser-general component. Marking the bug invalid.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → INVALID
plevent.h no longer a apart of NSPR. Marking as verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.