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:
ramiro%netscape.com 1999-06-12 12:49:04 +00:00
Родитель 1feaaef22d
Коммит 8eba1ffe7b
6 изменённых файлов: 53 добавлений и 7 удалений

Просмотреть файл

@ -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 =

Просмотреть файл

@ -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 \