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

RESOLVED FIXED in Thunderbird 11.0

Status

MailNews Core
Build Config
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: Martin Stránský, Assigned: Martin Stránský)

Tracking

Trunk
Thunderbird 11.0
x86_64
Linux
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
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.
(Assignee)

Comment 1

6 years ago
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
(Assignee)

Comment 2

6 years ago
I guess we need something like Bug 650304 but for Thunderbird.
(Assignee)

Comment 3

6 years ago
I think we should take Bug 650304, Bug 654493 and Bug 654653.
(Assignee)

Comment 4

6 years ago
Created attachment 580026 [details] [diff] [review]
patch

There's a composition of patches from bugs 650304, 654493, 654653.
(Assignee)

Comment 5

6 years ago
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+
(Assignee)

Comment 6

6 years ago
Thanks!
Keywords: checkin-needed
Checked in: http://hg.mozilla.org/comm-central/rev/808503d44ba1
Assignee: nobody → stransky
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Component: Build Config → Build Config
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.