Closed
Bug 200574
Opened 23 years ago
Closed 23 years ago
nscore.h needs an explicit dependency upon mozilla-config.h
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla1.4beta
People
(Reporter: netscape, Assigned: dougt)
Details
Attachments
(1 file, 1 obsolete file)
|
682 bytes,
patch
|
dbaron
:
superreview+
|
Details | Diff | Splinter Review |
| Reporter | ||
Comment 1•23 years ago
|
||
Argh. *kicks <enter> key*
mozilla-config.h sets a number of defines which determine whether we support
various c++ features (explicit, typename, etc) and nscore.h uses these defines.
Apparently, embeddors and other users of xpcom know nothing about
mozilla-config.h (who is teaching these people?) so we need an explicit
dependency upon mozilla-config.h. We can either add the #include or we can do a
#ifndef _MOZILLA_CONFIG_H__ #error #endif check.
| Reporter | ||
Comment 2•23 years ago
|
||
| Assignee | ||
Comment 3•23 years ago
|
||
what we really need is ONE #include for the SDK that includes all of the header
files that they need. Something like gecko.h. Right now you have to worry not
only about what includes you are required to use, but what ordering those
includes need to be in. Maybe now is a good time to flatten the sdk directory
structure to allow for something like a master gecko.h include?
| Reporter | ||
Updated•23 years ago
|
Attachment #119379 -
Flags: review?(dougt)
Do we use mozilla-config.h on all platforms? I thought we used -D options on
the command line for platforms that don't have a command-line -include option.
Might this cause problems with duplicate definitions in some cases?
Perhaps a better solution is to AC_DEFINE something unconditionally, and #error
based on that macro, to ensure that embedders are using configure?
| Assignee | ||
Comment 5•23 years ago
|
||
dbaron - think about embedders and component developers that are outside of the
mozilla build system. these guys don't have a -D option or AC_CONFIG stuff that
they want to mess with.
| Reporter | ||
Comment 6•23 years ago
|
||
dougt, I'm not a big fan of the all-inclusive pull everything includes. They
just hide any dependency issues and cause you to pull in far more than you
usually need. Besides, that wouldn't solve this particular problem anyway.
dbaron, mozilla-config.h is generated on all platforms which use configure
(which is all of them now :)) . It contains header guards to prevent multiple
defines from multiple inclusions. That header define is also set in the non-gcc
builds which dump all of the defines on the commandline.
| Assignee | ||
Comment 7•23 years ago
|
||
Comment on attachment 119379 [details] [diff] [review]
Add #include
make the comments look the same:
+/*
...
+
/**
Attachment #119379 -
Flags: review?(dougt) → review+
OK with me, then, but how about putting the include guard in nscore.h itself to
help compile time?
| Reporter | ||
Comment 9•23 years ago
|
||
Attachment #119379 -
Attachment is obsolete: true
Attachment #119382 -
Flags: superreview+
| Reporter | ||
Comment 10•23 years ago
|
||
Checked in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.4beta
You need to log in
before you can comment on or make changes to this bug.
Description
•