Closed Bug 708577 Opened 8 years ago Closed 8 years ago

ldap/xpcom/src fails to build (gcc-4.6.1)

Categories

(MailNews Core :: Build Config, defect)

x86_64
Linux
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 11.0

People

(Reporter: stransky, Assigned: stransky)

Details

Attachments

(1 file)

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.
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
I guess we need something like Bug 650304 but for Thunderbird.
I think we should take Bug 650304, Bug 654493 and Bug 654653.
Attached patch patchSplinter Review
There's a composition of patches from bugs 650304, 654493, 654653.
Comment on attachment 580026 [details] [diff] [review]
patch

Benjamin, can you check it please?
Attachment #580026 - Flags: review?(benjamin)
Attachment #580026 - Flags: review?(benjamin) → review+
Thanks!
Keywords: checkin-needed
Checked in: http://hg.mozilla.org/comm-central/rev/808503d44ba1
Assignee: nobody → stransky
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: in-testsuite-
Keywords: checkin-needed
Product: Thunderbird → MailNews Core
QA Contact: build-config → build-config
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 11.0
You need to log in before you can comment on or make changes to this bug.