Last Comment Bug 708577 - ldap/xpcom/src fails to build (gcc-4.6.1)
: ldap/xpcom/src fails to build (gcc-4.6.1)
Status: RESOLVED FIXED
:
Product: MailNews Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: x86_64 Linux
: -- normal (vote)
: Thunderbird 11.0
Assigned To: Martin Stránský
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-08 04:10 PST by Martin Stránský
Modified: 2011-12-13 05:52 PST (History)
1 user (show)
standard8: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch (3.72 KB, patch)
2011-12-08 06:18 PST, Martin Stránský
benjamin: review+
Details | Diff | Splinter Review

Description Martin Stránský 2011-12-08 04:10:23 PST
ldap/xpcom/src fails to build:

nsLDAPService.cpp:632:1: error: pasting "u" and ""LDAP: WARNING: nsLDAPService::OnLDAPMessage(): Unexpected LDAP message received"" does not give a valid preprocessing token
nsLDAPService.cpp: In member function ‘virtual nsresult nsLDAPService::OnLDAPMessage(nsILDAPMessage*)’:
nsLDAPService.cpp:632:13: error: ‘u’ was not declared in this scope
nsLDAPService.cpp:632:13: error: expected primary-expression before ‘(’ token
nsLDAPService.cpp:632:13: error: expected ‘)’ before string constant
nsLDAPService.cpp:632:13: error: expected primary-expression before ‘(’ token
nsLDAPService.cpp:632:13: error: expected ‘)’ before string constant
nsLDAPService.cpp:632:120: error: expected ‘)’ before ‘;’ token
nsLDAPService.cpp:632:120: error: expected ‘)’ before ‘;’ token
gmake[1]: *** [nsLDAPService.o] Error 1

With -std=gnu++0x it's compiled fine but I'm not sure it's the proper fix here.
Comment 1 Martin Stránský 2011-12-08 04:29:43 PST
It comes from nsStringAPI.h, when HAVE_CPP_CHAR16_T is defined (gcc-4.6.1 / Fedora 15).

#if defined(HAVE_CPP_CHAR16_T) || defined(HAVE_CPP_2BYTE_WCHAR_T)
#if defined(HAVE_CPP_CHAR16_T)
  PR_STATIC_ASSERT(sizeof(char16_t) == 2);
  #define NS_LL(s)                                u##s
#else
  PR_STATIC_ASSERT(sizeof(wchar_t) == 2);
  #define NS_LL(s)                                L##s
#endif
Comment 2 Martin Stránský 2011-12-08 05:01:48 PST
I guess we need something like Bug 650304 but for Thunderbird.
Comment 3 Martin Stránský 2011-12-08 05:09:52 PST
I think we should take Bug 650304, Bug 654493 and Bug 654653.
Comment 4 Martin Stránský 2011-12-08 06:18:15 PST
Created attachment 580026 [details] [diff] [review]
patch

There's a composition of patches from bugs 650304, 654493, 654653.
Comment 5 Martin Stránský 2011-12-08 06:34:49 PST
Comment on attachment 580026 [details] [diff] [review]
patch

Benjamin, can you check it please?
Comment 6 Martin Stránský 2011-12-08 08:21:46 PST
Thanks!
Comment 7 Mark Banner (:standard8) 2011-12-13 05:52:15 PST
Checked in: http://hg.mozilla.org/comm-central/rev/808503d44ba1

Note You need to log in before you can comment on or make changes to this bug.