Closed Bug 779910 Opened 9 years ago Closed 9 years ago
xulrunner builds fail to compile on windows
winEmbed.cpp e:/builds/moz2_slave/m-cen-w32-xr/build/obj-firefox/_virtualenv/Scripts/python.exe -O /e/builds/moz2_slave/m-cen-w32-xr/build/build/cl.py cl -FowinEmbed.obj -c -DXPCOM_GLUE -DXPI_NAME=winembed -I/e/builds/moz2_slave/m-cen-w32-xr/build/embedding/tests/winEmbed -I/e/builds/moz2_slave/m-cen-w32-xr/build/embedding/tests/winEmbed -I. -I../../../dist/include -Ie:/builds/moz2_slave/m-cen-w32-xr/build/obj-firefox/dist/include/nspr -Ie:/builds/moz2_slave/m-cen-w32-xr/build/obj-firefox/dist/include/nss -TP -nologo -W3 -Gy -Fdgenerated.pdb -wd4800 -we4553 -GR- -DNDEBUG -DTRIMMED -Zi -UDEBUG -DNDEBUG -O1 -Oy -MD -FI ../../../dist/include/mozilla-config.h -DMOZILLA_CLIENT /e/builds/moz2_slave/m-cen-w32-xr/build/embedding/tests/winEmbed/winEmbed.cpp winEmbed.cpp e:/builds/moz2_slave/m-cen-w32-xr/build/embedding/tests/winEmbed/winEmbed.cpp(877) : error C2664: 'SetWindowLongA' : cannot convert parameter 3 from 'nullptr' to 'LONG' A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type make: Leaving directory `/e/builds/moz2_slave/m-cen-w32-xr/build/obj-firefox/embedding/tests/winEmbed' make: Leaving directory `/e/builds/moz2_slave/m-cen-w32-xr/build/obj-firefox' make: Leaving directory `/e/builds/moz2_slave/m-cen-w32-xr/build/obj-firefox' make: Leaving directory `/e/builds/moz2_slave/m-cen-w32-xr/build/obj-firefox' make: Leaving directory `/e/builds/moz2_slave/m-cen-w32-xr/build' make: *** [winEmbed.obj] Error 2 make: *** [libs_tier_app] Error 2 make: *** [tier_app] Error 2 make: *** [default] Error 2 make: *** [realbuild] Error 2 make: *** [build] Error 2
Relevant docs: http://msdn.microsoft.com/en-us/library/windows/desktop/ms644898(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/cc230349(v=prot.10).aspx s/nullptr/0/ should work here, and for any similar errors. I'd write a patch, but I don't have easy access to a Windows machine.
(In reply to Aryeh Gregor from comment #1) > s/nullptr/0/ should work here, and for any similar errors. I'd write a > patch, but I don't have easy access to a Windows machine. I just tried it and there were no other compile errors.
Patch coming, based on above comments. I'll have to try it myself first. :)
Assignee: nobody → ajvincent
This patch fixes the build bustage, but unfortunately I believe that our regression troubles are not over yet. The --version flag opens a dialog with gibberish for the version field. Also, --gre-version doesn't output anything at all to stdout, as --help indicates it would.
Comment on attachment 649028 [details] [diff] [review] patch Looks fine to me, but you should get review from an owner or peer. It might be that some other symbol would be preferable for a LONG_PTR that's equal to 0 -- I don't know the first thing about Windows programming.
Comment on attachment 649028 [details] [diff] [review] patch I don't know anything about Windows either, sadly, but I think 0 is fine here.
Attachment #649028 - Flags: review?(bzbarsky) → review+
Target Milestone: --- → mozilla17
Win16 used INT = 16bit, LONG = 32bit, LPVOID = 32bit Win32 used INT = 32bit, LONG = 32bit, LPVOID = 32bit Win64 used INT = 32bit, LONG = 32bit, LPVOID = 64bit - oops! So they had to invent a new type for an integer that could hold an LPVOID. Thus LONG_PTR was created. It's basically the equivalent to C++11's intptr_t.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.