Closed
Bug 1201629
Opened 10 years ago
Closed 10 years ago
VS2015 build fails in suite/shell/src/nsWindowsShellService.cpp: error C2679: binary '=': no operator found
Categories
(SeaMonkey :: General, defect)
Tracking
(seamonkey2.40 fixed)
RESOLVED
FIXED
seamonkey2.40
| Tracking | Status | |
|---|---|---|
| seamonkey2.40 | --- | fixed |
People
(Reporter: frg, Assigned: frg)
References
Details
Attachments
(1 file, 2 obsolete files)
|
1.13 KB,
patch
|
neil
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:41.0) Gecko/20100101 Firefox/41.0 SeaMonkey/2.38
Build ID: 20150829170953
Steps to reproduce:
Try to build Seamonkey suite with VS2015
Actual results:
Compiler error in:
nsWindowsShellService.cpp
c:/seamonkey/comm-central/suite/shell/src/nsWindowsShellService.cpp(476): error C2679: binary '=': no operator found which takes a right-hand operand of type 'wchar_t [4096]' (or there is no acceptable conversion)
c:\seabuild\release\comm-central-15\obj-x86_64-pc-mingw32\dist\include\nsStringAPI.h(983): note: could be 'nsString_external::self_type &nsString_external::operator =(nsAString::char_type)'
c:\seabuild\release\comm-central-15\obj-x86_64-pc-mingw32\dist\include\nsStringAPI.h(978): note: or 'nsString_external::self_type &nsString_external::operator =(const nsAString::char_type *)'
c:\seabuild\release\comm-central-15\obj-x86_64-pc-mingw32\dist\include\nsStringAPI.h(973): note: or 'nsString_external::self_type &nsString_external::operator =(const nsString_external::abstract_string_type &)'
c:\seabuild\release\comm-central-15\obj-x86_64-pc-mingw32\dist\include\nsStringAPI.h(968): note: or 'nsString_external::self_type &nsString_external::operator =(const nsString_external::self_type &)'
c:/seamonkey/comm-central/suite/shell/src/nsWindowsShellService.cpp(476): note: while trying to match the argument list '(nsString_external, wchar_t [4096])'
c:/seamonkey/comm-central/suite/shell/src/nsWindowsShellService.cpp(483): error C2679: binary '=': no operator found which takes a right-hand operand of type 'wchar_t [4096]' (or there is no acceptable conversion)
c:\seabuild\release\comm-central-15\obj-x86_64-pc-mingw32\dist\include\nsStringAPI.h(983): note: could be 'nsString_external::self_type &nsString_external::operator =(nsAString::char_type)'
c:\seabuild\release\comm-central-15\obj-x86_64-pc-mingw32\dist\include\nsStringAPI.h(978): note: or 'nsString_external::self_type &nsString_external::operator =(const nsAString::char_type *)'
c:\seabuild\release\comm-central-15\obj-x86_64-pc-mingw32\dist\include\nsStringAPI.h(973): note: or 'nsString_external::self_type &nsString_external::operator =(const nsString_external::abstract_string_type &)'
c:\seabuild\release\comm-central-15\obj-x86_64-pc-mingw32\dist\include\nsStringAPI.h(968): note: or 'nsString_external::self_type &nsString_external::operator =(const nsString_external::self_type &)'
c:/seamonkey/comm-central/suite/shell/src/nsWindowsShellService.cpp(483): note: while trying to match the argument list '(nsString_external, wchar_t [4096])'
c:/seamonkey/comm-central/mozilla/config/rules.mk:958: recipe for target 'nsWindowsShellService.obj' failed
Expected results:
Compile should have succeeded
| Assignee | ||
Comment 1•10 years ago
|
||
| Assignee | ||
Comment 2•10 years ago
|
||
Patch attached to bug https://bugzilla.mozilla.org/show_bug.cgi?id=1198936 needs to be applied first or you won't even get this far.
| Assignee | ||
Updated•10 years ago
|
OS: Unspecified → Windows
Comment 3•10 years ago
|
||
Comment on attachment 8656714 [details] [diff] [review]
Patch for wchar_t casting
wwc(appPath) should work, shouldn't it?
| Assignee | ||
Comment 4•10 years ago
|
||
No I tried first.
With only wwc I get:
mozmake[5]: Entering directory 'c:/seamonkey/comm-central/mozilla/security/nss/lib/certdb'
nsWindowsShellService.cpp
c:/seamonkey/comm-central/suite/shell/src/nsWindowsShellService.cpp(477): error C3861: 'wwc': identifier not found
c:/seamonkey/comm-central/suite/shell/src/nsWindowsShellService.cpp(485): error C3861: 'wwc': identifier not found
c:/seamonkey/comm-central/mozilla/config/rules.mk:958: recipe for target 'nsWindowsShellService.obj' failed
If I also include nsString.h I get:
c:\seabuild\release\comm-central-15\obj-x86_64-pc-mingw32\dist\include\nsStringFwd.h(15): fatal error C1189: #error: Internal string headers are not available from external-linkage code.
c:/seamonkey/comm-central/mozilla/config/rules.mk:958: recipe for target 'nsWindowsShellService.obj' failed
Comment 5•10 years ago
|
||
Does anything from http://mxr.mozilla.org/comm-central/source/mozilla/mfbt/Char16.h help?
Comment 6•10 years ago
|
||
> nsString mAppLongPath;
> nsString mAppShortPath;
Would it help to get rid of nsString?
Comment 7•10 years ago
|
||
Sigh, wwc is only available with internal strings, but I've looked at nsStringAPI.h and I think we can use Assign() instead of operator=().
| Assignee | ||
Comment 8•10 years ago
|
||
My C++ is more or less nonexistent. I am only doing some Java for a living.
Firefox uses an nsAutostring. This class initialisation works in
mozilla\browser\components\shell\nsWindowsShellService.cpp:
nsAutoString appLongPath(exePath);
| Assignee | ||
Comment 9•10 years ago
|
||
Patch for wchar_t V2
Attachment #8656714 -
Attachment is obsolete: true
| Assignee | ||
Comment 10•10 years ago
|
||
Assign seems to work fine.
| Assignee | ||
Comment 11•10 years ago
|
||
patch for wchar_t conversion
Attachment #8658332 -
Attachment is obsolete: true
Updated•10 years ago
|
Assignee: nobody → frgrahl
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Updated•10 years ago
|
Attachment #8658361 -
Flags: review?(neil)
Updated•10 years ago
|
Attachment #8658361 -
Flags: review?(neil) → review+
Comment 13•10 years ago
|
||
Pushed to comm-central:
https://hg.mozilla.org/comm-central/rev/998a6fac4571
Thanks for the patch!
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-seamonkey2.40:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.40
You need to log in
before you can comment on or make changes to this bug.
Description
•