Closed
Bug 1100997
Opened 10 years ago
Closed 10 years ago
Fix FileUtilsWin.h compilation on mingw.
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
mozilla36
People
(Reporter: jacek, Assigned: jacek)
Details
Attachments
(1 file)
1.61 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
On GCC char16_t is not the same as wchar_t, so we need a cast.
Attachment #8524657 -
Flags: review?(nfroyd)
Updated•10 years ago
|
Attachment #8524657 -
Flags: review?(nfroyd) → review+
Comment 1•10 years ago
|
||
Thinking about this a little more, we have a raft of 16-bit character methods on nsString...are none of them applicable here?
Flags: needinfo?(jacek)
Assignee | ||
Comment 2•10 years ago
|
||
Sadly no. We use char16_t for internal UTF16 representation, while Windows API uses wchar_t for that. We have char16ptr_t type introduced in bug 928351 to hide the difference, but that's only for constant pointers. There happened to be too few cases where this was needed for non-const pointers, so those few places (like in this case) need an explicit cast.
Flags: needinfo?(jacek)
Assignee | ||
Comment 3•10 years ago
|
||
Thanks for review. https://hg.mozilla.org/integration/mozilla-inbound/rev/1e4f975958f2
https://hg.mozilla.org/mozilla-central/rev/1e4f975958f2
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Comment 5•10 years ago
|
||
(In reply to Nathan Froyd [high latency from 20 Nov through 1 December] (:froydnj) from comment #1) > Thinking about this a little more, we have a raft of 16-bit character > methods on nsString...are none of them applicable here? There is a wwc function in nsString.h which is doing a cast from char16_t* to wchar_t*.
Assignee | ||
Comment 6•9 years ago
|
||
The problem about wwc is that it's available only in nsString.h, which is used for internal string headers only. We have tests depending on FileUtilsWin.h and they don't use nsString.h, so they wouldn't build with wwc used.
You need to log in
before you can comment on or make changes to this bug.
Description
•