Closed Bug 323340 Opened 20 years ago Closed 20 years ago

XPCOM components built against the Gecko SDK need -fshort-wchar

Categories

(Core :: XPCOM, defect)

x86
Linux
defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 177150

People

(Reporter: darin.moz, Unassigned)

Details

XPCOM components built against the Gecko SDK need -fshort-wchar It may seem to an obvious thing, but we should try to find a way to make it clear to consumers of the Gecko SDK that they must compile with -fshort-wchar, or else certain things like NS_LITERAL_STRING will not work for them. Maybe GCC provides something that we can #ifdef against?!
Technially I believe they're supposed to use mozilla-config --cflags for this (otherwise a lot of the macros that our headers use may be incorrect). I don't know of any easy way to detect at preprocessor-time whether wchar is 2-byte or 4-byte (can't use sizeof in preprocessor tests). Perhaps we should have a required preprocessor variable (HAVE_MOZILLA_CFLAGS) to make sure that embedders using our headers have use mozilla-config or something representative? We really suck in this area, I've been discussing some build changes privately with cls that will make the cflags issues more important to get right (firefox-on-xulrunner and where do we get compile flags).
*** This bug has been marked as a duplicate of 177150 ***
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.