Closed Bug 170377 Opened 22 years ago Closed 22 years ago

defaults without config.

Categories

(Core :: XPCOM, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dougt, Assigned: dougt)

Details

Since i am using strings outside of the mozilla build system, I cant depend on
NEW_H being defined.  This simple patch ensure that if this variable isn't
defined, we default to something sane:

Index: nsBufferHandleUtils.h
===================================================================
RCS file: /cvsroot/mozilla/string/public/nsBufferHandleUtils.h,v
retrieving revision 1.8
diff -u -r1.8 nsBufferHandleUtils.h
--- nsBufferHandleUtils.h	19 Aug 2002 03:50:24 -0000	1.8
+++ nsBufferHandleUtils.h	23 Sep 2002 20:41:20 -0000
@@ -33,6 +33,9 @@
 #include "nsStringTraits.h"
 #endif
 
+#ifndef NEW_H
+#define NEW_H "new.h"
+#endif
 #include NEW_H
   // for placement |new|
If you're building outside of the mozilla build system (ie, you're an embeddor),
you should be using mozilla-config.h or the mozilla-config shell script.  There
are defines other than NEW_H that could be problematic.
this is the only one that I have found so far.
CPP_THROW_NEW is the other one that immediately pops into mind.  The various
HAVE_CPP_* defines could be problematic as well.  They are currently hardcoded
for win32 which is probably why you haven't run into that problem yet.
very true.  chris, can you create a file with these "common" defaults?
Component: String → XPCOM
Summary: default NEW_H → defaults without config.
these required common #defines are already specified in mozilla-config.h - which
would be in the dist\include dir.



Actually, my recommendation is to be to use mozilla-config.h.  If you are
building against a binary SDK, then you want to use the same flags that were
used to compile the SDK, not the defaults.  
where exactly does this file get build?  I want to export it to the sdk.
The file is created by configure and is placed in dist/include/ by the toplevel
Makefile.in.  

I'm not completely sold on the idea of bundling mozilla-config.h with the xpcom
SDK.  I'm still confused as to how the mini-SDKs relate to the GRE-based sdk and
to each other.
the config.h file shouldn't be part of the xpcom sdk, but rather above it.  It
should include all of the required define cruft that was used to build the
binaries in the children sdk's (eg. xpcom, necko...)

There will be an SDK which is paired with a GRE.  The SDK will only include libs
that you are required to link to.  
what file?

bash-2.05b$ ls -alR | grep mozilla-config.h
bash-2.05b$ pwd
/cygdrive/c/builds/trunk/mozilla/dist/include

Seams like my config file isn't getting to dist.  However chak's is.
chris fixed this.  
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.