Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 754795 - OSFileConstants.cpp fails to compile on mingw-w64
: OSFileConstants.cpp fails to compile on mingw-w64
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: x86_64 Windows Vista
: -- normal (vote)
: mozilla15
Assigned To: Jacek Caban
: Andrew Overholt [:overholt]
Depends on:
Blocks: 747872
  Show dependency treegraph
Reported: 2012-05-14 02:47 PDT by Jacek Caban
Modified: 2013-04-04 13:52 PDT (History)
1 user (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

fix v1.0 (926 bytes, patch)
2012-05-14 02:47 PDT, Jacek Caban
dteller: review+
Details | Diff | Splinter Review

Description Jacek Caban 2012-05-14 02:47:11 PDT
Created attachment 623619 [details] [diff] [review]
fix v1.0

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.
Comment 1 David Teller [:Yoric] (please use "needinfo") 2012-05-14 02:54:58 PDT
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++?
Comment 2 :Ms2ger (⌚ UTC+1/+2) 2012-05-14 05:06:23 PDT
Comment on attachment 623619 [details] [diff] [review]
fix v1.0

Review of attachment 623619 [details] [diff] [review]:

::: dom/system/OSFileConstants.cpp
@@ +216,5 @@
>    // SetFilePointer error constant

Comment 3 Jacek Caban 2012-05-15 03:21:13 PDT
Thanks for the reviews. Yes, I've tested compilation with VC++. Pushed to m-i addressing Ms2ger's comment:
Comment 4 Ed Morley [:emorley] 2012-05-16 03:56:17 PDT

Note You need to log in before you can comment on or make changes to this bug.