diff --git a/js/src/Makefile.in b/js/src/Makefile.in index 866a926312d..660549200bc 100644 --- a/js/src/Makefile.in +++ b/js/src/Makefile.in @@ -29,7 +29,7 @@ endif DIRS += fdlibm -# DIRS += xpconnect +DIRS += xpconnect LIBRARY_NAME = $(MOZ_LIB_JS_PREFIX)js diff --git a/js/src/xpconnect/src/Makefile.in b/js/src/xpconnect/src/Makefile.in index 405b92ca782..3eec5786621 100644 --- a/js/src/xpconnect/src/Makefile.in +++ b/js/src/xpconnect/src/Makefile.in @@ -49,7 +49,5 @@ CPPSRCS= \ xpcwrappednativeclass.cpp \ $(NULL) -export:: libs - include $(topsrcdir)/config/rules.mk diff --git a/xpcom/Makefile.in b/xpcom/Makefile.in index 4a786c6d30e..a8834e7d86d 100644 --- a/xpcom/Makefile.in +++ b/xpcom/Makefile.in @@ -21,7 +21,7 @@ srcdir = @srcdir@ include $(DEPTH)/config/autoconf.mk -DIRS = public src idl +DIRS = public src idl libxpt ifdef ENABLE_TESTS DIRS += tests diff --git a/xpcom/libxpt/src/Makefile.in b/xpcom/libxpt/src/Makefile.in index e3fd3e70d9c..313d259bfd1 100644 --- a/xpcom/libxpt/src/Makefile.in +++ b/xpcom/libxpt/src/Makefile.in @@ -30,6 +30,11 @@ CSRCS = xpt_struct.c \ REQUIRES = $(MODULE) +# build libxpt (but not xptinfo, xptcall subdirs) early so that it'll be +# available to xpidl, which also must be built early. export:: libs include $(topsrcdir)/config/rules.mk + +Move xptinfo, xptcall from export phase (erroneously copied from libxpt Makefile.in) to libs and back out previous temporary fix. + diff --git a/xpcom/libxpt/xptcall/src/Makefile.in b/xpcom/libxpt/xptcall/src/Makefile.in index e2346e13119..22fce155a45 100644 --- a/xpcom/libxpt/xptcall/src/Makefile.in +++ b/xpcom/libxpt/xptcall/src/Makefile.in @@ -33,6 +33,6 @@ CSRCS = xptcall.c \ REQUIRES = $(MODULE) -export:: libs +# export:: libs include $(topsrcdir)/config/rules.mk diff --git a/xpcom/libxpt/xptinfo/src/Makefile.in b/xpcom/libxpt/xptinfo/src/Makefile.in index 2c4e0df5882..a4b9c3e904a 100644 --- a/xpcom/libxpt/xptinfo/src/Makefile.in +++ b/xpcom/libxpt/xptinfo/src/Makefile.in @@ -34,6 +34,6 @@ CPPSRCS = nsInterfaceInfo.cpp \ REQUIRES = $(MODULE) -export:: libs +# export:: libs include $(topsrcdir)/config/rules.mk diff --git a/xpcom/libxpt/xptinfo/src/nsInterfaceInfo.cpp b/xpcom/libxpt/xptinfo/src/nsInterfaceInfo.cpp index 5f90c59223e..203a665aa28 100644 --- a/xpcom/libxpt/xptinfo/src/nsInterfaceInfo.cpp +++ b/xpcom/libxpt/xptinfo/src/nsInterfaceInfo.cpp @@ -18,6 +18,8 @@ /* Implementation of nsIInterfaceInfoManager. */ +#include "nscore.h" + #include "nsISupports.h" #include "nsIInterfaceInfo.h" #include "nsIInterfaceInfoManager.h" @@ -119,9 +121,9 @@ nsInterfaceInfo::GetMethodInfo(uint16 index, const nsXPTMethodInfo** info) } // else... - *info = (nsXPTMethodInfo*) - &mInterfaceRecord->interfaceDescriptor-> - method_descriptors[index - mMethodBaseIndex]; + *info = NS_REINTERPRET_CAST(nsXPTMethodInfo*, + &mInterfaceRecord->interfaceDescriptor-> + method_descriptors[index - mMethodBaseIndex]); return NS_OK; } @@ -131,19 +133,20 @@ nsInterfaceInfo::GetMethodInfoForName(const char* methodName, uint16 *index, { // XXX probably want to speed this up with a hashtable, or by at least interning // the names to avoid the strcmp + nsresult rv; for (uint16 i = mMethodBaseIndex; i < mMethodCount; i++) { const nsXPTMethodInfo* info; - info = (nsXPTMethodInfo*) - &mInterfaceRecord->interfaceDescriptor-> - method_descriptors[i - mMethodBaseIndex]; + info = NS_REINTERPRET_CAST(nsXPTMethodInfo*, + &mInterfaceRecord->interfaceDescriptor-> + method_descriptors[i - mMethodBaseIndex]); if (PL_strcmp(methodName, info->name) == 0) { #ifdef NS_DEBUG // make sure there aren't duplicate names for (; i < mMethodCount; i++) { const nsXPTMethodInfo* info2; - info2 = (nsXPTMethodInfo*) - &mInterfaceRecord->interfaceDescriptor-> - method_descriptors[i - mMethodBaseIndex]; + info2 = NS_REINTERPRET_CAST(nsXPTMethodInfo*, + &mInterfaceRecord->interfaceDescriptor-> + method_descriptors[i - mMethodBaseIndex]); NS_ASSERTION(PL_strcmp(methodName, info2->name)!= 0, "duplicate names"); } #endif @@ -168,9 +171,10 @@ nsInterfaceInfo::GetConstant(uint16 index, const nsXPTConstant** constant) } // else... - *constant = (nsXPTConstant*) - &mInterfaceRecord->interfaceDescriptor-> - const_descriptors[index-mConstantBaseIndex]; + *constant = + NS_REINTERPRET_CAST(nsXPTConstant*, + &mInterfaceRecord->interfaceDescriptor-> + const_descriptors[index-mConstantBaseIndex]); return NS_OK; } diff --git a/xpcom/libxpt/xptinfo/src/nsInterfaceInfoManager.cpp b/xpcom/libxpt/xptinfo/src/nsInterfaceInfoManager.cpp index ef8e80d85bc..568dd567946 100644 --- a/xpcom/libxpt/xptinfo/src/nsInterfaceInfoManager.cpp +++ b/xpcom/libxpt/xptinfo/src/nsInterfaceInfoManager.cpp @@ -19,6 +19,7 @@ /* Implementation of nsIInterfaceInfo. */ #include +#include "nscore.h" #include "nsISupports.h" #include "nsIInterfaceInfoManager.h" diff --git a/xpcom/reflect/xptcall/src/Makefile.in b/xpcom/reflect/xptcall/src/Makefile.in index e2346e13119..22fce155a45 100644 --- a/xpcom/reflect/xptcall/src/Makefile.in +++ b/xpcom/reflect/xptcall/src/Makefile.in @@ -33,6 +33,6 @@ CSRCS = xptcall.c \ REQUIRES = $(MODULE) -export:: libs +# export:: libs include $(topsrcdir)/config/rules.mk diff --git a/xpcom/reflect/xptinfo/src/Makefile.in b/xpcom/reflect/xptinfo/src/Makefile.in index 2c4e0df5882..a4b9c3e904a 100644 --- a/xpcom/reflect/xptinfo/src/Makefile.in +++ b/xpcom/reflect/xptinfo/src/Makefile.in @@ -34,6 +34,6 @@ CPPSRCS = nsInterfaceInfo.cpp \ REQUIRES = $(MODULE) -export:: libs +# export:: libs include $(topsrcdir)/config/rules.mk diff --git a/xpcom/reflect/xptinfo/src/nsInterfaceInfo.cpp b/xpcom/reflect/xptinfo/src/nsInterfaceInfo.cpp index 5f90c59223e..203a665aa28 100644 --- a/xpcom/reflect/xptinfo/src/nsInterfaceInfo.cpp +++ b/xpcom/reflect/xptinfo/src/nsInterfaceInfo.cpp @@ -18,6 +18,8 @@ /* Implementation of nsIInterfaceInfoManager. */ +#include "nscore.h" + #include "nsISupports.h" #include "nsIInterfaceInfo.h" #include "nsIInterfaceInfoManager.h" @@ -119,9 +121,9 @@ nsInterfaceInfo::GetMethodInfo(uint16 index, const nsXPTMethodInfo** info) } // else... - *info = (nsXPTMethodInfo*) - &mInterfaceRecord->interfaceDescriptor-> - method_descriptors[index - mMethodBaseIndex]; + *info = NS_REINTERPRET_CAST(nsXPTMethodInfo*, + &mInterfaceRecord->interfaceDescriptor-> + method_descriptors[index - mMethodBaseIndex]); return NS_OK; } @@ -131,19 +133,20 @@ nsInterfaceInfo::GetMethodInfoForName(const char* methodName, uint16 *index, { // XXX probably want to speed this up with a hashtable, or by at least interning // the names to avoid the strcmp + nsresult rv; for (uint16 i = mMethodBaseIndex; i < mMethodCount; i++) { const nsXPTMethodInfo* info; - info = (nsXPTMethodInfo*) - &mInterfaceRecord->interfaceDescriptor-> - method_descriptors[i - mMethodBaseIndex]; + info = NS_REINTERPRET_CAST(nsXPTMethodInfo*, + &mInterfaceRecord->interfaceDescriptor-> + method_descriptors[i - mMethodBaseIndex]); if (PL_strcmp(methodName, info->name) == 0) { #ifdef NS_DEBUG // make sure there aren't duplicate names for (; i < mMethodCount; i++) { const nsXPTMethodInfo* info2; - info2 = (nsXPTMethodInfo*) - &mInterfaceRecord->interfaceDescriptor-> - method_descriptors[i - mMethodBaseIndex]; + info2 = NS_REINTERPRET_CAST(nsXPTMethodInfo*, + &mInterfaceRecord->interfaceDescriptor-> + method_descriptors[i - mMethodBaseIndex]); NS_ASSERTION(PL_strcmp(methodName, info2->name)!= 0, "duplicate names"); } #endif @@ -168,9 +171,10 @@ nsInterfaceInfo::GetConstant(uint16 index, const nsXPTConstant** constant) } // else... - *constant = (nsXPTConstant*) - &mInterfaceRecord->interfaceDescriptor-> - const_descriptors[index-mConstantBaseIndex]; + *constant = + NS_REINTERPRET_CAST(nsXPTConstant*, + &mInterfaceRecord->interfaceDescriptor-> + const_descriptors[index-mConstantBaseIndex]); return NS_OK; } diff --git a/xpcom/reflect/xptinfo/src/nsInterfaceInfoManager.cpp b/xpcom/reflect/xptinfo/src/nsInterfaceInfoManager.cpp index ef8e80d85bc..568dd567946 100644 --- a/xpcom/reflect/xptinfo/src/nsInterfaceInfoManager.cpp +++ b/xpcom/reflect/xptinfo/src/nsInterfaceInfoManager.cpp @@ -19,6 +19,7 @@ /* Implementation of nsIInterfaceInfo. */ #include +#include "nscore.h" #include "nsISupports.h" #include "nsIInterfaceInfoManager.h" diff --git a/xpcom/typelib/xpt/src/Makefile.in b/xpcom/typelib/xpt/src/Makefile.in index e3fd3e70d9c..313d259bfd1 100644 --- a/xpcom/typelib/xpt/src/Makefile.in +++ b/xpcom/typelib/xpt/src/Makefile.in @@ -30,6 +30,11 @@ CSRCS = xpt_struct.c \ REQUIRES = $(MODULE) +# build libxpt (but not xptinfo, xptcall subdirs) early so that it'll be +# available to xpidl, which also must be built early. export:: libs include $(topsrcdir)/config/rules.mk + +Move xptinfo, xptcall from export phase (erroneously copied from libxpt Makefile.in) to libs and back out previous temporary fix. +