Closed
Bug 754795
Opened 12 years ago
Closed 12 years ago
OSFileConstants.cpp fails to compile on mingw-w64
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla15
People
(Reporter: jacek, Assigned: jacek)
References
Details
Attachments
(1 file)
926 bytes,
patch
|
Yoric
:
review+
|
Details | Diff | Splinter Review |
GCC considers direct 64-bit pointer to 32-bit integer as an error and that's what happens with INVALID_HANDLE_VALUE. INVALID_HANDLE_VALUE is of type HANDLE, which is void*, but guaranteed to be 32-bit value. Thus casting is fine, but needs to be done a bit differently. The attached patch changes the cast to use INT_PTR, which is later implicitly casted to 32-bit int.
Attachment #623619 -
Flags: review?(dteller)
Comment 1•12 years ago
|
||
Comment on attachment 623619 [details] [diff] [review] fix v1.0 Fine with me. I assume that you have tested that this does not prevent compilation with VC++?
Attachment #623619 -
Flags: review?(dteller) → review+
Comment 2•12 years ago
|
||
Comment on attachment 623619 [details] [diff] [review] fix v1.0 Review of attachment 623619 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/system/OSFileConstants.cpp @@ +216,5 @@ > INT_CONSTANT(FILE_ATTRIBUTE_READONLY), > INT_CONSTANT(FILE_ATTRIBUTE_TEMPORARY), > > // SetFilePointer error constant > + { "INVALID_HANDLE_VALUE", INT_TO_JSVAL((INT_PTR)INVALID_HANDLE_VALUE) }, This should be INT_PTR(INVALID_HANDLE_VALUE)
Assignee | ||
Comment 3•12 years ago
|
||
Thanks for the reviews. Yes, I've tested compilation with VC++. Pushed to m-i addressing Ms2ger's comment: https://hg.mozilla.org/integration/mozilla-inbound/rev/26fd69b1eec3
Target Milestone: --- → mozilla15
Comment 4•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/26fd69b1eec3
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Component: DOM: Other → DOM
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•