Closed
Bug 662224
Opened 13 years ago
Closed 13 years ago
NS_ATTR_MALLOC and NS_WARN_UNUSED_RESULT not defined when mozalloc.h is indirectly included in embedding code
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla7
People
(Reporter: glandium, Assigned: glandium)
Details
Attachments
(2 files, 1 obsolete file)
1.46 KB,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
1.84 KB,
patch
|
Details | Diff | Splinter Review |
When building e.g. external binary xpcom components with mozalloc (which is supposedly the default), including nsISupports.h (which is necessary when you use your own interfaces) includes nscore.h which includes mozalloc.h. That leads to a failure to build, since NS_ATTR_MALLOC and NS_WARN_UNUSED_RESULT are not defined. They are defined in mozilla-config.h (which is included from nowhere), but it seems wrong to rely on the fact that the compiler used to build the component supports the same things as the compiler used to build the sdk.
Assignee | ||
Comment 1•13 years ago
|
||
Attachment #537499 -
Flags: review?(benjamin)
Comment 2•13 years ago
|
||
Comment on attachment 537499 [details] [diff] [review] Safeguard NS_ATTR_MALLOC and NS_WARN_UNUSED_RESULT in mozalloc.h I think the correct thing to do here is add these to xpcom-config.h.in and include xpcom-config.h from this file.
Attachment #537499 -
Flags: review?(benjamin) → review-
Assignee | ||
Comment 3•13 years ago
|
||
Assignee | ||
Updated•13 years ago
|
Attachment #537499 -
Attachment is obsolete: true
Assignee | ||
Updated•13 years ago
|
Attachment #537705 -
Flags: review?(benjamin)
Updated•13 years ago
|
Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED
Updated•13 years ago
|
Attachment #537705 -
Flags: review?(benjamin) → review+
Assignee | ||
Comment 4•13 years ago
|
||
As I'm going to land: we need to add $(DEPTH)/xpcom to the include path so that xpcom-config.h is found when building mozalloc, which is built before xpcom-config.h is copied into dist/bin.
Assignee | ||
Comment 5•13 years ago
|
||
http://hg.mozilla.org/integration/mozilla-inbound/rev/d959aeca8307
Whiteboard: [inbound]
Comment 6•13 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/d959aeca8307
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → mozilla7
You need to log in
before you can comment on or make changes to this bug.
Description
•