diff options
author | Tim Starling <tstarling@wikimedia.org> | 2012-10-29 13:41:55 +1100 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2012-10-29 14:05:02 +0800 |
commit | 0ad948ede2b5060a144c72e4e27c38d24a272ef4 (patch) | |
tree | 3f7ccf915b1e7bec318d704cc6f79e89589be9f7 | |
parent | 6a36fbe3b3e001a8a840b5c1fdd81cefc9947f0d (diff) | |
download | android_external_libxml2-0ad948ede2b5060a144c72e4e27c38d24a272ef4.tar.gz android_external_libxml2-0ad948ede2b5060a144c72e4e27c38d24a272ef4.tar.bz2 android_external_libxml2-0ad948ede2b5060a144c72e4e27c38d24a272ef4.zip |
Define LIBXML_THREAD_ALLOC_ENABLED via xmlversion.h
Otherwise, direct calls to xmlFree() etc. from the application will
use a different set of allocation functions to what was used to allocate
the memory internally.
-rw-r--r-- | configure.in | 4 | ||||
-rw-r--r-- | include/libxml/xmlversion.h.in | 9 |
2 files changed, 12 insertions, 1 deletions
diff --git a/configure.in b/configure.in index 6da057cf..245c033d 100644 --- a/configure.in +++ b/configure.in @@ -954,6 +954,7 @@ WITH_THREADS=0 THREAD_CFLAGS="" TEST_THREADS="" THREADS_W32="" +WITH_THREAD_ALLOC=0 if test "$with_threads" = "no" ; then echo Disabling multithreaded support @@ -1017,7 +1018,7 @@ else fi fi if test "$with_thread_alloc" = "yes" -a "$WITH_THREADS" = "1" ; then - THREAD_CFLAGS="$THREAD_CFLAGS -DLIBXML_THREAD_ALLOC_ENABLED" + WITH_THREAD_ALLOC=1 fi AC_SUBST(THREAD_LIBS) @@ -1025,6 +1026,7 @@ AC_SUBST(BASE_THREAD_LIBS) AC_SUBST(WITH_THREADS) AC_SUBST(THREAD_CFLAGS) AC_SUBST(TEST_THREADS) +AC_SUBST(WITH_THREAD_ALLOC) AM_CONDITIONAL([THREADS_W32],[test -n "$THREADS_W32"]) dnl diff --git a/include/libxml/xmlversion.h.in b/include/libxml/xmlversion.h.in index c98e7ca7..00a836fb 100644 --- a/include/libxml/xmlversion.h.in +++ b/include/libxml/xmlversion.h.in @@ -98,6 +98,15 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); #endif /** + * LIBXML_THREAD_ALLOC_ENABLED: + * + * Whether the allocation hooks are per-thread + */ +#if @WITH_THREAD_ALLOC@ +#define LIBXML_THREAD_ALLOC_ENABLED +#endif + +/** * LIBXML_TREE_ENABLED: * * Whether the DOM like tree manipulation API support is configured in |