1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2025-07-03 00:42:24 +03:00

build: Remove mem-debug option

This is an ancient, internal debugging option which only works if
libxml2 is built with mem-debug as well. Remove the option to avoid
crashes.

Fixes #105.
This commit is contained in:
Nick Wellnhofer
2024-01-30 13:02:45 +01:00
parent bf3c42127e
commit c65a7c05f9
5 changed files with 1 additions and 43 deletions

View File

@ -40,7 +40,6 @@ endif()
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
option(LIBXSLT_WITH_DEBUGGER "Add the debugging support" ON)
option(LIBXSLT_WITH_CRYPTO "Add crypto support to exslt" OFF)
option(LIBXSLT_WITH_MEM_DEBUG "Add the memory debugging module" OFF)
option(LIBXSLT_WITH_MODULES "Add the module support" ON)
option(LIBXSLT_WITH_PROFILER "Add the profiling support" ON)
option(LIBXSLT_WITH_PYTHON "Build Python bindings" ON)
@ -76,7 +75,7 @@ if(LIBXSLT_WITH_THREADS)
find_package(Threads REQUIRED)
endif()
foreach(VARIABLE IN ITEMS WITH_CRYPTO WITH_DEBUGGER WITH_MEM_DEBUG WITH_MODULES WITH_PROFILER WITH_PYTHON WITH_TRIO WITH_XSLT_DEBUG)
foreach(VARIABLE IN ITEMS WITH_CRYPTO WITH_DEBUGGER WITH_MODULES WITH_PROFILER WITH_PYTHON WITH_TRIO WITH_XSLT_DEBUG)
if(LIBXSLT_${VARIABLE})
set(${VARIABLE} 1)
else()

View File

@ -253,15 +253,6 @@ else
fi
AC_SUBST(WITH_XSLT_DEBUG)
AC_ARG_WITH(mem_debug, [ --with-mem-debug Add the memory debugging module (off)])
if test "$with_mem_debug" = "yes" ; then
echo Enabling memory debug support
WITH_MEM_DEBUG=1
else
WITH_MEM_DEBUG=0
fi
AC_SUBST(WITH_MEM_DEBUG)
dnl
dnl Is debugger support requested
dnl

View File

@ -54,26 +54,6 @@ extern "C" {
#define WITH_XSLT_DEBUG
#endif
#if @WITH_MEM_DEBUG@
/**
* DEBUG_MEMORY:
*
* should be activated only when debugging libxslt. It replaces the
* allocator with a collect and debug shell to the libc allocator.
* Use configure --with-mem-debug to activate it on both library
*/
#define DEBUG_MEMORY
/**
* DEBUG_MEMORY_LOCATION:
*
* should be activated only when debugging libxslt.
* DEBUG_MEMORY_LOCATION should be activated only when libxml has
* been configured with --with-debug-mem too
*/
#define DEBUG_MEMORY_LOCATION
#endif
/**
* XSLT_NEED_TRIO:
*

View File

@ -51,13 +51,6 @@ __inline int c99_vsnprintf(char *outBuf, size_t size, const char *format, va_lis
#define vsnprintf trio_vsnprintf
#endif
/* #define DEBUG */
/* #define DEBUG_XPATH */
/* #define DEBUG_ERROR */
/* #define DEBUG_MEMORY */
/* #define DEBUG_EXTENSIONS */
/* #define DEBUG_EXTENSIONS */
#if PY_MAJOR_VERSION >= 3
PyObject* PyInit_libxsltmod(void);
#else

View File

@ -180,7 +180,6 @@ function discoverVersion()
cf.Close();
vf.WriteLine("WITH_TRIO=" + (withTrio? "1" : "0"));
vf.WriteLine("WITH_DEBUG=" + (withXsltDebug? "1" : "0"));
vf.WriteLine("WITH_MEM_DEBUG=" + (withMemDebug? "1" : "0"));
vf.WriteLine("WITH_DEBUGGER=" + (withDebugger? "1" : "0"));
vf.WriteLine("WITH_ICONV=" + (withIconv? "1" : "0"));
vf.WriteLine("WITH_ZLIB=" + (withZlib? "1" : "0"));
@ -230,8 +229,6 @@ function configureXslt()
of.WriteLine(s.replace(/\@WITH_TRIO\@/, withTrio? "1" : "0"));
} else if (s.search(/\@WITH_XSLT_DEBUG\@/) != -1) {
of.WriteLine(s.replace(/\@WITH_XSLT_DEBUG\@/, withXsltDebug? "1" : "0"));
} else if (s.search(/\@WITH_MEM_DEBUG\@/) != -1) {
of.WriteLine(s.replace(/\@WITH_MEM_DEBUG\@/, withMemDebug? "1" : "0"));
} else if (s.search(/\@WITH_DEBUGGER\@/) != -1) {
of.WriteLine(s.replace(/\@WITH_DEBUGGER\@/, withDebugger? "1" : "0"));
} else if (s.search(/\@WITH_MODULES\@/) != -1) {
@ -303,8 +300,6 @@ function configureLibxsltPy()
of.WriteLine(s.replace(/\@WITH_TRIO\@/, withTrio? "1" : "0"));
} else if (s.search(/\@WITH_XSLT_DEBUG\@/) != -1) {
of.WriteLine(s.replace(/\@WITH_XSLT_DEBUG\@/, withXsltDebug? "1" : "0"));
} else if (s.search(/\@WITH_MEM_DEBUG\@/) != -1) {
of.WriteLine(s.replace(/\@WITH_MEM_DEBUG\@/, withMemDebug? "1" : "0"));
} else if (s.search(/\@WITH_DEBUGGER\@/) != -1) {
of.WriteLine(s.replace(/\@WITH_DEBUGGER\@/, withDebugger? "1" : "0"));
} else if (s.search(/\@WITH_MODULES\@/) != -1) {