Commit 8ed1072c authored by Daniel Veillard's avatar Daniel Veillard
Browse files

Add symbol versioning to libxml2 shared libs

* libxml2.syms: the symbols with history, going back to 2.4.30
* Makefile.am configure.in: linking flags detection and use
* parser.c tree.c valid.c xpointer.c: various cleanup of functions
  which could be made static or simply discarded, not that many
parent f39eafaa
......@@ -18,7 +18,16 @@ bin_SCRIPTS=xml2-config
lib_LTLIBRARIES = libxml2.la
libxml2_la_LIBADD = @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@
libxml2_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ -version-info @LIBXML_VERSION_INFO@ @MODULE_PLATFORM_LIBS@
if USE_VERSION_SCRIPT
LIBXML2_VERSION_SCRIPT = $(VERSION_SCRIPT_FLAGS)$(srcdir)/libxml2.syms
else
LIBXML2_VERSION_SCRIPT =
endif
libxml2_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ \
$(LIBXML2_VERSION_SCRIPT) \
-version-info @LIBXML_VERSION_INFO@ \
@MODULE_PLATFORM_LIBS@
if WITH_TRIO_SOURCES
libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \
......@@ -1187,7 +1196,7 @@ EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \
triop.h triodef.h libxml.h elfgcchack.h \
testThreadsWin32.c genUnicode.py TODO_SCHEMAS \
dbgen.pl dbgenattr.pl regressions.py regressions.xml \
README.tests Makefile.tests \
README.tests Makefile.tests libxml2.syms \
$(CVS_EXTRA_DIST)
......
......@@ -67,6 +67,18 @@ test "x$U" != "x" && AC_MSG_ERROR(Compiler not ANSI compliant)
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
dnl
dnl if the system support linker version scripts for symbol versioning
dnl then add it
dnl
VERSION_SCRIPT_FLAGS=
$(/usr/bin/ld --help 2>&1 | grep -- --version-script >/dev/null) && \
VERSION_SCRIPT_FLAGS=-Wl,--version-script=
test "`uname`" == "SunOS" && \
VERSION_SCRIPT_FLAGS="-Wl,-M -Wl,"
AC_SUBST(VERSION_SCRIPT_FLAGS)
AM_CONDITIONAL([USE_VERSION_SCRIPT], [test -n "$VERSION_SCRIPT_FLAGS"])
dnl
dnl We process the AC_ARG_WITH first so that later we can modify
dnl some of them to try to prevent impossible combinations. This
......
This diff is collapsed.
......@@ -202,8 +202,8 @@ static const char *xmlW3CPIs[] = {
/* DEPR void xmlParserHandleReference(xmlParserCtxtPtr ctxt); */
xmlEntityPtr xmlParseStringPEReference(xmlParserCtxtPtr ctxt,
const xmlChar **str);
static xmlEntityPtr xmlParseStringPEReference(xmlParserCtxtPtr ctxt,
const xmlChar **str);
static xmlParserErrors
xmlParseExternalEntityPrivate(xmlDocPtr doc, xmlParserCtxtPtr oldctxt,
......@@ -1344,8 +1344,8 @@ xmlCheckLanguageID(const xmlChar * lang)
* *
************************************************************************/
xmlEntityPtr xmlParseStringEntityRef(xmlParserCtxtPtr ctxt,
const xmlChar ** str);
static xmlEntityPtr xmlParseStringEntityRef(xmlParserCtxtPtr ctxt,
const xmlChar ** str);
#ifdef SAX2
/**
......@@ -3995,7 +3995,7 @@ xmlParsePubidLiteral(xmlParserCtxtPtr ctxt) {
return(buf);
}
void xmlParseCharDataComplex(xmlParserCtxtPtr ctxt, int cdata);
static void xmlParseCharDataComplex(xmlParserCtxtPtr ctxt, int cdata);
/*
* used for the test in the inner loop of the char data testing
......@@ -4200,7 +4200,7 @@ get_more:
* of xmlParseCharData() when the parsing requires handling
* of non-ASCII characters.
*/
void
static void
xmlParseCharDataComplex(xmlParserCtxtPtr ctxt, int cdata) {
xmlChar buf[XML_PARSER_BIG_BUFFER_SIZE + 5];
int nbchar = 0;
......@@ -7274,7 +7274,7 @@ xmlParseEntityRef(xmlParserCtxtPtr ctxt) {
* Returns the xmlEntityPtr if found, or NULL otherwise. The str pointer
* is updated to the current location in the string.
*/
xmlEntityPtr
static xmlEntityPtr
xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, const xmlChar ** str) {
xmlChar *name;
const xmlChar *ptr;
......@@ -7683,7 +7683,7 @@ xmlLoadEntityContent(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) {
* Returns the string of the entity content.
* str is updated to the current value of the index
*/
xmlEntityPtr
static xmlEntityPtr
xmlParseStringPEReference(xmlParserCtxtPtr ctxt, const xmlChar **str) {
const xmlChar *ptr;
xmlChar cur;
......@@ -12106,8 +12106,6 @@ xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx, const xmlChar *URL,
int ret = 0;
xmlChar start[4];
xmlCharEncoding enc;
xmlParserInputPtr inputStream;
char *directory = NULL;
if (ctx == NULL) return(-1);
......
......@@ -49,7 +49,8 @@ int __xmlRegisterCallbacks = 0;
* *
************************************************************************/
xmlNsPtr xmlNewReconciliedNs(xmlDocPtr doc, xmlNodePtr tree, xmlNsPtr ns);
static xmlNsPtr
xmlNewReconciliedNs(xmlDocPtr doc, xmlNodePtr tree, xmlNsPtr ns);
static xmlChar* xmlGetPropNodeValueInternal(xmlAttrPtr prop);
......@@ -6056,7 +6057,7 @@ xmlSearchNsByHref(xmlDocPtr doc, xmlNodePtr node, const xmlChar * href)
* @tree or on one of its ancestors then a new prefix is generated.
* Returns the (new) namespace definition or NULL in case of error
*/
xmlNsPtr
static xmlNsPtr
xmlNewReconciliedNs(xmlDocPtr doc, xmlNodePtr tree, xmlNsPtr ns) {
xmlNsPtr def;
xmlChar prefix[50];
......
......@@ -637,8 +637,6 @@ xmlValidStateDebug(xmlValidCtxtPtr ctxt) {
else if ((doc->intSubset == NULL) && \
(doc->extSubset == NULL)) return(0)
xmlAttributePtr xmlScanAttributeDecl(xmlDtdPtr dtd, const xmlChar *elem);
#ifdef LIBXML_REGEXP_ENABLED
/************************************************************************
......@@ -1832,53 +1830,6 @@ xmlDumpEnumeration(xmlBufferPtr buf, xmlEnumerationPtr cur) {
#endif /* LIBXML_OUTPUT_ENABLED */
#ifdef LIBXML_VALID_ENABLED
/**
* xmlScanAttributeDeclCallback:
* @attr: the attribute decl
* @list: the list to update
*
* Callback called by xmlScanAttributeDecl when a new attribute
* has to be entered in the list.
*/
static void
xmlScanAttributeDeclCallback(xmlAttributePtr attr, xmlAttributePtr *list,
const xmlChar* name ATTRIBUTE_UNUSED) {
attr->nexth = *list;
*list = attr;
}
/**
* xmlScanAttributeDecl:
* @dtd: pointer to the DTD
* @elem: the element name
*
* When inserting a new element scan the DtD for existing attributes
* for that element and initialize the Attribute chain
*
* Returns the pointer to the first attribute decl in the chain,
* possibly NULL.
*/
xmlAttributePtr
xmlScanAttributeDecl(xmlDtdPtr dtd, const xmlChar *elem) {
xmlAttributePtr ret = NULL;
xmlAttributeTablePtr table;
if (dtd == NULL) {
return(NULL);
}
if (elem == NULL) {
return(NULL);
}
table = (xmlAttributeTablePtr) dtd->attributes;
if (table == NULL)
return(NULL);
/* WRONG !!! */
xmlHashScan3(table, NULL, NULL, elem,
(xmlHashScanner) xmlScanAttributeDeclCallback, &ret);
return(ret);
}
/**
* xmlScanIDAttributeDecl:
* @ctxt: the validation context
......
......@@ -1301,12 +1301,19 @@ xmlXPtrEvalXPointer(xmlXPathParserContextPtr ctxt) {
* *
************************************************************************/
static
void xmlXPtrStringRangeFunction(xmlXPathParserContextPtr ctxt, int nargs);
static
void xmlXPtrStartPointFunction(xmlXPathParserContextPtr ctxt, int nargs);
static
void xmlXPtrEndPointFunction(xmlXPathParserContextPtr ctxt, int nargs);
static
void xmlXPtrHereFunction(xmlXPathParserContextPtr ctxt, int nargs);
static
void xmlXPtrOriginFunction(xmlXPathParserContextPtr ctxt, int nargs);
static
void xmlXPtrRangeInsideFunction(xmlXPathParserContextPtr ctxt, int nargs);
static
void xmlXPtrRangeFunction(xmlXPathParserContextPtr ctxt, int nargs);
/**
......@@ -1734,7 +1741,7 @@ xmlXPtrNbLocChildren(xmlNodePtr node) {
* Function implementing here() operation
* as described in 5.4.3
*/
void
static void
xmlXPtrHereFunction(xmlXPathParserContextPtr ctxt, int nargs) {
CHECK_ARITY(0);
......@@ -1752,7 +1759,7 @@ xmlXPtrHereFunction(xmlXPathParserContextPtr ctxt, int nargs) {
* Function implementing origin() operation
* as described in 5.4.3
*/
void
static void
xmlXPtrOriginFunction(xmlXPathParserContextPtr ctxt, int nargs) {
CHECK_ARITY(0);
......@@ -1785,7 +1792,7 @@ xmlXPtrOriginFunction(xmlXPathParserContextPtr ctxt, int nargs) {
* ----------------
*
*/
void
static void
xmlXPtrStartPointFunction(xmlXPathParserContextPtr ctxt, int nargs) {
xmlXPathObjectPtr tmp, obj, point;
xmlLocationSetPtr newset = NULL;
......@@ -1879,7 +1886,7 @@ xmlXPtrStartPointFunction(xmlXPathParserContextPtr ctxt, int nargs) {
* syntax error.
* ----------------------------
*/
void
static void
xmlXPtrEndPointFunction(xmlXPathParserContextPtr ctxt, int nargs) {
xmlXPathObjectPtr tmp, obj, point;
xmlLocationSetPtr newset = NULL;
......@@ -2024,7 +2031,7 @@ xmlXPtrCoveringRange(xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr loc) {
* location-set, a range location representing the covering range of
* x is added to the result location-set.
*/
void
static void
xmlXPtrRangeFunction(xmlXPathParserContextPtr ctxt, int nargs) {
int i;
xmlXPathObjectPtr set;
......@@ -2170,7 +2177,7 @@ xmlXPtrInsideRange(xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr loc) {
* location children of x.
*
*/
void
static void
xmlXPtrRangeInsideFunction(xmlXPathParserContextPtr ctxt, int nargs) {
int i;
xmlXPathObjectPtr set;
......@@ -2759,7 +2766,7 @@ xmlXPtrGetEndPoint(xmlXPathObjectPtr obj, xmlNodePtr *node, int *indx) {
* all be character points.
* ------------------------------
*/
void
static void
xmlXPtrStringRangeFunction(xmlXPathParserContextPtr ctxt, int nargs) {
int i, startindex, endindex = 0, fendindex;
xmlNodePtr start, end = 0, fend;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment