Open Bug 796023 Opened 9 years ago Updated 4 years ago

Use -DUNICODE and -D_UNICODE everywhere


(Core :: XPCOM, defect)

Windows 7
Not set




(Reporter: joe, Unassigned)


We currently don't compile with -DUNICODE and -D_UNICODE everywhere, which can lead to problems when we compile one piece of code that exports a Windows type (like LOGFONT) with the define, and use it elsewhere without the define. This happens when the definition of code includes the file, but the user of that code doesn't.

We should just globally define -DUNICODE and -D_UNICODE everywhere on Windows.
We have to sanity check that we're not using non-W-prefixed APIs that would break with this. I *think* we're probably okay at this point, and any errors would just be compile errors.
wtf, I could have sworn we did this years ago.

Note that there are a few places which *remove* -DUNICODE from the build flags: gfx/gl/ and gfx/thebes/
It's entirely possible we do this everywhere except gfx/; I know for certain that including in gfx/2d caused types to change due to -DUNICODE, though.
You need to log in before you can comment on or make changes to this bug.