mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-30 22:43:14 +03:00
make the allocation be per-thread a configure option fixed compilation
* include/libxml/globals.h configure.in global.data: make the allocation be per-thread a configure option * encoding.c include/libxml/parser.h: fixed compilation errors Daniel
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
Mon Oct 15 14:30:11 CEST 2001 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* include/libxml/globals.h configure.in global.data: make
|
||||||
|
the allocation be per-thread a configure option
|
||||||
|
* encoding.c include/libxml/parser.h: fixed compilation
|
||||||
|
errors
|
||||||
|
|
||||||
Mon Oct 15 12:45:03 CEST 2001 Daniel Veillard <daniel@veillard.com>
|
Mon Oct 15 12:45:03 CEST 2001 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* include/libxml/parser.h: Norm reported that a few lines
|
* include/libxml/parser.h: Norm reported that a few lines
|
||||||
|
@ -249,6 +249,7 @@ dnl
|
|||||||
THREAD_LIBS=""
|
THREAD_LIBS=""
|
||||||
WITH_THREADS=0
|
WITH_THREADS=0
|
||||||
THREAD_CFLAGS=""
|
THREAD_CFLAGS=""
|
||||||
|
|
||||||
AC_ARG_WITH(threads, [ --with-threads Add multithread support(off)])
|
AC_ARG_WITH(threads, [ --with-threads Add multithread support(off)])
|
||||||
if test "$with_threads" = "yes" ; then
|
if test "$with_threads" = "yes" ; then
|
||||||
echo Enabling multithreaded support
|
echo Enabling multithreaded support
|
||||||
@ -264,6 +265,11 @@ if test "$with_threads" = "yes" ; then
|
|||||||
THREAD_CFLAGS="$XML_CFLAGS -D_REENTRANT"
|
THREAD_CFLAGS="$XML_CFLAGS -D_REENTRANT"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
AC_ARG_WITH(thread-alloc, [ --with-thread-alloc Add per-thread memory(off)])
|
||||||
|
if test "$with_threads" = "yes" -a "$WITH_THREADS" = "1" ; then
|
||||||
|
THREAD_CFLAGS="$XML_CFLAGS -DLIBXML_THREAD_ALLOC_ENABLED"
|
||||||
|
fi
|
||||||
|
|
||||||
AC_SUBST(THREAD_LIBS)
|
AC_SUBST(THREAD_LIBS)
|
||||||
AC_SUBST(WITH_THREADS)
|
AC_SUBST(WITH_THREADS)
|
||||||
AC_SUBST(THREAD_CFLAGS)
|
AC_SUBST(THREAD_CFLAGS)
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
#include <libxml/HTMLparser.h>
|
#include <libxml/HTMLparser.h>
|
||||||
#endif
|
#endif
|
||||||
#include <libxml/xmlerror.h>
|
#include <libxml/xmlerror.h>
|
||||||
|
#include <libxml/globals.h>
|
||||||
|
|
||||||
static xmlCharEncodingHandlerPtr xmlUTF16LEHandler = NULL;
|
static xmlCharEncodingHandlerPtr xmlUTF16LEHandler = NULL;
|
||||||
static xmlCharEncodingHandlerPtr xmlUTF16BEHandler = NULL;
|
static xmlCharEncodingHandlerPtr xmlUTF16BEHandler = NULL;
|
||||||
|
@ -6,7 +6,6 @@ int,xmlDefaultBufferSize
|
|||||||
xmlSAXHandler,xmlDefaultSAXHandler
|
xmlSAXHandler,xmlDefaultSAXHandler
|
||||||
xmlSAXLocator,xmlDefaultSAXLocator
|
xmlSAXLocator,xmlDefaultSAXLocator
|
||||||
int,xmlDoValidityCheckingDefaultValue
|
int,xmlDoValidityCheckingDefaultValue
|
||||||
xmlFreeFunc,xmlFree
|
|
||||||
xmlGenericErrorFunc,xmlGenericError
|
xmlGenericErrorFunc,xmlGenericError
|
||||||
void *,xmlGenericErrorContext
|
void *,xmlGenericErrorContext
|
||||||
int,xmlGetWarningsDefaultValue
|
int,xmlGetWarningsDefaultValue
|
||||||
@ -14,14 +13,11 @@ int,xmlIndentTreeOutput
|
|||||||
int,xmlKeepBlanksDefaultValue
|
int,xmlKeepBlanksDefaultValue
|
||||||
int,xmlLineNumbersDefaultValue
|
int,xmlLineNumbersDefaultValue
|
||||||
int,xmlLoadExtDtdDefaultValue
|
int,xmlLoadExtDtdDefaultValue
|
||||||
xmlMallocFunc,xmlMalloc
|
|
||||||
xmlStrdupFunc,xmlMemStrdup
|
|
||||||
int,xmlParserDebugEntities
|
int,xmlParserDebugEntities
|
||||||
const char *,xmlParserVersion
|
const char *,xmlParserVersion
|
||||||
int,xmlPedanticParserDefaultValue
|
int,xmlPedanticParserDefaultValue
|
||||||
xmlReallocFunc,xmlRealloc
|
|
||||||
int,xmlSaveNoEmptyTags
|
int,xmlSaveNoEmptyTags
|
||||||
#const xmlChar,xmlStringComment,[]
|
#const xmlChar,xmlStringComment,[]
|
||||||
#const xmlChar,xmlStringText,[]
|
#const xmlChar,xmlStringText,[]
|
||||||
#const xmlChar,xmlStringTextNoenc,[]
|
#const xmlChar,xmlStringTextNoenc,[]
|
||||||
int,xmlSubstituteEntitiesDefaultValue
|
int,xmlSubstituteEntitiesDefaultValue
|
||||||
|
@ -90,6 +90,54 @@ struct _xmlGlobalState
|
|||||||
|
|
||||||
void xmlInitializeGlobalState(xmlGlobalStatePtr gs);
|
void xmlInitializeGlobalState(xmlGlobalStatePtr gs);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* In general the memory allocation entry points are not kept
|
||||||
|
* thread specific but this can be overriden by LIBXML_THREAD_ALLOC_ENABLED
|
||||||
|
* - xmlMalloc
|
||||||
|
* - xmlRealloc
|
||||||
|
* - xmlMemStrdup
|
||||||
|
* - xmlFree
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef LIBXML_THREAD_ALLOC_ENABLED
|
||||||
|
#ifdef LIBXML_THREAD_ENABLED
|
||||||
|
extern xmlMallocFunc *__xmlMalloc(void);
|
||||||
|
#define xmlMalloc \
|
||||||
|
(*(__xmlMalloc()))
|
||||||
|
#else
|
||||||
|
LIBXML_DLL_IMPORT extern xmlMallocFunc xmlMalloc;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef LIBXML_THREAD_ENABLED
|
||||||
|
extern xmlReallocFunc *__xmlRealloc(void);
|
||||||
|
#define xmlRealloc \
|
||||||
|
(*(__xmlRealloc()))
|
||||||
|
#else
|
||||||
|
LIBXML_DLL_IMPORT extern xmlReallocFunc xmlRealloc;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef LIBXML_THREAD_ENABLED
|
||||||
|
extern xmlFreeFunc *__xmlFree(void);
|
||||||
|
#define xmlFree \
|
||||||
|
(*(__xmlFree()))
|
||||||
|
#else
|
||||||
|
LIBXML_DLL_IMPORT extern xmlFreeFunc xmlFree;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef LIBXML_THREAD_ENABLED
|
||||||
|
extern xmlStrdupFunc *__xmlMemStrdup(void);
|
||||||
|
#define xmlMemStrdup \
|
||||||
|
(*(__xmlMemStrdup()))
|
||||||
|
#else
|
||||||
|
LIBXML_DLL_IMPORT extern xmlStrdupFunc xmlMemStrdup;
|
||||||
|
#endif
|
||||||
|
#else /* !LIBXML_THREAD_ALLOC_ENABLED */
|
||||||
|
LIBXML_DLL_IMPORT extern xmlMallocFunc xmlMalloc;
|
||||||
|
LIBXML_DLL_IMPORT extern xmlReallocFunc xmlRealloc;
|
||||||
|
LIBXML_DLL_IMPORT extern xmlFreeFunc xmlFree;
|
||||||
|
LIBXML_DLL_IMPORT extern xmlStrdupFunc xmlMemStrdup;
|
||||||
|
#endif /* LIBXML_THREAD_ALLOC_ENABLED */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Everything starting from the line below is
|
* Everything starting from the line below is
|
||||||
* Automatically generated by build_glob.py.
|
* Automatically generated by build_glob.py.
|
||||||
@ -161,14 +209,6 @@ extern int *__xmlDoValidityCheckingDefaultValue(void);
|
|||||||
LIBXML_DLL_IMPORT extern int xmlDoValidityCheckingDefaultValue;
|
LIBXML_DLL_IMPORT extern int xmlDoValidityCheckingDefaultValue;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LIBXML_THREAD_ENABLED
|
|
||||||
extern xmlFreeFunc *__xmlFree(void);
|
|
||||||
#define xmlFree \
|
|
||||||
(*(__xmlFree()))
|
|
||||||
#else
|
|
||||||
LIBXML_DLL_IMPORT extern xmlFreeFunc xmlFree;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef LIBXML_THREAD_ENABLED
|
#ifdef LIBXML_THREAD_ENABLED
|
||||||
extern xmlGenericErrorFunc *__xmlGenericError(void);
|
extern xmlGenericErrorFunc *__xmlGenericError(void);
|
||||||
#define xmlGenericError \
|
#define xmlGenericError \
|
||||||
@ -225,22 +265,6 @@ extern int *__xmlLoadExtDtdDefaultValue(void);
|
|||||||
LIBXML_DLL_IMPORT extern int xmlLoadExtDtdDefaultValue;
|
LIBXML_DLL_IMPORT extern int xmlLoadExtDtdDefaultValue;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LIBXML_THREAD_ENABLED
|
|
||||||
extern xmlMallocFunc *__xmlMalloc(void);
|
|
||||||
#define xmlMalloc \
|
|
||||||
(*(__xmlMalloc()))
|
|
||||||
#else
|
|
||||||
LIBXML_DLL_IMPORT extern xmlMallocFunc xmlMalloc;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef LIBXML_THREAD_ENABLED
|
|
||||||
extern xmlStrdupFunc *__xmlMemStrdup(void);
|
|
||||||
#define xmlMemStrdup \
|
|
||||||
(*(__xmlMemStrdup()))
|
|
||||||
#else
|
|
||||||
LIBXML_DLL_IMPORT extern xmlStrdupFunc xmlMemStrdup;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef LIBXML_THREAD_ENABLED
|
#ifdef LIBXML_THREAD_ENABLED
|
||||||
extern int *__xmlParserDebugEntities(void);
|
extern int *__xmlParserDebugEntities(void);
|
||||||
#define xmlParserDebugEntities \
|
#define xmlParserDebugEntities \
|
||||||
@ -265,14 +289,6 @@ extern int *__xmlPedanticParserDefaultValue(void);
|
|||||||
LIBXML_DLL_IMPORT extern int xmlPedanticParserDefaultValue;
|
LIBXML_DLL_IMPORT extern int xmlPedanticParserDefaultValue;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LIBXML_THREAD_ENABLED
|
|
||||||
extern xmlReallocFunc *__xmlRealloc(void);
|
|
||||||
#define xmlRealloc \
|
|
||||||
(*(__xmlRealloc()))
|
|
||||||
#else
|
|
||||||
LIBXML_DLL_IMPORT extern xmlReallocFunc xmlRealloc;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef LIBXML_THREAD_ENABLED
|
#ifdef LIBXML_THREAD_ENABLED
|
||||||
extern int *__xmlSaveNoEmptyTags(void);
|
extern int *__xmlSaveNoEmptyTags(void);
|
||||||
#define xmlSaveNoEmptyTags \
|
#define xmlSaveNoEmptyTags \
|
||||||
|
@ -13,9 +13,6 @@
|
|||||||
#include <libxml/valid.h>
|
#include <libxml/valid.h>
|
||||||
#include <libxml/xmlIO.h>
|
#include <libxml/xmlIO.h>
|
||||||
#include <libxml/entities.h>
|
#include <libxml/entities.h>
|
||||||
#if defined(_REENTRANT) || (_POSIX_C_SOURCE - 0 >= 199506L)
|
|
||||||
#include <pthread.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -579,5 +576,7 @@ xmlParserInputPtr
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <libxml/globals.h>
|
||||||
|
|
||||||
#endif /* __XML_PARSER_H__ */
|
#endif /* __XML_PARSER_H__ */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user