зеркало из https://github.com/mozilla/gecko-dev.git
Conditionally ifdef out some dtd debugging code that chokes some
compilers because of badly broken streams code in prstrm.cpp.
This commit is contained in:
Родитель
1feaaef22d
Коммит
8eba1ffe7b
|
@ -190,6 +190,8 @@ LIBS_PATH = @LIBS_PATH@
|
|||
COMPILER_DEPEND = @COMPILER_DEPEND@
|
||||
MDDEPDIR := @MDDEPDIR@
|
||||
|
||||
MOZ_DISABLE_DTD_DEBUG = @MOZ_DISABLE_DTD_DEBUG@
|
||||
|
||||
# Pulled these out of configure.in,
|
||||
# so undefine them now instead of subst
|
||||
MOZ_NETCAST =
|
||||
|
|
20
configure.in
20
configure.in
|
@ -463,6 +463,24 @@ fi
|
|||
|
||||
dnl ========================================================
|
||||
|
||||
dnl ========================================================
|
||||
dnl =
|
||||
dnl = --diable-dtd-debug
|
||||
dnl =
|
||||
dnl = Disable some DTD debugging code in the parser that
|
||||
dnl = breaks on some compilers because of evil and broken
|
||||
dnl = streams code in htmlparser/src/prstrm.cpp
|
||||
dnl =
|
||||
dnl ========================================================
|
||||
MOZ_DISABLE_DTD_DEBUG=
|
||||
|
||||
MOZ_ARG_DISABLE_BOOL(dtd-debug,
|
||||
[ --disable-dtd-debug Disable some DTD debuggin code in the parser)],
|
||||
MOZ_DISABLE_DTD_DEBUG=1
|
||||
AC_DEFINE(MOZ_DISABLE_DTD_DEBUG) )
|
||||
|
||||
dnl ========================================================
|
||||
|
||||
|
||||
dnl Checks for X libraries.
|
||||
dnl Ordering is important.
|
||||
|
@ -2025,7 +2043,7 @@ AC_SUBST(CXXFLAGS)
|
|||
AC_SUBST(LDFLAGS)
|
||||
AC_SUBST(LIBS)
|
||||
|
||||
AC_SUBST(USE_STRING2)
|
||||
AC_SUBST(MOZ_DISABLE_DTD_DEBUG)
|
||||
|
||||
AC_SUBST(WRAP_MALLOC_CFLAGS)
|
||||
AC_SUBST(WRAP_MALLOC_LIB)
|
||||
|
|
|
@ -412,7 +412,13 @@ nsresult CNavDTD::CreateNewInstance(nsIDTD** aInstancePtrResult){
|
|||
PRBool CNavDTD::Verify(nsString& aURLRef,nsIParser* aParser){
|
||||
PRBool result=PR_TRUE;
|
||||
|
||||
if(!mDTDDebug){;
|
||||
/*
|
||||
* Disable some DTD debugging code in the parser that
|
||||
* breaks on some compilers because of some broken
|
||||
* streams code in prstrm.cpp.
|
||||
*/
|
||||
#if !defined(MOZ_DISABLE_DTD_DEBUG)
|
||||
if(!mDTDDebug){
|
||||
nsresult rval = NS_NewDTDDebug(&mDTDDebug);
|
||||
if (NS_OK != rval) {
|
||||
fputs("Cannot create parser debugger.\n", stdout);
|
||||
|
@ -420,6 +426,8 @@ PRBool CNavDTD::Verify(nsString& aURLRef,nsIParser* aParser){
|
|||
}
|
||||
else mDTDDebug->SetVerificationDirectory(kVerificationDir);
|
||||
}
|
||||
#endif
|
||||
|
||||
if(mDTDDebug) {
|
||||
// mDTDDebug->Verify(this,aParser,mBodyContext->GetCount(),mBodyContext->mStack,aURLRef);
|
||||
}
|
||||
|
|
|
@ -37,7 +37,6 @@ CPPSRCS= \
|
|||
CNavDTD.cpp \
|
||||
COtherDTD.cpp \
|
||||
CRtfDTD.cpp \
|
||||
nsDTDDebug.cpp \
|
||||
nsHTMLEntities.cpp \
|
||||
nsHTMLNullSink.cpp \
|
||||
nsHTMLTags.cpp \
|
||||
|
@ -56,9 +55,15 @@ CPPSRCS= \
|
|||
nsWellFormedDTD.cpp \
|
||||
nsViewSourceHTML.cpp \
|
||||
nsXIFDTD.cpp \
|
||||
prstrm.cpp \
|
||||
$(NULL)
|
||||
|
||||
# Disable some DTD debugging code in the parser that
|
||||
# breaks on some compilers because of some broken
|
||||
# streams code in prstrm.cpp.
|
||||
ifndef MOZ_DISABLE_DTD_DEBUG
|
||||
CPPSRCS += nsDTDDebug.cpp prstrm.cpp
|
||||
endif
|
||||
|
||||
EXPORTS = \
|
||||
nshtmlpars.h \
|
||||
nsIContentSink.h \
|
||||
|
|
|
@ -412,7 +412,13 @@ nsresult CNavDTD::CreateNewInstance(nsIDTD** aInstancePtrResult){
|
|||
PRBool CNavDTD::Verify(nsString& aURLRef,nsIParser* aParser){
|
||||
PRBool result=PR_TRUE;
|
||||
|
||||
if(!mDTDDebug){;
|
||||
/*
|
||||
* Disable some DTD debugging code in the parser that
|
||||
* breaks on some compilers because of some broken
|
||||
* streams code in prstrm.cpp.
|
||||
*/
|
||||
#if !defined(MOZ_DISABLE_DTD_DEBUG)
|
||||
if(!mDTDDebug){
|
||||
nsresult rval = NS_NewDTDDebug(&mDTDDebug);
|
||||
if (NS_OK != rval) {
|
||||
fputs("Cannot create parser debugger.\n", stdout);
|
||||
|
@ -420,6 +426,8 @@ PRBool CNavDTD::Verify(nsString& aURLRef,nsIParser* aParser){
|
|||
}
|
||||
else mDTDDebug->SetVerificationDirectory(kVerificationDir);
|
||||
}
|
||||
#endif
|
||||
|
||||
if(mDTDDebug) {
|
||||
// mDTDDebug->Verify(this,aParser,mBodyContext->GetCount(),mBodyContext->mStack,aURLRef);
|
||||
}
|
||||
|
|
|
@ -37,7 +37,6 @@ CPPSRCS= \
|
|||
CNavDTD.cpp \
|
||||
COtherDTD.cpp \
|
||||
CRtfDTD.cpp \
|
||||
nsDTDDebug.cpp \
|
||||
nsHTMLEntities.cpp \
|
||||
nsHTMLNullSink.cpp \
|
||||
nsHTMLTags.cpp \
|
||||
|
@ -56,9 +55,15 @@ CPPSRCS= \
|
|||
nsWellFormedDTD.cpp \
|
||||
nsViewSourceHTML.cpp \
|
||||
nsXIFDTD.cpp \
|
||||
prstrm.cpp \
|
||||
$(NULL)
|
||||
|
||||
# Disable some DTD debugging code in the parser that
|
||||
# breaks on some compilers because of some broken
|
||||
# streams code in prstrm.cpp.
|
||||
ifndef MOZ_DISABLE_DTD_DEBUG
|
||||
CPPSRCS += nsDTDDebug.cpp prstrm.cpp
|
||||
endif
|
||||
|
||||
EXPORTS = \
|
||||
nshtmlpars.h \
|
||||
nsIContentSink.h \
|
||||
|
|
Загрузка…
Ссылка в новой задаче