Skip to content

Commit c65a7c0

Browse files
committed
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.
1 parent bf3c421 commit c65a7c0

File tree

5 files changed

+1
-43
lines changed

5 files changed

+1
-43
lines changed

CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ endif()
4040
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
4141
option(LIBXSLT_WITH_DEBUGGER "Add the debugging support" ON)
4242
option(LIBXSLT_WITH_CRYPTO "Add crypto support to exslt" OFF)
43-
option(LIBXSLT_WITH_MEM_DEBUG "Add the memory debugging module" OFF)
4443
option(LIBXSLT_WITH_MODULES "Add the module support" ON)
4544
option(LIBXSLT_WITH_PROFILER "Add the profiling support" ON)
4645
option(LIBXSLT_WITH_PYTHON "Build Python bindings" ON)
@@ -76,7 +75,7 @@ if(LIBXSLT_WITH_THREADS)
7675
find_package(Threads REQUIRED)
7776
endif()
7877

79-
foreach(VARIABLE IN ITEMS WITH_CRYPTO WITH_DEBUGGER WITH_MEM_DEBUG WITH_MODULES WITH_PROFILER WITH_PYTHON WITH_TRIO WITH_XSLT_DEBUG)
78+
foreach(VARIABLE IN ITEMS WITH_CRYPTO WITH_DEBUGGER WITH_MODULES WITH_PROFILER WITH_PYTHON WITH_TRIO WITH_XSLT_DEBUG)
8079
if(LIBXSLT_${VARIABLE})
8180
set(${VARIABLE} 1)
8281
else()

configure.ac

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -253,15 +253,6 @@ else
253253
fi
254254
AC_SUBST(WITH_XSLT_DEBUG)
255255

256-
AC_ARG_WITH(mem_debug, [ --with-mem-debug Add the memory debugging module (off)])
257-
if test "$with_mem_debug" = "yes" ; then
258-
echo Enabling memory debug support
259-
WITH_MEM_DEBUG=1
260-
else
261-
WITH_MEM_DEBUG=0
262-
fi
263-
AC_SUBST(WITH_MEM_DEBUG)
264-
265256
dnl
266257
dnl Is debugger support requested
267258
dnl

libxslt/xsltconfig.h.in

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -54,26 +54,6 @@ extern "C" {
5454
#define WITH_XSLT_DEBUG
5555
#endif
5656

57-
#if @WITH_MEM_DEBUG@
58-
/**
59-
* DEBUG_MEMORY:
60-
*
61-
* should be activated only when debugging libxslt. It replaces the
62-
* allocator with a collect and debug shell to the libc allocator.
63-
* Use configure --with-mem-debug to activate it on both library
64-
*/
65-
#define DEBUG_MEMORY
66-
67-
/**
68-
* DEBUG_MEMORY_LOCATION:
69-
*
70-
* should be activated only when debugging libxslt.
71-
* DEBUG_MEMORY_LOCATION should be activated only when libxml has
72-
* been configured with --with-debug-mem too
73-
*/
74-
#define DEBUG_MEMORY_LOCATION
75-
#endif
76-
7757
/**
7858
* XSLT_NEED_TRIO:
7959
*

python/libxslt.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,6 @@ __inline int c99_vsnprintf(char *outBuf, size_t size, const char *format, va_lis
5151
#define vsnprintf trio_vsnprintf
5252
#endif
5353

54-
/* #define DEBUG */
55-
/* #define DEBUG_XPATH */
56-
/* #define DEBUG_ERROR */
57-
/* #define DEBUG_MEMORY */
58-
/* #define DEBUG_EXTENSIONS */
59-
/* #define DEBUG_EXTENSIONS */
60-
6154
#if PY_MAJOR_VERSION >= 3
6255
PyObject* PyInit_libxsltmod(void);
6356
#else

win32/configure.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ function discoverVersion()
180180
cf.Close();
181181
vf.WriteLine("WITH_TRIO=" + (withTrio? "1" : "0"));
182182
vf.WriteLine("WITH_DEBUG=" + (withXsltDebug? "1" : "0"));
183-
vf.WriteLine("WITH_MEM_DEBUG=" + (withMemDebug? "1" : "0"));
184183
vf.WriteLine("WITH_DEBUGGER=" + (withDebugger? "1" : "0"));
185184
vf.WriteLine("WITH_ICONV=" + (withIconv? "1" : "0"));
186185
vf.WriteLine("WITH_ZLIB=" + (withZlib? "1" : "0"));
@@ -230,8 +229,6 @@ function configureXslt()
230229
of.WriteLine(s.replace(/\@WITH_TRIO\@/, withTrio? "1" : "0"));
231230
} else if (s.search(/\@WITH_XSLT_DEBUG\@/) != -1) {
232231
of.WriteLine(s.replace(/\@WITH_XSLT_DEBUG\@/, withXsltDebug? "1" : "0"));
233-
} else if (s.search(/\@WITH_MEM_DEBUG\@/) != -1) {
234-
of.WriteLine(s.replace(/\@WITH_MEM_DEBUG\@/, withMemDebug? "1" : "0"));
235232
} else if (s.search(/\@WITH_DEBUGGER\@/) != -1) {
236233
of.WriteLine(s.replace(/\@WITH_DEBUGGER\@/, withDebugger? "1" : "0"));
237234
} else if (s.search(/\@WITH_MODULES\@/) != -1) {
@@ -303,8 +300,6 @@ function configureLibxsltPy()
303300
of.WriteLine(s.replace(/\@WITH_TRIO\@/, withTrio? "1" : "0"));
304301
} else if (s.search(/\@WITH_XSLT_DEBUG\@/) != -1) {
305302
of.WriteLine(s.replace(/\@WITH_XSLT_DEBUG\@/, withXsltDebug? "1" : "0"));
306-
} else if (s.search(/\@WITH_MEM_DEBUG\@/) != -1) {
307-
of.WriteLine(s.replace(/\@WITH_MEM_DEBUG\@/, withMemDebug? "1" : "0"));
308303
} else if (s.search(/\@WITH_DEBUGGER\@/) != -1) {
309304
of.WriteLine(s.replace(/\@WITH_DEBUGGER\@/, withDebugger? "1" : "0"));
310305
} else if (s.search(/\@WITH_MODULES\@/) != -1) {

0 commit comments

Comments
 (0)