Imported Upstream version 2.9.4 37/74637/1 upstream/2.9.4
authorDongHun Kwak <dh0128.kwak@samsung.com>
Wed, 15 Jun 2016 05:06:40 +0000 (14:06 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Wed, 15 Jun 2016 05:07:20 +0000 (14:07 +0900)
Change-Id: Ia77571980e4b0410bb3314b12af5a9e5bf732a38
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
288 files changed:
ChangeLog
HTMLparser.c
HTMLtree.c
INSTALL
Makefile.am
Makefile.in
NEWS
SAX2.c
aclocal.m4
autogen.sh [new file with mode: 0755]
buf.c
catalog.c
compile [new file with mode: 0755]
config.guess
config.h.in
config.sub
configure
configure.ac
debugXML.c
depcomp
dict.c
doc/APIchunk13.html
doc/APIchunk26.html
doc/APIfiles.html
doc/APIfunctions.html
doc/APIsymbols.html
doc/Makefile.in
doc/apibuild.py
doc/devhelp/Makefile.in
doc/devhelp/general.html
doc/devhelp/libxml2-dict.html
doc/devhelp/libxml2-parser.html
doc/devhelp/libxml2-tree.html
doc/devhelp/libxml2-xmlmemory.html
doc/devhelp/libxml2-xmlregexp.html
doc/devhelp/libxml2-xmlstring.html
doc/devhelp/libxml2.devhelp
doc/examples/Makefile.in
doc/examples/io1.res
doc/html/book1.html
doc/html/index.html
doc/html/libxml-dict.html
doc/html/libxml-lib.html
doc/html/libxml-parser.html
doc/html/libxml-tree.html
doc/html/libxml-xmlmemory.html
doc/html/libxml-xmlregexp.html
doc/html/libxml-xmlstring.html
doc/index.py
doc/libxml2-api.xml
doc/libxml2.xsa
doc/news.html
doc/search.php
doc/xml.html
encoding.c
entities.c
error.c
example/Makefile.in
include/Makefile.in
include/libxml/Makefile.in
include/libxml/dict.h
include/libxml/parser.h
include/libxml/parserInternals.h
include/libxml/schemasInternals.h
include/libxml/tree.h
include/libxml/xmlerror.h
include/libxml/xmlstring.h
include/libxml/xmlversion.h
include/libxml/xmlversion.h.in
include/libxml/xpathInternals.h
install-sh
libxml.h
libxml.spec.in
libxml2-config.cmake.in
libxml2.spec
ltmain.sh
m4/libtool.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/lt~obsolete.m4
missing
os400/README400
os400/config.h.in [new file with mode: 0644]
os400/dlfcn/dlfcn.c
os400/initscript.sh
os400/libxmlmain.c [new file with mode: 0644]
os400/libxmlrpg/DOCBparser.rpgle
os400/libxmlrpg/HTMLparser.rpgle
os400/libxmlrpg/HTMLtree.rpgle
os400/libxmlrpg/SAX.rpgle
os400/libxmlrpg/SAX2.rpgle
os400/libxmlrpg/c14n.rpgle
os400/libxmlrpg/catalog.rpgle
os400/libxmlrpg/chvalid.rpgle
os400/libxmlrpg/debugXML.rpgle
os400/libxmlrpg/dict.rpgle
os400/libxmlrpg/encoding.rpgle
os400/libxmlrpg/entities.rpgle
os400/libxmlrpg/globals.rpgle
os400/libxmlrpg/hash.rpgle
os400/libxmlrpg/list.rpgle
os400/libxmlrpg/nanoftp.rpgle
os400/libxmlrpg/nanohttp.rpgle
os400/libxmlrpg/parser.rpgle
os400/libxmlrpg/parserInternals.rpgle
os400/libxmlrpg/pattern.rpgle
os400/libxmlrpg/relaxng.rpgle
os400/libxmlrpg/schemasInternals.rpgle
os400/libxmlrpg/schematron.rpgle
os400/libxmlrpg/threads.rpgle
os400/libxmlrpg/tree.rpgle
os400/libxmlrpg/uri.rpgle
os400/libxmlrpg/valid.rpgle
os400/libxmlrpg/xinclude.rpgle
os400/libxmlrpg/xlink.rpgle
os400/libxmlrpg/xmlIO.rpgle
os400/libxmlrpg/xmlTypesC.rpgle [new file with mode: 0644]
os400/libxmlrpg/xmlautomata.rpgle
os400/libxmlrpg/xmlerror.rpgle
os400/libxmlrpg/xmlmemory.rpgle
os400/libxmlrpg/xmlmodule.rpgle
os400/libxmlrpg/xmlreader.rpgle
os400/libxmlrpg/xmlregexp.rpgle
os400/libxmlrpg/xmlsave.rpgle
os400/libxmlrpg/xmlschemas.rpgle
os400/libxmlrpg/xmlschemastypes.rpgle
os400/libxmlrpg/xmlstdarg.rpgle
os400/libxmlrpg/xmlstring.rpgle
os400/libxmlrpg/xmlunicode.rpgle
os400/libxmlrpg/xmlversion.rpgle.in
os400/libxmlrpg/xmlwriter.rpgle
os400/libxmlrpg/xpath.rpgle
os400/libxmlrpg/xpathInternals.rpgle
os400/libxmlrpg/xpointer.rpgle
os400/make-rpg.sh
os400/make-src.sh
os400/make.sh
os400/rpgsupport.c
os400/rpgsupport.h
os400/xmlcatalog.cmd [new file with mode: 0644]
os400/xmlcatlgcl.c [new file with mode: 0644]
os400/xmllint.cmd [new file with mode: 0644]
os400/xmllintcl.c [new file with mode: 0644]
parser.c
parserInternals.c
python/Makefile.in
python/drv_libxml2.py
python/libxml.c
python/libxml2.py
python/libxml2class.py
python/setup.py
python/tests/Makefile.in
relaxng.c
result/HTML/758605.html [new file with mode: 0644]
result/HTML/758605.html.err [new file with mode: 0644]
result/HTML/758605.html.sax [new file with mode: 0644]
result/HTML/758606.html [new file with mode: 0644]
result/HTML/758606.html.err [new file with mode: 0644]
result/HTML/758606.html.sax [new file with mode: 0644]
result/HTML/758606_2.html [new file with mode: 0644]
result/HTML/758606_2.html.err [new file with mode: 0644]
result/HTML/758606_2.html.sax [new file with mode: 0644]
result/XPath/expr/base
result/XPath/tests/chaptersbase
result/XPath/tests/nssimple [new file with mode: 0644]
result/XPath/tests/simplebase
result/cdata-2-byte-UTF-8.xml [new file with mode: 0644]
result/cdata-2-byte-UTF-8.xml.rde [new file with mode: 0644]
result/cdata-2-byte-UTF-8.xml.rdr [new file with mode: 0644]
result/cdata-2-byte-UTF-8.xml.sax [new file with mode: 0644]
result/cdata-2-byte-UTF-8.xml.sax2 [new file with mode: 0644]
result/cdata-3-byte-UTF-8.xml [new file with mode: 0644]
result/cdata-3-byte-UTF-8.xml.rde [new file with mode: 0644]
result/cdata-3-byte-UTF-8.xml.rdr [new file with mode: 0644]
result/cdata-3-byte-UTF-8.xml.sax [new file with mode: 0644]
result/cdata-3-byte-UTF-8.xml.sax2 [new file with mode: 0644]
result/cdata-4-byte-UTF-8.xml [new file with mode: 0644]
result/cdata-4-byte-UTF-8.xml.rde [new file with mode: 0644]
result/cdata-4-byte-UTF-8.xml.rdr [new file with mode: 0644]
result/cdata-4-byte-UTF-8.xml.sax [new file with mode: 0644]
result/cdata-4-byte-UTF-8.xml.sax2 [new file with mode: 0644]
result/ent_738805.xml [new file with mode: 0644]
result/ent_738805.xml.rde [new file with mode: 0644]
result/ent_738805.xml.rdr [new file with mode: 0644]
result/ent_738805.xml.sax [new file with mode: 0644]
result/ent_738805.xml.sax2 [new file with mode: 0644]
result/errors/754946.xml [new file with mode: 0644]
result/errors/754946.xml.err [new file with mode: 0644]
result/errors/754946.xml.str [new file with mode: 0644]
result/errors/754947.xml [new file with mode: 0644]
result/errors/754947.xml.err [new file with mode: 0644]
result/errors/754947.xml.str [new file with mode: 0644]
result/errors/758588.xml [new file with mode: 0644]
result/errors/758588.xml.err [new file with mode: 0644]
result/errors/758588.xml.str [new file with mode: 0644]
result/errors/759020.xml [new file with mode: 0644]
result/errors/759020.xml.err [new file with mode: 0644]
result/errors/759020.xml.str [new file with mode: 0644]
result/errors/759398.xml [new file with mode: 0644]
result/errors/759398.xml.err [new file with mode: 0644]
result/errors/759398.xml.str [new file with mode: 0644]
result/errors/759573-2.xml [new file with mode: 0644]
result/errors/759573-2.xml.err [new file with mode: 0644]
result/errors/759573-2.xml.str [new file with mode: 0644]
result/errors/759573.xml [new file with mode: 0644]
result/errors/759573.xml.err [new file with mode: 0644]
result/errors/759573.xml.str [new file with mode: 0644]
result/errors/cdata.xml.str
result/errors/content1.xml.err
result/noent/cdata-2-byte-UTF-8.xml [new file with mode: 0644]
result/noent/cdata-3-byte-UTF-8.xml [new file with mode: 0644]
result/noent/cdata-4-byte-UTF-8.xml [new file with mode: 0644]
result/noent/ent_738805.xml [new file with mode: 0644]
result/relaxng/565219_0 [new file with mode: 0644]
result/relaxng/565219_0.err [new file with mode: 0644]
result/relaxng/565219_1 [new file with mode: 0644]
result/relaxng/565219_1.err [new file with mode: 0644]
result/relaxng/565219_2 [new file with mode: 0644]
result/relaxng/565219_2.err [new file with mode: 0644]
result/relaxng/565219_err [new file with mode: 0644]
result/relaxng/565219_valid [new file with mode: 0644]
result/relaxng/710744_err [new file with mode: 0644]
result/relaxng/710744_valid [new file with mode: 0644]
result/relaxng/pattern3_1 [new file with mode: 0644]
result/relaxng/pattern3_1.err [new file with mode: 0644]
result/schemas/regexp-char-ref_0_0.err [new file with mode: 0644]
result/schemas/regexp-char-ref_1_0.err [new file with mode: 0644]
result/valid/737840.xml [new file with mode: 0644]
result/valid/737840.xml.err [new file with mode: 0644]
result/valid/737840.xml.err.rdr [new file with mode: 0644]
result/valid/t8.xml.err
result/valid/t8a.xml.err
runtest.c
schematron.c
test/HTML/758605.html [new file with mode: 0644]
test/HTML/758606.html [new file with mode: 0644]
test/HTML/758606_2.html [new file with mode: 0644]
test/XPath/docs/ns [new file with mode: 0644]
test/XPath/expr/base
test/XPath/tests/chaptersbase
test/XPath/tests/nssimple [new file with mode: 0644]
test/XPath/tests/simplebase
test/cdata-2-byte-UTF-8.xml [new file with mode: 0644]
test/cdata-3-byte-UTF-8.xml [new file with mode: 0644]
test/cdata-4-byte-UTF-8.xml [new file with mode: 0644]
test/ent_738805.xml [new file with mode: 0644]
test/errors/754946.xml [new file with mode: 0644]
test/errors/754947.xml [new file with mode: 0644]
test/errors/758588.xml [new file with mode: 0644]
test/errors/759020.xml [new file with mode: 0644]
test/errors/759398.xml [new file with mode: 0755]
test/errors/759573-2.xml [new file with mode: 0644]
test/errors/759573.xml [new file with mode: 0644]
test/relaxng/565219.rng [new file with mode: 0644]
test/relaxng/565219_0.xml [new file with mode: 0644]
test/relaxng/565219_1.xml [new file with mode: 0644]
test/relaxng/565219_2.xml [new file with mode: 0644]
test/relaxng/pattern3.rng [new file with mode: 0644]
test/relaxng/pattern3_1.xml [new file with mode: 0644]
test/valid/737840.xml [new file with mode: 0644]
test/valid/dtds/737840.ent [new file with mode: 0644]
testModule.c
testapi.c
testdict.c
threads.c
timsort.h
tree.c
uri.c
valid.c
win32/VC10/config.h
win32/configure.js
xinclude.c
xmlIO.c
xmlcatalog.c
xmllint.c
xmlmemory.c
xmlreader.c
xmlregexp.c
xmlsave.c
xmlschemas.c
xmlschemastypes.c
xmlstring.c
xmlwriter.c
xpath.c
xpointer.c
xstc/Makefile.in
xzlib.c

index 08725dd..ef6cb8e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -593,7 +593,7 @@ Thu Apr 24 13:56:53 CEST 2008 Daniel Veillard <daniel@veillard.com>
 
 Tue Apr 22 10:27:17 CEST 2008 Daniel Veillard <daniel@veillard.com>
 
-       * dict.c: improvement on the hashing of the dictionnary, with visible
+       * dict.c: improvement on the hashing of the dictionary, with visible
          speed up as the number of strings in the hash increases, work from
          Stefan Behnel
 
@@ -5017,7 +5017,7 @@ Mon Jan 24 00:47:41 CET 2005 Daniel Veillard <daniel@veillard.com>
 Sun Jan 23 23:54:39 CET 2005 Daniel Veillard <daniel@veillard.com>
 
        * hash.c include/libxml/hash.h: added xmlHashCreateDict where
-         the hash reuses the dictionnary for internal strings
+         the hash reuses the dictionary for internal strings
        * entities.c valid.c parser.c: reuse that new API, leads to a decent
          speedup when parsing for example DocBook documents.
 
@@ -5371,7 +5371,7 @@ Fri Nov 26 11:44:36 CET 2004 Daniel Veillard <daniel@veillard.com>
 Wed Nov 24 13:41:52 CET 2004 Daniel Veillard <daniel@veillard.com>
 
        * dict.c include/libxml/dict.h: added xmlDictExists() to the 
-         dictionnary interface.
+         dictionary interface.
        * xmlreader.c: applying xmlTextReaderHasAttributes fix for namespaces
          from Rob Richards
 
@@ -5697,7 +5697,7 @@ Tue Oct 26 23:57:02 CEST 2004 Daniel Veillard <daniel@veillard.com>
 Tue Oct 26 18:09:59 CEST 2004 Daniel Veillard <daniel@veillard.com>
 
        * debugXML.c include/libxml/xmlerror.h: added checking for names
-         values and dictionnaries generates a tons of errors
+         values and dictionaries generates a tons of errors
        * SAX2.ccatalog.c parser.c relaxng.c tree.c xinclude.c xmlwriter.c
          include/libxml/tree.h: fixing the errors in the regression tests
 
@@ -7746,14 +7746,14 @@ Fri Jan 23 14:03:21 CET 2004 Daniel Veillard <daniel@veillard.com>
          make tests
        * xpath.c include/libxml/xpath.h: added xmlXPathCtxtCompile() to
          compile an XPath expression within a context, currently the goal
-         is to be able to reuse the XSLT stylesheet dictionnary, but this
+         is to be able to reuse the XSLT stylesheet dictionary, but this
          opens the door to others possible optimizations.
        * dict.c include/libxml/dict.h: added xmlDictCreateSub() which allows
-         to build a new dictionnary based on another read-only dictionnary.
-         This is needed for XSLT to keep the stylesheet dictionnary read-only
+         to build a new dictionary based on another read-only dictionary.
+         This is needed for XSLT to keep the stylesheet dictionary read-only
          while being able to reuse the strings for the transformation
-         dictionnary.
-       * xinclude.c: fixed a dictionnar reference counting problem occuring
+         dictionary.
+       * xinclude.c: fixed a dictionary reference counting problem occuring
          when document parsing failed.
        * testSAX.c: adding option --repeat for timing 100times the parsing
        * doc/* : rebuilt all the docs
@@ -7806,7 +7806,7 @@ Mon Jan 12 17:22:57 CET 2004 Daniel Veillard <daniel@veillard.com>
 Thu Jan  8 17:57:50 CET 2004 Daniel Veillard <daniel@veillard.com>
 
        * xmlschemas.c: removed a memory leak remaining from the switch
-         to a dictionnary for string allocations c.f. #130891
+         to a dictionary for string allocations c.f. #130891
 
 Thu Jan  8 17:48:46 CET 2004 Daniel Veillard <daniel@veillard.com>
 
@@ -7928,7 +7928,7 @@ Fri Jan  2 22:58:29 HKT 2004 William Brack <wbrack@mmm.com.hk>
 Fri Jan  2 11:40:06 CET 2004 Daniel Veillard <daniel@veillard.com>
 
        * SAX2.c: found and fixed a bug misallocating some non
-         blank text node strings from the dictionnary.
+         blank text node strings from the dictionary.
        * xmlmemory.c: fixed a problem with the memory debug mutex
          release.
 
@@ -9386,7 +9386,7 @@ Sat Sep 27 01:25:39 CEST 2003 Daniel Veillard <daniel@veillard.com>
 
        * parser.c: William's change allowed to spot a nasty bug in xmlDoRead
          if the result is not well formed that ctxt->myDoc is not NULL
-         and uses the context dictionnary.
+         and uses the context dictionary.
 
 Fri Sep 26 21:09:34 CEST 2003 Daniel Veillard <daniel@veillard.com>
 
index d329d3b..d1395fa 100644 (file)
@@ -105,7 +105,7 @@ htmlErrMemory(xmlParserCtxtPtr ctxt, const char *extra)
  *
  * Handle a fatal parser error, i.e. violating Well-Formedness constraints
  */
-static void
+static void LIBXML_ATTR_FORMAT(3,0)
 htmlParseErr(xmlParserCtxtPtr ctxt, xmlParserErrors error,
              const char *msg, const xmlChar *str1, const xmlChar *str2)
 {
@@ -132,7 +132,7 @@ htmlParseErr(xmlParserCtxtPtr ctxt, xmlParserErrors error,
  *
  * Handle a fatal parser error, i.e. violating Well-Formedness constraints
  */
-static void
+static void LIBXML_ATTR_FORMAT(3,0)
 htmlParseErrInt(xmlParserCtxtPtr ctxt, xmlParserErrors error,
              const char *msg, int val)
 {
@@ -303,6 +303,7 @@ htmlNodeInfoPop(htmlParserCtxtPtr ctxt)
 #define UPP(val) (toupper(ctxt->input->cur[(val)]))
 
 #define CUR_PTR ctxt->input->cur
+#define BASE_PTR ctxt->input->base
 
 #define SHRINK if ((ctxt->input->cur - ctxt->input->base > 2 * INPUT_CHUNK) && \
                   (ctxt->input->end - ctxt->input->cur < 2 * INPUT_CHUNK)) \
@@ -2471,6 +2472,10 @@ htmlParseName(htmlParserCtxtPtr ctxt) {
               (*in == '_') || (*in == '-') ||
               (*in == ':') || (*in == '.'))
            in++;
+
+       if (in == ctxt->input->end)
+           return(NULL);
+
        if ((*in > 0) && (*in < 0x80)) {
            count = in - ctxt->input->cur;
            ret = xmlDictLookup(ctxt->dict, ctxt->input->cur, count);
@@ -2488,6 +2493,7 @@ htmlParseNameComplex(xmlParserCtxtPtr ctxt) {
     int len = 0, l;
     int c;
     int count = 0;
+    const xmlChar *base = ctxt->input->base;
 
     /*
      * Handler for more complex cases
@@ -2513,7 +2519,18 @@ htmlParseNameComplex(xmlParserCtxtPtr ctxt) {
        len += l;
        NEXTL(l);
        c = CUR_CHAR(l);
+       if (ctxt->input->base != base) {
+           /*
+            * We changed encoding from an unknown encoding
+            * Input buffer changed location, so we better start again
+            */
+           return(htmlParseNameComplex(ctxt));
+       }
     }
+
+    if (ctxt->input->base > ctxt->input->cur - len)
+       return(NULL);
+
     return(xmlDictLookup(ctxt->dict, ctxt->input->cur - len, len));
 }
 
@@ -2765,31 +2782,43 @@ htmlParseAttValue(htmlParserCtxtPtr ctxt) {
 
 static xmlChar *
 htmlParseSystemLiteral(htmlParserCtxtPtr ctxt) {
-    const xmlChar *q;
+    size_t len = 0, startPosition = 0;
     xmlChar *ret = NULL;
 
     if (CUR == '"') {
         NEXT;
-       q = CUR_PTR;
-       while ((IS_CHAR_CH(CUR)) && (CUR != '"'))
+
+        if (CUR_PTR < BASE_PTR)
+            return(ret);
+        startPosition = CUR_PTR - BASE_PTR;
+
+       while ((IS_CHAR_CH(CUR)) && (CUR != '"')) {
            NEXT;
+           len++;
+       }
        if (!IS_CHAR_CH(CUR)) {
            htmlParseErr(ctxt, XML_ERR_LITERAL_NOT_FINISHED,
                         "Unfinished SystemLiteral\n", NULL, NULL);
        } else {
-           ret = xmlStrndup(q, CUR_PTR - q);
+           ret = xmlStrndup((BASE_PTR+startPosition), len);
            NEXT;
         }
     } else if (CUR == '\'') {
         NEXT;
-       q = CUR_PTR;
-       while ((IS_CHAR_CH(CUR)) && (CUR != '\''))
+
+        if (CUR_PTR < BASE_PTR)
+            return(ret);
+        startPosition = CUR_PTR - BASE_PTR;
+
+       while ((IS_CHAR_CH(CUR)) && (CUR != '\'')) {
            NEXT;
+           len++;
+       }
        if (!IS_CHAR_CH(CUR)) {
            htmlParseErr(ctxt, XML_ERR_LITERAL_NOT_FINISHED,
                         "Unfinished SystemLiteral\n", NULL, NULL);
        } else {
-           ret = xmlStrndup(q, CUR_PTR - q);
+           ret = xmlStrndup((BASE_PTR+startPosition), len);
            NEXT;
         }
     } else {
@@ -2813,32 +2842,47 @@ htmlParseSystemLiteral(htmlParserCtxtPtr ctxt) {
 
 static xmlChar *
 htmlParsePubidLiteral(htmlParserCtxtPtr ctxt) {
-    const xmlChar *q;
+    size_t len = 0, startPosition = 0;
     xmlChar *ret = NULL;
     /*
      * Name ::= (Letter | '_') (NameChar)*
      */
     if (CUR == '"') {
         NEXT;
-       q = CUR_PTR;
-       while (IS_PUBIDCHAR_CH(CUR)) NEXT;
+
+        if (CUR_PTR < BASE_PTR)
+            return(ret);
+        startPosition = CUR_PTR - BASE_PTR;
+
+        while (IS_PUBIDCHAR_CH(CUR)) {
+            len++;
+            NEXT;
+        }
+
        if (CUR != '"') {
            htmlParseErr(ctxt, XML_ERR_LITERAL_NOT_FINISHED,
                         "Unfinished PubidLiteral\n", NULL, NULL);
        } else {
-           ret = xmlStrndup(q, CUR_PTR - q);
+           ret = xmlStrndup((BASE_PTR + startPosition), len);
            NEXT;
        }
     } else if (CUR == '\'') {
         NEXT;
-       q = CUR_PTR;
-       while ((IS_PUBIDCHAR_CH(CUR)) && (CUR != '\''))
-           NEXT;
+
+        if (CUR_PTR < BASE_PTR)
+            return(ret);
+        startPosition = CUR_PTR - BASE_PTR;
+
+        while ((IS_PUBIDCHAR_CH(CUR)) && (CUR != '\'')){
+            len++;
+            NEXT;
+        }
+
        if (CUR != '\'') {
            htmlParseErr(ctxt, XML_ERR_LITERAL_NOT_FINISHED,
                         "Unfinished PubidLiteral\n", NULL, NULL);
        } else {
-           ret = xmlStrndup(q, CUR_PTR - q);
+           ret = xmlStrndup((BASE_PTR + startPosition), len);
            NEXT;
        }
     } else {
@@ -2948,8 +2992,9 @@ htmlParseScript(htmlParserCtxtPtr ctxt) {
 
 
 /**
- * htmlParseCharData:
+ * htmlParseCharDataInternal:
  * @ctxt:  an HTML parser context
+ * @readahead: optional read ahead character in ascii range
  *
  * parse a CharData section.
  * if we are within a CDATA section ']]>' marks an end of section.
@@ -2958,12 +3003,15 @@ htmlParseScript(htmlParserCtxtPtr ctxt) {
  */
 
 static void
-htmlParseCharData(htmlParserCtxtPtr ctxt) {
-    xmlChar buf[HTML_PARSER_BIG_BUFFER_SIZE + 5];
+htmlParseCharDataInternal(htmlParserCtxtPtr ctxt, int readahead) {
+    xmlChar buf[HTML_PARSER_BIG_BUFFER_SIZE + 6];
     int nbchar = 0;
     int cur, l;
     int chunk = 0;
 
+    if (readahead)
+        buf[nbchar++] = readahead;
+
     SHRINK;
     cur = CUR_CHAR(l);
     while (((cur != '<') || (ctxt->token == '<')) &&
@@ -3043,6 +3091,21 @@ htmlParseCharData(htmlParserCtxtPtr ctxt) {
 }
 
 /**
+ * htmlParseCharData:
+ * @ctxt:  an HTML parser context
+ *
+ * parse a CharData section.
+ * if we are within a CDATA section ']]>' marks an end of section.
+ *
+ * [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)
+ */
+
+static void
+htmlParseCharData(htmlParserCtxtPtr ctxt) {
+    htmlParseCharDataInternal(ctxt, 0);
+}
+
+/**
  * htmlParseExternalID:
  * @ctxt:  an HTML parser context
  * @publicID:  a xmlChar** receiving PubidLiteral
@@ -3245,12 +3308,17 @@ htmlParseComment(htmlParserCtxtPtr ctxt) {
        ctxt->instate = state;
        return;
     }
+    len = 0;
+    buf[len] = 0;
     q = CUR_CHAR(ql);
+    if (!IS_CHAR(q))
+        goto unfinished;
     NEXTL(ql);
     r = CUR_CHAR(rl);
+    if (!IS_CHAR(r))
+        goto unfinished;
     NEXTL(rl);
     cur = CUR_CHAR(l);
-    len = 0;
     while (IS_CHAR(cur) &&
            ((cur != '>') ||
            (r != '-') || (q != '-'))) {
@@ -3281,18 +3349,20 @@ htmlParseComment(htmlParserCtxtPtr ctxt) {
        }
     }
     buf[len] = 0;
-    if (!IS_CHAR(cur)) {
-       htmlParseErr(ctxt, XML_ERR_COMMENT_NOT_FINISHED,
-                    "Comment not terminated \n<!--%.50s\n", buf, NULL);
-       xmlFree(buf);
-    } else {
+    if (IS_CHAR(cur)) {
         NEXT;
        if ((ctxt->sax != NULL) && (ctxt->sax->comment != NULL) &&
            (!ctxt->disableSAX))
            ctxt->sax->comment(ctxt->userData, buf);
        xmlFree(buf);
+       ctxt->instate = state;
+       return;
     }
-    ctxt->instate = state;
+
+unfinished:
+    htmlParseErr(ctxt, XML_ERR_COMMENT_NOT_FINISHED,
+                "Comment not terminated \n<!--%.50s\n", buf, NULL);
+    xmlFree(buf);
 }
 
 /**
@@ -3690,6 +3760,14 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) {
        htmlParseErr(ctxt, XML_ERR_NAME_REQUIRED,
                     "htmlParseStartTag: invalid element name\n",
                     NULL, NULL);
+       /* if recover preserve text on classic misconstructs */
+       if ((ctxt->recovery) && ((IS_BLANK_CH(CUR)) || (CUR == '<') ||
+           (CUR == '=') || (CUR == '>') || (((CUR >= '0') && (CUR <= '9'))))) {
+           htmlParseCharDataInternal(ctxt, '<');
+           return(-1);
+       }
+
+
        /* Dump the bogus tag like browsers do */
        while ((IS_CHAR_CH(CUR)) && (CUR != '>') &&
                (ctxt->instate != XML_PARSER_EOF))
@@ -5701,17 +5779,17 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
                                if (ctxt->keepBlanks) {
                                    if (ctxt->sax->characters != NULL)
                                        ctxt->sax->characters(
-                                               ctxt->userData, &cur, 1);
+                                               ctxt->userData, &in->cur[0], 1);
                                } else {
                                    if (ctxt->sax->ignorableWhitespace != NULL)
                                        ctxt->sax->ignorableWhitespace(
-                                               ctxt->userData, &cur, 1);
+                                               ctxt->userData, &in->cur[0], 1);
                                }
                            } else {
                                htmlCheckParagraph(ctxt);
                                if (ctxt->sax->characters != NULL)
                                    ctxt->sax->characters(
-                                           ctxt->userData, &cur, 1);
+                                           ctxt->userData, &in->cur[0], 1);
                            }
                        }
                        ctxt->token = 0;
@@ -6503,7 +6581,7 @@ htmlNodeStatus(const htmlNodePtr node, int legacy) {
  * DICT_FREE:
  * @str:  a string
  *
- * Free a string if it is not owned by the "dict" dictionnary in the
+ * Free a string if it is not owned by the "dict" dictionary in the
  * current scope
  */
 #define DICT_FREE(str)                                         \
index 5c57fc5..2fd0c9c 100644 (file)
@@ -668,7 +668,8 @@ htmlDtdDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
            xmlOutputBufferWriteString(buf, " ");
            xmlBufWriteQuotedString(buf->buffer, cur->SystemID);
        }
-    }  else if (cur->SystemID != NULL) {
+    } else if (cur->SystemID != NULL &&
+              xmlStrcmp(cur->SystemID, BAD_CAST "about:legacy-compat")) {
        xmlOutputBufferWriteString(buf, " SYSTEM ");
        xmlBufWriteQuotedString(buf->buffer, cur->SystemID);
     }
diff --git a/INSTALL b/INSTALL
index 007e939..2099840 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -12,8 +12,8 @@ without warranty of any kind.
 Basic Installation
 ==================
 
-   Briefly, the shell commands `./configure; make; make install' should
-configure, build, and install this package.  The following
+   Briefly, the shell command `./configure && make && make install'
+should configure, build, and install this package.  The following
 more-detailed instructions are generic; see the `README' file for
 instructions specific to this package.  Some packages provide this
 `INSTALL' file but do not implement all of the features documented
index 70720f3..9f988b0 100644 (file)
@@ -216,6 +216,10 @@ check-valgrind valgrind: all
        @echo '## Go get a cup of coffee it is gonna take a while ...'
        $(MAKE) CHECKER='valgrind -q' runtests
 
+asan:
+       @echo '## rebuilding for ASAN'
+       ./configure CFLAGS="-fsanitize=address,undefined -Wformat -Werror=format-security -Werror=array-bounds -g" CXXFLAGS="-fsanitize=address,undefined -Wformat -Werror=format-security -Werror=array-bounds -g" LDFLAGS="-fsanitize=address,undefined" CC="clang" CXX="clang++" --disable-shared ; OptimOff  ; $(MAKE) clean ; $(MAKE)
+
 testall : tests SVGtests SAXtests
 
 tests: XMLtests XMLenttests NStests IDtests Errtests APItests $(READER_TEST) $(TEST_SAX) $(TEST_PUSH) $(TEST_HTML) $(TEST_PHTML) $(TEST_VALID) URItests $(TEST_PATTERN) $(TEST_XPATH) $(TEST_XPTR) $(TEST_XINCLUDE) $(TEST_C14N) $(TEST_DEBUG) $(TEST_CATALOG) $(TEST_REGEXPS) $(TEST_SCHEMAS) $(TEST_SCHEMATRON) $(TEST_THREADS) Timingtests $(TEST_VTIME) $(PYTHON_TESTS) $(TEST_MODULES)
@@ -1207,7 +1211,7 @@ EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \
             check-xsddata-test-suite.py check-xinclude-test-suite.py \
              example/Makefile.am example/gjobread.c example/gjobs.xml \
             $(man_MANS) libxml-2.0.pc.in libxml-2.0-uninstalled.pc.in \
-            libxml2-config.cmake.in \
+            libxml2-config.cmake.in autogen.sh \
             trionan.c trionan.h triostr.c triostr.h trio.c trio.h \
             triop.h triodef.h libxml.h elfgcchack.h xzlib.h buf.h \
             enc.h save.h testThreadsWin32.c genUnicode.py TODO_SCHEMAS \
index fbe49ec..b406cce 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -90,15 +100,6 @@ noinst_PROGRAMS = testSchemas$(EXEEXT) testRelax$(EXEEXT) \
        runxmlconf$(EXEEXT) testrecurse$(EXEEXT) testlimits$(EXEEXT)
 bin_PROGRAMS = xmllint$(EXEEXT) xmlcatalog$(EXEEXT)
 subdir = .
-DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
-       $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(top_srcdir)/configure $(am__configure_deps) \
-       $(srcdir)/config.h.in $(srcdir)/libxml.spec.in \
-       $(srcdir)/libxml-2.0.pc.in \
-       $(srcdir)/libxml-2.0-uninstalled.pc.in \
-       $(srcdir)/libxml2-config.cmake.in $(srcdir)/xml2-config.in \
-       depcomp COPYING TODO config.guess config.sub install-sh \
-       missing ltmain.sh
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
@@ -106,6 +107,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+       $(am__configure_deps) $(am__DIST_COMMON)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno config.status.lineno
 mkinstalldirs = $(install_sh) -d
@@ -406,6 +409,12 @@ am__define_uniq_tagged_files = \
 ETAGS = etags
 CTAGS = ctags
 CSCOPE = cscope
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
+       $(srcdir)/libxml-2.0-uninstalled.pc.in \
+       $(srcdir)/libxml-2.0.pc.in $(srcdir)/libxml.spec.in \
+       $(srcdir)/libxml2-config.cmake.in $(srcdir)/xml2-config.in \
+       AUTHORS COPYING ChangeLog INSTALL NEWS README TODO compile \
+       config.guess config.sub depcomp install-sh ltmain.sh missing
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
@@ -488,6 +497,7 @@ HTML_DIR = @HTML_DIR@
 HTML_OBJ = @HTML_OBJ@
 HTTP_OBJ = @HTTP_OBJ@
 ICONV_LIBS = @ICONV_LIBS@
+ICU_CFLAGS = @ICU_CFLAGS@
 ICU_LIBS = @ICU_LIBS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
@@ -509,8 +519,10 @@ LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 LZMA_CFLAGS = @LZMA_CFLAGS@
 LZMA_LIBS = @LZMA_LIBS@
+MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -817,7 +829,7 @@ EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \
             check-xsddata-test-suite.py check-xinclude-test-suite.py \
              example/Makefile.am example/gjobread.c example/gjobs.xml \
             $(man_MANS) libxml-2.0.pc.in libxml-2.0-uninstalled.pc.in \
-            libxml2-config.cmake.in \
+            libxml2-config.cmake.in autogen.sh \
             trionan.c trionan.h triostr.c triostr.h trio.c trio.h \
             triop.h triodef.h libxml.h elfgcchack.h xzlib.h buf.h \
             enc.h save.h testThreadsWin32.c genUnicode.py TODO_SCHEMAS \
@@ -850,7 +862,7 @@ all: $(BUILT_SOURCES) config.h
 .SUFFIXES: .c .lo .o .obj
 am--refresh: Makefile
        @:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@ -863,7 +875,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -877,20 +888,20 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
        $(SHELL) ./config.status --recheck
 
-$(top_srcdir)/configure:  $(am__configure_deps)
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        $(am__cd) $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
 $(am__aclocal_m4_deps):
 
 config.h: stamp-h1
-       @if test ! -f $@; then rm -f stamp-h1; else :; fi
-       @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
+       @test -f $@ || rm -f stamp-h1
+       @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
 
 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
        @rm -f stamp-h1
        cd $(top_builddir) && $(SHELL) ./config.status config.h
-$(srcdir)/config.h.in:  $(am__configure_deps) 
+$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
        ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
        rm -f stamp-h1
        touch $@
@@ -1224,14 +1235,14 @@ distclean-compile:
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
 
 .c.obj:
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 
 .c.lo:
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -1609,10 +1620,16 @@ dist-xz: distdir
        $(am__post_remove_distdir)
 
 dist-tarZ: distdir
+       @echo WARNING: "Support for distribution archives compressed with" \
+                      "legacy program 'compress' is deprecated." >&2
+       @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
        tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
        $(am__post_remove_distdir)
 
 dist-shar: distdir
+       @echo WARNING: "Support for shar distribution archives is" \
+                      "deprecated." >&2
+       @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
        shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
        $(am__post_remove_distdir)
 
@@ -1647,16 +1664,17 @@ distcheck: dist
        esac
        chmod -R a-w $(distdir)
        chmod u+w $(distdir)
-       mkdir $(distdir)/_build $(distdir)/_inst
+       mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
        chmod a-w $(distdir)
        test -d $(distdir)/_build || exit 0; \
        dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
          && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
          && am__cwd=`pwd` \
-         && $(am__cd) $(distdir)/_build \
-         && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+         && $(am__cd) $(distdir)/_build/sub \
+         && ../../configure \
            $(AM_DISTCHECK_CONFIGURE_FLAGS) \
            $(DISTCHECK_CONFIGURE_FLAGS) \
+           --srcdir=../.. --prefix="$$dc_install_base" \
          && $(MAKE) $(AM_MAKEFLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) dvi \
          && $(MAKE) $(AM_MAKEFLAGS) check \
@@ -1867,6 +1885,8 @@ uninstall-man: uninstall-man1 uninstall-man3
        uninstall-man uninstall-man1 uninstall-man3 \
        uninstall-pkgconfigDATA
 
+.PRECIOUS: Makefile
+
 
 # that one forces the rebuild when "make rebuild" is run on doc/
 rebuild_testapi:
@@ -1898,6 +1918,10 @@ check-valgrind valgrind: all
        @echo '## Go get a cup of coffee it is gonna take a while ...'
        $(MAKE) CHECKER='valgrind -q' runtests
 
+asan:
+       @echo '## rebuilding for ASAN'
+       ./configure CFLAGS="-fsanitize=address,undefined -Wformat -Werror=format-security -Werror=array-bounds -g" CXXFLAGS="-fsanitize=address,undefined -Wformat -Werror=format-security -Werror=array-bounds -g" LDFLAGS="-fsanitize=address,undefined" CC="clang" CXX="clang++" --disable-shared ; OptimOff  ; $(MAKE) clean ; $(MAKE)
+
 testall : tests SVGtests SAXtests
 
 tests: XMLtests XMLenttests NStests IDtests Errtests APItests $(READER_TEST) $(TEST_SAX) $(TEST_PUSH) $(TEST_HTML) $(TEST_PHTML) $(TEST_VALID) URItests $(TEST_PATTERN) $(TEST_XPATH) $(TEST_XPTR) $(TEST_XINCLUDE) $(TEST_C14N) $(TEST_DEBUG) $(TEST_CATALOG) $(TEST_REGEXPS) $(TEST_SCHEMAS) $(TEST_SCHEMATRON) $(TEST_THREADS) Timingtests $(TEST_VTIME) $(PYTHON_TESTS) $(TEST_MODULES)
diff --git a/NEWS b/NEWS
index 8027d55..d248c69 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -845,7 +845,7 @@ Gansterer),
    - Improvement: switch parser to XML-1.0 5th edition, add parsing flags
       for old versions, switch URI parsing to RFC 3986,
       add xmlSchemaValidCtxtGetParserCtxt (Holger Kaelberer),
-      new hashing functions for dictionnaries (based on Stefan Behnel work),
+      new hashing functions for dictionaries (based on Stefan Behnel work),
       improve handling of misplaced html/head/body in HTML parser, better
       regression test tools and code coverage display, better algorithms
       to detect various versions of the billion laughts attacks, make
@@ -1231,7 +1231,7 @@ Do not use or package 2.6.25
     Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed),
     some gcc4 fixes, HP-UX portability fixes (Rick Jones).
    - bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and
-    xmlreader stopping on non-fatal errors, thread support for dictionnaries
+    xmlreader stopping on non-fatal errors, thread support for dictionaries
     reference counting (Gary Coady), internal subset and push problem, URL
     saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python paths
     fixup (Stephane Bidoul), xmlGetNodePath and namespaces, xmlSetNsProp fix
@@ -1244,7 +1244,7 @@ Do not use or package 2.6.25
     Hendricks), aliasing bug exposed by gcc4 on s390, xmlTextReaderNext bug
     (Rob Richards), Schemas decimal type fixes (William Brack),
     xmlByteConsumed static buffer (Ben Maurer).
-   - improvement: speedup parsing comments and DTDs, dictionnary support for
+   - improvement: speedup parsing comments and DTDs, dictionary support for
     hash tables, Schemas Identity constraints (Kasimier), streaming XPath
     subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical
     values handling (Kasimier), add xmlTextReaderByteConsumed (Aron
@@ -1454,7 +1454,7 @@ Do not use or package 2.6.25
     URI on SYSTEM lookup failure, XInclude parse flags inheritance (William),
     XInclude and XPointer fixes for entities (William), XML parser bug
     reported by Holger Rauch, nanohttp fd leak (William),  regexps char
-    groups '-' handling (William), dictionnary reference counting problems,
+    groups '-' handling (William), dictionary reference counting problems,
     do not close stderr.
    - performance patches from Petr Pajas
    - Documentation fixes: XML_CATALOG_FILES in man pages (Mike Hommey)
@@ -1482,7 +1482,7 @@ Do not use or package 2.6.25
     William) reported by Yuuichi Teranishi
    - bugfixes: make test and path issues, xmlWriter attribute serialization
     (William Brack), xmlWriter indentation (William), schemas validation
-    (Eric Haszlakiewicz), XInclude dictionnaries issues (William and Oleg
+    (Eric Haszlakiewicz), XInclude dictionaries issues (William and Oleg
     Paraschenko), XInclude empty fallback (William), HTML warnings (William),
     XPointer in XInclude (William), Python namespace serialization,
     isolat1ToUTF8 bound error (Alfred Mickautsch), output of parameter
@@ -1503,7 +1503,7 @@ Do not use or package 2.6.25
 
 
 2.6.5: Jan 25 2004:
-   - Bugfixes: dictionnaries for schemas (William Brack), regexp segfault
+   - Bugfixes: dictionaries for schemas (William Brack), regexp segfault
     (William), xs:all problem (William), a number of XPointer bugfixes
     (William), xmllint error go to stderr, DTD validation problem with
     namespace, memory leak (William), SAX1 cleanup and minimal options fixes
@@ -1515,14 +1515,14 @@ Do not use or package 2.6.25
     Fleck), doc (Sven Zimmerman), I/O example.
    - Python bindings: fixes (William), enum support (Stéphane Bidoul),
     structured error reporting (Stéphane Bidoul)
-   - XInclude: various fixes for conformance, problem related to dictionnary
+   - XInclude: various fixes for conformance, problem related to dictionary
     references (William & me), recursion (William)
    - xmlWriter: indentation (Lucas Brasilino), memory leaks (Alfred
     Mickautsch),
    - xmlSchemas: normalizedString datatype (John Belmonte)
    - code cleanup for strings functions (William)
    - Windows: compiler patches (Mark Vakoc)
-   - Parser optimizations, a few new XPath and dictionnary APIs for future
+   - Parser optimizations, a few new XPath and dictionary APIs for future
     XSLT optimizations.
 
 
@@ -1617,8 +1617,8 @@ Do not use or package 2.6.25
     of change
    - Increased the library modularity, far more options can be stripped out,
     a --with-minimum configuration will weight around 160KBytes
-   - Use per parser and per document dictionnary, allocate names and small
-    text nodes from the dictionnary
+   - Use per parser and per document dictionary, allocate names and small
+    text nodes from the dictionary
    - Switch to a SAX2 like parser rewrote most of the XML parser core,
     provides namespace resolution and defaulted attributes, minimize memory
     allocations and copies, namespace checking and specific error handling,
@@ -1665,7 +1665,7 @@ Do not use or package 2.6.25
     (William), xmlCleanupParser (Marc Liyanage), CDATA output (William), HTTP
     error handling.
    - xmllint options: --dtdvalidfpi for Tobias Reif, --sax1 for compat
-    testing,  --nodict for building without tree dictionnary, --nocdata to
+    testing,  --nodict for building without tree dictionary, --nocdata to
     replace CDATA by text, --nsclean to remove surperfluous  namespace
     declarations
    - added xml2-config --libtool-libs option from Kevin P. Fleming
diff --git a/SAX2.c b/SAX2.c
index ffef3e1..5cbb700 100644 (file)
--- a/SAX2.c
+++ b/SAX2.c
@@ -55,7 +55,7 @@
  * @ctxt:  an XML validation parser context
  * @msg:   a string to accompany the error message
  */
-static void
+static void LIBXML_ATTR_FORMAT(2,0)
 xmlSAX2ErrMemory(xmlParserCtxtPtr ctxt, const char *msg) {
     xmlStructuredErrorFunc schannel = NULL;
     const char *str1 = "out of memory\n";
@@ -93,7 +93,7 @@ xmlSAX2ErrMemory(xmlParserCtxtPtr ctxt, const char *msg) {
  *
  * Handle a validation error
  */
-static void
+static void LIBXML_ATTR_FORMAT(3,0)
 xmlErrValid(xmlParserCtxtPtr ctxt, xmlParserErrors error,
             const char *msg, const char *str1, const char *str2)
 {
@@ -133,7 +133,7 @@ xmlErrValid(xmlParserCtxtPtr ctxt, xmlParserErrors error,
  *
  * Handle a fatal parser error, i.e. violating Well-Formedness constraints
  */
-static void
+static void LIBXML_ATTR_FORMAT(3,0)
 xmlFatalErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
                const char *msg, const xmlChar *str1, const xmlChar *str2)
 {
@@ -164,7 +164,7 @@ xmlFatalErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
  *
  * Handle a parser warning
  */
-static void
+static void LIBXML_ATTR_FORMAT(3,0)
 xmlWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
                const char *msg, const xmlChar *str1)
 {
@@ -189,7 +189,7 @@ xmlWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
  *
  * Handle a namespace error
  */
-static void
+static void LIBXML_ATTR_FORMAT(3,0)
 xmlNsErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
             const char *msg, const xmlChar *str1, const xmlChar *str2)
 {
@@ -213,7 +213,7 @@ xmlNsErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
  *
  * Handle a namespace warning
  */
-static void
+static void LIBXML_ATTR_FORMAT(3,0)
 xmlNsWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
              const char *msg, const xmlChar *str1, const xmlChar *str2)
 {
index 51ce905..aff179a 100644 (file)
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.13.4 -*- Autoconf -*-
+# generated automatically by aclocal 1.15 -*- Autoconf -*-
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -220,7 +220,22 @@ m4_popdef([pkg_default])
 m4_popdef([pkg_description])
 ]) dnl PKG_NOARCH_INSTALLDIR
 
-# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+
+# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# -------------------------------------------
+# Retrieves the value of the pkg-config variable for the given module.
+AC_DEFUN([PKG_CHECK_VAR],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
+
+_PKG_CONFIG([$1], [variable="][$3]["], [$2])
+AS_VAR_COPY([$1], [pkg_cv_][$1])
+
+AS_VAR_IF([$1], [""], [$5], [$4])dnl
+])# PKG_CHECK_VAR
+
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -232,10 +247,10 @@ m4_popdef([pkg_description])
 # generated from the m4 files accompanying Automake X.Y.
 # (This private macro should not be called outside this file.)
 AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.13'
+[am__api_version='1.15'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.13.4], [],
+m4_if([$1], [1.15], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -251,14 +266,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.13.4])dnl
+[AM_AUTOMAKE_VERSION([1.15])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -303,15 +318,14 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 # configured tree to be moved without reconfiguration.
 
 AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
 ])
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -342,7 +356,7 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -533,7 +547,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -609,7 +623,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -618,6 +632,12 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 # This macro actually does too much.  Some checks are only needed if
 # your package does certain things.  But this isn't really a big deal.
 
+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
+m4_define([AC_PROG_CC],
+m4_defn([AC_PROG_CC])
+[_AM_PROG_CC_C_O
+])
+
 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 # AM_INIT_AUTOMAKE([OPTIONS])
 # -----------------------------------------------
@@ -693,8 +713,8 @@ AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
+# We need awk for the "check" target (and possibly the TAP driver).  The
+# system "awk" is bad on some platforms.
 AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
@@ -726,6 +746,51 @@ dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
 AC_CONFIG_COMMANDS_PRE(dnl
 [m4_provide_if([_AM_COMPILER_EXEEXT],
   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes.  So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+  cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present.  This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message.  This
+can help us improve future automake versions.
+
+END
+  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+    echo 'Configuration will proceed anyway, since you have set the' >&2
+    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+    echo >&2
+  else
+    cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+  fi
+fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
 ])
 
 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
@@ -734,7 +799,6 @@ dnl mangled by Autoconf and run in a shell conditional statement.
 m4_define([_AC_COMPILER_EXEEXT],
 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
 
-
 # When config.status generates a header, we must update the stamp-h file.
 # This file resides in the same directory as the config header
 # that is generated.  The stamp files are numbered to have different names.
@@ -756,7 +820,7 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -767,7 +831,7 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co
 # Define $install_sh.
 AC_DEFUN([AM_PROG_INSTALL_SH],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
   case $am_aux_dir in
   *\ * | *\    *)
     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -777,7 +841,7 @@ if test x"${install_sh}" != xset; then
 fi
 AC_SUBST([install_sh])])
 
-# Copyright (C) 2003-2013 Free Software Foundation, Inc.
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -796,9 +860,45 @@ fi
 rmdir .tst 2>/dev/null
 AC_SUBST([am__leading_dot])])
 
+# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless 'enable' is passed literally.
+# For symmetry, 'disable' may be passed as well.  Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+       [enable], [m4_define([am_maintainer_other], [disable])],
+       [disable], [m4_define([am_maintainer_other], [enable])],
+       [m4_define([am_maintainer_other], [enable])
+        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+  AC_ARG_ENABLE([maintainer-mode],
+    [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
+      am_maintainer_other[ make rules and dependencies not useful
+      (and sometimes confusing) to the casual installer])],
+    [USE_MAINTAINER_MODE=$enableval],
+    [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+  MAINT=$MAINTAINER_MODE_TRUE
+  AC_SUBST([MAINT])dnl
+]
+)
+
 # Check to see how 'make' treats includes.                 -*- Autoconf -*-
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -848,7 +948,7 @@ rm -f confinc confmf
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -887,7 +987,7 @@ fi
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -916,9 +1016,73 @@ AC_DEFUN([_AM_SET_OPTIONS],
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_CC_C_O
+# ---------------
+# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
+# to automatically call this.
+AC_DEFUN([_AM_PROG_CC_C_O],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+AC_LANG_PUSH([C])dnl
+AC_CACHE_CHECK(
+  [whether $CC understands -c and -o together],
+  [am_cv_prog_cc_c_o],
+  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
+  # Make sure it works both with $CC and with simple cc.
+  # Following AC_PROG_CC_C_O, we do the test twice because some
+  # compilers refuse to overwrite an existing .o file with -o,
+  # though they will create one.
+  am_cv_prog_cc_c_o=yes
+  for am_i in 1 2; do
+    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
+         && test -f conftest2.$ac_objext; then
+      : OK
+    else
+      am_cv_prog_cc_c_o=no
+      break
+    fi
+  done
+  rm -f core conftest*
+  unset am_i])
+if test "$am_cv_prog_cc_c_o" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+AC_LANG_POP([C])])
+
+# For backward compatibility.
+AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   (exit $ac_status); }])
+
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -999,7 +1163,7 @@ AC_CONFIG_COMMANDS_PRE(
 rm -f conftest.file
 ])
 
-# Copyright (C) 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1059,7 +1223,7 @@ AC_SUBST([AM_BACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 ])
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1087,7 +1251,7 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006-2013 Free Software Foundation, Inc.
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1106,7 +1270,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004-2013 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
diff --git a/autogen.sh b/autogen.sh
new file mode 100755 (executable)
index 0000000..8b47ea5
--- /dev/null
@@ -0,0 +1,81 @@
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=. 
+
+THEDIR=`pwd`
+cd $srcdir
+DIE=0
+
+(autoconf --version) < /dev/null > /dev/null 2>&1 || {
+       echo
+       echo "You must have autoconf installed to compile libxml."
+       echo "Download the appropriate package for your distribution,"
+       echo "or see http://www.gnu.org/software/autoconf"
+       DIE=1
+}
+
+(libtoolize --version) < /dev/null > /dev/null 2>&1 || {
+       echo
+       echo "You must have libtool installed to compile libxml."
+       echo "Download the appropriate package for your distribution,"
+       echo "or see http://www.gnu.org/software/libtool"
+       DIE=1
+}
+
+(automake --version) < /dev/null > /dev/null 2>&1 || {
+       echo
+       DIE=1
+       echo "You must have automake installed to compile libxml."
+       echo "Download the appropriate package for your distribution,"
+       echo "or see http://www.gnu.org/software/automake"
+}
+
+if test "$DIE" -eq 1; then
+       exit 1
+fi
+
+test -f entities.c || {
+       echo "You must run this script in the top-level libxml directory"
+       exit 1
+}
+
+EXTRA_ARGS=
+if test "x$1" = "x--system"; then
+    shift
+    prefix=/usr
+    libdir=$prefix/lib
+    sysconfdir=/etc
+    localstatedir=/var
+    if [ -d /usr/lib64 ]; then
+      libdir=$prefix/lib64
+    fi
+    EXTRA_ARGS="--prefix=$prefix --sysconfdir=$sysconfdir --localstatedir=$localstatedir --libdir=$libdir"
+    echo "Running ./configure with $EXTRA_ARGS $@"
+else
+    if test -z "$NOCONFIGURE" && test -z "$*"; then
+        echo "I am going to run ./configure with no arguments - if you wish "
+        echo "to pass any to it, please specify them on the $0 command line."
+    fi
+fi
+
+if [ ! -d $srcdir/m4 ]; then
+        mkdir $srcdir/m4
+fi
+
+# Replaced by autoreconf below
+autoreconf -if -Wall
+
+cd $THEDIR
+
+if test x$OBJ_DIR != x; then
+    mkdir -p "$OBJ_DIR"
+    cd "$OBJ_DIR"
+fi
+
+if test -z "$NOCONFIGURE"; then
+    $srcdir/configure $EXTRA_ARGS "$@"
+    echo
+    echo "Now type 'make' to compile libxml2."
+fi
diff --git a/buf.c b/buf.c
index 6efc7b6..07922ff 100644 (file)
--- a/buf.c
+++ b/buf.c
@@ -27,6 +27,7 @@
 #include <libxml/tree.h>
 #include <libxml/globals.h>
 #include <libxml/tree.h>
+#include <libxml/parserInternals.h> /* for XML_MAX_TEXT_LENGTH */
 #include "buf.h"
 
 #define WITH_BUFFER_COMPAT
@@ -299,7 +300,8 @@ xmlBufSetAllocationScheme(xmlBufPtr buf,
     if ((scheme == XML_BUFFER_ALLOC_DOUBLEIT) ||
         (scheme == XML_BUFFER_ALLOC_EXACT) ||
         (scheme == XML_BUFFER_ALLOC_HYBRID) ||
-        (scheme == XML_BUFFER_ALLOC_IMMUTABLE)) {
+        (scheme == XML_BUFFER_ALLOC_IMMUTABLE) ||
+       (scheme == XML_BUFFER_ALLOC_BOUNDED)) {
        buf->alloc = scheme;
         if (buf->buffer)
             buf->buffer->alloc = scheme;
@@ -458,6 +460,18 @@ xmlBufGrowInternal(xmlBufPtr buf, size_t len) {
     size = buf->use + len + 100;
 #endif
 
+    if (buf->alloc == XML_BUFFER_ALLOC_BOUNDED) {
+        /*
+        * Used to provide parsing limits
+        */
+        if ((buf->use + len >= XML_MAX_TEXT_LENGTH) ||
+           (buf->size >= XML_MAX_TEXT_LENGTH)) {
+           xmlBufMemoryError(buf, "buffer error: text too long\n");
+           return(0);
+       }
+       if (size >= XML_MAX_TEXT_LENGTH)
+           size = XML_MAX_TEXT_LENGTH;
+    }
     if ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL)) {
         size_t start_buf = buf->content - buf->contentIO;
 
@@ -739,6 +753,15 @@ xmlBufResize(xmlBufPtr buf, size_t size)
     CHECK_COMPAT(buf)
 
     if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(0);
+    if (buf->alloc == XML_BUFFER_ALLOC_BOUNDED) {
+        /*
+        * Used to provide parsing limits
+        */
+        if (size >= XML_MAX_TEXT_LENGTH) {
+           xmlBufMemoryError(buf, "buffer error: text too long\n");
+           return(0);
+       }
+    }
 
     /* Don't resize if we don't have to */
     if (size < buf->size)
@@ -867,6 +890,15 @@ xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len) {
 
     needSize = buf->use + len + 2;
     if (needSize > buf->size){
+       if (buf->alloc == XML_BUFFER_ALLOC_BOUNDED) {
+           /*
+            * Used to provide parsing limits
+            */
+           if (needSize >= XML_MAX_TEXT_LENGTH) {
+               xmlBufMemoryError(buf, "buffer error: text too long\n");
+               return(-1);
+           }
+       }
         if (!xmlBufResize(buf, needSize)){
            xmlBufMemoryError(buf, "growing buffer");
             return XML_ERR_NO_MEMORY;
@@ -938,6 +970,15 @@ xmlBufAddHead(xmlBufPtr buf, const xmlChar *str, int len) {
     }
     needSize = buf->use + len + 2;
     if (needSize > buf->size){
+       if (buf->alloc == XML_BUFFER_ALLOC_BOUNDED) {
+           /*
+            * Used to provide parsing limits
+            */
+           if (needSize >= XML_MAX_TEXT_LENGTH) {
+               xmlBufMemoryError(buf, "buffer error: text too long\n");
+               return(-1);
+           }
+       }
         if (!xmlBufResize(buf, needSize)){
            xmlBufMemoryError(buf, "growing buffer");
             return XML_ERR_NO_MEMORY;
index 5773db3..6dfdfbb 100644 (file)
--- a/catalog.c
+++ b/catalog.c
@@ -47,9 +47,9 @@
 #define MAX_CATAL_DEPTH        50
 
 #ifdef _WIN32
-# define PATH_SEAPARATOR ';'
+# define PATH_SEPARATOR ';'
 #else
-# define PATH_SEAPARATOR ':'
+# define PATH_SEPARATOR ':'
 #endif
 
 /**
@@ -238,7 +238,7 @@ xmlCatalogErrMemory(const char *extra)
  *
  * Handle a catalog error
  */
-static void
+static void LIBXML_ATTR_FORMAT(4,0)
 xmlCatalogErr(xmlCatalogEntryPtr catal, xmlNodePtr node, int error,
                const char *msg, const xmlChar *str1, const xmlChar *str2,
               const xmlChar *str3)
@@ -3247,7 +3247,7 @@ xmlLoadCatalogs(const char *pathss) {
        while (xmlIsBlank_ch(*cur)) cur++;
        if (*cur != 0) {
            paths = cur;
-           while ((*cur != 0) && (*cur != PATH_SEAPARATOR) && (!xmlIsBlank_ch(*cur)))
+           while ((*cur != 0) && (*cur != PATH_SEPARATOR) && (!xmlIsBlank_ch(*cur)))
                cur++;
            path = xmlStrndup((const xmlChar *)paths, cur - paths);
 #ifdef _WIN32
@@ -3263,7 +3263,7 @@ xmlLoadCatalogs(const char *pathss) {
                xmlFree(path);
            }
        }
-       while (*cur == PATH_SEAPARATOR)
+       while (*cur == PATH_SEPARATOR)
            cur++;
     }
 }
diff --git a/compile b/compile
new file mode 100755 (executable)
index 0000000..a85b723
--- /dev/null
+++ b/compile
@@ -0,0 +1,347 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand '-c -o'.
+
+scriptversion=2012-10-14.11; # UTC
+
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+nl='
+'
+
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent tools from complaining about whitespace usage.
+IFS=" ""       $nl"
+
+file_conv=
+
+# func_file_conv build_file lazy
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts. If the determined conversion
+# type is listed in (the comma separated) LAZY, no conversion will
+# take place.
+func_file_conv ()
+{
+  file=$1
+  case $file in
+    / | /[!/]*) # absolute file, and not a UNC file
+      if test -z "$file_conv"; then
+       # lazily determine how to convert abs files
+       case `uname -s` in
+         MINGW*)
+           file_conv=mingw
+           ;;
+         CYGWIN*)
+           file_conv=cygwin
+           ;;
+         *)
+           file_conv=wine
+           ;;
+       esac
+      fi
+      case $file_conv/,$2, in
+       *,$file_conv,*)
+         ;;
+       mingw/*)
+         file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+         ;;
+       cygwin/*)
+         file=`cygpath -m "$file" || echo "$file"`
+         ;;
+       wine/*)
+         file=`winepath -w "$file" || echo "$file"`
+         ;;
+      esac
+      ;;
+  esac
+}
+
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+  func_file_conv "$1"
+  if test -z "$lib_path"; then
+    lib_path=$file
+  else
+    lib_path="$lib_path;$file"
+  fi
+  linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+  lib=$1
+  found=no
+  save_IFS=$IFS
+  IFS=';'
+  for dir in $lib_path $LIB
+  do
+    IFS=$save_IFS
+    if $shared && test -f "$dir/$lib.dll.lib"; then
+      found=yes
+      lib=$dir/$lib.dll.lib
+      break
+    fi
+    if test -f "$dir/$lib.lib"; then
+      found=yes
+      lib=$dir/$lib.lib
+      break
+    fi
+    if test -f "$dir/lib$lib.a"; then
+      found=yes
+      lib=$dir/lib$lib.a
+      break
+    fi
+  done
+  IFS=$save_IFS
+
+  if test "$found" != yes; then
+    lib=$lib.lib
+  fi
+}
+
+# func_cl_wrapper cl arg...
+# Adjust compile command to suit cl
+func_cl_wrapper ()
+{
+  # Assume a capable shell
+  lib_path=
+  shared=:
+  linker_opts=
+  for arg
+  do
+    if test -n "$eat"; then
+      eat=
+    else
+      case $1 in
+       -o)
+         # configure might choose to run compile as 'compile cc -o foo foo.c'.
+         eat=1
+         case $2 in
+           *.o | *.[oO][bB][jJ])
+             func_file_conv "$2"
+             set x "$@" -Fo"$file"
+             shift
+             ;;
+           *)
+             func_file_conv "$2"
+             set x "$@" -Fe"$file"
+             shift
+             ;;
+         esac
+         ;;
+       -I)
+         eat=1
+         func_file_conv "$2" mingw
+         set x "$@" -I"$file"
+         shift
+         ;;
+       -I*)
+         func_file_conv "${1#-I}" mingw
+         set x "$@" -I"$file"
+         shift
+         ;;
+       -l)
+         eat=1
+         func_cl_dashl "$2"
+         set x "$@" "$lib"
+         shift
+         ;;
+       -l*)
+         func_cl_dashl "${1#-l}"
+         set x "$@" "$lib"
+         shift
+         ;;
+       -L)
+         eat=1
+         func_cl_dashL "$2"
+         ;;
+       -L*)
+         func_cl_dashL "${1#-L}"
+         ;;
+       -static)
+         shared=false
+         ;;
+       -Wl,*)
+         arg=${1#-Wl,}
+         save_ifs="$IFS"; IFS=','
+         for flag in $arg; do
+           IFS="$save_ifs"
+           linker_opts="$linker_opts $flag"
+         done
+         IFS="$save_ifs"
+         ;;
+       -Xlinker)
+         eat=1
+         linker_opts="$linker_opts $2"
+         ;;
+       -*)
+         set x "$@" "$1"
+         shift
+         ;;
+       *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+         func_file_conv "$1"
+         set x "$@" -Tp"$file"
+         shift
+         ;;
+       *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+         func_file_conv "$1" mingw
+         set x "$@" "$file"
+         shift
+         ;;
+       *)
+         set x "$@" "$1"
+         shift
+         ;;
+      esac
+    fi
+    shift
+  done
+  if test -n "$linker_opts"; then
+    linker_opts="-link$linker_opts"
+  fi
+  exec "$@" $linker_opts
+  exit 1
+}
+
+eat=
+
+case $1 in
+  '')
+     echo "$0: No command.  Try '$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand '-c -o'.
+Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file 'INSTALL'.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "compile $scriptversion"
+    exit $?
+    ;;
+  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+    func_cl_wrapper "$@"      # Doesn't return...
+    ;;
+esac
+
+ofile=
+cfile=
+
+for arg
+do
+  if test -n "$eat"; then
+    eat=
+  else
+    case $1 in
+      -o)
+       # configure might choose to run compile as 'compile cc -o foo foo.c'.
+       # So we strip '-o arg' only if arg is an object.
+       eat=1
+       case $2 in
+         *.o | *.obj)
+           ofile=$2
+           ;;
+         *)
+           set x "$@" -o "$2"
+           shift
+           ;;
+       esac
+       ;;
+      *.c)
+       cfile=$1
+       set x "$@" "$1"
+       shift
+       ;;
+      *)
+       set x "$@" "$1"
+       shift
+       ;;
+    esac
+  fi
+  shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+  # If no '-o' option was seen then we might have been invoked from a
+  # pattern rule where we don't need one.  That is ok -- this is a
+  # normal compilation that the losing compiler can handle.  If no
+  # '.c' file was seen then we are probably linking.  That is also
+  # ok.
+  exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use '[/\\:.-]' here to ensure that we don't use the same name
+# that we are using for the .o file.  Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
+while true; do
+  if mkdir "$lockdir" >/dev/null 2>&1; then
+    break
+  fi
+  sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+  test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+  test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
index b79252d..dbfb978 100755 (executable)
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2013 Free Software Foundation, Inc.
+#   Copyright 1992-2015 Free Software Foundation, Inc.
 
-timestamp='2013-06-10'
+timestamp='2015-01-01'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -24,12 +24,12 @@ timestamp='2013-06-10'
 # program.  This Exception is an additional permission under section 7
 # of the GNU General Public License, version 3 ("GPLv3").
 #
-# Originally written by Per Bothner.
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
 #
 # You can get the latest version of this script from:
 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 #
-# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+# Please send patches to <config-patches@gnu.org>.
 
 
 me=`echo "$0" | sed -e 's,.*/,,'`
@@ -50,7 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2013 Free Software Foundation, Inc.
+Copyright 1992-2015 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -149,7 +149,7 @@ Linux|GNU|GNU/*)
        LIBC=gnu
        #endif
        EOF
-       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
        ;;
 esac
 
@@ -579,8 +579,9 @@ EOF
        else
                IBM_ARCH=powerpc
        fi
-       if [ -x /usr/bin/oslevel ] ; then
-               IBM_REV=`/usr/bin/oslevel`
+       if [ -x /usr/bin/lslpp ] ; then
+               IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+                          awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
        else
                IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
        fi
@@ -826,7 +827,7 @@ EOF
     *:MINGW*:*)
        echo ${UNAME_MACHINE}-pc-mingw32
        exit ;;
-    i*:MSYS*:*)
+    *:MSYS*:*)
        echo ${UNAME_MACHINE}-pc-msys
        exit ;;
     i*:windows32*:*)
@@ -969,10 +970,10 @@ EOF
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
        ;;
-    or1k:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+    openrisc*:Linux:*:*)
+       echo or1k-unknown-linux-${LIBC}
        exit ;;
-    or32:Linux:*:*)
+    or32:Linux:*:* | or1k*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     padre:Linux:*:*)
@@ -1260,16 +1261,26 @@ EOF
        if test "$UNAME_PROCESSOR" = unknown ; then
            UNAME_PROCESSOR=powerpc
        fi
-       if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-           if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-               (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-               grep IS_64BIT_ARCH >/dev/null
-           then
-               case $UNAME_PROCESSOR in
-                   i386) UNAME_PROCESSOR=x86_64 ;;
-                   powerpc) UNAME_PROCESSOR=powerpc64 ;;
-               esac
+       if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+           if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+               if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+                   (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+                   grep IS_64BIT_ARCH >/dev/null
+               then
+                   case $UNAME_PROCESSOR in
+                       i386) UNAME_PROCESSOR=x86_64 ;;
+                       powerpc) UNAME_PROCESSOR=powerpc64 ;;
+                   esac
+               fi
            fi
+       elif test "$UNAME_PROCESSOR" = i386 ; then
+           # Avoid executing cc on OS X 10.9, as it ships with a stub
+           # that puts up a graphical alert prompting to install
+           # developer tools.  Any system running Mac OS X 10.7 or
+           # later (Darwin 11 and later) is required to have a 64-bit
+           # processor. This is not true of the ARM version of Darwin
+           # that Apple uses in portable devices.
+           UNAME_PROCESSOR=x86_64
        fi
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
        exit ;;
@@ -1361,154 +1372,6 @@ EOF
        exit ;;
 esac
 
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-       "4"
-#else
-       ""
-#endif
-       ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-       printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-       printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-#  include <sys/param.h>
-#  if defined (BSD)
-#   if BSD == 43
-      printf ("vax-dec-bsd4.3\n"); exit (0);
-#   else
-#    if BSD == 199006
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#    else
-      printf ("vax-dec-bsd\n"); exit (0);
-#    endif
-#   endif
-#  else
-    printf ("vax-dec-bsd\n"); exit (0);
-#  endif
-# else
-    printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
-       { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-       echo c1-convex-bsd
-       exit ;;
-    c2*)
-       if getsysinfo -f scalar_acc
-       then echo c32-convex-bsd
-       else echo c2-convex-bsd
-       fi
-       exit ;;
-    c34*)
-       echo c34-convex-bsd
-       exit ;;
-    c38*)
-       echo c38-convex-bsd
-       exit ;;
-    c4*)
-       echo c4-convex-bsd
-       exit ;;
-    esac
-fi
-
 cat >&2 <<EOF
 $0: unable to guess system type
 
index eaef4d4..749b1d6 100644 (file)
 /* Define as const if the declaration of iconv() needs const. */
 #undef ICONV_CONST
 
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
-   */
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
 #undef LT_OBJDIR
 
 /* Name of package */
index c765b34..6467c95 100755 (executable)
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright 1992-2013 Free Software Foundation, Inc.
+#   Copyright 1992-2015 Free Software Foundation, Inc.
 
-timestamp='2013-04-24'
+timestamp='2015-01-01'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ timestamp='2013-04-24'
 # of the GNU General Public License, version 3 ("GPLv3").
 
 
-# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+# Please send patches to <config-patches@gnu.org>.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
@@ -68,7 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright 1992-2013 Free Software Foundation, Inc.
+Copyright 1992-2015 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -257,14 +257,15 @@ case $basic_machine in
        | avr | avr32 \
        | be32 | be64 \
        | bfin \
-       | c4x | clipper \
+       | c4x | c8051 | clipper \
        | d10v | d30v | dlx | dsp16xx \
        | epiphany \
-       | fido | fr30 | frv \
+       | fido | fr30 | frv | ft32 \
        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
        | hexagon \
        | i370 | i860 | i960 | ia64 \
        | ip2k | iq2000 \
+       | k1om \
        | le32 | le64 \
        | lm32 \
        | m32c | m32r | m32rle | m68000 | m68k | m88k \
@@ -282,8 +283,10 @@ case $basic_machine in
        | mips64vr5900 | mips64vr5900el \
        | mipsisa32 | mipsisa32el \
        | mipsisa32r2 | mipsisa32r2el \
+       | mipsisa32r6 | mipsisa32r6el \
        | mipsisa64 | mipsisa64el \
        | mipsisa64r2 | mipsisa64r2el \
+       | mipsisa64r6 | mipsisa64r6el \
        | mipsisa64sb1 | mipsisa64sb1el \
        | mipsisa64sr71k | mipsisa64sr71kel \
        | mipsr5900 | mipsr5900el \
@@ -295,11 +298,11 @@ case $basic_machine in
        | nds32 | nds32le | nds32be \
        | nios | nios2 | nios2eb | nios2el \
        | ns16k | ns32k \
-       | open8 \
-       | or1k | or32 \
+       | open8 | or1k | or1knd | or32 \
        | pdp10 | pdp11 | pj | pjl \
        | powerpc | powerpc64 | powerpc64le | powerpcle \
        | pyramid \
+       | riscv32 | riscv64 \
        | rl78 | rx \
        | score \
        | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
@@ -310,6 +313,7 @@ case $basic_machine in
        | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
        | ubicom32 \
        | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+       | visium \
        | we32k \
        | x86 | xc16x | xstormy16 | xtensa \
        | z8k | z80)
@@ -324,7 +328,10 @@ case $basic_machine in
        c6x)
                basic_machine=tic6x-unknown
                ;;
-       m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+       leon|leon[3-9])
+               basic_machine=sparc-$basic_machine
+               ;;
+       m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
                basic_machine=$basic_machine-unknown
                os=-none
                ;;
@@ -372,7 +379,7 @@ case $basic_machine in
        | be32-* | be64-* \
        | bfin-* | bs2000-* \
        | c[123]* | c30-* | [cjt]90-* | c4x-* \
-       | clipper-* | craynv-* | cydra-* \
+       | c8051-* | clipper-* | craynv-* | cydra-* \
        | d10v-* | d30v-* | dlx-* \
        | elxsi-* \
        | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
@@ -381,6 +388,7 @@ case $basic_machine in
        | hexagon-* \
        | i*86-* | i860-* | i960-* | ia64-* \
        | ip2k-* | iq2000-* \
+       | k1om-* \
        | le32-* | le64-* \
        | lm32-* \
        | m32c-* | m32r-* | m32rle-* \
@@ -400,8 +408,10 @@ case $basic_machine in
        | mips64vr5900-* | mips64vr5900el-* \
        | mipsisa32-* | mipsisa32el-* \
        | mipsisa32r2-* | mipsisa32r2el-* \
+       | mipsisa32r6-* | mipsisa32r6el-* \
        | mipsisa64-* | mipsisa64el-* \
        | mipsisa64r2-* | mipsisa64r2el-* \
+       | mipsisa64r6-* | mipsisa64r6el-* \
        | mipsisa64sb1-* | mipsisa64sb1el-* \
        | mipsisa64sr71k-* | mipsisa64sr71kel-* \
        | mipsr5900-* | mipsr5900el-* \
@@ -413,6 +423,7 @@ case $basic_machine in
        | nios-* | nios2-* | nios2eb-* | nios2el-* \
        | none-* | np1-* | ns16k-* | ns32k-* \
        | open8-* \
+       | or1k*-* \
        | orion-* \
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
@@ -430,6 +441,7 @@ case $basic_machine in
        | ubicom32-* \
        | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
        | vax-* \
+       | visium-* \
        | we32k-* \
        | x86-* | x86_64-* | xc16x-* | xps100-* \
        | xstormy16-* | xtensa*-* \
@@ -767,6 +779,9 @@ case $basic_machine in
                basic_machine=m68k-isi
                os=-sysv
                ;;
+       leon-*|leon[3-9]-*)
+               basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
+               ;;
        m68knommu)
                basic_machine=m68k-unknown
                os=-linux
@@ -794,7 +809,7 @@ case $basic_machine in
                os=-mingw64
                ;;
        mingw32)
-               basic_machine=i386-pc
+               basic_machine=i686-pc
                os=-mingw32
                ;;
        mingw32ce)
@@ -822,6 +837,10 @@ case $basic_machine in
                basic_machine=powerpc-unknown
                os=-morphos
                ;;
+       moxiebox)
+               basic_machine=moxie-unknown
+               os=-moxiebox
+               ;;
        msdos)
                basic_machine=i386-pc
                os=-msdos
@@ -830,7 +849,7 @@ case $basic_machine in
                basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
                ;;
        msys)
-               basic_machine=i386-pc
+               basic_machine=i686-pc
                os=-msys
                ;;
        mvs)
@@ -1367,14 +1386,14 @@ case $os in
              | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
              | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
              | -linux-newlib* | -linux-musl* | -linux-uclibc* \
-             | -uxpv* | -beos* | -mpeix* | -udk* \
+             | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
              | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
@@ -1546,6 +1565,9 @@ case $basic_machine in
        c4x-* | tic4x-*)
                os=-coff
                ;;
+       c8051-*)
+               os=-elf
+               ;;
        hexagon-*)
                os=-elf
                ;;
@@ -1589,9 +1611,6 @@ case $basic_machine in
        mips*-*)
                os=-elf
                ;;
-       or1k-*)
-               os=-elf
-               ;;
        or32-*)
                os=-coff
                ;;
index d63dce1..eb371a7 100755 (executable)
--- a/configure
+++ b/configure
@@ -663,8 +663,9 @@ WITH_REGEXPS
 TEST_SCHEMAS
 WITH_SCHEMAS
 WITH_ISO8859X
-ICU_LIBS
 WITH_ICU
+ICU_LIBS
+ICU_CFLAGS
 WITH_ICONV
 WITH_OUTPUT
 TEST_XPATH
@@ -744,6 +745,7 @@ HTML_DIR
 USE_VERSION_SCRIPT_FALSE
 USE_VERSION_SCRIPT_TRUE
 VERSION_SCRIPT_FLAGS
+LT_SYS_LIBRARY_PATH
 OTOOL64
 OTOOL
 LIPO
@@ -834,6 +836,9 @@ build_os
 build_vendor
 build_cpu
 build
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
 target_alias
 host_alias
 build_alias
@@ -875,12 +880,14 @@ SHELL'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
+enable_maintainer_mode
 enable_silent_rules
 enable_dependency_tracking
 enable_shared
 enable_static
 with_pic
 enable_fast_install
+with_aix_soname
 with_gnu_ld
 with_sysroot
 enable_libtool_lock
@@ -940,8 +947,13 @@ CPP
 PKG_CONFIG
 PKG_CONFIG_PATH
 PKG_CONFIG_LIBDIR
+LT_SYS_LIBRARY_PATH
+Z_CFLAGS
+Z_LIBS
 LZMA_CFLAGS
-LZMA_LIBS'
+LZMA_LIBS
+ICU_CFLAGS
+ICU_LIBS'
 
 
 # Initialize some variables set by options.
@@ -1558,6 +1570,9 @@ Optional Features:
   --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --disable-maintainer-mode
+                          disable make rules and dependencies not useful (and
+                          sometimes confusing) to the casual installer
   --enable-silent-rules   less verbose build output (undo: "make V=1")
   --disable-silent-rules  verbose build output (undo: "make V=0")
   --enable-dependency-tracking
@@ -1577,9 +1592,12 @@ Optional Packages:
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
                           both]
+  --with-aix-soname=aix|svr4|both
+                          shared library versioning (aka "SONAME") variant to
+                          provide on AIX, [default=aix].
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
-  --with-sysroot=DIR Search for dependent libraries within DIR
-                        (or the compiler's sysroot if not specified).
+  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
+                          compiler's sysroot if not specified).
   --with-c14n             add the Canonicalization support (on)
   --with-catalog          add the Catalog support (on)
   --with-debug            add the debugging module (on)
@@ -1639,8 +1657,14 @@ Some influential environment variables:
               directories to add to pkg-config's search path
   PKG_CONFIG_LIBDIR
               path overriding pkg-config's built-in search path
+  LT_SYS_LIBRARY_PATH
+              User-defined run-time library search path.
+  Z_CFLAGS    C compiler flags for Z, overriding pkg-config
+  Z_LIBS      linker flags for Z, overriding pkg-config
   LZMA_CFLAGS C compiler flags for LZMA, overriding pkg-config
   LZMA_LIBS   linker flags for LZMA, overriding pkg-config
+  ICU_CFLAGS  C compiler flags for ICU, overriding pkg-config
+  ICU_LIBS    linker flags for ICU, overriding pkg-config
 
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
@@ -2479,6 +2503,29 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 ac_config_headers="$ac_config_headers config.h"
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+    # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then :
+  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+  USE_MAINTAINER_MODE=yes
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+   if test $USE_MAINTAINER_MODE = yes; then
+  MAINTAINER_MODE_TRUE=
+  MAINTAINER_MODE_FALSE='#'
+else
+  MAINTAINER_MODE_TRUE='#'
+  MAINTAINER_MODE_FALSE=
+fi
+
+  MAINT=$MAINTAINER_MODE_TRUE
+
+
+
 ac_aux_dir=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
   if test -f "$ac_dir/install-sh"; then
@@ -2582,7 +2629,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 LIBXML_MAJOR_VERSION=2
 LIBXML_MINOR_VERSION=9
-LIBXML_MICRO_VERSION=2
+LIBXML_MICRO_VERSION=4
 LIBXML_MICRO_VERSION_SUFFIX=
 LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX
 LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION
@@ -2623,7 +2670,7 @@ fi
 
 VERSION=${LIBXML_VERSION}
 
-am__api_version='1.13'
+am__api_version='1.15'
 
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
@@ -2795,8 +2842,8 @@ test "$program_suffix" != NONE &&
 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
 
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
 
 if test x"${MISSING+set}" != xset; then
   case $am_aux_dir in
@@ -2815,7 +2862,7 @@ else
 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
 fi
 
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
   case $am_aux_dir in
   *\ * | *\    *)
     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -3144,8 +3191,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 mkdir_p='$(MKDIR_P)'
 
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
+# We need awk for the "check" target (and possibly the TAP driver).  The
+# system "awk" is bad on some platforms.
 # Always define AMTAR for backward compatibility.  Yes, it's still used
 # in the wild :-(  We should find a proper way to deprecate it ...
 AMTAR='$${TAR-tar}'
@@ -3161,6 +3208,48 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
 
 
 
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes.  So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+  cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present.  This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message.  This
+can help us improve future automake versions.
+
+END
+  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+    echo 'Configuration will proceed anyway, since you have set the' >&2
+    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+    echo >&2
+  else
+    cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
+  fi
+fi
+
 
 # Support silent build rules, requires at least automake-1.11. Disable
 # by either passing --disable-silent-rules to configure or passing V=1
@@ -3993,6 +4082,65 @@ ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
+$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
+if ${am_cv_prog_cc_c_o+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+  # Make sure it works both with $CC and with simple cc.
+  # Following AC_PROG_CC_C_O, we do the test twice because some
+  # compilers refuse to overwrite an existing .o file with -o,
+  # though they will create one.
+  am_cv_prog_cc_c_o=yes
+  for am_i in 1 2; do
+    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
+   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } \
+         && test -f conftest2.$ac_objext; then
+      : OK
+    else
+      am_cv_prog_cc_c_o=no
+      break
+    fi
+  done
+  rm -f core conftest*
+  unset am_i
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+$as_echo "$am_cv_prog_cc_c_o" >&6; }
+if test "$am_cv_prog_cc_c_o" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
 DEPDIR="${am__leading_dot}deps"
 
 ac_config_commands="$ac_config_commands depfiles"
@@ -4710,8 +4858,8 @@ esac
 
 
 
-macro_version='2.4.2'
-macro_revision='1.3337'
+macro_version='2.4.6'
+macro_revision='2.4.6'
 
 
 
@@ -4725,7 +4873,7 @@ macro_revision='1.3337'
 
 
 
-ltmain="$ac_aux_dir/ltmain.sh"
+ltmain=$ac_aux_dir/ltmain.sh
 
 # Backslashify metacharacters that are still active within
 # double-quoted strings.
@@ -4774,7 +4922,7 @@ func_echo_all ()
     $ECHO ""
 }
 
-case "$ECHO" in
+case $ECHO in
   printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
 $as_echo "printf" >&6; } ;;
   print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
@@ -5097,19 +5245,19 @@ test -z "$GREP" && GREP=grep
 
 # Check whether --with-gnu-ld was given.
 if test "${with_gnu_ld+set}" = set; then :
-  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
 else
   with_gnu_ld=no
 fi
 
 ac_prog=ld
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   # Check if gcc -print-prog-name=ld gives a path.
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
 $as_echo_n "checking for ld used by $CC... " >&6; }
   case $host in
   *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
+    # gcc leaves a trailing carriage return, which upsets mingw
     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
   *)
     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
@@ -5123,7 +5271,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
        ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
       done
-      test -z "$LD" && LD="$ac_prog"
+      test -z "$LD" && LD=$ac_prog
       ;;
   "")
     # If it fails, then pretend we aren't using GCC.
@@ -5134,7 +5282,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
     with_gnu_ld=unknown
     ;;
   esac
-elif test "$with_gnu_ld" = yes; then
+elif test yes = "$with_gnu_ld"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
 $as_echo_n "checking for GNU ld... " >&6; }
 else
@@ -5145,32 +5293,32 @@ if ${lt_cv_path_LD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
   for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
     test -z "$ac_dir" && ac_dir=.
     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
+      lt_cv_path_LD=$ac_dir/$ac_prog
       # Check to see if the program is GNU ld.  I'd rather use --version,
       # but apparently some variants of GNU ld only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
       *GNU* | *'with BFD'*)
-       test "$with_gnu_ld" != no && break
+       test no != "$with_gnu_ld" && break
        ;;
       *)
-       test "$with_gnu_ld" != yes && break
+       test yes != "$with_gnu_ld" && break
        ;;
       esac
     fi
   done
-  IFS="$lt_save_ifs"
+  IFS=$lt_save_ifs
 else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+  lt_cv_path_LD=$LD # Let the user override the test with a path.
 fi
 fi
 
-LD="$lt_cv_path_LD"
+LD=$lt_cv_path_LD
 if test -n "$LD"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
 $as_echo "$LD" >&6; }
@@ -5213,33 +5361,38 @@ if ${lt_cv_path_NM+:} false; then :
 else
   if test -n "$NM"; then
   # Let the user override the test.
-  lt_cv_path_NM="$NM"
+  lt_cv_path_NM=$NM
 else
-  lt_nm_to_check="${ac_tool_prefix}nm"
+  lt_nm_to_check=${ac_tool_prefix}nm
   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
     lt_nm_to_check="$lt_nm_to_check nm"
   fi
   for lt_tmp_nm in $lt_nm_to_check; do
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       test -z "$ac_dir" && ac_dir=.
-      tmp_nm="$ac_dir/$lt_tmp_nm"
-      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+      tmp_nm=$ac_dir/$lt_tmp_nm
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
        # Check to see if the nm accepts a BSD-compat flag.
-       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+       # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
        #   nm: unknown option "B" ignored
        # Tru64's nm complains that /dev/null is an invalid object file
-       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
-       */dev/null* | *'Invalid file or object type'*)
+       # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
+       case $build_os in
+       mingw*) lt_bad_file=conftest.nm/nofile ;;
+       *) lt_bad_file=/dev/null ;;
+       esac
+       case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+       *$lt_bad_file* | *'Invalid file or object type'*)
          lt_cv_path_NM="$tmp_nm -B"
-         break
+         break 2
          ;;
        *)
          case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
          */dev/null*)
            lt_cv_path_NM="$tmp_nm -p"
-           break
+           break 2
            ;;
          *)
            lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
@@ -5250,15 +5403,15 @@ else
        esac
       fi
     done
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
   done
   : ${lt_cv_path_NM=no}
 fi
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
 $as_echo "$lt_cv_path_NM" >&6; }
-if test "$lt_cv_path_NM" != "no"; then
-  NM="$lt_cv_path_NM"
+if test no != "$lt_cv_path_NM"; then
+  NM=$lt_cv_path_NM
 else
   # Didn't find any BSD compatible name lister, look for dumpbin.
   if test -n "$DUMPBIN"; then :
@@ -5364,9 +5517,9 @@ esac
   fi
 fi
 
-    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
     *COFF*)
-      DUMPBIN="$DUMPBIN -symbols"
+      DUMPBIN="$DUMPBIN -symbols -headers"
       ;;
     *)
       DUMPBIN=:
@@ -5374,8 +5527,8 @@ fi
     esac
   fi
 
-  if test "$DUMPBIN" != ":"; then
-    NM="$DUMPBIN"
+  if test : != "$DUMPBIN"; then
+    NM=$DUMPBIN
   fi
 fi
 test -z "$NM" && NM=nm
@@ -5415,7 +5568,7 @@ if ${lt_cv_sys_max_cmd_len+:} false; then :
   $as_echo_n "(cached) " >&6
 else
     i=0
-  teststring="ABCD"
+  teststring=ABCD
 
   case $build_os in
   msdosdjgpp*)
@@ -5455,7 +5608,7 @@ else
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
-  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
     # This has been around since 386BSD, at least.  Likely further.
     if test -x /sbin/sysctl; then
       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -5505,22 +5658,23 @@ else
     ;;
   *)
     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
-    if test -n "$lt_cv_sys_max_cmd_len"; then
+    if test -n "$lt_cv_sys_max_cmd_len" && \
+       test undefined != "$lt_cv_sys_max_cmd_len"; then
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
     else
       # Make teststring a little bigger before we do anything with it.
       # a 1K string should be a reasonable start.
-      for i in 1 2 3 4 5 6 7 8 ; do
+      for i in 1 2 3 4 5 6 7 8; do
         teststring=$teststring$teststring
       done
       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
       # If test is not a shell built-in, we'll probably end up computing a
       # maximum length that is only half of the actual maximum length, but
       # we can't tell.
-      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
+      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
                 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
-             test $i != 17 # 1/2 MB should be enough
+             test 17 != "$i" # 1/2 MB should be enough
       do
         i=`expr $i + 1`
         teststring=$teststring$teststring
@@ -5538,7 +5692,7 @@ else
 
 fi
 
-if test -n $lt_cv_sys_max_cmd_len ; then
+if test -n "$lt_cv_sys_max_cmd_len"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
 else
@@ -5556,30 +5710,6 @@ max_cmd_len=$lt_cv_sys_max_cmd_len
 : ${MV="mv -f"}
 : ${RM="rm -f"}
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
-$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
-  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
-      = c,a/b,b/c, \
-    && eval 'test $(( 1 + 1 )) -eq 2 \
-    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
-  && xsi_shell=yes
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
-$as_echo "$xsi_shell" >&6; }
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
-$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
-    >/dev/null 2>&1 \
-  && lt_shell_append=yes
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
-$as_echo "$lt_shell_append" >&6; }
-
-
 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
   lt_unset=unset
 else
@@ -5702,13 +5832,13 @@ esac
 reload_cmds='$LD$reload_flag -o $output$reload_objs'
 case $host_os in
   cygwin* | mingw* | pw32* | cegcc*)
-    if test "$GCC" != yes; then
+    if test yes != "$GCC"; then
       reload_cmds=false
     fi
     ;;
   darwin*)
-    if test "$GCC" = yes; then
-      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    if test yes = "$GCC"; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
     else
       reload_cmds='$LD$reload_flag -o $output$reload_objs'
     fi
@@ -5836,13 +5966,13 @@ lt_cv_deplibs_check_method='unknown'
 # Need to set the preceding variable on all platforms that support
 # interlibrary dependencies.
 # 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
+# 'unknown' -- same as none, but documents that we really don't know.
 # 'pass_all' -- all dependencies passed with no checks.
 # 'test_compile' -- check by making test program.
 # 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
+# that responds to the $file_magic_cmd with a given extended regex.
+# If you have 'file' or equivalent on your system and you're not sure
+# whether 'pass_all' will *always* work, you probably want this one.
 
 case $host_os in
 aix[4-9]*)
@@ -5869,8 +5999,7 @@ mingw* | pw32*)
   # Base MSYS/MinGW do not provide the 'file' command needed by
   # func_win32_libid shell function, so use a weaker test based on 'objdump',
   # unless we find 'file', for example because we are cross-compiling.
-  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
-  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
+  if ( file / ) >/dev/null 2>&1; then
     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
     lt_cv_file_magic_cmd='func_win32_libid'
   else
@@ -5906,10 +6035,6 @@ freebsd* | dragonfly*)
   fi
   ;;
 
-gnu*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
 haiku*)
   lt_cv_deplibs_check_method=pass_all
   ;;
@@ -5948,7 +6073,7 @@ irix5* | irix6* | nonstopux*)
   ;;
 
 # This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -5970,8 +6095,8 @@ newos6*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-openbsd*)
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+openbsd* | bitrig*)
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
   else
     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
@@ -6024,6 +6149,9 @@ sysv4 | sysv4.3*)
 tpf*)
   lt_cv_deplibs_check_method=pass_all
   ;;
+os2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 esac
 
 fi
@@ -6181,8 +6309,8 @@ else
 
 case $host_os in
 cygwin* | mingw* | pw32* | cegcc*)
-  # two different shell functions defined in ltmain.sh
-  # decide which to use based on capabilities of $DLLTOOL
+  # two different shell functions defined in ltmain.sh;
+  # decide which one to use based on capabilities of $DLLTOOL
   case `$DLLTOOL --help 2>&1` in
   *--identify-strict*)
     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
@@ -6194,7 +6322,7 @@ cygwin* | mingw* | pw32* | cegcc*)
   ;;
 *)
   # fallback: assume linklib IS sharedlib
-  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+  lt_cv_sharedlib_from_linklib_cmd=$ECHO
   ;;
 esac
 
@@ -6349,7 +6477,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
-      if test "$ac_status" -eq 0; then
+      if test 0 -eq "$ac_status"; then
        # Ensure the archiver fails upon bogus file names.
        rm -f conftest.$ac_objext libconftest.a
        { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
@@ -6357,7 +6485,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
-       if test "$ac_status" -ne 0; then
+       if test 0 -ne "$ac_status"; then
           lt_cv_ar_at_file=@
         fi
       fi
@@ -6370,7 +6498,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
 $as_echo "$lt_cv_ar_at_file" >&6; }
 
-if test "x$lt_cv_ar_at_file" = xno; then
+if test no = "$lt_cv_ar_at_file"; then
   archiver_list_spec=
 else
   archiver_list_spec=$lt_cv_ar_at_file
@@ -6587,7 +6715,7 @@ old_postuninstall_cmds=
 
 if test -n "$RANLIB"; then
   case $host_os in
-  openbsd*)
+  bitrig* | openbsd*)
     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
     ;;
   *)
@@ -6677,7 +6805,7 @@ cygwin* | mingw* | pw32* | cegcc*)
   symcode='[ABCDGISTW]'
   ;;
 hpux*)
-  if test "$host_cpu" = ia64; then
+  if test ia64 = "$host_cpu"; then
     symcode='[ABCDEGRST]'
   fi
   ;;
@@ -6710,14 +6838,44 @@ case `$NM -V 2>&1` in
   symcode='[ABCDGIRSTW]' ;;
 esac
 
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+  # Gets list of data symbols to import.
+  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+  # Adjust the below global symbol transforms to fixup imported variables.
+  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
+  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
+  lt_c_name_lib_hook="\
+  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
+  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
+else
+  # Disable hooks by default.
+  lt_cv_sys_global_symbol_to_import=
+  lt_cdecl_hook=
+  lt_c_name_hook=
+  lt_c_name_lib_hook=
+fi
+
 # Transform an extracted symbol line into a proper C declaration.
 # Some systems (esp. on ia64) link data and code symbols differently,
 # so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+$lt_cdecl_hook\
+" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
 
 # Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+$lt_c_name_hook\
+" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
+
+# Transform an extracted symbol line into symbol name with lib prefix and
+# symbol address.
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+$lt_c_name_lib_hook\
+" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
 
 # Handle CRLF in mingw tool chain
 opt_cr=
@@ -6735,21 +6893,24 @@ for ac_symprfx in "" "_"; do
 
   # Write the raw and C identifiers.
   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
-    # Fake it for dumpbin and say T for any non-static function
-    # and D for any global variable.
+    # Fake it for dumpbin and say T for any non-static function,
+    # D for any global variable and I for any imported variable.
     # Also find C++ and __fastcall symbols from MSVC++,
     # which start with @ or ?.
     lt_cv_sys_global_symbol_pipe="$AWK '"\
 "     {last_section=section; section=\$ 3};"\
 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
+"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
+"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
 "     \$ 0!~/External *\|/{next};"\
 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
 "     {if(hide[section]) next};"\
-"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
-"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
+"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
+"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
+"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
 "     ' prfx=^$ac_symprfx"
   else
     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[     ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
@@ -6797,11 +6958,11 @@ _LT_EOF
        if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
          cat <<_LT_EOF > conftest.$ac_ext
 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
-/* DATA imports from DLLs on WIN32 con't be const, because runtime
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
    relocations are performed -- see ld's documentation on pseudo-relocs.  */
 # define LT_DLSYM_CONST
-#elif defined(__osf__)
+#elif defined __osf__
 /* This system does not cope well with relocations in const data.  */
 # define LT_DLSYM_CONST
 #else
@@ -6827,7 +6988,7 @@ lt__PROGRAM__LTX_preloaded_symbols[] =
 {
   { "@PROGRAM@", (void *) 0 },
 _LT_EOF
-         $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+         $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
          cat <<\_LT_EOF >> conftest.$ac_ext
   {0, (void *) 0}
 };
@@ -6847,13 +7008,13 @@ _LT_EOF
          mv conftest.$ac_objext conftstm.$ac_objext
          lt_globsym_save_LIBS=$LIBS
          lt_globsym_save_CFLAGS=$CFLAGS
-         LIBS="conftstm.$ac_objext"
+         LIBS=conftstm.$ac_objext
          CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
          if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
   (eval $ac_link) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest${ac_exeext}; then
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
            pipe_works=yes
          fi
          LIBS=$lt_globsym_save_LIBS
@@ -6874,7 +7035,7 @@ _LT_EOF
   rm -rf conftest* conftst*
 
   # Do not use the global_symbol_pipe unless it works.
-  if test "$pipe_works" = yes; then
+  if test yes = "$pipe_works"; then
     break
   else
     lt_cv_sys_global_symbol_pipe=
@@ -6927,6 +7088,16 @@ fi
 
 
 
+
+
+
+
+
+
+
+
+
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
 $as_echo_n "checking for sysroot... " >&6; }
 
@@ -6939,9 +7110,9 @@ fi
 
 
 lt_sysroot=
-case ${with_sysroot} in #(
+case $with_sysroot in #(
  yes)
-   if test "$GCC" = yes; then
+   if test yes = "$GCC"; then
      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
    fi
    ;; #(
@@ -6951,8 +7122,8 @@ case ${with_sysroot} in #(
  no|'')
    ;; #(
  *)
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
-$as_echo "${with_sysroot}" >&6; }
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
+$as_echo "$with_sysroot" >&6; }
    as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
    ;;
 esac
@@ -6964,18 +7135,99 @@ $as_echo "${lt_sysroot:-no}" >&6; }
 
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
+$as_echo_n "checking for a working dd... " >&6; }
+if ${ac_cv_path_lt_DD+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+: ${lt_DD:=$DD}
+if test -z "$lt_DD"; then
+  ac_path_lt_DD_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in dd; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_lt_DD" || continue
+if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+  cmp -s conftest.i conftest.out \
+  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
+fi
+      $ac_path_lt_DD_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_lt_DD"; then
+    :
+  fi
+else
+  ac_cv_path_lt_DD=$lt_DD
+fi
+
+rm -f conftest.i conftest2.i conftest.out
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
+$as_echo "$ac_cv_path_lt_DD" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
+$as_echo_n "checking how to truncate binary pipes... " >&6; }
+if ${lt_cv_truncate_bin+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+lt_cv_truncate_bin=
+if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+  cmp -s conftest.i conftest.out \
+  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
+fi
+rm -f conftest.i conftest2.i conftest.out
+test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
+$as_echo "$lt_cv_truncate_bin" >&6; }
+
+
+
+
+
+
+
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+    for cc_temp in $*""; do
+      case $cc_temp in
+        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+        \-*) ;;
+        *) break;;
+      esac
+    done
+    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+
 # Check whether --enable-libtool-lock was given.
 if test "${enable_libtool_lock+set}" = set; then :
   enableval=$enable_libtool_lock;
 fi
 
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+test no = "$enable_libtool_lock" || enable_libtool_lock=yes
 
 # Some flags need to be propagated to the compiler or linker for good
 # libtool support.
 case $host in
 ia64-*-hpux*)
-  # Find out which ABI we are using.
+  # Find out what ABI is being produced by ac_compile, and set mode
+  # options accordingly.
   echo 'int i;' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
@@ -6984,24 +7236,25 @@ ia64-*-hpux*)
   test $ac_status = 0; }; then
     case `/usr/bin/file conftest.$ac_objext` in
       *ELF-32*)
-       HPUX_IA64_MODE="32"
+       HPUX_IA64_MODE=32
        ;;
       *ELF-64*)
-       HPUX_IA64_MODE="64"
+       HPUX_IA64_MODE=64
        ;;
     esac
   fi
   rm -rf conftest*
   ;;
 *-*-irix6*)
-  # Find out which ABI we are using.
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.
   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-    if test "$lt_cv_prog_gnu_ld" = yes; then
+    if test yes = "$lt_cv_prog_gnu_ld"; then
       case `/usr/bin/file conftest.$ac_objext` in
        *32-bit*)
          LD="${LD-ld} -melf32bsmip"
@@ -7030,9 +7283,50 @@ ia64-*-hpux*)
   rm -rf conftest*
   ;;
 
+mips64*-*linux*)
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.
+  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    emul=elf
+    case `/usr/bin/file conftest.$ac_objext` in
+      *32-bit*)
+       emul="${emul}32"
+       ;;
+      *64-bit*)
+       emul="${emul}64"
+       ;;
+    esac
+    case `/usr/bin/file conftest.$ac_objext` in
+      *MSB*)
+       emul="${emul}btsmip"
+       ;;
+      *LSB*)
+       emul="${emul}ltsmip"
+       ;;
+    esac
+    case `/usr/bin/file conftest.$ac_objext` in
+      *N32*)
+       emul="${emul}n32"
+       ;;
+    esac
+    LD="${LD-ld} -m $emul"
+  fi
+  rm -rf conftest*
+  ;;
+
 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
-  # Find out which ABI we are using.
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.  Note that the listed cases only cover the
+  # situations where additional linker options are needed (such as when
+  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
+  # vice versa); the common cases where no linker options are needed do
+  # not appear in the list.
   echo 'int i;' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
@@ -7046,7 +7340,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
            LD="${LD-ld} -m elf_i386_fbsd"
            ;;
          x86_64-*linux*)
-           LD="${LD-ld} -m elf_i386"
+           case `/usr/bin/file conftest.o` in
+             *x86-64*)
+               LD="${LD-ld} -m elf32_x86_64"
+               ;;
+             *)
+               LD="${LD-ld} -m elf_i386"
+               ;;
+           esac
            ;;
          powerpc64le-*linux*)
            LD="${LD-ld} -m elf32lppclinux"
@@ -7091,7 +7392,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 
 *-*-sco3.2v5*)
   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  SAVE_CFLAGS="$CFLAGS"
+  SAVE_CFLAGS=$CFLAGS
   CFLAGS="$CFLAGS -belf"
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
@@ -7131,13 +7432,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
 $as_echo "$lt_cv_cc_needs_belf" >&6; }
-  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+  if test yes != "$lt_cv_cc_needs_belf"; then
     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS="$SAVE_CFLAGS"
+    CFLAGS=$SAVE_CFLAGS
   fi
   ;;
 *-*solaris*)
-  # Find out which ABI we are using.
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.
   echo 'int i;' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
@@ -7149,7 +7451,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
       case $lt_cv_prog_gnu_ld in
       yes*)
         case $host in
-        i?86-*-solaris*)
+        i?86-*-solaris*|x86_64-*-solaris*)
           LD="${LD-ld} -m elf_x86_64"
           ;;
         sparc*-*-solaris*)
@@ -7158,7 +7460,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
         esac
         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
-          LD="${LD-ld}_sol2"
+          LD=${LD-ld}_sol2
         fi
         ;;
       *)
@@ -7174,7 +7476,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
   ;;
 esac
 
-need_locks="$enable_libtool_lock"
+need_locks=$enable_libtool_lock
 
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
@@ -7285,7 +7587,7 @@ else
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
-if test "x$lt_cv_path_mainfest_tool" != xyes; then
+if test yes != "$lt_cv_path_mainfest_tool"; then
   MANIFEST_TOOL=:
 fi
 
@@ -7788,7 +8090,7 @@ if ${lt_cv_apple_cc_single_mod+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_apple_cc_single_mod=no
-      if test -z "${LT_MULTI_MODULE}"; then
+      if test -z "$LT_MULTI_MODULE"; then
        # By default we will add the -single_module flag. You can override
        # by either setting the environment variable LT_MULTI_MODULE
        # non-empty at configure time, or by adding -multi_module to the
@@ -7806,7 +8108,7 @@ else
          cat conftest.err >&5
        # Otherwise, if the output was created with a 0 exit code from
        # the compiler, it worked.
-       elif test -f libconftest.dylib && test $_lt_result -eq 0; then
+       elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
          lt_cv_apple_cc_single_mod=yes
        else
          cat conftest.err >&5
@@ -7845,7 +8147,7 @@ else
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-       LDFLAGS="$save_LDFLAGS"
+       LDFLAGS=$save_LDFLAGS
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
@@ -7874,7 +8176,7 @@ _LT_EOF
       _lt_result=$?
       if test -s conftest.err && $GREP force_load conftest.err; then
        cat conftest.err >&5
-      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
+      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
        lt_cv_ld_force_load=yes
       else
        cat conftest.err >&5
@@ -7887,32 +8189,32 @@ fi
 $as_echo "$lt_cv_ld_force_load" >&6; }
     case $host_os in
     rhapsody* | darwin1.[012])
-      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
     darwin1.*)
-      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
     darwin*) # darwin 5.x on
       # if running on 10.5 or later, the deployment target defaults
       # to the OS version, if on x86, and 10.4, the deployment
       # target defaults to 10.4. Don't you love it?
       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
        10.0,*86*-darwin8*|10.0,*-darwin[91]*)
-         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-       10.[012]*)
-         _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+         _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+       10.[012][,.]*)
+         _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
        10.*)
-         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+         _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
       esac
     ;;
   esac
-    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+    if test yes = "$lt_cv_apple_cc_single_mod"; then
       _lt_dar_single_mod='$single_module'
     fi
-    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
-      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+    if test yes = "$lt_cv_ld_exported_symbols_list"; then
+      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
     else
-      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
     fi
-    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
+    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
       _lt_dsymutil='~$DSYMUTIL $lib || :'
     else
       _lt_dsymutil=
@@ -7920,6 +8222,41 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
     ;;
   esac
 
+# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+#       string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+#       string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+#       "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+#       VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+    case x$2 in
+    x)
+        ;;
+    *:)
+        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
+        ;;
+    x:*)
+        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
+        ;;
+    *::*)
+        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
+        ;;
+    *)
+        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
+        ;;
+    esac
+}
+
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
 $as_echo_n "checking for ANSI C header files... " >&6; }
@@ -8086,14 +8423,14 @@ if test "${enable_shared+set}" = set; then :
     *)
       enable_shared=no
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
       for pkg in $enableval; do
-       IFS="$lt_save_ifs"
+       IFS=$lt_save_ifs
        if test "X$pkg" = "X$p"; then
          enable_shared=yes
        fi
       done
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       ;;
     esac
 else
@@ -8117,14 +8454,14 @@ if test "${enable_static+set}" = set; then :
     *)
      enable_static=no
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
       for pkg in $enableval; do
-       IFS="$lt_save_ifs"
+       IFS=$lt_save_ifs
        if test "X$pkg" = "X$p"; then
          enable_static=yes
        fi
       done
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       ;;
     esac
 else
@@ -8148,14 +8485,14 @@ if test "${with_pic+set}" = set; then :
     *)
       pic_mode=default
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
       for lt_pkg in $withval; do
-       IFS="$lt_save_ifs"
+       IFS=$lt_save_ifs
        if test "X$lt_pkg" = "X$lt_p"; then
          pic_mode=yes
        fi
       done
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       ;;
     esac
 else
@@ -8163,8 +8500,6 @@ else
 fi
 
 
-test -z "$pic_mode" && pic_mode=default
-
 
 
 
@@ -8180,14 +8515,14 @@ if test "${enable_fast_install+set}" = set; then :
     *)
       enable_fast_install=no
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
       for pkg in $enableval; do
-       IFS="$lt_save_ifs"
+       IFS=$lt_save_ifs
        if test "X$pkg" = "X$p"; then
          enable_fast_install=yes
        fi
       done
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       ;;
     esac
 else
@@ -8201,11 +8536,63 @@ fi
 
 
 
+  shared_archive_member_spec=
+case $host,$enable_shared in
+power*-*-aix[5-9]*,yes)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
+$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
+
+# Check whether --with-aix-soname was given.
+if test "${with_aix_soname+set}" = set; then :
+  withval=$with_aix_soname; case $withval in
+    aix|svr4|both)
+      ;;
+    *)
+      as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
+      ;;
+    esac
+    lt_cv_with_aix_soname=$with_aix_soname
+else
+  if ${lt_cv_with_aix_soname+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_with_aix_soname=aix
+fi
+
+    with_aix_soname=$lt_cv_with_aix_soname
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
+$as_echo "$with_aix_soname" >&6; }
+  if test aix != "$with_aix_soname"; then
+    # For the AIX way of multilib, we name the shared archive member
+    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
+    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
+    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
+    # the AIX toolchain works better with OBJECT_MODE set (default 32).
+    if test 64 = "${OBJECT_MODE-32}"; then
+      shared_archive_member_spec=shr_64
+    else
+      shared_archive_member_spec=shr
+    fi
+  fi
+  ;;
+*)
+  with_aix_soname=aix
+  ;;
+esac
+
+
+
+
+
+
+
 
 
 
 # This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
+LIBTOOL_DEPS=$ltmain
 
 # Always use our own libtool.
 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
@@ -8254,7 +8641,7 @@ test -z "$LN_S" && LN_S="ln -s"
 
 
 
-if test -n "${ZSH_VERSION+set}" ; then
+if test -n "${ZSH_VERSION+set}"; then
    setopt NO_GLOB_SUBST
 fi
 
@@ -8293,7 +8680,7 @@ aix3*)
   # AIX sometimes has problems with the GCC collect2 program.  For some
   # reason, if we set the COLLECT_NAMES environment variable, the problems
   # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
+  if test set != "${COLLECT_NAMES+set}"; then
     COLLECT_NAMES=
     export COLLECT_NAMES
   fi
@@ -8304,14 +8691,14 @@ esac
 ofile=libtool
 can_build_shared=yes
 
-# All known linkers require a `.a' archive for static linking (except MSVC,
+# All known linkers require a '.a' archive for static linking (except MSVC,
 # which needs '.lib').
 libext=a
 
-with_gnu_ld="$lt_cv_prog_gnu_ld"
+with_gnu_ld=$lt_cv_prog_gnu_ld
 
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
+old_CC=$CC
+old_CFLAGS=$CFLAGS
 
 # Set sane defaults for various variables
 test -z "$CC" && CC=cc
@@ -8320,15 +8707,8 @@ test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
 test -z "$LD" && LD=ld
 test -z "$ac_objext" && ac_objext=o
 
-for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+func_cc_basename $compiler
+cc_basename=$func_cc_basename_result
 
 
 # Only perform the check for file, if the check method requires it
@@ -8343,22 +8723,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then :
 else
   case $MAGIC_CMD in
 [\\/*] |  ?:[\\/]*)
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
   ;;
 *)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  lt_save_MAGIC_CMD=$MAGIC_CMD
+  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
   for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
     test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/${ac_tool_prefix}file; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+    if test -f "$ac_dir/${ac_tool_prefix}file"; then
+      lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
       if test -n "$file_magic_test_file"; then
        case $deplibs_check_method in
        "file_magic "*)
          file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+         MAGIC_CMD=$lt_cv_path_MAGIC_CMD
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
            $EGREP "$file_magic_regex" > /dev/null; then
            :
@@ -8381,13 +8761,13 @@ _LT_EOF
       break
     fi
   done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  IFS=$lt_save_ifs
+  MAGIC_CMD=$lt_save_MAGIC_CMD
   ;;
 esac
 fi
 
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
 if test -n "$MAGIC_CMD"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
 $as_echo "$MAGIC_CMD" >&6; }
@@ -8409,22 +8789,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then :
 else
   case $MAGIC_CMD in
 [\\/*] |  ?:[\\/]*)
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
   ;;
 *)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  lt_save_MAGIC_CMD=$MAGIC_CMD
+  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
   for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
     test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/file; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/file"
+    if test -f "$ac_dir/file"; then
+      lt_cv_path_MAGIC_CMD=$ac_dir/"file"
       if test -n "$file_magic_test_file"; then
        case $deplibs_check_method in
        "file_magic "*)
          file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+         MAGIC_CMD=$lt_cv_path_MAGIC_CMD
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
            $EGREP "$file_magic_regex" > /dev/null; then
            :
@@ -8447,13 +8827,13 @@ _LT_EOF
       break
     fi
   done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  IFS=$lt_save_ifs
+  MAGIC_CMD=$lt_save_MAGIC_CMD
   ;;
 esac
 fi
 
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
 if test -n "$MAGIC_CMD"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
 $as_echo "$MAGIC_CMD" >&6; }
@@ -8474,7 +8854,7 @@ esac
 
 # Use C for the default configuration in the libtool script
 
-lt_save_CC="$CC"
+lt_save_CC=$CC
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -8536,7 +8916,7 @@ if test -n "$compiler"; then
 
 lt_prog_compiler_no_builtin_flag=
 
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   case $cc_basename in
   nvcc*)
     lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
@@ -8552,7 +8932,7 @@ else
   lt_cv_prog_compiler_rtti_exceptions=no
    ac_outfile=conftest.$ac_objext
    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="-fno-rtti -fno-exceptions"
+   lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
    # Insert the option either (1) after the last *FLAGS variable, or
    # (2) before a word containing "conftest.", or (3) at the end.
    # Note that $ac_compile itself does not contain backslashes and begins
@@ -8582,7 +8962,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
 
-if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
 else
     :
@@ -8600,17 +8980,18 @@ lt_prog_compiler_pic=
 lt_prog_compiler_static=
 
 
-  if test "$GCC" = yes; then
+  if test yes = "$GCC"; then
     lt_prog_compiler_wl='-Wl,'
     lt_prog_compiler_static='-static'
 
     case $host_os in
       aix*)
       # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
        # AIX 5 now supports IA64 processor
        lt_prog_compiler_static='-Bstatic'
       fi
+      lt_prog_compiler_pic='-fPIC'
       ;;
 
     amigaos*)
@@ -8621,8 +9002,8 @@ lt_prog_compiler_static=
         ;;
       m68k)
             # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
+            # adding the '-m68020' flag to GCC prevents building anything better,
+            # like '-m68040'.
             lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
         ;;
       esac
@@ -8638,6 +9019,11 @@ lt_prog_compiler_static=
       # Although the cygwin gcc ignores -fPIC, still need this for old-style
       # (--disable-auto-import) libraries
       lt_prog_compiler_pic='-DDLL_EXPORT'
+      case $host_os in
+      os2*)
+       lt_prog_compiler_static='$wl-static'
+       ;;
+      esac
       ;;
 
     darwin* | rhapsody*)
@@ -8708,7 +9094,7 @@ lt_prog_compiler_static=
     case $host_os in
     aix*)
       lt_prog_compiler_wl='-Wl,'
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
        # AIX 5 now supports IA64 processor
        lt_prog_compiler_static='-Bstatic'
       else
@@ -8716,10 +9102,29 @@ lt_prog_compiler_static=
       fi
       ;;
 
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic='-fno-common'
+      case $cc_basename in
+      nagfor*)
+        # NAG Fortran compiler
+        lt_prog_compiler_wl='-Wl,-Wl,,'
+        lt_prog_compiler_pic='-PIC'
+        lt_prog_compiler_static='-Bstatic'
+        ;;
+      esac
+      ;;
+
     mingw* | cygwin* | pw32* | os2* | cegcc*)
       # This hack is so that the source file can tell whether it is being
       # built for inclusion in a dll (and should export symbols for example).
       lt_prog_compiler_pic='-DDLL_EXPORT'
+      case $host_os in
+      os2*)
+       lt_prog_compiler_static='$wl-static'
+       ;;
+      esac
       ;;
 
     hpux9* | hpux10* | hpux11*)
@@ -8735,7 +9140,7 @@ lt_prog_compiler_static=
        ;;
       esac
       # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      lt_prog_compiler_static='${wl}-a ${wl}archive'
+      lt_prog_compiler_static='$wl-a ${wl}archive'
       ;;
 
     irix5* | irix6* | nonstopux*)
@@ -8744,9 +9149,9 @@ lt_prog_compiler_static=
       lt_prog_compiler_static='-non_shared'
       ;;
 
-    linux* | k*bsd*-gnu | kopensolaris*-gnu)
+    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
       case $cc_basename in
-      # old Intel for x86_64 which still supported -KPIC.
+      # old Intel for x86_64, which still supported -KPIC.
       ecc*)
        lt_prog_compiler_wl='-Wl,'
        lt_prog_compiler_pic='-KPIC'
@@ -8771,6 +9176,12 @@ lt_prog_compiler_static=
        lt_prog_compiler_pic='-PIC'
        lt_prog_compiler_static='-Bstatic'
        ;;
+      tcc*)
+       # Fabrice Bellard et al's Tiny C Compiler
+       lt_prog_compiler_wl='-Wl,'
+       lt_prog_compiler_pic='-fPIC'
+       lt_prog_compiler_static='-static'
+       ;;
       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
         # Portland Group compilers (*not* the Pentium gcc compiler,
        # which looks to be a dead project)
@@ -8868,7 +9279,7 @@ lt_prog_compiler_static=
       ;;
 
     sysv4*MP*)
-      if test -d /usr/nec ;then
+      if test -d /usr/necthen
        lt_prog_compiler_pic='-Kconform_pic'
        lt_prog_compiler_static='-Bstatic'
       fi
@@ -8897,7 +9308,7 @@ lt_prog_compiler_static=
   fi
 
 case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
+  # For platforms that do not support PIC, -DPIC is meaningless:
   *djgpp*)
     lt_prog_compiler_pic=
     ;;
@@ -8929,7 +9340,7 @@ else
   lt_cv_prog_compiler_pic_works=no
    ac_outfile=conftest.$ac_objext
    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
    # Insert the option either (1) after the last *FLAGS variable, or
    # (2) before a word containing "conftest.", or (3) at the end.
    # Note that $ac_compile itself does not contain backslashes and begins
@@ -8959,7 +9370,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
 
-if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+if test yes = "$lt_cv_prog_compiler_pic_works"; then
     case $lt_prog_compiler_pic in
      "" | " "*) ;;
      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
@@ -8991,7 +9402,7 @@ if ${lt_cv_prog_compiler_static_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_static_works=no
-   save_LDFLAGS="$LDFLAGS"
+   save_LDFLAGS=$LDFLAGS
    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
    echo "$lt_simple_link_test_code" > conftest.$ac_ext
    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -9010,13 +9421,13 @@ else
      fi
    fi
    $RM -r conftest*
-   LDFLAGS="$save_LDFLAGS"
+   LDFLAGS=$save_LDFLAGS
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
 
-if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+if test yes = "$lt_cv_prog_compiler_static_works"; then
     :
 else
     lt_prog_compiler_static=
@@ -9136,8 +9547,8 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
 
 
 
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+hard_links=nottested
+if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
   # do not overwrite the value of need_locks provided by the user
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
 $as_echo_n "checking if we can lock with hard links... " >&6; }
@@ -9149,9 +9560,9 @@ $as_echo_n "checking if we can lock with hard links... " >&6; }
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
 $as_echo "$hard_links" >&6; }
-  if test "$hard_links" = no; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+  if test no = "$hard_links"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
     need_locks=warn
   fi
 else
@@ -9194,9 +9605,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
   # included in the symbol list
   include_expsyms=
   # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
+  # it will be wrapped by ' (' and ')$', so one must not match beginning or
+  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
+  # as well as any symbol that contains 'd'.
   exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
   # platforms (ab)use it in PIC code, but their linkers get confused if
@@ -9211,7 +9622,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     # FIXME: the MSVC++ port hasn't been tested in a loooong time
     # When not using gcc, we currently assume that we are using
     # Microsoft Visual C++.
-    if test "$GCC" != yes; then
+    if test yes != "$GCC"; then
       with_gnu_ld=no
     fi
     ;;
@@ -9219,7 +9630,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     # we just hope/assume this is gcc and not c89 (= MSVC++)
     with_gnu_ld=yes
     ;;
-  openbsd*)
+  openbsd* | bitrig*)
     with_gnu_ld=no
     ;;
   esac
@@ -9229,7 +9640,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
   # On some targets, GNU ld is compatible enough with the native linker
   # that we're better off using the native interface for both.
   lt_use_gnu_ld_interface=no
-  if test "$with_gnu_ld" = yes; then
+  if test yes = "$with_gnu_ld"; then
     case $host_os in
       aix*)
        # The AIX port of GNU ld has always aspired to compatibility
@@ -9251,24 +9662,24 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     esac
   fi
 
-  if test "$lt_use_gnu_ld_interface" = yes; then
+  if test yes = "$lt_use_gnu_ld_interface"; then
     # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
+    wlarc='$wl'
 
     # Set some defaults for GNU ld with shared library support. These
     # are reset later if shared libraries are not supported. Putting them
     # here allows them to be overridden if necessary.
     runpath_var=LD_RUN_PATH
-    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-    export_dynamic_flag_spec='${wl}--export-dynamic'
+    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+    export_dynamic_flag_spec='$wl--export-dynamic'
     # ancient GNU ld didn't support --whole-archive et. al.
     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
-      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
     else
       whole_archive_flag_spec=
     fi
     supports_anon_versioning=no
-    case `$LD -v 2>&1` in
+    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
       *GNU\ gold*) supports_anon_versioning=yes ;;
       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
@@ -9281,7 +9692,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     case $host_os in
     aix[3-9]*)
       # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
+      if test ia64 != "$host_cpu"; then
        ld_shlibs=no
        cat <<_LT_EOF 1>&2
 
@@ -9300,7 +9711,7 @@ _LT_EOF
       case $host_cpu in
       powerpc)
             # see comment about AmigaOS4 .so support
-            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
             archive_expsym_cmds=''
         ;;
       m68k)
@@ -9316,7 +9727,7 @@ _LT_EOF
        allow_undefined_flag=unsupported
        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
        # support --undefined.  This deserves some investigation.  FIXME
-       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
       else
        ld_shlibs=no
       fi
@@ -9326,7 +9737,7 @@ _LT_EOF
       # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
       # as there is no search path for DLLs.
       hardcode_libdir_flag_spec='-L$libdir'
-      export_dynamic_flag_spec='${wl}--export-all-symbols'
+      export_dynamic_flag_spec='$wl--export-all-symbols'
       allow_undefined_flag=unsupported
       always_export_symbols=no
       enable_shared_with_static_runtimes=yes
@@ -9334,61 +9745,89 @@ _LT_EOF
       exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
 
       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-       # If the export-symbols file already is a .def file (1st line
-       # is EXPORTS), use it as is; otherwise, prepend...
-       archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-         cp $export_symbols $output_objdir/$soname.def;
-       else
-         echo EXPORTS > $output_objdir/$soname.def;
-         cat $export_symbols >> $output_objdir/$soname.def;
-       fi~
-       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+       # If the export-symbols file already is a .def file, use it as
+       # is; otherwise, prepend EXPORTS...
+       archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[   ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([     ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
+          cp $export_symbols $output_objdir/$soname.def;
+        else
+          echo EXPORTS > $output_objdir/$soname.def;
+          cat $export_symbols >> $output_objdir/$soname.def;
+        fi~
+        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
       else
        ld_shlibs=no
       fi
       ;;
 
     haiku*)
-      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
       link_all_deplibs=yes
       ;;
 
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      allow_undefined_flag=unsupported
+      shrext_cmds=.dll
+      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+       $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+       $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+       $ECHO EXPORTS >> $output_objdir/$libname.def~
+       emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+       $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+       emximp -o $lib $output_objdir/$libname.def'
+      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+       $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+       $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+       $ECHO EXPORTS >> $output_objdir/$libname.def~
+       prefix_cmds="$SED"~
+       if test EXPORTS = "`$SED 1q $export_symbols`"; then
+         prefix_cmds="$prefix_cmds -e 1d";
+       fi~
+       prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+       cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+       $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+       emximp -o $lib $output_objdir/$libname.def'
+      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+      enable_shared_with_static_runtimes=yes
+      ;;
+
     interix[3-9]*)
       hardcode_direct=no
       hardcode_shlibpath_var=no
-      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-      export_dynamic_flag_spec='${wl}-E'
+      hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+      export_dynamic_flag_spec='$wl-E'
       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
       # Instead, shared libraries are loaded at an image base (0x10000000 by
       # default) and relocated if they conflict, which is a slow very memory
       # consuming and fragmenting process.  To avoid this, we pick a random,
       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
       ;;
 
     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
       tmp_diet=no
-      if test "$host_os" = linux-dietlibc; then
+      if test linux-dietlibc = "$host_os"; then
        case $cc_basename in
          diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
        esac
       fi
       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
-        && test "$tmp_diet" = no
+        && test no = "$tmp_diet"
       then
        tmp_addflag=' $pic_flag'
        tmp_sharedflag='-shared'
        case $cc_basename,$host_cpu in
         pgcc*)                         # Portland Group C compiler
-         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+         whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
          tmp_addflag=' $pic_flag'
          ;;
        pgf77* | pgf90* | pgf95* | pgfortran*)
                                        # Portland Group f77 and f90 compilers
-         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+         whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
          tmp_addflag=' $pic_flag -Mnomain' ;;
        ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
          tmp_addflag=' -i_dynamic' ;;
@@ -9399,42 +9838,47 @@ _LT_EOF
        lf95*)                          # Lahey Fortran 8.1
          whole_archive_flag_spec=
          tmp_sharedflag='--shared' ;;
+        nagfor*)                        # NAGFOR 5.3
+          tmp_sharedflag='-Wl,-shared' ;;
        xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
          tmp_sharedflag='-qmkshrobj'
          tmp_addflag= ;;
        nvcc*)  # Cuda Compiler Driver 2.2
-         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+         whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
          compiler_needs_object=yes
          ;;
        esac
        case `$CC -V 2>&1 | sed 5q` in
        *Sun\ C*)                       # Sun C 5.9
-         whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+         whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
          compiler_needs_object=yes
          tmp_sharedflag='-G' ;;
        *Sun\ F*)                       # Sun Fortran 8.3
          tmp_sharedflag='-G' ;;
        esac
-       archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
 
-        if test "x$supports_anon_versioning" = xyes; then
+        if test yes = "$supports_anon_versioning"; then
           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
-           cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-           echo "local: *; };" >> $output_objdir/$libname.ver~
-           $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+            echo "local: *; };" >> $output_objdir/$libname.ver~
+            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
         fi
 
        case $cc_basename in
+       tcc*)
+         export_dynamic_flag_spec='-rdynamic'
+         ;;
        xlf* | bgf* | bgxlf* | mpixlf*)
          # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
          whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
-         hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+         hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
          archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
-         if test "x$supports_anon_versioning" = xyes; then
+         if test yes = "$supports_anon_versioning"; then
            archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
-             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-             echo "local: *; };" >> $output_objdir/$libname.ver~
-             $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+              echo "local: *; };" >> $output_objdir/$libname.ver~
+              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
          fi
          ;;
        esac
@@ -9448,8 +9892,8 @@ _LT_EOF
        archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
        wlarc=
       else
-       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+       archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       fi
       ;;
 
@@ -9467,8 +9911,8 @@ _LT_EOF
 
 _LT_EOF
       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+       archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       else
        ld_shlibs=no
       fi
@@ -9480,7 +9924,7 @@ _LT_EOF
        ld_shlibs=no
        cat <<_LT_EOF 1>&2
 
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
 *** reliably create shared libraries on SCO systems.  Therefore, libtool
 *** is disabling shared libraries support.  We urge you to upgrade GNU
 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
@@ -9495,9 +9939,9 @@ _LT_EOF
          # DT_RUNPATH tag from executables and libraries.  But doing so
          # requires that you compile everything twice, which is a pain.
          if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-           hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-           archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-           archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+           hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+           archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+           archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
          else
            ld_shlibs=no
          fi
@@ -9514,15 +9958,15 @@ _LT_EOF
 
     *)
       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+       archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       else
        ld_shlibs=no
       fi
       ;;
     esac
 
-    if test "$ld_shlibs" = no; then
+    if test no = "$ld_shlibs"; then
       runpath_var=
       hardcode_libdir_flag_spec=
       export_dynamic_flag_spec=
@@ -9538,7 +9982,7 @@ _LT_EOF
       # Note: this linker hardcodes the directories in LIBPATH if there
       # are no directories specified by -L.
       hardcode_minus_L=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
        # Neither direct hardcoding nor static linking is supported with a
        # broken collect2.
        hardcode_direct=unsupported
@@ -9546,34 +9990,57 @@ _LT_EOF
       ;;
 
     aix[4-9]*)
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
        # On IA64, the linker does run time linking by default, so we don't
        # have to do anything special.
        aix_use_runtimelinking=no
        exp_sym_flag='-Bexport'
-       no_entry_flag=""
+       no_entry_flag=
       else
        # If we're using GNU nm, then we don't want the "-C" option.
-       # -C means demangle to AIX nm, but means don't demangle with GNU nm
-       # Also, AIX nm treats weak defined symbols like other global
-       # defined symbols, whereas GNU nm marks them as "W".
+       # -C means demangle to GNU nm, but means don't demangle to AIX nm.
+       # Without the "-l" option, or with the "-B" option, AIX nm treats
+       # weak defined symbols like other global defined symbols, whereas
+       # GNU nm marks them as "W".
+       # While the 'weak' keyword is ignored in the Export File, we need
+       # it in the Import File for the 'aix-soname' feature, so we have
+       # to replace the "-B" option with "-P" for AIX nm.
        if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-         export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+         export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
        else
-         export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+         export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
        fi
        aix_use_runtimelinking=no
 
        # Test if we are trying to use run time linking or normal
        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-       # need to do runtime linking.
+       # have runtime linking enabled, and use it for executables.
+       # For shared libraries, we enable/disable runtime linking
+       # depending on the kind of the shared library created -
+       # when "with_aix_soname,aix_use_runtimelinking" is:
+       # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
+       # "aix,yes"  lib.so          shared, rtl:yes, for executables
+       #            lib.a           static archive
+       # "both,no"  lib.so.V(shr.o) shared, rtl:yes
+       #            lib.a(lib.so.V) shared, rtl:no,  for executables
+       # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+       #            lib.a(lib.so.V) shared, rtl:no
+       # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
+       #            lib.a           static archive
        case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
          for ld_flag in $LDFLAGS; do
-         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+         if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
            aix_use_runtimelinking=yes
            break
          fi
          done
+         if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+           # With aix-soname=svr4, we create the lib.so.V shared archives only,
+           # so we don't have lib.a shared libs to link our executables.
+           # We have to force runtime linking in this case.
+           aix_use_runtimelinking=yes
+           LDFLAGS="$LDFLAGS -Wl,-brtl"
+         fi
          ;;
        esac
 
@@ -9592,13 +10059,21 @@ _LT_EOF
       hardcode_direct_absolute=yes
       hardcode_libdir_separator=':'
       link_all_deplibs=yes
-      file_list_spec='${wl}-f,'
+      file_list_spec='$wl-f,'
+      case $with_aix_soname,$aix_use_runtimelinking in
+      aix,*) ;; # traditional, no import file
+      svr4,* | *,yes) # use import file
+       # The Import File defines what to hardcode.
+       hardcode_direct=no
+       hardcode_direct_absolute=no
+       ;;
+      esac
 
-      if test "$GCC" = yes; then
+      if test yes = "$GCC"; then
        case $host_os in aix4.[012]|aix4.[012].*)
        # We only want to do this on AIX 4.2 and lower, the check
        # below for broken collect2 doesn't work under 4.3+
-         collect2name=`${CC} -print-prog-name=collect2`
+         collect2name=`$CC -print-prog-name=collect2`
          if test -f "$collect2name" &&
           strings "$collect2name" | $GREP resolve_lib_name >/dev/null
          then
@@ -9617,35 +10092,42 @@ _LT_EOF
          ;;
        esac
        shared_flag='-shared'
-       if test "$aix_use_runtimelinking" = yes; then
-         shared_flag="$shared_flag "'${wl}-G'
+       if test yes = "$aix_use_runtimelinking"; then
+         shared_flag="$shared_flag "'$wl-G'
        fi
+       # Need to ensure runtime linking is disabled for the traditional
+       # shared library, or the linker may eventually find shared libraries
+       # /with/ Import File - we do not want to mix them.
+       shared_flag_aix='-shared'
+       shared_flag_svr4='-shared $wl-G'
       else
        # not using gcc
-       if test "$host_cpu" = ia64; then
+       if test ia64 = "$host_cpu"; then
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
        # chokes on -Wl,-G. The following line is correct:
          shared_flag='-G'
        else
-         if test "$aix_use_runtimelinking" = yes; then
-           shared_flag='${wl}-G'
+         if test yes = "$aix_use_runtimelinking"; then
+           shared_flag='$wl-G'
          else
-           shared_flag='${wl}-bM:SRE'
+           shared_flag='$wl-bM:SRE'
          fi
+         shared_flag_aix='$wl-bM:SRE'
+         shared_flag_svr4='$wl-G'
        fi
       fi
 
-      export_dynamic_flag_spec='${wl}-bexpall'
+      export_dynamic_flag_spec='$wl-bexpall'
       # It seems that -bexpall does not export symbols beginning with
       # underscore (_), so it is better to generate a list of symbols to export.
       always_export_symbols=yes
-      if test "$aix_use_runtimelinking" = yes; then
+      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
        # Warning - without using the other runtime loading flags (-brtl),
        # -berok will link without error, but may produce a broken library.
        allow_undefined_flag='-berok'
         # Determine the default libpath from the value encoded in an
         # empty executable.
-        if test "${lt_cv_aix_libpath+set}" = set; then
+        if test set = "${lt_cv_aix_libpath+set}"; then
   aix_libpath=$lt_cv_aix_libpath
 else
   if ${lt_cv_aix_libpath_+:} false; then :
@@ -9680,7 +10162,7 @@ fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
   if test -z "$lt_cv_aix_libpath_"; then
-    lt_cv_aix_libpath_="/usr/lib:/lib"
+    lt_cv_aix_libpath_=/usr/lib:/lib
   fi
 
 fi
   aix_libpath=$lt_cv_aix_libpath_
 fi
 
-        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
+        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
       else
-       if test "$host_cpu" = ia64; then
-         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+       if test ia64 = "$host_cpu"; then
+         hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
          allow_undefined_flag="-z nodefs"
-         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
        else
         # Determine the default libpath from the value encoded in an
         # empty executable.
-        if test "${lt_cv_aix_libpath+set}" = set; then
+        if test set = "${lt_cv_aix_libpath+set}"; then
   aix_libpath=$lt_cv_aix_libpath
 else
   if ${lt_cv_aix_libpath_+:} false; then :
@@ -9733,7 +10215,7 @@ fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
   if test -z "$lt_cv_aix_libpath_"; then
-    lt_cv_aix_libpath_="/usr/lib:/lib"
+    lt_cv_aix_libpath_=/usr/lib:/lib
   fi
 
 fi
   aix_libpath=$lt_cv_aix_libpath_
 fi
 
-        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
          # Warning - without using the other run time loading flags,
          # -berok will link without error, but may produce a broken library.
-         no_undefined_flag=' ${wl}-bernotok'
-         allow_undefined_flag=' ${wl}-berok'
-         if test "$with_gnu_ld" = yes; then
+         no_undefined_flag=' $wl-bernotok'
+         allow_undefined_flag=' $wl-berok'
+         if test yes = "$with_gnu_ld"; then
            # We only use this code for GNU lds that support --whole-archive.
-           whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+           whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
          else
            # Exported symbols can be pulled into shared objects from archives
            whole_archive_flag_spec='$convenience'
          fi
          archive_cmds_need_lc=yes
-         # This is similar to how AIX traditionally builds its shared libraries.
-         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+         archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+         # -brtl affects multiple linker settings, -berok does not and is overridden later
+         compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
+         if test svr4 != "$with_aix_soname"; then
+           # This is similar to how AIX traditionally builds its shared libraries.
+           archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+         fi
+         if test aix != "$with_aix_soname"; then
+           archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
+         else
+           # used by -dlpreopen to get the symbols
+           archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
+         fi
+         archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
        fi
       fi
       ;;
@@ -9764,7 +10258,7 @@ fi
       case $host_cpu in
       powerpc)
             # see comment about AmigaOS4 .so support
-            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
             archive_expsym_cmds=''
         ;;
       m68k)
        # Tell ltmain to make .lib files, not .a files.
        libext=lib
        # Tell ltmain to make .dll files, not .so files.
-       shrext_cmds=".dll"
+       shrext_cmds=.dll
        # FIXME: Setting linknames here is a bad hack.
-       archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
-       archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-           sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
-         else
-           sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
-         fi~
-         $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
-         linknames='
+       archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+       archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[   ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([     ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
+            cp "$export_symbols" "$output_objdir/$soname.def";
+            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+          else
+            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+          fi~
+          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+          linknames='
        # The linker will not automatically build a static lib if we build a DLL.
        # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
        enable_shared_with_static_runtimes=yes
        # Don't use ranlib
        old_postinstall_cmds='chmod 644 $oldlib'
        postlink_cmds='lt_outputfile="@OUTPUT@"~
-         lt_tool_outputfile="@TOOL_OUTPUT@"~
-         case $lt_outputfile in
-           *.exe|*.EXE) ;;
-           *)
-             lt_outputfile="$lt_outputfile.exe"
-             lt_tool_outputfile="$lt_tool_outputfile.exe"
-             ;;
-         esac~
-         if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
-           $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
-           $RM "$lt_outputfile.manifest";
-         fi'
+          lt_tool_outputfile="@TOOL_OUTPUT@"~
+          case $lt_outputfile in
+            *.exe|*.EXE) ;;
+            *)
+              lt_outputfile=$lt_outputfile.exe
+              lt_tool_outputfile=$lt_tool_outputfile.exe
+              ;;
+          esac~
+          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+            $RM "$lt_outputfile.manifest";
+          fi'
        ;;
       *)
        # Assume MSVC wrapper
@@ -9832,7 +10327,7 @@ fi
        # Tell ltmain to make .lib files, not .a files.
        libext=lib
        # Tell ltmain to make .dll files, not .so files.
-       shrext_cmds=".dll"
+       shrext_cmds=.dll
        # FIXME: Setting linknames here is a bad hack.
        archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
        # The linker will automatically build a .lib file if we build a DLL.
   hardcode_direct=no
   hardcode_automatic=yes
   hardcode_shlibpath_var=unsupported
-  if test "$lt_cv_ld_force_load" = "yes"; then
-    whole_archive_flag_spec='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+  if test yes = "$lt_cv_ld_force_load"; then
+    whole_archive_flag_spec='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
 
   else
     whole_archive_flag_spec=''
   fi
   link_all_deplibs=yes
-  allow_undefined_flag="$_lt_dar_allow_undefined"
+  allow_undefined_flag=$_lt_dar_allow_undefined
   case $cc_basename in
-     ifort*) _lt_dar_can_shared=yes ;;
+     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
      *) _lt_dar_can_shared=$GCC ;;
   esac
-  if test "$_lt_dar_can_shared" = "yes"; then
+  if test yes = "$_lt_dar_can_shared"; then
     output_verbose_link_cmd=func_echo_all
-    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
-    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
-    module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+    archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+    module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
 
   else
   ld_shlibs=no
       ;;
 
     hpux9*)
-      if test "$GCC" = yes; then
-       archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      if test yes = "$GCC"; then
+       archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
       else
-       archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+       archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
       fi
-      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_flag_spec='$wl+b $wl$libdir'
       hardcode_libdir_separator=:
       hardcode_direct=yes
 
       # hardcode_minus_L: Not really in the search PATH,
       # but as the default location of the library.
       hardcode_minus_L=yes
-      export_dynamic_flag_spec='${wl}-E'
+      export_dynamic_flag_spec='$wl-E'
       ;;
 
     hpux10*)
-      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
-       archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes,no = "$GCC,$with_gnu_ld"; then
+       archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
       else
        archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
       fi
-      if test "$with_gnu_ld" = no; then
-       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      if test no = "$with_gnu_ld"; then
+       hardcode_libdir_flag_spec='$wl+b $wl$libdir'
        hardcode_libdir_separator=:
        hardcode_direct=yes
        hardcode_direct_absolute=yes
-       export_dynamic_flag_spec='${wl}-E'
+       export_dynamic_flag_spec='$wl-E'
        # hardcode_minus_L: Not really in the search PATH,
        # but as the default location of the library.
        hardcode_minus_L=yes
       ;;
 
     hpux11*)
-      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+      if test yes,no = "$GCC,$with_gnu_ld"; then
        case $host_cpu in
        hppa*64*)
-         archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        ia64*)
-         archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+         archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        *)
-         archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+         archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        esac
       else
        case $host_cpu in
        hppa*64*)
-         archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        ia64*)
-         archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+         archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        *)
 
@@ -9974,7 +10469,7 @@ if ${lt_cv_prog_compiler__b+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler__b=no
-   save_LDFLAGS="$LDFLAGS"
+   save_LDFLAGS=$LDFLAGS
    LDFLAGS="$LDFLAGS -b"
    echo "$lt_simple_link_test_code" > conftest.$ac_ext
    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -9993,14 +10488,14 @@ else
      fi
    fi
    $RM -r conftest*
-   LDFLAGS="$save_LDFLAGS"
+   LDFLAGS=$save_LDFLAGS
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
 $as_echo "$lt_cv_prog_compiler__b" >&6; }
 
-if test x"$lt_cv_prog_compiler__b" = xyes; then
-    archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+if test yes = "$lt_cv_prog_compiler__b"; then
+    archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 else
     archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
 fi
@@ -10008,8 +10503,8 @@ fi
          ;;
        esac
       fi
-      if test "$with_gnu_ld" = no; then
-       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      if test no = "$with_gnu_ld"; then
+       hardcode_libdir_flag_spec='$wl+b $wl$libdir'
        hardcode_libdir_separator=:
 
        case $host_cpu in
@@ -10020,7 +10515,7 @@ fi
        *)
          hardcode_direct=yes
          hardcode_direct_absolute=yes
-         export_dynamic_flag_spec='${wl}-E'
+         export_dynamic_flag_spec='$wl-E'
 
          # hardcode_minus_L: Not really in the search PATH,
          # but as the default location of the library.
@@ -10031,8 +10526,8 @@ fi
       ;;
 
     irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      if test yes = "$GCC"; then
+       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
        # Try to use the -exported_symbol ld option, if it does not
        # work, assume that -exports_file does not work either and
        # implicitly export all symbols.
@@ -10042,8 +10537,8 @@ $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >
 if ${lt_cv_irix_exported_symbol+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  save_LDFLAGS="$LDFLAGS"
-          LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+  save_LDFLAGS=$LDFLAGS
+          LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int foo (void) { return 0; }
@@ -10055,24 +10550,34 @@ else
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-           LDFLAGS="$save_LDFLAGS"
+           LDFLAGS=$save_LDFLAGS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
-       if test "$lt_cv_irix_exported_symbol" = yes; then
-          archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+       if test yes = "$lt_cv_irix_exported_symbol"; then
+          archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
        fi
       else
-       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
-       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
       fi
       archive_cmds_need_lc='no'
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
       hardcode_libdir_separator=:
       inherit_rpath=yes
       link_all_deplibs=yes
       ;;
 
+    linux*)
+      case $cc_basename in
+      tcc*)
+       # Fabrice Bellard et al's Tiny C Compiler
+       ld_shlibs=yes
+       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+       ;;
+      esac
+      ;;
+
     netbsd*)
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
        archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
@@ -10087,7 +10592,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
     newsos6)
       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
       hardcode_direct=yes
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
       hardcode_libdir_separator=:
       hardcode_shlibpath_var=no
       ;;
@@ -10095,27 +10600,19 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
     *nto* | *qnx*)
       ;;
 
-    openbsd*)
+    openbsd* | bitrig*)
       if test -f /usr/libexec/ld.so; then
        hardcode_direct=yes
        hardcode_shlibpath_var=no
        hardcode_direct_absolute=yes
-       if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+       if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
          archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-         archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-         export_dynamic_flag_spec='${wl}-E'
+         archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
+         hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+         export_dynamic_flag_spec='$wl-E'
        else
-         case $host_os in
-          openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-            archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-            hardcode_libdir_flag_spec='-R$libdir'
-            ;;
-          *)
-            archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-            hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-            ;;
-         esac
+         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+         hardcode_libdir_flag_spec='$wl-rpath,$libdir'
        fi
       else
        ld_shlibs=no
@@ -10126,33 +10623,53 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
       hardcode_libdir_flag_spec='-L$libdir'
       hardcode_minus_L=yes
       allow_undefined_flag=unsupported
-      archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-      old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      shrext_cmds=.dll
+      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+       $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+       $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+       $ECHO EXPORTS >> $output_objdir/$libname.def~
+       emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+       $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+       emximp -o $lib $output_objdir/$libname.def'
+      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+       $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+       $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+       $ECHO EXPORTS >> $output_objdir/$libname.def~
+       prefix_cmds="$SED"~
+       if test EXPORTS = "`$SED 1q $export_symbols`"; then
+         prefix_cmds="$prefix_cmds -e 1d";
+       fi~
+       prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+       cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+       $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+       emximp -o $lib $output_objdir/$libname.def'
+      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+      enable_shared_with_static_runtimes=yes
       ;;
 
     osf3*)
-      if test "$GCC" = yes; then
-       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      if test yes = "$GCC"; then
+       allow_undefined_flag=' $wl-expect_unresolved $wl\*'
+       archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
       else
        allow_undefined_flag=' -expect_unresolved \*'
-       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+       archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
       fi
       archive_cmds_need_lc='no'
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
       hardcode_libdir_separator=:
       ;;
 
     osf4* | osf5*)     # as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-       archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      if test yes = "$GCC"; then
+       allow_undefined_flag=' $wl-expect_unresolved $wl\*'
+       archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
       else
        allow_undefined_flag=' -expect_unresolved \*'
-       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+       archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
        archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
-       $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+          $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
 
        # Both c and cxx compiler support -rpath directly
        hardcode_libdir_flag_spec='-rpath $libdir'
@@ -10163,24 +10680,24 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
 
     solaris*)
       no_undefined_flag=' -z defs'
-      if test "$GCC" = yes; then
-       wlarc='${wl}'
-       archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+       wlarc='$wl'
+       archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
        archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-         $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+          $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
       else
        case `$CC -V 2>&1` in
        *"Compilers 5.0"*)
          wlarc=''
-         archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
          archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
          ;;
        *)
-         wlarc='${wl}'
-         archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+         wlarc='$wl'
+         archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
          archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-         $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
          ;;
        esac
       fi
@@ -10190,11 +10707,11 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
       solaris2.[0-5] | solaris2.[0-5].*) ;;
       *)
        # The compiler driver will combine and reorder linker options,
-       # but understands `-z linker_flag'.  GCC discards it without `$wl',
+       # but understands '-z linker_flag'.  GCC discards it without '$wl',
        # but is careful enough not to reorder.
        # Supported since Solaris 2.6 (maybe 2.5.1?)
-       if test "$GCC" = yes; then
-         whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+       if test yes = "$GCC"; then
+         whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
        else
          whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
        fi
@@ -10204,10 +10721,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
       ;;
 
     sunos4*)
-      if test "x$host_vendor" = xsequent; then
+      if test sequent = "$host_vendor"; then
        # Use $CC to link under sequent, because it throws in some extra .o
        # files that make .init and .fini sections work.
-       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
       else
        archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
       fi
@@ -10256,43 +10773,43 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
       ;;
 
     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
-      no_undefined_flag='${wl}-z,text'
+      no_undefined_flag='$wl-z,text'
       archive_cmds_need_lc=no
       hardcode_shlibpath_var=no
       runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-       archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+       archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-       archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       fi
       ;;
 
     sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
+      # Note: We CANNOT use -z defs as we might desire, because we do not
       # link with -lc, and that would cause any symbols used from libc to
       # always be unresolved, which means just about no library would
       # ever link correctly.  If we're not using GNU ld we use -z text
       # though, which does catch some bad symbols but isn't as heavy-handed
       # as -z defs.
-      no_undefined_flag='${wl}-z,text'
-      allow_undefined_flag='${wl}-z,nodefs'
+      no_undefined_flag='$wl-z,text'
+      allow_undefined_flag='$wl-z,nodefs'
       archive_cmds_need_lc=no
       hardcode_shlibpath_var=no
-      hardcode_libdir_flag_spec='${wl}-R,$libdir'
+      hardcode_libdir_flag_spec='$wl-R,$libdir'
       hardcode_libdir_separator=':'
       link_all_deplibs=yes
-      export_dynamic_flag_spec='${wl}-Bexport'
+      export_dynamic_flag_spec='$wl-Bexport'
       runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-       archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+       archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-       archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       fi
       ;;
 
@@ -10307,10 +10824,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
       ;;
     esac
 
-    if test x$host_vendor = xsni; then
+    if test sni = "$host_vendor"; then
       case $host in
       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-       export_dynamic_flag_spec='${wl}-Blargedynsym'
+       export_dynamic_flag_spec='$wl-Blargedynsym'
        ;;
       esac
     fi
@@ -10318,7 +10835,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
 $as_echo "$ld_shlibs" >&6; }
-test "$ld_shlibs" = no && can_build_shared=no
+test no = "$ld_shlibs" && can_build_shared=no
 
 with_gnu_ld=$with_gnu_ld
 
@@ -10344,7 +10861,7 @@ x|xyes)
   # Assume -lc should be added
   archive_cmds_need_lc=yes
 
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
+  if test yes,yes = "$GCC,$enable_shared"; then
     case $archive_cmds in
     *'~'*)
       # FIXME: we may have to deal with multi-command sequences.
@@ -10559,14 +11076,14 @@ esac
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
 $as_echo_n "checking dynamic linker characteristics... " >&6; }
 
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   case $host_os in
-    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
-    *) lt_awk_arg="/^libraries:/" ;;
+    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
+    *) lt_awk_arg='/^libraries:/' ;;
   esac
   case $host_os in
-    mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
-    *) lt_sed_strip_eq="s,=/,/,g" ;;
+    mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
+    *) lt_sed_strip_eq='s|=/|/|g' ;;
   esac
   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
   case $lt_search_path_spec in
@@ -10582,28 +11099,35 @@ if test "$GCC" = yes; then
     ;;
   esac
   # Ok, now we have the path, separated by spaces, we can step through it
-  # and add multilib dir if necessary.
+  # and add multilib dir if necessary...
   lt_tmp_lt_search_path_spec=
-  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  # ...but if some path component already ends with the multilib dir we assume
+  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
+  case "$lt_multi_os_dir; $lt_search_path_spec " in
+  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
+    lt_multi_os_dir=
+    ;;
+  esac
   for lt_sys_path in $lt_search_path_spec; do
-    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
-      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
-    else
+    if test -d "$lt_sys_path$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
+    elif test -n "$lt_multi_os_dir"; then
       test -d "$lt_sys_path" && \
        lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
     fi
   done
   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
-BEGIN {RS=" "; FS="/|\n";} {
-  lt_foo="";
-  lt_count=0;
+BEGIN {RS = " "; FS = "/|\n";} {
+  lt_foo = "";
+  lt_count = 0;
   for (lt_i = NF; lt_i > 0; lt_i--) {
     if ($lt_i != "" && $lt_i != ".") {
       if ($lt_i == "..") {
         lt_count++;
       } else {
         if (lt_count == 0) {
-          lt_foo="/" $lt_i lt_foo;
+          lt_foo = "/" $lt_i lt_foo;
         } else {
           lt_count--;
         }
@@ -10617,7 +11141,7 @@ BEGIN {RS=" "; FS="/|\n";} {
   # for these hosts.
   case $host_os in
     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
-      $SED 's,/\([A-Za-z]:\),\1,g'` ;;
+      $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
   esac
   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
 else
@@ -10626,7 +11150,7 @@ fi
 library_names_spec=
 libname_spec='lib$name'
 soname_spec=
-shrext_cmds=".so"
+shrext_cmds=.so
 postinstall_cmds=
 postuninstall_cmds=
 finish_cmds=
@@ -10643,14 +11167,16 @@ hardcode_into_libs=no
 # flags to be left without arguments
 need_version=unknown
 
+
+
 case $host_os in
 aix3*)
   version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
   # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
+  soname_spec='$libname$release$shared_ext$major'
   ;;
 
 aix[4-9]*)
@@ -10658,41 +11184,91 @@ aix[4-9]*)
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
+  if test ia64 = "$host_cpu"; then
     # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
     shlibpath_var=LD_LIBRARY_PATH
   else
     # With GCC up to 2.95.x, collect2 would create an import file
     # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
+    # the line '#! .'.  This would cause the generated library to
+    # depend on '.', always an invalid library.  This was fixed in
     # development snapshots of GCC prior to 3.0.
     case $host_os in
       aix4 | aix4.[01] | aix4.[01].*)
       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
           echo ' yes '
-          echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+          echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
        :
       else
        can_build_shared=no
       fi
       ;;
     esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # Using Import Files as archive members, it is possible to support
+    # filename-based versioning of shared library archives on AIX. While
+    # this would work for both with and without runtime linking, it will
+    # prevent static linking of such archives. So we do filename-based
+    # shared library versioning with .so extension only, which is used
+    # when both runtime linking and shared linking is enabled.
+    # Unfortunately, runtime linking may impact performance, so we do
+    # not want this to be the default eventually. Also, we use the
+    # versioned .so libs for executables only if there is the -brtl
+    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+    # To allow for filename-based versioning support, we need to create
+    # libNAME.so.V as an archive file, containing:
+    # *) an Import File, referring to the versioned filename of the
+    #    archive as well as the shared archive member, telling the
+    #    bitwidth (32 or 64) of that shared object, and providing the
+    #    list of exported symbols of that shared object, eventually
+    #    decorated with the 'weak' keyword
+    # *) the shared object with the F_LOADONLY flag set, to really avoid
+    #    it being seen by the linker.
+    # At run time we better use the real file rather than another symlink,
+    # but for link time we create the symlink libNAME.so -> libNAME.so.V
+
+    case $with_aix_soname,$aix_use_runtimelinking in
+    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
     # soname into executable. Probably we can add versioning support to
     # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
+    aix,yes) # traditional libtool
+      dynamic_linker='AIX unversionable lib.so'
       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
       # instead of lib<name>.a to let people know that these are not
       # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+      ;;
+    aix,no) # traditional AIX only
+      dynamic_linker='AIX lib.a(lib.so.V)'
       # We preserve .a as extension for shared libraries through AIX4.2
       # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
+      library_names_spec='$libname$release.a $libname.a'
+      soname_spec='$libname$release$shared_ext$major'
+      ;;
+    svr4,*) # full svr4 only
+      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
+      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+      # We do not specify a path in Import Files, so LIBPATH fires.
+      shlibpath_overrides_runpath=yes
+      ;;
+    *,yes) # both, prefer svr4
+      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
+      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+      # unpreferred sharedlib libNAME.a needs extra handling
+      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
+      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
+      # We do not specify a path in Import Files, so LIBPATH fires.
+      shlibpath_overrides_runpath=yes
+      ;;
+    *,no) # both, prefer aix
+      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
+      library_names_spec='$libname$release.a $libname.a'
+      soname_spec='$libname$release$shared_ext$major'
+      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
+      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
+      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
+      ;;
+    esac
     shlibpath_var=LIBPATH
   fi
   ;;
@@ -10702,18 +11278,18 @@ amigaos*)
   powerpc)
     # Since July 2007 AmigaOS4 officially supports .so libraries.
     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
     ;;
   m68k)
     library_names_spec='$libname.ixlibrary $libname.a'
     # Create ${libname}_ixlibrary.a entries in /sys/libs.
-    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
     ;;
   esac
   ;;
 
 beos*)
-  library_names_spec='${libname}${shared_ext}'
+  library_names_spec='$libname$shared_ext'
   dynamic_linker="$host_os ld.so"
   shlibpath_var=LIBRARY_PATH
   ;;
@@ -10721,8 +11297,8 @@ beos*)
 bsdi[45]*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@@ -10734,7 +11310,7 @@ bsdi[45]*)
 
 cygwin* | mingw* | pw32* | cegcc*)
   version_type=windows
-  shrext_cmds=".dll"
+  shrext_cmds=.dll
   need_version=no
   need_lib_prefix=no
 
@@ -10743,8 +11319,8 @@ cygwin* | mingw* | pw32* | cegcc*)
     # gcc
     library_names_spec='$libname.dll.a'
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+    postinstall_cmds='base_file=`basename \$file`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
       $install_prog $dir/$dlname \$dldir/$dlname~
@@ -10760,17 +11336,17 @@ cygwin* | mingw* | pw32* | cegcc*)
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
 
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
     mingw* | cegcc*)
       # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
       ;;
     pw32*)
       # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
       ;;
     esac
     dynamic_linker='Win32 ld.exe'
@@ -10779,8 +11355,8 @@ cygwin* | mingw* | pw32* | cegcc*)
   *,cl*)
     # Native MSVC
     libname_spec='$name'
-    soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-    library_names_spec='${libname}.dll.lib'
+    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+    library_names_spec='$libname.dll.lib'
 
     case $build_os in
     mingw*)
@@ -10807,7 +11383,7 @@ cygwin* | mingw* | pw32* | cegcc*)
       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
       ;;
     *)
-      sys_lib_search_path_spec="$LIB"
+      sys_lib_search_path_spec=$LIB
       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
         # It is most probably a Windows format PATH.
         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
@@ -10820,8 +11396,8 @@ cygwin* | mingw* | pw32* | cegcc*)
     esac
 
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+    postinstall_cmds='base_file=`basename \$file`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
       $install_prog $dir/$dlname \$dldir/$dlname'
@@ -10834,7 +11410,7 @@ cygwin* | mingw* | pw32* | cegcc*)
 
   *)
     # Assume MSVC wrapper
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
     dynamic_linker='Win32 ld.exe'
     ;;
   esac
@@ -10847,8 +11423,8 @@ darwin* | rhapsody*)
   version_type=darwin
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
+  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+  soname_spec='$libname$release$major$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
@@ -10861,8 +11437,8 @@ dgux*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -10880,12 +11456,13 @@ freebsd* | dragonfly*)
   version_type=freebsd-$objformat
   case $version_type in
     freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+      soname_spec='$libname$release$shared_ext$major'
       need_version=no
       need_lib_prefix=no
       ;;
     freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
       need_version=yes
       ;;
   esac
@@ -10910,26 +11487,15 @@ freebsd* | dragonfly*)
   esac
   ;;
 
-gnu*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
-haiku*)
+haiku*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   dynamic_linker="$host_os runtime_loader"
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
+  shlibpath_overrides_runpath=no
   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
   hardcode_into_libs=yes
   ;;
@@ -10947,14 +11513,15 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.so"
     shlibpath_var=LD_LIBRARY_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
+    if test 32 = "$HPUX_IA64_MODE"; then
       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
     else
       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
     fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
   hppa*64*)
     shrext_cmds='.sl'
@@ -10962,8 +11529,8 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
@@ -10972,8 +11539,8 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=SHLIB_PATH
     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     ;;
   esac
   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
@@ -10986,8 +11553,8 @@ interix[3-9]*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
@@ -10998,7 +11565,7 @@ irix5* | irix6* | nonstopux*)
   case $host_os in
     nonstopux*) version_type=nonstopux ;;
     *)
-       if test "$lt_cv_prog_gnu_ld" = yes; then
+       if test yes = "$lt_cv_prog_gnu_ld"; then
                version_type=linux # correct to gnu/linux during the next big refactor
        else
                version_type=irix
@@ -11006,8 +11573,8 @@ irix5* | irix6* | nonstopux*)
   esac
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
   case $host_os in
   irix5* | nonstopux*)
     libsuff= shlibsuff=
@@ -11026,8 +11593,8 @@ irix5* | irix6* | nonstopux*)
   esac
   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
   shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
   hardcode_into_libs=yes
   ;;
 
@@ -11036,13 +11603,33 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
+linux*android*)
+  version_type=none # Android doesn't support versioned libraries.
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='$libname$release$shared_ext'
+  soname_spec='$libname$release$shared_ext'
+  finish_cmds=
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  dynamic_linker='Android linker'
+  # Don't embed -rpath directories since the linker doesn't support them.
+  hardcode_libdir_flag_spec='-L$libdir'
+  ;;
+
 # This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   # Add ABI-specific directories to the system library path.
   sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
 
-  # Append ld.so.conf contents to the search path
+  # Ideally, we could use ldconfig to report *all* directores which are
+  # searched for libraries, however this is still not possible.  Aside from not
+  # being certain /sbin/ldconfig is available, command
+  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
+  # even though it is searched at run-time.  Try to do the best guess by
+  # appending ld.so.conf contents (and includes) to the search path.
   if test -f /etc/ld.so.conf; then
     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[      ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
     sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
-
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -11110,12 +11701,12 @@ netbsd*)
   need_lib_prefix=no
   need_version=no
   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
     dynamic_linker='NetBSD (a.out) ld.so'
   else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     dynamic_linker='NetBSD ld.elf_so'
   fi
   shlibpath_var=LD_LIBRARY_PATH
@@ -11125,7 +11716,7 @@ netbsd*)
 
 newsos6)
   version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   ;;
@@ -11134,58 +11725,68 @@ newsos6)
   version_type=qnx
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
   dynamic_linker='ldqnx.so'
   ;;
 
-openbsd*)
+openbsd* | bitrig*)
   version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
+  sys_lib_dlsearch_path_spec=/usr/lib
   need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
-    *)                         need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[89] | openbsd2.[89].*)
-       shlibpath_overrides_runpath=no
-       ;;
-      *)
-       shlibpath_overrides_runpath=yes
-       ;;
-      esac
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+    need_version=no
   else
-    shlibpath_overrides_runpath=yes
+    need_version=yes
   fi
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
   ;;
 
 os2*)
   libname_spec='$name'
-  shrext_cmds=".dll"
+  version_type=windows
+  shrext_cmds=.dll
+  need_version=no
   need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
+  # OS/2 can only load a DLL with a base name of 8 characters or less.
+  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+    v=$($ECHO $release$versuffix | tr -d .-);
+    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+    $ECHO $n$v`$shared_ext'
+  library_names_spec='${libname}_dll.$libext'
   dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
+  shlibpath_var=BEGINLIBPATH
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+  postinstall_cmds='base_file=`basename \$file`~
+    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
+    dldir=$destdir/`dirname \$dlpath`~
+    test -d \$dldir || mkdir -p \$dldir~
+    $install_prog $dir/$dlname \$dldir/$dlname~
+    chmod a+x \$dldir/$dlname~
+    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+    fi'
+  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
+    dlpath=$dir/\$dldll~
+    $RM \$dlpath'
   ;;
 
 osf3* | osf4* | osf5*)
   version_type=osf
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
   ;;
 
 rdos*)
@@ -11196,8 +11797,8 @@ solaris*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
@@ -11207,11 +11808,11 @@ solaris*)
 
 sunos4*)
   version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
+  if test yes = "$with_gnu_ld"; then
     need_lib_prefix=no
   fi
   need_version=yes
@@ -11219,8 +11820,8 @@ sunos4*)
 
 sysv4 | sysv4.3*)
   version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   case $host_vendor in
     sni)
@@ -11241,24 +11842,24 @@ sysv4 | sysv4.3*)
   ;;
 
 sysv4*MP*)
-  if test -d /usr/nec ;then
+  if test -d /usr/necthen
     version_type=linux # correct to gnu/linux during the next big refactor
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
+    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+    soname_spec='$libname$shared_ext.$major'
     shlibpath_var=LD_LIBRARY_PATH
   fi
   ;;
 
 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
+  version_type=sco
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
+  if test yes = "$with_gnu_ld"; then
     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
   else
     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
@@ -11276,7 +11877,7 @@ tpf*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
@@ -11284,8 +11885,8 @@ tpf*)
 
 uts4*)
   version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -11295,20 +11896,35 @@ uts4*)
 esac
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
 $as_echo "$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
+test no = "$dynamic_linker" && can_build_shared=no
 
 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 fi
 
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
-  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
 fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
-  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
 fi
 
+# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
+configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
+
+# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
+configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
+
+
+
+
+
+
 
 
 
@@ -11405,15 +12021,15 @@ $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
 hardcode_action=
 if test -n "$hardcode_libdir_flag_spec" ||
    test -n "$runpath_var" ||
-   test "X$hardcode_automatic" = "Xyes" ; then
+   test yes = "$hardcode_automatic"; then
 
   # We can hardcode non-existent directories.
-  if test "$hardcode_direct" != no &&
+  if test no != "$hardcode_direct" &&
      # If the only mechanism to avoid hardcoding is shlibpath_var, we
      # have to relink, otherwise we might link with an installed library
      # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
-     test "$hardcode_minus_L" != no; then
+     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
+     test no != "$hardcode_minus_L"; then
     # Linking always hardcodes the temporary library directory.
     hardcode_action=relink
   else
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
 $as_echo "$hardcode_action" >&6; }
 
-if test "$hardcode_action" = relink ||
-   test "$inherit_rpath" = yes; then
+if test relink = "$hardcode_action" ||
+   test yes = "$inherit_rpath"; then
   # Fast installation is not supported
   enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
+elif test yes = "$shlibpath_overrides_runpath" ||
+     test no = "$enable_shared"; then
   # Fast installation is not necessary
   enable_fast_install=needless
 fi
@@ -11443,7 +12059,7 @@ fi
 
 
 
-  if test "x$enable_dlopen" != xyes; then
+  if test yes != "$enable_dlopen"; then
   enable_dlopen=unknown
   enable_dlopen_self=unknown
   enable_dlopen_self_static=unknown
@@ -11453,23 +12069,23 @@ else
 
   case $host_os in
   beos*)
-    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen=load_add_on
     lt_cv_dlopen_libs=
     lt_cv_dlopen_self=yes
     ;;
 
   mingw* | pw32* | cegcc*)
-    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen=LoadLibrary
     lt_cv_dlopen_libs=
     ;;
 
   cygwin*)
-    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen=dlopen
     lt_cv_dlopen_libs=
     ;;
 
   darwin*)
-  # if libdl is installed we need to link against it
+    # if libdl is installed we need to link against it
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
 $as_echo_n "checking for dlopen in -ldl... " >&6; }
 if ${ac_cv_lib_dl_dlopen+:} false; then :
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
 else
 
-    lt_cv_dlopen="dyld"
+    lt_cv_dlopen=dyld
     lt_cv_dlopen_libs=
     lt_cv_dlopen_self=yes
 
 
     ;;
 
+  tpf*)
+    # Don't try to run any link tests for TPF.  We know it's impossible
+    # because TPF is a cross-compiler, and we know how we open DSOs.
+    lt_cv_dlopen=dlopen
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=no
+    ;;
+
   *)
     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
 if test "x$ac_cv_func_shl_load" = xyes; then :
-  lt_cv_dlopen="shl_load"
+  lt_cv_dlopen=shl_load
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
 $as_echo_n "checking for shl_load in -ldld... " >&6; }
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
-  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
 else
   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
 if test "x$ac_cv_func_dlopen" = xyes; then :
-  lt_cv_dlopen="dlopen"
+  lt_cv_dlopen=dlopen
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
 $as_echo_n "checking for dlopen in -ldl... " >&6; }
@@ -11603,7 +12227,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
@@ -11642,7 +12266,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
 $as_echo_n "checking for dld_link in -ldld... " >&6; }
@@ -11681,7 +12305,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
-  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
 fi
 
 
     ;;
   esac
 
-  if test "x$lt_cv_dlopen" != xno; then
-    enable_dlopen=yes
-  else
+  if test no = "$lt_cv_dlopen"; then
     enable_dlopen=no
+  else
+    enable_dlopen=yes
   fi
 
   case $lt_cv_dlopen in
   dlopen)
-    save_CPPFLAGS="$CPPFLAGS"
-    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+    save_CPPFLAGS=$CPPFLAGS
+    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
-    save_LDFLAGS="$LDFLAGS"
+    save_LDFLAGS=$LDFLAGS
     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
-    save_LIBS="$LIBS"
+    save_LIBS=$LIBS
     LIBS="$lt_cv_dlopen_libs $LIBS"
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
@@ -11724,7 +12348,7 @@ $as_echo_n "checking whether a program can dlopen itself... " >&6; }
 if ${lt_cv_dlopen_self+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-         if test "$cross_compiling" = yes; then :
+         if test yes = "$cross_compiling"; then :
   lt_cv_dlopen_self=cross
 else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
@@ -11771,9 +12395,9 @@ else
 #  endif
 #endif
 
-/* When -fvisbility=hidden is used, assume the code has been annotated
+/* When -fvisibility=hidden is used, assume the code has been annotated
    correspondingly for the symbols needed.  */
-#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
 int fnord () __attribute__((visibility("default")));
 #endif
 
@@ -11803,7 +12427,7 @@ _LT_EOF
   (eval $ac_link) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
     (./conftest; exit; ) >&5 2>/dev/null
     lt_status=$?
     case x$lt_status in
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
 $as_echo "$lt_cv_dlopen_self" >&6; }
 
-    if test "x$lt_cv_dlopen_self" = xyes; then
+    if test yes = "$lt_cv_dlopen_self"; then
       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
 if ${lt_cv_dlopen_self_static+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-         if test "$cross_compiling" = yes; then :
+         if test yes = "$cross_compiling"; then :
   lt_cv_dlopen_self_static=cross
 else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
@@ -11877,9 +12501,9 @@ else
 #  endif
 #endif
 
-/* When -fvisbility=hidden is used, assume the code has been annotated
+/* When -fvisibility=hidden is used, assume the code has been annotated
    correspondingly for the symbols needed.  */
-#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
 int fnord () __attribute__((visibility("default")));
 #endif
 
@@ -11909,7 +12533,7 @@ _LT_EOF
   (eval $ac_link) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
     (./conftest; exit; ) >&5 2>/dev/null
     lt_status=$?
     case x$lt_status in
@@ -11930,9 +12554,9 @@ fi
 $as_echo "$lt_cv_dlopen_self_static" >&6; }
     fi
 
-    CPPFLAGS="$save_CPPFLAGS"
-    LDFLAGS="$save_LDFLAGS"
-    LIBS="$save_LIBS"
+    CPPFLAGS=$save_CPPFLAGS
+    LDFLAGS=$save_LDFLAGS
+    LIBS=$save_LIBS
     ;;
   esac
 
@@ -11976,7 +12600,7 @@ else
 # FIXME - insert some real tests, host_os isn't really good enough
   case $host_os in
   darwin*)
-    if test -n "$STRIP" ; then
+    if test -n "$STRIP"; then
       striplib="$STRIP -x"
       old_striplib="$STRIP -S"
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -12004,7 +12628,7 @@ fi
 
 
 
-  # Report which library types will actually be built
+  # Report what library types will actually be built
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
@@ -12012,13 +12636,13 @@ $as_echo "$can_build_shared" >&6; }
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
 $as_echo_n "checking whether to build shared libraries... " >&6; }
-  test "$can_build_shared" = "no" && enable_shared=no
+  test no = "$can_build_shared" && enable_shared=no
 
   # On AIX, shared libraries and static libraries use the same namespace, and
   # are all built from PIC.
   case $host_os in
   aix3*)
-    test "$enable_shared" = yes && enable_static=no
+    test yes = "$enable_shared" && enable_static=no
     if test -n "$RANLIB"; then
       archive_cmds="$archive_cmds~\$RANLIB \$lib"
       postinstall_cmds='$RANLIB $lib'
@@ -12026,8 +12650,12 @@ $as_echo_n "checking whether to build shared libraries... " >&6; }
     ;;
 
   aix[4-9]*)
-    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-      test "$enable_shared" = yes && enable_static=no
+    if test ia64 != "$host_cpu"; then
+      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+      yes,aix,yes) ;;                  # shared object as lib.so file only
+      yes,svr4,*) ;;                   # shared object as lib.so archive member only
+      yes,*) enable_static=no ;;       # shared object in lib.a archive as well
+      esac
     fi
     ;;
   esac
@@ -12037,7 +12665,7 @@ $as_echo "$enable_shared" >&6; }
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
 $as_echo_n "checking whether to build static libraries... " >&6; }
   # Make sure either enable_shared or enable_static is yes.
-  test "$enable_shared" = yes || enable_static=yes
+  test yes = "$enable_shared" || enable_static=yes
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
 $as_echo "$enable_static" >&6; }
 
@@ -12051,7 +12679,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-CC="$lt_save_CC"
+CC=$lt_save_CC
 
 
 
@@ -12250,7 +12878,7 @@ if test "${with_readline+set}" = set; then :
   if test "$withval" != "no" -a "$withval" != "yes"; then
     RDL_DIR=$withval
     CPPFLAGS="${CPPFLAGS} -I$withval/include"
-    LIBS="${LIBS} -L$withval/lib"
+    LDFLAGS="${LDFLAGS} -L$withval/lib"
   fi
 
 fi
@@ -12346,7 +12974,7 @@ if test "${with_zlib+set}" = set; then :
   if test "$withval" != "no" -a "$withval" != "yes"; then
     Z_DIR=$withval
     CPPFLAGS="${CPPFLAGS} -I$withval/include"
-    LIBS="${LIBS} -L$withval/lib"
+    LDFLAGS="${LDFLAGS} -L$withval/lib"
   fi
 
 fi
@@ -12358,7 +12986,7 @@ if test "${with_lzma+set}" = set; then :
   if test "$withval" != "no" -a "$withval" != "yes"; then
     LZMA_DIR=$withval
     CPPFLAGS="${CPPFLAGS} -I$withval/include"
-    LIBS="${LIBS} -L$withval/lib"
+    LDFLAGS="${LDFLAGS} -L$withval/lib"
   fi
 
 fi
@@ -12555,16 +13183,89 @@ WITH_ZLIB=0
 if test "$with_zlib" = "no"; then
     echo "Disabling compression support"
 else
-    for ac_header in zlib.h
+    # Try pkg-config first so that static linking works.
+    # If this succeeeds, we ignore the WITH_ZLIB directory.
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Z" >&5
+$as_echo_n "checking for Z... " >&6; }
+
+if test -n "$Z_CFLAGS"; then
+    pkg_cv_Z_CFLAGS="$Z_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "zlib") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_Z_CFLAGS=`$PKG_CONFIG --cflags "zlib" 2>/dev/null`
+                     test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$Z_LIBS"; then
+    pkg_cv_Z_LIBS="$Z_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "zlib") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_Z_LIBS=`$PKG_CONFIG --libs "zlib" 2>/dev/null`
+                     test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+               Z_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib" 2>&1`
+        else
+               Z_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$Z_PKG_ERRORS" >&5
+
+       have_libz=no
+elif test $pkg_failed = untried; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       have_libz=no
+else
+       Z_CFLAGS=$pkg_cv_Z_CFLAGS
+       Z_LIBS=$pkg_cv_Z_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       have_libz=yes
+fi
+
+     if test "x$have_libz" = "xno"; then
+        for ac_header in zlib.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
 if test "x$ac_cv_header_zlib_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_ZLIB_H 1
 _ACEOF
- SAVE_LDFLAGS="${LDFLAGS}"
-        LDFLAGS="-L${Z_DIR}/lib"
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzread in -lz" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzread in -lz" >&5
 $as_echo_n "checking for gzread in -lz... " >&6; }
 if ${ac_cv_lib_z_gzread+:} false; then :
   $as_echo_n "(cached) " >&6
 $as_echo "$ac_cv_lib_z_gzread" >&6; }
 if test "x$ac_cv_lib_z_gzread" = xyes; then :
 
+                have_libz=yes
+                if test "x${Z_DIR}" != "x"; then
+                    Z_CFLAGS="-I${Z_DIR}/include"
+                    Z_LIBS="-L${Z_DIR}/lib -lz"
+                    case ${host} in
+                        *-*-solaris*)
+                            Z_LIBS="-L${Z_DIR}/lib -R${Z_DIR}/lib -lz"
+                            ;;
+                    esac
+                else
+                    Z_LIBS="-lz"
+                fi
+else
+  have_libz=no
+fi
 
-$as_echo "#define HAVE_LIBZ 1" >>confdefs.h
 
-           WITH_ZLIB=1
-           if test "x${Z_DIR}" != "x"; then
-               Z_CFLAGS="-I${Z_DIR}/include"
-               Z_LIBS="-L${Z_DIR}/lib -lz"
-               case ${host} in
-                   *-*-solaris*)
-                       Z_LIBS="-L${Z_DIR}/lib -R${Z_DIR}/lib -lz"
-                       ;;
-               esac
-           else
-               Z_LIBS="-lz"
-           fi
 fi
 
-        LDFLAGS="${SAVE_LDFLAGS}"
+done
+
+    else
+       # we still need to check for zlib.h header
+       for ac_header in zlib.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_zlib_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_ZLIB_H 1
+_ACEOF
+
 fi
 
 done
 
+    fi
+
+    # Found the library via either method?
+    if test "x$have_libz" = "xyes"; then
+
+$as_echo "#define HAVE_LIBZ 1" >>confdefs.h
+
+        WITH_ZLIB=1
+    fi
 fi
 
 
@@ -12722,9 +13445,7 @@ if test "x$ac_cv_header_lzma_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LZMA_H 1
 _ACEOF
- SAVE_LDFLAGS="${LDFLAGS}"
-            LDFLAGS="-L${LZMA_DIR}/lib"
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzma_code in -llzma" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzma_code in -llzma" >&5
 $as_echo_n "checking for lzma_code in -llzma... " >&6; }
 if ${ac_cv_lib_lzma_lzma_code+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -12773,7 +13494,21 @@ else
   have_liblzma=no
 fi
 
-            LDFLAGS="${SAVE_LDFLAGS}"
+
+fi
+
+done
+
+    else
+       # we still need to check for lzma,h header
+       for ac_header in lzma.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default"
+if test "x$ac_cv_header_lzma_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LZMA_H 1
+_ACEOF
+
 fi
 
 done
@@ -13718,7 +14453,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array type" >&5
 $as_echo_n "checking whether va_list is an array type... " >&6; }
 cat > conftest.$ac_ext <<EOF
-#line 13721 "configure"
+#line 14456 "configure"
 #include "confdefs.h"
 
 #include <stdarg.h>
@@ -13728,7 +14463,7 @@ int main(void) {
 va_list ap1, ap2; a(&ap1); ap2 = (va_list) ap1
 ; return 0; }
 EOF
-if { (eval echo configure:13731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then
+if { (eval echo configure:14466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then
   rm -rf conftest*
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -13918,7 +14653,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of socket length (socklen_t)" >&5
 $as_echo_n "checking for type of socket length (socklen_t)... " >&6; }
 cat > conftest.$ac_ext <<EOF
-#line 13921 "configure"
+#line 14656 "configure"
 #include "confdefs.h"
 
 #include <stddef.h>
@@ -13929,7 +14664,7 @@ int main(void) {
 (void)getsockopt (1, 1, 1, NULL, (socklen_t *)NULL)
 ; return 0; }
 EOF
-if { (eval echo configure:13932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then
+if { (eval echo configure:14667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then
   rm -rf conftest*
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: socklen_t *" >&5
@@ -13941,7 +14676,7 @@ else
   rm -rf conftest*
 
   cat > conftest.$ac_ext <<EOF
-#line 13944 "configure"
+#line 14679 "configure"
 #include "confdefs.h"
 
 #include <stddef.h>
@@ -13952,7 +14687,7 @@ int main(void) {
 (void)getsockopt (1, 1, 1, NULL, (size_t *)NULL)
 ; return 0; }
 EOF
-if { (eval echo configure:13955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then
+if { (eval echo configure:14690: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then
   rm -rf conftest*
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: size_t *" >&5
@@ -13964,7 +14699,7 @@ else
   rm -rf conftest*
 
     cat > conftest.$ac_ext <<EOF
-#line 13967 "configure"
+#line 14702 "configure"
 #include "confdefs.h"
 
 #include <stddef.h>
@@ -13975,7 +14710,7 @@ int main(void) {
 (void)getsockopt (1, 1, 1, NULL, (int *)NULL)
 ; return 0; }
 EOF
-if { (eval echo configure:13978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then
+if { (eval echo configure:14713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then
   rm -rf conftest*
 
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: int *" >&5
@@ -14378,7 +15113,7 @@ else
     fi
 
     # warnings we'd like to see
-    CFLAGS="${CFLAGS} -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls"
+    CFLAGS="${CFLAGS} -pedantic -W -Wformat -Wno-format-extra-args -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls"
     # warnings we'd like to supress
     CFLAGS="${CFLAGS} -Wno-long-long"
     case "${host}" in
@@ -14769,7 +15504,7 @@ if [ "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XML" ] || \
        fi
     fi
     if test "${GCC}" = "yes" ; then
-    CFLAGS="-g -O -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wall"
+    CFLAGS="-g -O -pedantic -W -Wformat -Wno-format-extra-args -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wall"
     fi
     STATIC_BINARIES="-static"
 else
@@ -15499,8 +16234,6 @@ case "$host" in
        *) M_LIBS="-lm"
        ;;
 esac
-XML_LIBS="-lxml2 $Z_LIBS $THREAD_LIBS $ICONV_LIBS $M_LIBS $LIBS"
-XML_LIBTOOLLIBS="libxml2.la"
 
 
 WITH_ICU=0
@@ -15508,17 +16241,175 @@ ICU_LIBS=""
 if test "$with_icu" != "yes" ; then
     echo Disabling ICU support
 else
-    ICU_CONFIG=icu-config
-    if ${ICU_CONFIG} --cflags >/dev/null 2>&1
-    then
-        ICU_LIBS=`${ICU_CONFIG} --ldflags`
+    # Try pkg-config first so that static linking works.
+    # If this succeeeds, we ignore the WITH_ICU directory.
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICU" >&5
+$as_echo_n "checking for ICU... " >&6; }
+
+if test -n "$ICU_CFLAGS"; then
+    pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-i18n\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "icu-i18n") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-i18n" 2>/dev/null`
+                     test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$ICU_LIBS"; then
+    pkg_cv_ICU_LIBS="$ICU_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-i18n\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "icu-i18n") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-i18n" 2>/dev/null`
+                     test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+               ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-i18n" 2>&1`
+        else
+               ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-i18n" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$ICU_PKG_ERRORS" >&5
+
+       have_libicu=no
+elif test $pkg_failed = untried; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       have_libicu=no
+else
+       ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
+       ICU_LIBS=$pkg_cv_ICU_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       have_libicu=yes
+fi
+
+    # If pkg-config failed, fall back to AC_CHECK_LIB. This
+    # will not pick up the necessary LIBS flags for liblzma's
+    # private dependencies, though, so static linking may fail.
+    if test "x$have_libicu" = "xno"; then
+        ICU_CONFIG=icu-config
+        if ${ICU_CONFIG} --cflags >/dev/null 2>&1
+        then
+            ICU_LIBS=`${ICU_CONFIG} --ldflags`
+            have_libicu=yes
+            echo Enabling ICU support
+        else
+            if test "$with_icu" != "yes" -a "$with_iconv" != "" ; then
+                CPPFLAGS="${CPPFLAGS} -I$with_icu"
+                # Export this since our headers include icu.h
+                XML_INCLUDEDIR="${XML_INCLUDEDIR} -I$with_icu"
+            fi
+
+            ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucnv.h" "ac_cv_header_unicode_ucnv_h" "$ac_includes_default"
+if test "x$ac_cv_header_unicode_ucnv_h" = xyes; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu" >&5
+$as_echo_n "checking for icu... " >&6; }
+            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unicode/ucnv.h>
+int
+main ()
+{
+
+        UConverter *utf = ucnv_open("UTF-8", NULL);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                have_libicu=yes
+else
+
+                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu in -licucore" >&5
+$as_echo_n "checking for icu in -licucore... " >&6; }
+
+                _ldflags="${LDFLAGS}"
+                _libs="${LIBS}"
+                LDFLAGS="${LDFLAGS} ${ICU_LIBS}"
+                LIBS="${LIBS} -licucore"
+
+                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unicode/ucnv.h>
+int
+main ()
+{
+
+        UConverter *utf = ucnv_open("UTF-8", NULL);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                    have_libicu=yes
+                    ICU_LIBS="${ICU_LIBS} -licucore"
+                    LIBS="${_libs}"
+                    LDFLAGS="${_ldflags}"
+else
+
+                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                    LIBS="${_libs}"
+                LDFLAGS="${_ldflags}"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+        fi
+    fi
+
+    # Found the library via either method?
+    if test "x$have_libicu" = "xyes"; then
         WITH_ICU=1
-        echo Enabling ICU support
-    else
-        as_fn_error $? "libicu config program icu-config not found" "$LINENO" 5
     fi
 fi
-
+XML_LIBS="-lxml2 $Z_LIBS $LZMA_LIBS $THREAD_LIBS $ICONV_LIBS $ICU_LIBS $M_LIBS $LIBS"
+XML_LIBTOOLLIBS="libxml2.la"
 
 
 WITH_ISO8859X=1
@@ -15669,6 +16560,7 @@ fi
 
 
 
+
 RELDATE=`date +'%a %b %e %Y'`
 
 
@@ -15792,6 +16684,10 @@ LIBOBJS=$ac_libobjs
 LTLIBOBJS=$ac_ltlibobjs
 
 
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+  as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
 $as_echo_n "checking that generated files are newer than configure... " >&6; }
    if test -n "$am_sleep_pid"; then
@@ -16438,6 +17334,7 @@ enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
+shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
@@ -16487,10 +17384,13 @@ compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
+lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
+lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
@@ -16555,7 +17455,8 @@ finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
-sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
+configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
+configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
@@ -16606,9 +17507,12 @@ CFLAGS \
 compiler \
 lt_cv_sys_global_symbol_pipe \
 lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_import \
 lt_cv_sys_global_symbol_to_c_name_address \
 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+lt_cv_nm_interface \
 nm_file_list_spec \
+lt_cv_truncate_bin \
 lt_prog_compiler_no_builtin_flag \
 lt_prog_compiler_pic \
 lt_prog_compiler_wl \
@@ -16643,7 +17547,7 @@ old_striplib \
 striplib; do
     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[\\\\\\\`\\"\\\$]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -16670,10 +17574,11 @@ postinstall_cmds \
 postuninstall_cmds \
 finish_cmds \
 sys_lib_search_path_spec \
-sys_lib_dlsearch_path_spec; do
+configure_time_dlsearch_path \
+configure_time_lt_sys_library_path; do
     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[\\\\\\\`\\"\\\$]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -16682,19 +17587,16 @@ sys_lib_dlsearch_path_spec; do
 done
 
 ac_aux_dir='$ac_aux_dir'
-xsi_shell='$xsi_shell'
-lt_shell_append='$lt_shell_append'
 
-# See if we are running on zsh, and set the options which allow our
+# See if we are running on zsh, and set the options that allow our
 # commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
+if test -n "\${ZSH_VERSION+set}"; then
    setopt NO_GLOB_SUBST
 fi
 
 
     PACKAGE='$PACKAGE'
     VERSION='$VERSION'
-    TIMESTAMP='$TIMESTAMP'
     RM='$RM'
     ofile='$ofile'
 
@@ -17419,55 +18321,53 @@ $as_echo X"$file" |
  ;;
     "libtool":C)
 
-    # See if we are running on zsh, and set the options which allow our
+    # See if we are running on zsh, and set the options that allow our
     # commands through without removal of \ escapes.
-    if test -n "${ZSH_VERSION+set}" ; then
+    if test -n "${ZSH_VERSION+set}"; then
       setopt NO_GLOB_SUBST
     fi
 
-    cfgfile="${ofile}T"
+    cfgfile=${ofile}T
     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
     $RM "$cfgfile"
 
     cat <<_LT_EOF >> "$cfgfile"
 #! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Generated automatically by $as_me ($PACKAGE) $VERSION
 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
+
+# Provide generalized library-building support services.
+# Written by Gordon Matzigkeit, 1996
+
+# Copyright (C) 2014 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions.  There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of of the License, or
+# (at your option) any later version.
 #
-#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-#                 Foundation, Inc.
-#   Written by Gordon Matzigkeit, 1996
-#
-#   This file is part of GNU Libtool.
-#
-# GNU Libtool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program or library that is built
+# using GNU Libtool, you may include this file under the  same
+# distribution terms that you use for the rest of that program.
 #
-# GNU Libtool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING.  If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 # The names of the tagged configurations supported by this script.
-available_tags=""
+available_tags=''
+
+# Configured defaults for sys_lib_dlsearch_path munging.
+: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
 
 # ### BEGIN LIBTOOL CONFIG
 
@@ -17487,6 +18387,9 @@ pic_mode=$pic_mode
 # Whether or not to optimize for fast installation.
 fast_install=$enable_fast_install
 
+# Shared archive member basename,for filename based shared library versioning on AIX.
+shared_archive_member_spec=$shared_archive_member_spec
+
 # Shell to use when invoking shell scripts.
 SHELL=$lt_SHELL
 
@@ -17604,18 +18507,27 @@ global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
 # Transform the output of nm in a proper C declaration.
 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
 
+# Transform the output of nm into a list of symbols to manually relocate.
+global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
+
 # Transform the output of nm in a C name address pair.
 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
 
 # Transform the output of nm in a C name address pair when lib prefix is needed.
 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
 
+# The name lister interface.
+nm_interface=$lt_lt_cv_nm_interface
+
 # Specify filename containing input files for \$NM.
 nm_file_list_spec=$lt_nm_file_list_spec
 
-# The root where to search for dependent libraries,and in which our libraries should be installed.
+# The root where to search for dependent libraries,and where our libraries should be installed.
 lt_sysroot=$lt_sysroot
 
+# Command to truncate a binary pipe.
+lt_truncate_bin=$lt_lt_cv_truncate_bin
+
 # The name of the directory that contains temporary libtool files.
 objdir=$objdir
 
@@ -17706,8 +18618,11 @@ hardcode_into_libs=$hardcode_into_libs
 # Compile-time system search path for libraries.
 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 
-# Run-time system search path for libraries.
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+# Detected run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
+
+# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
+configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
 
 # Whether dlopen is supported.
 dlopen_support=$enable_dlopen
@@ -17800,13 +18715,13 @@ hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
 # Whether we need a single "-rpath" flag with a separated argument.
 hardcode_libdir_separator=$lt_hardcode_libdir_separator
 
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
 # DIR into the resulting binary.
 hardcode_direct=$hardcode_direct
 
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
 # DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# "absolute",i.e impossible to change by setting \$shlibpath_var if the
 # library is relocated.
 hardcode_direct_absolute=$hardcode_direct_absolute
 
@@ -17858,13 +18773,72 @@ hardcode_action=$hardcode_action
 
 _LT_EOF
 
+    cat <<'_LT_EOF' >> "$cfgfile"
+
+# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
+
+# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+#       string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+#       string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+#       "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+#       VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+    case x$2 in
+    x)
+        ;;
+    *:)
+        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
+        ;;
+    x:*)
+        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
+        ;;
+    *::*)
+        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
+        ;;
+    *)
+        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
+        ;;
+    esac
+}
+
+
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+    for cc_temp in $*""; do
+      case $cc_temp in
+        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+        \-*) ;;
+        *) break;;
+      esac
+    done
+    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+
+
+# ### END FUNCTIONS SHARED WITH CONFIGURE
+
+_LT_EOF
+
   case $host_os in
   aix3*)
     cat <<\_LT_EOF >> "$cfgfile"
 # AIX sometimes has problems with the GCC collect2 program.  For some
 # reason, if we set the COLLECT_NAMES environment variable, the problems
 # vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
+if test set != "${COLLECT_NAMES+set}"; then
   COLLECT_NAMES=
   export COLLECT_NAMES
 fi
@@ -17873,7 +18847,7 @@ _LT_EOF
   esac
 
 
-ltmain="$ac_aux_dir/ltmain.sh"
+ltmain=$ac_aux_dir/ltmain.sh
 
 
   # We use sed instead of cat because bash on DJGPP gets confused if
@@ -17883,165 +18857,6 @@ ltmain="$ac_aux_dir/ltmain.sh"
   sed '$q' "$ltmain" >> "$cfgfile" \
      || (rm -f "$cfgfile"; exit 1)
 
-  if test x"$xsi_shell" = xyes; then
-  sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
-func_dirname ()\
-{\
-\    case ${1} in\
-\      */*) func_dirname_result="${1%/*}${2}" ;;\
-\      *  ) func_dirname_result="${3}" ;;\
-\    esac\
-} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_basename ()$/,/^} # func_basename /c\
-func_basename ()\
-{\
-\    func_basename_result="${1##*/}"\
-} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
-func_dirname_and_basename ()\
-{\
-\    case ${1} in\
-\      */*) func_dirname_result="${1%/*}${2}" ;;\
-\      *  ) func_dirname_result="${3}" ;;\
-\    esac\
-\    func_basename_result="${1##*/}"\
-} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
-func_stripname ()\
-{\
-\    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
-\    # positional parameters, so assign one to ordinary parameter first.\
-\    func_stripname_result=${3}\
-\    func_stripname_result=${func_stripname_result#"${1}"}\
-\    func_stripname_result=${func_stripname_result%"${2}"}\
-} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
-func_split_long_opt ()\
-{\
-\    func_split_long_opt_name=${1%%=*}\
-\    func_split_long_opt_arg=${1#*=}\
-} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
-func_split_short_opt ()\
-{\
-\    func_split_short_opt_arg=${1#??}\
-\    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
-} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
-func_lo2o ()\
-{\
-\    case ${1} in\
-\      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
-\      *)    func_lo2o_result=${1} ;;\
-\    esac\
-} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_xform ()$/,/^} # func_xform /c\
-func_xform ()\
-{\
-    func_xform_result=${1%.*}.lo\
-} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_arith ()$/,/^} # func_arith /c\
-func_arith ()\
-{\
-    func_arith_result=$(( $* ))\
-} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_len ()$/,/^} # func_len /c\
-func_len ()\
-{\
-    func_len_result=${#1}\
-} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-fi
-
-if test x"$lt_shell_append" = xyes; then
-  sed -e '/^func_append ()$/,/^} # func_append /c\
-func_append ()\
-{\
-    eval "${1}+=\\${2}"\
-} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
-func_append_quoted ()\
-{\
-\    func_quote_for_eval "${2}"\
-\    eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
-} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  # Save a `func_append' function call where possible by direct use of '+='
-  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
-    && mv -f "$cfgfile.tmp" "$cfgfile" \
-      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-  test 0 -eq $? || _lt_function_replace_fail=:
-else
-  # Save a `func_append' function call even when '+=' is not available
-  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
-    && mv -f "$cfgfile.tmp" "$cfgfile" \
-      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-  test 0 -eq $? || _lt_function_replace_fail=:
-fi
-
-if test x"$_lt_function_replace_fail" = x":"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
-$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
-fi
-
-
    mv -f "$cfgfile" "$ofile" ||
     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
   chmod +x "$ofile"
index 14ac0a8..911984e 100644 (file)
@@ -3,12 +3,13 @@ AC_PREREQ([2.63])
 AC_INIT
 AC_CONFIG_SRCDIR([entities.c])
 AC_CONFIG_HEADERS([config.h])
+AM_MAINTAINER_MODE([enable])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CANONICAL_HOST
 
 LIBXML_MAJOR_VERSION=2
 LIBXML_MINOR_VERSION=9
-LIBXML_MICRO_VERSION=2
+LIBXML_MICRO_VERSION=4
 LIBXML_MICRO_VERSION_SUFFIX=
 LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX
 LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION
@@ -158,7 +159,7 @@ AC_ARG_WITH(readline,
   if test "$withval" != "no" -a "$withval" != "yes"; then
     RDL_DIR=$withval
     CPPFLAGS="${CPPFLAGS} -I$withval/include"
-    LIBS="${LIBS} -L$withval/lib"
+    LDFLAGS="${LDFLAGS} -L$withval/lib"
   fi
 ])
 AC_ARG_WITH(regexps,
@@ -194,7 +195,7 @@ AC_ARG_WITH(zlib,
   if test "$withval" != "no" -a "$withval" != "yes"; then
     Z_DIR=$withval
     CPPFLAGS="${CPPFLAGS} -I$withval/include"
-    LIBS="${LIBS} -L$withval/lib"
+    LDFLAGS="${LDFLAGS} -L$withval/lib"
   fi
 ])
 AC_ARG_WITH(lzma,
@@ -202,7 +203,7 @@ AC_ARG_WITH(lzma,
   if test "$withval" != "no" -a "$withval" != "yes"; then
     LZMA_DIR=$withval
     CPPFLAGS="${CPPFLAGS} -I$withval/include"
-    LIBS="${LIBS} -L$withval/lib"
+    LDFLAGS="${LDFLAGS} -L$withval/lib"
   fi
 ])
 AC_ARG_WITH(coverage,
@@ -390,24 +391,39 @@ WITH_ZLIB=0
 if test "$with_zlib" = "no"; then
     echo "Disabling compression support"
 else
-    AC_CHECK_HEADERS(zlib.h,
-        [SAVE_LDFLAGS="${LDFLAGS}"
-        LDFLAGS="-L${Z_DIR}/lib"
-       AC_CHECK_LIB(z, gzread,[
-           AC_DEFINE([HAVE_LIBZ], [1], [Have compression library])
-           WITH_ZLIB=1
-           if test "x${Z_DIR}" != "x"; then
-               Z_CFLAGS="-I${Z_DIR}/include"
-               Z_LIBS="-L${Z_DIR}/lib -lz"
-               [case ${host} in
-                   *-*-solaris*)
-                       Z_LIBS="-L${Z_DIR}/lib -R${Z_DIR}/lib -lz"
-                       ;;
-               esac]
-           else
-               Z_LIBS="-lz"
-           fi])
-        LDFLAGS="${SAVE_LDFLAGS}"])
+    # Try pkg-config first so that static linking works.
+    # If this succeeeds, we ignore the WITH_ZLIB directory.
+    PKG_CHECK_MODULES([Z],[zlib],
+        [have_libz=yes],
+        [have_libz=no])
+
+     if test "x$have_libz" = "xno"; then
+        AC_CHECK_HEADERS(zlib.h,
+            AC_CHECK_LIB(z, gzread,[
+                have_libz=yes
+                if test "x${Z_DIR}" != "x"; then
+                    Z_CFLAGS="-I${Z_DIR}/include"
+                    Z_LIBS="-L${Z_DIR}/lib -lz"
+                    [case ${host} in
+                        *-*-solaris*)
+                            Z_LIBS="-L${Z_DIR}/lib -R${Z_DIR}/lib -lz"
+                            ;;
+                    esac]
+                else
+                    Z_LIBS="-lz"
+                fi],
+                [have_libz=no])
+             )
+    else
+       # we still need to check for zlib.h header
+       AC_CHECK_HEADERS([zlib.h])
+    fi
+
+    # Found the library via either method?
+    if test "x$have_libz" = "xyes"; then
+        AC_DEFINE([HAVE_LIBZ], [1], [Have compression library])
+        WITH_ZLIB=1
+    fi
 fi
 
 AC_SUBST(Z_CFLAGS)
@@ -433,8 +449,6 @@ else
      # private dependencies, though, so static linking may fail.
      if test "x$have_liblzma" = "xno"; then
          AC_CHECK_HEADERS(lzma.h,
-           [SAVE_LDFLAGS="${LDFLAGS}"
-            LDFLAGS="-L${LZMA_DIR}/lib"
             AC_CHECK_LIB(lzma, lzma_code,[
                 have_liblzma=yes
                 if test "x${LZMA_DIR}" != "x"; then
@@ -444,7 +458,10 @@ else
                     LZMA_LIBS="-llzma"
                 fi],
                 [have_liblzma=no])
-            LDFLAGS="${SAVE_LDFLAGS}"])
+            )
+    else
+       # we still need to check for lzma,h header
+       AC_CHECK_HEADERS([lzma.h])
     fi
 
     # Found the library via either method?
@@ -774,7 +791,7 @@ else
     fi
 
     # warnings we'd like to see
-    CFLAGS="${CFLAGS} -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls"
+    CFLAGS="${CFLAGS} -pedantic -W -Wformat -Wno-format-extra-args -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls"
     # warnings we'd like to supress
     CFLAGS="${CFLAGS} -Wno-long-long"
     case "${host}" in
@@ -993,7 +1010,7 @@ if [[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XML" ]] || \
        fi
     fi
     if test "${GCC}" = "yes" ; then
-    CFLAGS="-g -O -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wall"
+    CFLAGS="-g -O -pedantic -W -Wformat -Wno-format-extra-args -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wall"
     fi
     STATIC_BINARIES="-static"
 dnl -Wcast-qual -ansi
@@ -1476,8 +1493,6 @@ case "$host" in
        *) M_LIBS="-lm"
        ;;
 esac
-XML_LIBS="-lxml2 $Z_LIBS $THREAD_LIBS $ICONV_LIBS $M_LIBS $LIBS"
-XML_LIBTOOLLIBS="libxml2.la"
 AC_SUBST(WITH_ICONV)
 
 WITH_ICU=0
@@ -1485,18 +1500,64 @@ ICU_LIBS=""
 if test "$with_icu" != "yes" ; then
     echo Disabling ICU support
 else
-    ICU_CONFIG=icu-config
-    if ${ICU_CONFIG} --cflags >/dev/null 2>&1
-    then
-        ICU_LIBS=`${ICU_CONFIG} --ldflags`
+    # Try pkg-config first so that static linking works.
+    # If this succeeeds, we ignore the WITH_ICU directory.
+    PKG_CHECK_MODULES([ICU],[icu-i18n],
+        [have_libicu=yes],
+        [have_libicu=no])
+
+    # If pkg-config failed, fall back to AC_CHECK_LIB. This
+    # will not pick up the necessary LIBS flags for liblzma's
+    # private dependencies, though, so static linking may fail.
+    if test "x$have_libicu" = "xno"; then
+        ICU_CONFIG=icu-config
+        if ${ICU_CONFIG} --cflags >/dev/null 2>&1
+        then
+            ICU_LIBS=`${ICU_CONFIG} --ldflags`
+            have_libicu=yes
+            echo Enabling ICU support
+        else
+            if test "$with_icu" != "yes" -a "$with_iconv" != "" ; then
+                CPPFLAGS="${CPPFLAGS} -I$with_icu"
+                # Export this since our headers include icu.h
+                XML_INCLUDEDIR="${XML_INCLUDEDIR} -I$with_icu"
+            fi
+
+            AC_CHECK_HEADER(unicode/ucnv.h,
+            AC_MSG_CHECKING(for icu)
+            AC_TRY_LINK([#include <unicode/ucnv.h>],[
+        UConverter *utf = ucnv_open("UTF-8", NULL);],[
+                AC_MSG_RESULT(yes)
+                have_libicu=yes],[
+                AC_MSG_RESULT(no)
+                AC_MSG_CHECKING(for icu in -licucore)
+
+                _ldflags="${LDFLAGS}"
+                _libs="${LIBS}"
+                LDFLAGS="${LDFLAGS} ${ICU_LIBS}"
+                LIBS="${LIBS} -licucore"
+
+                AC_TRY_LINK([#include <unicode/ucnv.h>],[
+        UConverter *utf = ucnv_open("UTF-8", NULL);],[
+                    AC_MSG_RESULT(yes)
+                    have_libicu=yes
+                    ICU_LIBS="${ICU_LIBS} -licucore"
+                    LIBS="${_libs}"
+                    LDFLAGS="${_ldflags}"],[
+                    AC_MSG_RESULT(no)
+                    LIBS="${_libs}"
+                LDFLAGS="${_ldflags}"])]))
+        fi
+    fi
+
+    # Found the library via either method?
+    if test "x$have_libicu" = "xyes"; then
         WITH_ICU=1
-        echo Enabling ICU support
-    else
-        AC_MSG_ERROR([libicu config program icu-config not found])
     fi
 fi
+XML_LIBS="-lxml2 $Z_LIBS $LZMA_LIBS $THREAD_LIBS $ICONV_LIBS $ICU_LIBS $M_LIBS $LIBS"
+XML_LIBTOOLLIBS="libxml2.la"
 AC_SUBST(WITH_ICU)
-AC_SUBST(ICU_LIBS)
 
 WITH_ISO8859X=1
 if test "$WITH_ICONV" != "1" ; then
@@ -1635,6 +1696,7 @@ AC_SUBST(XML_LIBDIR)
 AC_SUBST(XML_LIBS)
 AC_SUBST(XML_LIBTOOLLIBS)
 AC_SUBST(ICONV_LIBS)
+AC_SUBST(ICU_LIBS)
 AC_SUBST(XML_INCLUDEDIR)
 AC_SUBST(HTML_DIR)
 AC_SUBST(HAVE_ISNAN)
index b05fdff..a1b550a 100644 (file)
@@ -44,10 +44,10 @@ struct _xmlDebugCtxt {
     int depth;                  /* current depth */
     xmlDocPtr doc;              /* current document */
     xmlNodePtr node;           /* current node */
-    xmlDictPtr dict;           /* the doc dictionnary */
+    xmlDictPtr dict;           /* the doc dictionary */
     int check;                  /* do just checkings */
     int errors;                 /* number of errors found */
-    int nodict;                        /* if the document has no dictionnary */
+    int nodict;                        /* if the document has no dictionary */
     int options;               /* options */
 };
 
@@ -164,7 +164,7 @@ xmlDebugErr(xmlDebugCtxtPtr ctxt, int error, const char *msg)
                    NULL, NULL, NULL, 0, 0,
                    "%s", msg);
 }
-static void
+static void LIBXML_ATTR_FORMAT(3,0)
 xmlDebugErr2(xmlDebugCtxtPtr ctxt, int error, const char *msg, int extra)
 {
     ctxt->errors++;
@@ -174,7 +174,7 @@ xmlDebugErr2(xmlDebugCtxtPtr ctxt, int error, const char *msg, int extra)
                    NULL, NULL, NULL, 0, 0,
                    msg, extra);
 }
-static void
+static void LIBXML_ATTR_FORMAT(3,0)
 xmlDebugErr3(xmlDebugCtxtPtr ctxt, int error, const char *msg, const char *extra)
 {
     ctxt->errors++;
@@ -243,7 +243,7 @@ xmlCtxtCheckString(xmlDebugCtxtPtr ctxt, const xmlChar * str)
  * @ctxt: the debug context
  * @name: the name
  *
- * Do debugging on the name, for example the dictionnary status and
+ * Do debugging on the name, for example the dictionary status and
  * conformance to the Name production.
  */
 static void
@@ -265,7 +265,7 @@ xmlCtxtCheckName(xmlDebugCtxtPtr ctxt, const xmlChar * name)
             ((ctxt->doc == NULL) ||
              ((ctxt->doc->parseFlags & (XML_PARSE_SAX1 | XML_PARSE_NODICT)) == 0))) {
            xmlDebugErr3(ctxt, XML_CHECK_OUTSIDE_DICT,
-                        "Name is not from the document dictionnary '%s'",
+                        "Name is not from the document dictionary '%s'",
                         (const char *) name);
        }
     }
@@ -292,7 +292,7 @@ xmlCtxtGenericNodeCheck(xmlDebugCtxtPtr ctxt, xmlNodePtr node) {
             /* desactivated right now as it raises too many errors */
            if (doc->type == XML_DOCUMENT_NODE)
                xmlDebugErr(ctxt, XML_CHECK_NO_DICT,
-                           "Document has no dictionnary\n");
+                           "Document has no dictionary\n");
 #endif
            ctxt->nodict = 1;
        }
diff --git a/depcomp b/depcomp
index 4ebd5b3..fc98710 100755 (executable)
--- a/depcomp
+++ b/depcomp
@@ -3,7 +3,7 @@
 
 scriptversion=2013-05-30.07; # UTC
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/dict.c b/dict.c
index 5f71d55..c0585fe 100644 (file)
--- a/dict.c
+++ b/dict.c
@@ -87,7 +87,7 @@ typedef unsigned __int32 uint32_t;
 #endif /* WITH_BIG_KEY */
 
 /*
- * An entry in the dictionnary
+ * An entry in the dictionary
  */
 typedef struct _xmlDictEntry xmlDictEntry;
 typedef xmlDictEntry *xmlDictEntryPtr;
@@ -110,7 +110,7 @@ struct _xmlDictStrings {
     xmlChar array[1];
 };
 /*
- * The entire dictionnary
+ * The entire dictionary
  */
 struct _xmlDict {
     int ref_counter;
@@ -229,7 +229,7 @@ xmlDictCleanup(void) {
 
 /*
  * xmlDictAddString:
- * @dict: the dictionnary
+ * @dict: the dictionary
  * @name: the name of the userdata
  * @len: the length of the name
  *
@@ -291,7 +291,7 @@ found_pool:
 
 /*
  * xmlDictAddQString:
- * @dict: the dictionnary
+ * @dict: the dictionary
  * @prefix: the prefix of the userdata
  * @plen: the prefix length
  * @name: the name of the userdata
@@ -486,7 +486,10 @@ xmlDictComputeFastQKey(const xmlChar *prefix, int plen,
        value += 30 * (*prefix);
 
     if (len > 10) {
-        value += name[len - (plen + 1 + 1)];
+        int offset = len - (plen + 1 + 1);
+       if (offset < 0)
+           offset = len - (10 + 1);
+       value += name[offset];
         len = 10;
        if (plen > 10)
            plen = 10;
@@ -530,7 +533,7 @@ xmlDictComputeFastQKey(const xmlChar *prefix, int plen,
  *
  * Create a new dictionary
  *
- * Returns the newly created dictionnary, or NULL if an error occured.
+ * Returns the newly created dictionary, or NULL if an error occured.
  */
 xmlDictPtr
 xmlDictCreate(void) {
@@ -570,14 +573,14 @@ xmlDictCreate(void) {
 
 /**
  * xmlDictCreateSub:
- * @sub: an existing dictionnary
+ * @sub: an existing dictionary
  *
  * Create a new dictionary, inheriting strings from the read-only
- * dictionnary @sub. On lookup, strings are first searched in the
- * new dictionnary, then in @sub, and if not found are created in the
- * new dictionnary.
+ * dictionary @sub. On lookup, strings are first searched in the
+ * new dictionary, then in @sub, and if not found are created in the
+ * new dictionary.
  *
- * Returns the newly created dictionnary, or NULL if an error occured.
+ * Returns the newly created dictionary, or NULL if an error occured.
  */
 xmlDictPtr
 xmlDictCreateSub(xmlDictPtr sub) {
@@ -596,7 +599,7 @@ xmlDictCreateSub(xmlDictPtr sub) {
 
 /**
  * xmlDictReference:
- * @dict: the dictionnary
+ * @dict: the dictionary
  *
  * Increment the reference counter of a dictionary
  *
@@ -617,10 +620,10 @@ xmlDictReference(xmlDictPtr dict) {
 
 /**
  * xmlDictGrow:
- * @dict: the dictionnary
- * @size: the new size of the dictionnary
+ * @dict: the dictionary
+ * @size: the new size of the dictionary
  *
- * resize the dictionnary
+ * resize the dictionary
  *
  * Returns 0 in case of success, -1 in case of failure
  */
@@ -752,7 +755,7 @@ xmlDictGrow(xmlDictPtr dict, size_t size) {
 
 /**
  * xmlDictFree:
- * @dict: the dictionnary
+ * @dict: the dictionary
  *
  * Free the hash @dict and its contents. The userdata is
  * deallocated with @f if provided.
@@ -814,11 +817,11 @@ xmlDictFree(xmlDictPtr dict) {
 
 /**
  * xmlDictLookup:
- * @dict: the dictionnary
+ * @dict: the dictionary
  * @name: the name of the userdata
  * @len: the length of the name, if -1 it is recomputed
  *
- * Add the @name to the dictionnary @dict if not present.
+ * Add the @name to the dictionary @dict if not present.
  *
  * Returns the internal copy of the name or NULL in case of internal error
  */
@@ -954,11 +957,11 @@ xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len) {
 
 /**
  * xmlDictExists:
- * @dict: the dictionnary
+ * @dict: the dictionary
  * @name: the name of the userdata
  * @len: the length of the name, if -1 it is recomputed
  *
- * Check if the @name exists in the dictionnary @dict.
+ * Check if the @name exists in the dictionary @dict.
  *
  * Returns the internal copy of the name or NULL if not found.
  */
@@ -1062,7 +1065,7 @@ xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) {
 
 /**
  * xmlDictQLookup:
- * @dict: the dictionnary
+ * @dict: the dictionary
  * @prefix: the prefix
  * @name: the name
  *
@@ -1167,7 +1170,7 @@ xmlDictQLookup(xmlDictPtr dict, const xmlChar *prefix, const xmlChar *name) {
 
 /**
  * xmlDictOwns:
- * @dict: the dictionnary
+ * @dict: the dictionary
  * @str: the string
  *
  * check if a string is owned by the disctionary
@@ -1194,11 +1197,11 @@ xmlDictOwns(xmlDictPtr dict, const xmlChar *str) {
 
 /**
  * xmlDictSize:
- * @dict: the dictionnary
+ * @dict: the dictionary
  *
  * Query the number of elements installed in the hash @dict.
  *
- * Returns the number of elements in the dictionnary or
+ * Returns the number of elements in the dictionary or
  * -1 in case of error
  */
 int
@@ -1212,7 +1215,7 @@ xmlDictSize(xmlDictPtr dict) {
 
 /**
  * xmlDictSetLimit:
- * @dict: the dictionnary
+ * @dict: the dictionary
  * @limit: the limit in bytes
  *
  * Set a size limit for the dictionary
@@ -1233,7 +1236,7 @@ xmlDictSetLimit(xmlDictPtr dict, size_t limit) {
 
 /**
  * xmlDictGetUsage:
- * @dict: the dictionnary
+ * @dict: the dictionary
  *
  * Get how much memory is used by a dictionary for strings
  * Added in 2.9.0
index b1f069d..dba5952 100644 (file)
@@ -383,34 +383,6 @@ A:link, A:visited, A:active { text-decoration: underline }
 <a href="html/libxml-xmlregexp.html#xmlRegexpIsDeterminist">xmlRegexpIsDeterminist</a><br />
 </dd><dt>dict</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
 </dd><dt>dictionaries</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_NAME_LENGTH">XML_MAX_NAME_LENGTH</a><br />
-</dd><dt>dictionary</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_DICTIONARY_LIMIT">XML_MAX_DICTIONARY_LIMIT</a><br />
-<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
-<a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
-<a href="html/libxml-dict.html#xmlDictCleanup">xmlDictCleanup</a><br />
-<a href="html/libxml-dict.html#xmlDictCreate">xmlDictCreate</a><br />
-<a href="html/libxml-dict.html#xmlDictCreateSub">xmlDictCreateSub</a><br />
-<a href="html/libxml-dict.html#xmlDictGetUsage">xmlDictGetUsage</a><br />
-<a href="html/libxml-dict.html#xmlDictReference">xmlDictReference</a><br />
-<a href="html/libxml-dict.html#xmlDictSetLimit">xmlDictSetLimit</a><br />
-<a href="html/libxml-hash.html#xmlHashCreateDict">xmlHashCreateDict</a><br />
-<a href="html/libxml-dict.html#xmlInitializeDict">xmlInitializeDict</a><br />
-<a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br />
-<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
-<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
-<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
-</dd><dt>dictionnary</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
-<a href="html/libxml-dict.html#xmlDictCreate">xmlDictCreate</a><br />
-<a href="html/libxml-dict.html#xmlDictCreateSub">xmlDictCreateSub</a><br />
-<a href="html/libxml-dict.html#xmlDictExists">xmlDictExists</a><br />
-<a href="html/libxml-dict.html#xmlDictFree">xmlDictFree</a><br />
-<a href="html/libxml-dict.html#xmlDictGetUsage">xmlDictGetUsage</a><br />
-<a href="html/libxml-dict.html#xmlDictLookup">xmlDictLookup</a><br />
-<a href="html/libxml-dict.html#xmlDictOwns">xmlDictOwns</a><br />
-<a href="html/libxml-dict.html#xmlDictQLookup">xmlDictQLookup</a><br />
-<a href="html/libxml-dict.html#xmlDictReference">xmlDictReference</a><br />
-<a href="html/libxml-dict.html#xmlDictSetLimit">xmlDictSetLimit</a><br />
-<a href="html/libxml-dict.html#xmlDictSize">xmlDictSize</a><br />
-<a href="html/libxml-xmlregexp.html#xmlExpNewCtxt">xmlExpNewCtxt</a><br />
 </dd><dt>did</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_BLOCK_DEFAULT">XML_SCHEMAS_TYPE_BLOCK_DEFAULT</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
 <a href="html/libxml-xmlreader.html#xmlTextReaderStandalone">xmlTextReaderStandalone</a><br />
index c68ae92..af3b1a5 100644 (file)
@@ -143,6 +143,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <a href="html/libxml-xpathInternals.html#xmlXPathRegisterVariableNS">xmlXPathRegisterVariableNS</a><br />
 </dd><dt>unsafe</dt><dd><a href="html/libxml-valid.html#xmlSprintfElementContent">xmlSprintfElementContent</a><br />
 </dd><dt>unsigned</dt><dd><a href="">c</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocAtomicLoc">xmlMallocAtomicLoc</a><br />
 <a href="html/libxml-uri.html#xmlURIUnescapeString">xmlURIUnescapeString</a><br />
 </dd><dt>unsupported</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
 <a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
index 65e004b..2252a6b 100644 (file)
@@ -1309,6 +1309,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <a href="html/libxml-tree.html#XML_ATTRIBUTE_NONE">XML_ATTRIBUTE_NONE</a><br />
 <a href="html/libxml-tree.html#XML_ATTRIBUTE_NOTATION">XML_ATTRIBUTE_NOTATION</a><br />
 <a href="html/libxml-tree.html#XML_ATTRIBUTE_REQUIRED">XML_ATTRIBUTE_REQUIRED</a><br />
+<a href="html/libxml-tree.html#XML_BUFFER_ALLOC_BOUNDED">XML_BUFFER_ALLOC_BOUNDED</a><br />
 <a href="html/libxml-tree.html#XML_BUFFER_ALLOC_DOUBLEIT">XML_BUFFER_ALLOC_DOUBLEIT</a><br />
 <a href="html/libxml-tree.html#XML_BUFFER_ALLOC_EXACT">XML_BUFFER_ALLOC_EXACT</a><br />
 <a href="html/libxml-tree.html#XML_BUFFER_ALLOC_HYBRID">XML_BUFFER_ALLOC_HYBRID</a><br />
index 9027afe..f9ac249 100644 (file)
@@ -368,9 +368,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <a href="html/libxml-tree.html#xmlSplitQName2">xmlSplitQName2</a><br />
 <a href="html/libxml-tree.html#xmlSplitQName3">xmlSplitQName3</a><br />
 <a href="html/libxml-xmlstring.html#xmlStrEqual">xmlStrEqual</a><br />
-<a href="html/libxml-xmlstring.html#xmlStrPrintf">xmlStrPrintf</a><br />
 <a href="html/libxml-xmlstring.html#xmlStrQEqual">xmlStrQEqual</a><br />
-<a href="html/libxml-xmlstring.html#xmlStrVPrintf">xmlStrVPrintf</a><br />
 <a href="html/libxml-xmlstring.html#xmlStrcasecmp">xmlStrcasecmp</a><br />
 <a href="html/libxml-xmlstring.html#xmlStrcasestr">xmlStrcasestr</a><br />
 <a href="html/libxml-xmlstring.html#xmlStrcat">xmlStrcat</a><br />
index c2b82e7..cdde358 100644 (file)
@@ -154,6 +154,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <a href="html/libxml-tree.html#XML_ATTRIBUTE_NONE">XML_ATTRIBUTE_NONE</a><br />
 <a href="html/libxml-tree.html#XML_ATTRIBUTE_NOTATION">XML_ATTRIBUTE_NOTATION</a><br />
 <a href="html/libxml-tree.html#XML_ATTRIBUTE_REQUIRED">XML_ATTRIBUTE_REQUIRED</a><br />
+<a href="html/libxml-tree.html#XML_BUFFER_ALLOC_BOUNDED">XML_BUFFER_ALLOC_BOUNDED</a><br />
 <a href="html/libxml-tree.html#XML_BUFFER_ALLOC_DOUBLEIT">XML_BUFFER_ALLOC_DOUBLEIT</a><br />
 <a href="html/libxml-tree.html#XML_BUFFER_ALLOC_EXACT">XML_BUFFER_ALLOC_EXACT</a><br />
 <a href="html/libxml-tree.html#XML_BUFFER_ALLOC_HYBRID">XML_BUFFER_ALLOC_HYBRID</a><br />
index 03fcbd3..1514a76 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -78,7 +88,6 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = doc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
@@ -86,6 +95,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -176,6 +186,7 @@ am__define_uniq_tagged_files = \
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -242,6 +253,7 @@ HTML_DIR = @HTML_DIR@
 HTML_OBJ = @HTML_OBJ@
 HTTP_OBJ = @HTTP_OBJ@
 ICONV_LIBS = @ICONV_LIBS@
+ICU_CFLAGS = @ICU_CFLAGS@
 ICU_LIBS = @ICU_LIBS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
@@ -263,8 +275,10 @@ LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 LZMA_CFLAGS = @LZMA_CFLAGS@
 LZMA_LIBS = @LZMA_LIBS@
+MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -676,7 +690,7 @@ man_MANS = xmllint.1 xmlcatalog.1
 all: all-recursive
 
 .SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@ -688,7 +702,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu doc/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -701,9 +714,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 
-$(top_srcdir)/configure:  $(am__configure_deps)
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
 
@@ -1034,6 +1047,8 @@ uninstall-man: uninstall-man1
        mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
        uninstall-am uninstall-man uninstall-man1
 
+.PRECIOUS: Makefile
+
 
 @REBUILD_DOCS_TRUE@docs: web $(top_builddir)/NEWS libxml2.xsa $(man_MANS)
 
index b5b669a..7a36466 100755 (executable)
@@ -81,6 +81,7 @@ ignored_words = {
   "ATTRIBUTE_PRINTF": (5, "macro for gcc printf args checking extension"),
   "LIBXML_ATTR_FORMAT": (5, "macro for gcc printf args checking extension"),
   "LIBXML_ATTR_ALLOC_SIZE": (3, "macro for gcc checking extension"),
+  "__XML_EXTERNC": (0, "Special macro added for os400"),
 }
 
 def escape(raw):
index 4a86a2d..3041b2e 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,8 +89,6 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = doc/devhelp
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(dist_devhelp_DATA)
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
@@ -88,6 +96,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(dist_devhelp_DATA) \
+       $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -141,6 +151,7 @@ am__uninstall_files_from_dir = { \
 am__installdirs = "$(DESTDIR)$(devhelpdir)"
 DATA = $(dist_devhelp_DATA)
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -182,6 +193,7 @@ HTML_DIR = @HTML_DIR@
 HTML_OBJ = @HTML_OBJ@
 HTTP_OBJ = @HTTP_OBJ@
 ICONV_LIBS = @ICONV_LIBS@
+ICU_CFLAGS = @ICU_CFLAGS@
 ICU_LIBS = @ICU_LIBS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
@@ -203,8 +215,10 @@ LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 LZMA_CFLAGS = @LZMA_CFLAGS@
 LZMA_LIBS = @LZMA_LIBS@
+MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -442,7 +456,7 @@ EXTRA_DIST = devhelp.xsl html.xsl
 all: all-am
 
 .SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@ -454,7 +468,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/devhelp/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu doc/devhelp/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -467,9 +480,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 
-$(top_srcdir)/configure:  $(am__configure_deps)
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
 
@@ -654,6 +667,8 @@ uninstall-am: uninstall-dist_devhelpDATA
        mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
        uninstall-am uninstall-dist_devhelpDATA
 
+.PRECIOUS: Makefile
+
 
 @REBUILD_DOCS_TRUE@rebuild: libxml2.devhelp $(HTML_FILES)
 @REBUILD_DOCS_TRUE@.PHONY: rebuild
index 68f9380..90f0d39 100644 (file)
@@ -33,6 +33,6 @@
     <h2>
       <span class="refentrytitle">libxml2 API Modules</span>
     </h2>
-    <p><a href="libxml2-DOCBparser.html">DOCBparser</a> - old DocBook SGML parser<br/><a href="libxml2-HTMLparser.html">HTMLparser</a> - interface for an HTML 4.0 non-verifying parser<br/><a href="libxml2-HTMLtree.html">HTMLtree</a> - specific APIs to process HTML tree, especially serialization<br/><a href="libxml2-SAX.html">SAX</a> - Old SAX version 1 handler, deprecated<br/><a href="libxml2-SAX2.html">SAX2</a> - SAX2 parser interface used to build the DOM tree<br/><a href="libxml2-c14n.html">c14n</a> - Provide Canonical XML and Exclusive XML Canonicalization<br/><a href="libxml2-catalog.html">catalog</a> - interfaces to the Catalog handling system<br/><a href="libxml2-chvalid.html">chvalid</a> - Unicode character range checking<br/><a href="libxml2-debugXML.html">debugXML</a> - Tree debugging APIs<br/><a href="libxml2-dict.html">dict</a> - string dictionnary<br/><a href="libxml2-encoding.html">encoding</a> - interface for the encoding conversion functions<br/><a href="libxml2-entities.html">entities</a> - interface for the XML entities handling<br/><a href="libxml2-globals.html">globals</a> - interface for all global variables of the library<br/><a href="libxml2-hash.html">hash</a> - Chained hash tables<br/><a href="libxml2-list.html">list</a> - lists interfaces<br/><a href="libxml2-nanoftp.html">nanoftp</a> - minimal FTP implementation<br/><a href="libxml2-nanohttp.html">nanohttp</a> - minimal HTTP implementation<br/><a href="libxml2-parser.html">parser</a> - the core parser module<br/><a href="libxml2-parserInternals.html">parserInternals</a> - internals routines and limits exported by the parser.<br/><a href="libxml2-pattern.html">pattern</a> - pattern expression handling<br/><a href="libxml2-relaxng.html">relaxng</a> - implementation of the Relax-NG validation<br/><a href="libxml2-schemasInternals.html">schemasInternals</a> - internal interfaces for XML Schemas<br/><a href="libxml2-schematron.html">schematron</a> - XML Schemastron implementation<br/><a href="libxml2-threads.html">threads</a> - interfaces for thread handling<br/><a href="libxml2-tree.html">tree</a> - interfaces for tree manipulation<br/><a href="libxml2-uri.html">uri</a> - library of generic URI related routines<br/><a href="libxml2-valid.html">valid</a> - The DTD validation<br/><a href="libxml2-xinclude.html">xinclude</a> - implementation of XInclude<br/><a href="libxml2-xlink.html">xlink</a> - unfinished XLink detection module<br/><a href="libxml2-xmlIO.html">xmlIO</a> - interface for the I/O interfaces used by the parser<br/><a href="libxml2-xmlautomata.html">xmlautomata</a> - API to build regexp automata<br/><a href="libxml2-xmlerror.html">xmlerror</a> - error handling<br/><a href="libxml2-xmlexports.html">xmlexports</a> - macros for marking symbols as exportable/importable.<br/><a href="libxml2-xmlmemory.html">xmlmemory</a> - interface for the memory allocator<br/><a href="libxml2-xmlmodule.html">xmlmodule</a> - dynamic module loading<br/><a href="libxml2-xmlreader.html">xmlreader</a> - the XMLReader implementation<br/><a href="libxml2-xmlregexp.html">xmlregexp</a> - regular expressions handling<br/><a href="libxml2-xmlsave.html">xmlsave</a> - the XML document serializer<br/><a href="libxml2-xmlschemas.html">xmlschemas</a> - incomplete XML Schemas structure implementation<br/><a href="libxml2-xmlschemastypes.html">xmlschemastypes</a> - implementation of XML Schema Datatypes<br/><a href="libxml2-xmlstring.html">xmlstring</a> - set of routines to process strings<br/><a href="libxml2-xmlunicode.html">xmlunicode</a> - Unicode character APIs<br/><a href="libxml2-xmlversion.html">xmlversion</a> - compile-time version informations<br/><a href="libxml2-xmlwriter.html">xmlwriter</a> - text writing API for XML<br/><a href="libxml2-xpath.html">xpath</a> - XML Path Language implementation<br/><a href="libxml2-xpathInternals.html">xpathInternals</a> - internal interfaces for XML Path Language implementation<br/><a href="libxml2-xpointer.html">xpointer</a> - API to handle XML Pointers<br/></p>
+    <p><a href="libxml2-DOCBparser.html">DOCBparser</a> - old DocBook SGML parser<br/><a href="libxml2-HTMLparser.html">HTMLparser</a> - interface for an HTML 4.0 non-verifying parser<br/><a href="libxml2-HTMLtree.html">HTMLtree</a> - specific APIs to process HTML tree, especially serialization<br/><a href="libxml2-SAX.html">SAX</a> - Old SAX version 1 handler, deprecated<br/><a href="libxml2-SAX2.html">SAX2</a> - SAX2 parser interface used to build the DOM tree<br/><a href="libxml2-c14n.html">c14n</a> - Provide Canonical XML and Exclusive XML Canonicalization<br/><a href="libxml2-catalog.html">catalog</a> - interfaces to the Catalog handling system<br/><a href="libxml2-chvalid.html">chvalid</a> - Unicode character range checking<br/><a href="libxml2-debugXML.html">debugXML</a> - Tree debugging APIs<br/><a href="libxml2-dict.html">dict</a> - string dictionary<br/><a href="libxml2-encoding.html">encoding</a> - interface for the encoding conversion functions<br/><a href="libxml2-entities.html">entities</a> - interface for the XML entities handling<br/><a href="libxml2-globals.html">globals</a> - interface for all global variables of the library<br/><a href="libxml2-hash.html">hash</a> - Chained hash tables<br/><a href="libxml2-list.html">list</a> - lists interfaces<br/><a href="libxml2-nanoftp.html">nanoftp</a> - minimal FTP implementation<br/><a href="libxml2-nanohttp.html">nanohttp</a> - minimal HTTP implementation<br/><a href="libxml2-parser.html">parser</a> - the core parser module<br/><a href="libxml2-parserInternals.html">parserInternals</a> - internals routines and limits exported by the parser.<br/><a href="libxml2-pattern.html">pattern</a> - pattern expression handling<br/><a href="libxml2-relaxng.html">relaxng</a> - implementation of the Relax-NG validation<br/><a href="libxml2-schemasInternals.html">schemasInternals</a> - internal interfaces for XML Schemas<br/><a href="libxml2-schematron.html">schematron</a> - XML Schemastron implementation<br/><a href="libxml2-threads.html">threads</a> - interfaces for thread handling<br/><a href="libxml2-tree.html">tree</a> - interfaces for tree manipulation<br/><a href="libxml2-uri.html">uri</a> - library of generic URI related routines<br/><a href="libxml2-valid.html">valid</a> - The DTD validation<br/><a href="libxml2-xinclude.html">xinclude</a> - implementation of XInclude<br/><a href="libxml2-xlink.html">xlink</a> - unfinished XLink detection module<br/><a href="libxml2-xmlIO.html">xmlIO</a> - interface for the I/O interfaces used by the parser<br/><a href="libxml2-xmlautomata.html">xmlautomata</a> - API to build regexp automata<br/><a href="libxml2-xmlerror.html">xmlerror</a> - error handling<br/><a href="libxml2-xmlexports.html">xmlexports</a> - macros for marking symbols as exportable/importable.<br/><a href="libxml2-xmlmemory.html">xmlmemory</a> - interface for the memory allocator<br/><a href="libxml2-xmlmodule.html">xmlmodule</a> - dynamic module loading<br/><a href="libxml2-xmlreader.html">xmlreader</a> - the XMLReader implementation<br/><a href="libxml2-xmlregexp.html">xmlregexp</a> - regular expressions handling<br/><a href="libxml2-xmlsave.html">xmlsave</a> - the XML document serializer<br/><a href="libxml2-xmlschemas.html">xmlschemas</a> - incomplete XML Schemas structure implementation<br/><a href="libxml2-xmlschemastypes.html">xmlschemastypes</a> - implementation of XML Schema Datatypes<br/><a href="libxml2-xmlstring.html">xmlstring</a> - set of routines to process strings<br/><a href="libxml2-xmlunicode.html">xmlunicode</a> - Unicode character APIs<br/><a href="libxml2-xmlversion.html">xmlversion</a> - compile-time version informations<br/><a href="libxml2-xmlwriter.html">xmlwriter</a> - text writing API for XML<br/><a href="libxml2-xpath.html">xpath</a> - XML Path Language implementation<br/><a href="libxml2-xpathInternals.html">xpathInternals</a> - internal interfaces for XML Path Language implementation<br/><a href="libxml2-xpointer.html">xpointer</a> - API to handle XML Pointers<br/></p>
   </body>
 </html>
index fd5f6b9..3776c5b 100644 (file)
@@ -2,7 +2,7 @@
 <html>
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-    <title>dict: string dictionnary</title>
+    <title>dict: string dictionary</title>
     <meta name="generator" content="Libxml2 devhelp stylesheet"/>
     <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
     <link rel="up" href="general.html" title="API"/>
@@ -38,7 +38,7 @@
     <h2>
       <span class="refentrytitle">dict</span>
     </h2>
-    <p>dict - string dictionnary</p>
+    <p>dict - string dictionary</p>
     <p>dictionary of reusable strings, just used to avoid allocation and freeing operations. </p>
     <p>Author(s): Daniel Veillard </p>
     <div class="refsynopsisdiv">
@@ -82,47 +82,47 @@ The content of this structure is not made public by the API.
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlDictCreate"/>xmlDictCreate ()</h3><pre class="programlisting"><a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a>    xmlDictCreate           (void)<br/>
 </pre><p>Create a new dictionary</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created dictionnary, or NULL if an error occured.</td></tr></tbody></table></div></div>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created dictionary, or NULL if an error occured.</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlDictCreateSub"/>xmlDictCreateSub ()</h3><pre class="programlisting"><a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a>      xmlDictCreateSub        (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> sub)<br/>
-</pre><p>Create a new dictionary, inheriting strings from the read-only dictionnary @sub. On lookup, strings are first searched in the new dictionnary, then in @sub, and if not found are created in the new dictionnary.</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sub</tt></i>:</span></td><td>an existing dictionnary</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created dictionnary, or NULL if an error occured.</td></tr></tbody></table></div></div>
+</pre><p>Create a new dictionary, inheriting strings from the read-only dictionary @sub. On lookup, strings are first searched in the new dictionary, then in @sub, and if not found are created in the new dictionary.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sub</tt></i>:</span></td><td>an existing dictionary</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created dictionary, or NULL if an error occured.</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlDictExists"/>xmlDictExists ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *     xmlDictExists           (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br/>                                       const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/>                                        int len)<br/>
-</pre><p>Check if the @name exists in the dictionnary @dict.</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the name, if -1 it is recomputed</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal copy of the name or NULL if not found.</td></tr></tbody></table></div></div>
+</pre><p>Check if the @name exists in the dictionary @dict.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionary</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the name, if -1 it is recomputed</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal copy of the name or NULL if not found.</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlDictFree"/>xmlDictFree ()</h3><pre class="programlisting">void xmlDictFree                     (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br/>
 </pre><p>Free the hash @dict and its contents. The userdata is deallocated with @f if provided.</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr></tbody></table></div></div>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionary</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlDictGetUsage"/>xmlDictGetUsage ()</h3><pre class="programlisting">size_t       xmlDictGetUsage                 (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br/>
 </pre><p>Get how much memory is used by a dictionary for strings Added in 2.9.0</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the amount of strings allocated</td></tr></tbody></table></div></div>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionary</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the amount of strings allocated</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlDictLookup"/>xmlDictLookup ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *     xmlDictLookup           (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br/>                                       const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/>                                        int len)<br/>
-</pre><p>Add the @name to the dictionnary @dict if not present.</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the name, if -1 it is recomputed</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal copy of the name or NULL in case of internal error</td></tr></tbody></table></div></div>
+</pre><p>Add the @name to the dictionary @dict if not present.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionary</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the name, if -1 it is recomputed</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal copy of the name or NULL in case of internal error</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlDictOwns"/>xmlDictOwns ()</h3><pre class="programlisting">int  xmlDictOwns                     (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br/>                                       const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str)<br/>
 </pre><p>check if a string is owned by the disctionary</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true, 0 if false and -1 in case of error -1 in case of error</td></tr></tbody></table></div></div>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionary</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true, 0 if false and -1 in case of error -1 in case of error</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlDictQLookup"/>xmlDictQLookup ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *   xmlDictQLookup          (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br/>                                       const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/>                                      const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
 </pre><p>Add the QName @prefix:@name to the hash @dict if not present.</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the prefix</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal copy of the QName or NULL in case of internal error</td></tr></tbody></table></div></div>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionary</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the prefix</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal copy of the QName or NULL in case of internal error</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlDictReference"/>xmlDictReference ()</h3><pre class="programlisting">int        xmlDictReference                (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br/>
 </pre><p>Increment the <a href="libxml2-SAX.html#reference">reference</a> counter of a dictionary</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error</td></tr></tbody></table></div></div>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionary</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlDictSetLimit"/>xmlDictSetLimit ()</h3><pre class="programlisting">size_t       xmlDictSetLimit                 (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br/>                                       size_t limit)<br/>
 </pre><p>Set a size limit for the dictionary Added in 2.9.0</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>limit</tt></i>:</span></td><td>the limit in bytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the previous limit of the dictionary or 0</td></tr></tbody></table></div></div>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionary</td></tr><tr><td><span class="term"><i><tt>limit</tt></i>:</span></td><td>the limit in bytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the previous limit of the dictionary or 0</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlDictSize"/>xmlDictSize ()</h3><pre class="programlisting">int  xmlDictSize                     (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br/>
 </pre><p>Query the number of elements installed in the hash @dict.</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of elements in the dictionnary or -1 in case of error</td></tr></tbody></table></div></div>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionary</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of elements in the dictionary or -1 in case of error</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlInitializeDict"/>xmlInitializeDict ()</h3><pre class="programlisting">int      xmlInitializeDict               (void)<br/>
 </pre><p>Do the dictionary mutex initialization. this function is deprecated</p>
index 357c14a..c740554 100644 (file)
@@ -300,7 +300,7 @@ void        <a href="#xmlSetExternalEntityLoader">xmlSetExternalEntityLoader</a>    (<a hr
     <a name="XML_PARSE_SAX1">XML_PARSE_SAX1</a> = 512 /* use the SAX1 interface internally */
     <a name="XML_PARSE_XINCLUDE">XML_PARSE_XINCLUDE</a> = 1024 /* Implement XInclude substitition */
     <a name="XML_PARSE_NONET">XML_PARSE_NONET</a> = 2048 /* Forbid network access */
-    <a name="XML_PARSE_NODICT">XML_PARSE_NODICT</a> = 4096 /* Do not reuse the context dictionnary */
+    <a name="XML_PARSE_NODICT">XML_PARSE_NODICT</a> = 4096 /* Do not reuse the context dictionary */
     <a name="XML_PARSE_NSCLEAN">XML_PARSE_NSCLEAN</a> = 8192 /* remove redundant namespaces declarations */
     <a name="XML_PARSE_NOCDATA">XML_PARSE_NOCDATA</a> = 16384 /* merge CDATA as text nodes */
     <a name="XML_PARSE_NOXINCNODE">XML_PARSE_NOXINCNODE</a> = 32768 /* do not generate XINCLUDE START/END nodes */
index 3cc28c7..ac85d60 100644 (file)
@@ -409,7 +409,8 @@ The content of this structure is not made public by the API.
     <a name="XML_BUFFER_ALLOC_EXACT">XML_BUFFER_ALLOC_EXACT</a> = 2 /* grow only to the minimal size */
     <a name="XML_BUFFER_ALLOC_IMMUTABLE">XML_BUFFER_ALLOC_IMMUTABLE</a> = 3 /* immutable buffer */
     <a name="XML_BUFFER_ALLOC_IO">XML_BUFFER_ALLOC_IO</a> = 4 /* special allocation scheme used for I/O */
-    <a name="XML_BUFFER_ALLOC_HYBRID">XML_BUFFER_ALLOC_HYBRID</a> = 5 /*  exact up to a threshold, and doubleit thereafter */
+    <a name="XML_BUFFER_ALLOC_HYBRID">XML_BUFFER_ALLOC_HYBRID</a> = 5 /* exact up to a threshold, and doubleit thereafter */
+    <a name="XML_BUFFER_ALLOC_BOUNDED">XML_BUFFER_ALLOC_BOUNDED</a> = 6 /*  limit the upper size of the buffer */
 };
 </pre><p/>
 </div>
@@ -781,7 +782,7 @@ The content of this structure is not made public by the API.
     void *     catalogs        : document's own catalog
     int        recovery        : run in recovery mode
     int        progressive     : is this a progressive parsing
-    <a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a>      dict    : dictionnary for the parser
+    <a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a>      dict    : dictionary for the parser
     const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * *     atts    : array for the attributes callbacks
     int        maxatts : the size of the array
     int        docdict : * pre-interned strings *
index 8610538..bf400d0 100644 (file)
@@ -118,7 +118,7 @@ char *      <a href="#xmlMemStrdupLoc">xmlMemStrdupLoc</a>                  (const char * str, <br/>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlMallocAtomicLoc"/>xmlMallocAtomicLoc ()</h3><pre class="programlisting">void * xmlMallocAtomicLoc              (size_t size, <br/>                                      const char * file, <br/>                                        int line)<br/>
 </pre><p>a malloc() equivalent, with logging of the allocation info.</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>an int specifying the size in byte to allocate.</td></tr><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>the file name or NULL</td></tr><tr><td><span class="term"><i><tt>line</tt></i>:</span></td><td>the line number</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the allocated area or NULL in case of lack of memory.</td></tr></tbody></table></div></div>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>an unsigned int specifying the size in byte to allocate.</td></tr><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>the file name or NULL</td></tr><tr><td><span class="term"><i><tt>line</tt></i>:</span></td><td>the line number</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the allocated area or NULL in case of lack of memory.</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlMallocLoc"/>xmlMallocLoc ()</h3><pre class="programlisting">void *     xmlMallocLoc                    (size_t size, <br/>                                      const char * file, <br/>                                        int line)<br/>
 </pre><p>a malloc() equivalent, with logging of the allocation info.</p>
index 9427a34..8d5c80e 100644 (file)
@@ -200,7 +200,7 @@ The content of this structure is not made public by the API.
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlExpNewCtxt"/>xmlExpNewCtxt ()</h3><pre class="programlisting"><a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> xmlExpNewCtxt           (int maxNodes, <br/>                                     <a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br/>
 </pre><p>Creates a new context for manipulating expressions</p>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>maxNodes</tt></i>:</span></td><td>the maximum number of nodes</td></tr><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>optional dictionnary to use internally</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the context or NULL in case of error</td></tr></tbody></table></div></div>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>maxNodes</tt></i>:</span></td><td>the maximum number of nodes</td></tr><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>optional dictionary to use internally</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the context or NULL in case of error</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlExpNewOr"/>xmlExpNewOr ()</h3><pre class="programlisting"><a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a>     xmlExpNewOr             (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/>                                    <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> left, <br/>                                    <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> right)<br/>
 </pre><p>Get the atom associated to the choice @left | @right Note that @left and @right are consumed in the operation, to keep an handle on them use xmlExpRef() and use xmlExpFree() to release them, this is true even in case of failure (unless ctxt == NULL).</p>
index 6dfc70b..ca90ed4 100644 (file)
@@ -49,7 +49,7 @@ int   <a href="#xmlStrcmp">xmlStrcmp</a>                      (const <a href="libxml2-xmlstring.html#
 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCharStrndup">xmlCharStrndup</a>            (const char * cur, <br/>                                         int len);
 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *   <a href="#xmlStrcasestr">xmlStrcasestr</a>              (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/>                                         const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * val);
 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlStrcat">xmlStrcat</a>              (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/>                                       const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * add);
-int    <a href="#xmlStrPrintf">xmlStrPrintf</a>                        (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * buf, <br/>                                       int len, <br/>                                  const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * msg, <br/>                                         ... ...);
+int    <a href="#xmlStrPrintf">xmlStrPrintf</a>                        (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * buf, <br/>                                       int len, <br/>                                  const char * msg, <br/>                                         ... ...);
 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *   <a href="#xmlStrstr">xmlStrstr</a>              (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/>                                         const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * val);
 int    <a href="#xmlUTF8Size">xmlUTF8Size</a>                  (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf);
 int    <a href="#xmlStrQEqual">xmlStrQEqual</a>                        (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pref, <br/>                                        const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/>                                        const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str);
@@ -65,7 +65,7 @@ int   <a href="#xmlStrncmp">xmlStrncmp</a>                    (const <a href="libxml2-xmlstring.htm
 int    <a href="#xmlGetUTF8Char">xmlGetUTF8Char</a>                    (const unsigned char * utf, <br/>                                        int * len);
 int    <a href="#xmlStrcasecmp">xmlStrcasecmp</a>                      (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br/>                                        const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2);
 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlStrndup">xmlStrndup</a>            (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/>                                         int len);
-int    <a href="#xmlStrVPrintf">xmlStrVPrintf</a>                      (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * buf, <br/>                                       int len, <br/>                                  const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * msg, <br/>                                         va_list ap);
+int    <a href="#xmlStrVPrintf">xmlStrVPrintf</a>                      (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * buf, <br/>                                       int len, <br/>                                  const char * msg, <br/>                                         va_list ap);
 int    <a href="#xmlUTF8Strsize">xmlUTF8Strsize</a>                    (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf, <br/>                                         int len);
 int    <a href="#xmlCheckUTF8">xmlCheckUTF8</a>                        (const unsigned char * utf);
 int    <a href="#xmlStrncasecmp">xmlStrncasecmp</a>                    (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br/>                                        const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2, <br/>                                        int len);
@@ -111,7 +111,7 @@ int <a href="#xmlUTF8Strloc">xmlUTF8Strloc</a>                      (const <a href="libxml2-xmlstri
 </pre><p>Check if both strings are equal of have same content. Should be a bit more readable and faster than xmlStrcmp()</p>
 <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>the first <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>the second <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if they are equal, 0 if they are different</td></tr></tbody></table></div></div>
         <hr/>
-        <div class="refsect2" lang="en"><h3><a name="xmlStrPrintf"/>xmlStrPrintf ()</h3><pre class="programlisting">int        xmlStrPrintf                    (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * buf, <br/>                                       int len, <br/>                                  const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * msg, <br/>                                         ... ...)<br/>
+        <div class="refsect2" lang="en"><h3><a name="xmlStrPrintf"/>xmlStrPrintf ()</h3><pre class="programlisting">int        xmlStrPrintf                    (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * buf, <br/>                                       int len, <br/>                                  const char * msg, <br/>                                         ... ...)<br/>
 </pre><p>Formats @msg and places result into @buf.</p>
 <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the result buffer.</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the result buffer length.</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message with printf formatting.</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the message.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of <a href="libxml2-SAX.html#characters">characters</a> written to @buf or -1 if an error occurs.</td></tr></tbody></table></div></div>
         <hr/>
@@ -119,7 +119,7 @@ int <a href="#xmlUTF8Strloc">xmlUTF8Strloc</a>                      (const <a href="libxml2-xmlstri
 </pre><p>Check if a QName is Equal to a given string</p>
 <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>pref</tt></i>:</span></td><td>the prefix of the QName</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the localname of the QName</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the second <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if they are equal, 0 if they are different</td></tr></tbody></table></div></div>
         <hr/>
-        <div class="refsect2" lang="en"><h3><a name="xmlStrVPrintf"/>xmlStrVPrintf ()</h3><pre class="programlisting">int      xmlStrVPrintf                   (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * buf, <br/>                                       int len, <br/>                                  const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * msg, <br/>                                         va_list ap)<br/>
+        <div class="refsect2" lang="en"><h3><a name="xmlStrVPrintf"/>xmlStrVPrintf ()</h3><pre class="programlisting">int      xmlStrVPrintf                   (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * buf, <br/>                                       int len, <br/>                                  const char * msg, <br/>                                         va_list ap)<br/>
 </pre><p>Formats @msg and places result into @buf.</p>
 <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the result buffer.</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the result buffer length.</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message with printf formatting.</td></tr><tr><td><span class="term"><i><tt>ap</tt></i>:</span></td><td>extra parameters for the message.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of <a href="libxml2-SAX.html#characters">characters</a> written to @buf or -1 if an error occurs.</td></tr></tbody></table></div></div>
         <hr/>
index 282546a..fbd3ad4 100644 (file)
     <function name="XML_ATTRIBUTE_NONE" link="libxml2-tree.html#XML_ATTRIBUTE_NONE"/>
     <function name="XML_ATTRIBUTE_NOTATION" link="libxml2-tree.html#XML_ATTRIBUTE_NOTATION"/>
     <function name="XML_ATTRIBUTE_REQUIRED" link="libxml2-tree.html#XML_ATTRIBUTE_REQUIRED"/>
+    <function name="XML_BUFFER_ALLOC_BOUNDED" link="libxml2-tree.html#XML_BUFFER_ALLOC_BOUNDED"/>
     <function name="XML_BUFFER_ALLOC_DOUBLEIT" link="libxml2-tree.html#XML_BUFFER_ALLOC_DOUBLEIT"/>
     <function name="XML_BUFFER_ALLOC_EXACT" link="libxml2-tree.html#XML_BUFFER_ALLOC_EXACT"/>
     <function name="XML_BUFFER_ALLOC_HYBRID" link="libxml2-tree.html#XML_BUFFER_ALLOC_HYBRID"/>
index 7b66627..05830fb 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -84,8 +94,6 @@ noinst_PROGRAMS = io1$(EXEEXT) io2$(EXEEXT) parse1$(EXEEXT) \
        reader4$(EXEEXT) testWriter$(EXEEXT) tree1$(EXEEXT) \
        tree2$(EXEEXT) xpath1$(EXEEXT) xpath2$(EXEEXT)
 subdir = doc/examples
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(top_srcdir)/depcomp
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
@@ -93,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -276,6 +285,7 @@ am__define_uniq_tagged_files = \
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -317,6 +327,7 @@ HTML_DIR = @HTML_DIR@
 HTML_OBJ = @HTML_OBJ@
 HTTP_OBJ = @HTTP_OBJ@
 ICONV_LIBS = @ICONV_LIBS@
+ICU_CFLAGS = @ICU_CFLAGS@
 ICU_LIBS = @ICU_LIBS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
@@ -338,8 +349,10 @@ LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 LZMA_CFLAGS = @LZMA_CFLAGS@
 LZMA_LIBS = @LZMA_LIBS@
+MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -549,7 +562,7 @@ all: all-am
 
 .SUFFIXES:
 .SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@ -561,7 +574,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/examples/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu doc/examples/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -574,9 +586,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 
-$(top_srcdir)/configure:  $(am__configure_deps)
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
 
@@ -676,14 +688,14 @@ distclean-compile:
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
 
 .c.obj:
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 
 .c.lo:
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -902,6 +914,8 @@ uninstall-am:
        mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
        tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 @REBUILD_DOCS_TRUE@rebuild: examples.xml index.html
 @REBUILD_DOCS_TRUE@.PHONY: rebuild
index adf65c7..4a4c036 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
 <document xmlns:xi="http://www.w3.org/2003/XInclude">
   <p>List of people:</p>
-  <list xml:base="sql://select_name_from_people"><people>a</people><people>b</people></list>
+  <list><people>a</people><people>b</people></list>
 </document>
index 1a58210..42d71a6 100644 (file)
@@ -10,4 +10,4 @@ A:link, A:visited, A:active { text-decoration: underline }
 </style><style type="text/css">
       div.deprecated pre.programlisting {border-style: double;border-color:red}
       pre.programlisting {border-style: double;background: #EECFA1}
-    </style><title>Reference Manual for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Reference Manual for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2>Table of Contents</h2><ul><li><a href="libxml-DOCBparser.html">DOCBparser</a>: old DocBook SGML parser</li><li><a href="libxml-HTMLparser.html">HTMLparser</a>: interface for an HTML 4.0 non-verifying parser</li><li><a href="libxml-HTMLtree.html">HTMLtree</a>: specific APIs to process HTML tree, especially serialization</li><li><a href="libxml-SAX.html">SAX</a>: Old SAX version 1 handler, deprecated</li><li><a href="libxml-SAX2.html">SAX2</a>: SAX2 parser interface used to build the DOM tree</li><li><a href="libxml-c14n.html">c14n</a>: Provide Canonical XML and Exclusive XML Canonicalization</li><li><a href="libxml-catalog.html">catalog</a>: interfaces to the Catalog handling system</li><li><a href="libxml-chvalid.html">chvalid</a>: Unicode character range checking</li><li><a href="libxml-debugXML.html">debugXML</a>: Tree debugging APIs</li><li><a href="libxml-dict.html">dict</a>: string dictionnary</li><li><a href="libxml-encoding.html">encoding</a>: interface for the encoding conversion functions</li><li><a href="libxml-entities.html">entities</a>: interface for the XML entities handling</li><li><a href="libxml-globals.html">globals</a>: interface for all global variables of the library</li><li><a href="libxml-hash.html">hash</a>: Chained hash tables</li><li><a href="libxml-list.html">list</a>: lists interfaces</li><li><a href="libxml-nanoftp.html">nanoftp</a>: minimal FTP implementation</li><li><a href="libxml-nanohttp.html">nanohttp</a>: minimal HTTP implementation</li><li><a href="libxml-parser.html">parser</a>: the core parser module</li><li><a href="libxml-parserInternals.html">parserInternals</a>: internals routines and limits exported by the parser.</li><li><a href="libxml-pattern.html">pattern</a>: pattern expression handling</li><li><a href="libxml-relaxng.html">relaxng</a>: implementation of the Relax-NG validation</li><li><a href="libxml-schemasInternals.html">schemasInternals</a>: internal interfaces for XML Schemas</li><li><a href="libxml-schematron.html">schematron</a>: XML Schemastron implementation</li><li><a href="libxml-threads.html">threads</a>: interfaces for thread handling</li><li><a href="libxml-tree.html">tree</a>: interfaces for tree manipulation</li><li><a href="libxml-uri.html">uri</a>: library of generic URI related routines</li><li><a href="libxml-valid.html">valid</a>: The DTD validation</li><li><a href="libxml-xinclude.html">xinclude</a>: implementation of XInclude</li><li><a href="libxml-xlink.html">xlink</a>: unfinished XLink detection module</li><li><a href="libxml-xmlIO.html">xmlIO</a>: interface for the I/O interfaces used by the parser</li><li><a href="libxml-xmlautomata.html">xmlautomata</a>: API to build regexp automata</li><li><a href="libxml-xmlerror.html">xmlerror</a>: error handling</li><li><a href="libxml-xmlexports.html">xmlexports</a>: macros for marking symbols as exportable/importable.</li><li><a href="libxml-xmlmemory.html">xmlmemory</a>: interface for the memory allocator</li><li><a href="libxml-xmlmodule.html">xmlmodule</a>: dynamic module loading</li><li><a href="libxml-xmlreader.html">xmlreader</a>: the XMLReader implementation</li><li><a href="libxml-xmlregexp.html">xmlregexp</a>: regular expressions handling</li><li><a href="libxml-xmlsave.html">xmlsave</a>: the XML document serializer</li><li><a href="libxml-xmlschemas.html">xmlschemas</a>: incomplete XML Schemas structure implementation</li><li><a href="libxml-xmlschemastypes.html">xmlschemastypes</a>: implementation of XML Schema Datatypes</li><li><a href="libxml-xmlstring.html">xmlstring</a>: set of routines to process strings</li><li><a href="libxml-xmlunicode.html">xmlunicode</a>: Unicode character APIs</li><li><a href="libxml-xmlversion.html">xmlversion</a>: compile-time version informations</li><li><a href="libxml-xmlwriter.html">xmlwriter</a>: text writing API for XML</li><li><a href="libxml-xpath.html">xpath</a>: XML Path Language implementation</li><li><a href="libxml-xpathInternals.html">xpathInternals</a>: internal interfaces for XML Path Language implementation</li><li><a href="libxml-xpointer.html">xpointer</a>: API to handle XML Pointers</li></ul><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
+    </style><title>Reference Manual for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Reference Manual for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2>Table of Contents</h2><ul><li><a href="libxml-DOCBparser.html">DOCBparser</a>: old DocBook SGML parser</li><li><a href="libxml-HTMLparser.html">HTMLparser</a>: interface for an HTML 4.0 non-verifying parser</li><li><a href="libxml-HTMLtree.html">HTMLtree</a>: specific APIs to process HTML tree, especially serialization</li><li><a href="libxml-SAX.html">SAX</a>: Old SAX version 1 handler, deprecated</li><li><a href="libxml-SAX2.html">SAX2</a>: SAX2 parser interface used to build the DOM tree</li><li><a href="libxml-c14n.html">c14n</a>: Provide Canonical XML and Exclusive XML Canonicalization</li><li><a href="libxml-catalog.html">catalog</a>: interfaces to the Catalog handling system</li><li><a href="libxml-chvalid.html">chvalid</a>: Unicode character range checking</li><li><a href="libxml-debugXML.html">debugXML</a>: Tree debugging APIs</li><li><a href="libxml-dict.html">dict</a>: string dictionary</li><li><a href="libxml-encoding.html">encoding</a>: interface for the encoding conversion functions</li><li><a href="libxml-entities.html">entities</a>: interface for the XML entities handling</li><li><a href="libxml-globals.html">globals</a>: interface for all global variables of the library</li><li><a href="libxml-hash.html">hash</a>: Chained hash tables</li><li><a href="libxml-list.html">list</a>: lists interfaces</li><li><a href="libxml-nanoftp.html">nanoftp</a>: minimal FTP implementation</li><li><a href="libxml-nanohttp.html">nanohttp</a>: minimal HTTP implementation</li><li><a href="libxml-parser.html">parser</a>: the core parser module</li><li><a href="libxml-parserInternals.html">parserInternals</a>: internals routines and limits exported by the parser.</li><li><a href="libxml-pattern.html">pattern</a>: pattern expression handling</li><li><a href="libxml-relaxng.html">relaxng</a>: implementation of the Relax-NG validation</li><li><a href="libxml-schemasInternals.html">schemasInternals</a>: internal interfaces for XML Schemas</li><li><a href="libxml-schematron.html">schematron</a>: XML Schemastron implementation</li><li><a href="libxml-threads.html">threads</a>: interfaces for thread handling</li><li><a href="libxml-tree.html">tree</a>: interfaces for tree manipulation</li><li><a href="libxml-uri.html">uri</a>: library of generic URI related routines</li><li><a href="libxml-valid.html">valid</a>: The DTD validation</li><li><a href="libxml-xinclude.html">xinclude</a>: implementation of XInclude</li><li><a href="libxml-xlink.html">xlink</a>: unfinished XLink detection module</li><li><a href="libxml-xmlIO.html">xmlIO</a>: interface for the I/O interfaces used by the parser</li><li><a href="libxml-xmlautomata.html">xmlautomata</a>: API to build regexp automata</li><li><a href="libxml-xmlerror.html">xmlerror</a>: error handling</li><li><a href="libxml-xmlexports.html">xmlexports</a>: macros for marking symbols as exportable/importable.</li><li><a href="libxml-xmlmemory.html">xmlmemory</a>: interface for the memory allocator</li><li><a href="libxml-xmlmodule.html">xmlmodule</a>: dynamic module loading</li><li><a href="libxml-xmlreader.html">xmlreader</a>: the XMLReader implementation</li><li><a href="libxml-xmlregexp.html">xmlregexp</a>: regular expressions handling</li><li><a href="libxml-xmlsave.html">xmlsave</a>: the XML document serializer</li><li><a href="libxml-xmlschemas.html">xmlschemas</a>: incomplete XML Schemas structure implementation</li><li><a href="libxml-xmlschemastypes.html">xmlschemastypes</a>: implementation of XML Schema Datatypes</li><li><a href="libxml-xmlstring.html">xmlstring</a>: set of routines to process strings</li><li><a href="libxml-xmlunicode.html">xmlunicode</a>: Unicode character APIs</li><li><a href="libxml-xmlversion.html">xmlversion</a>: compile-time version informations</li><li><a href="libxml-xmlwriter.html">xmlwriter</a>: text writing API for XML</li><li><a href="libxml-xpath.html">xpath</a>: XML Path Language implementation</li><li><a href="libxml-xpathInternals.html">xpathInternals</a>: internal interfaces for XML Path Language implementation</li><li><a href="libxml-xpointer.html">xpointer</a>: API to handle XML Pointers</li></ul><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
index 1a58210..42d71a6 100644 (file)
@@ -10,4 +10,4 @@ A:link, A:visited, A:active { text-decoration: underline }
 </style><style type="text/css">
       div.deprecated pre.programlisting {border-style: double;border-color:red}
       pre.programlisting {border-style: double;background: #EECFA1}
-    </style><title>Reference Manual for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Reference Manual for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2>Table of Contents</h2><ul><li><a href="libxml-DOCBparser.html">DOCBparser</a>: old DocBook SGML parser</li><li><a href="libxml-HTMLparser.html">HTMLparser</a>: interface for an HTML 4.0 non-verifying parser</li><li><a href="libxml-HTMLtree.html">HTMLtree</a>: specific APIs to process HTML tree, especially serialization</li><li><a href="libxml-SAX.html">SAX</a>: Old SAX version 1 handler, deprecated</li><li><a href="libxml-SAX2.html">SAX2</a>: SAX2 parser interface used to build the DOM tree</li><li><a href="libxml-c14n.html">c14n</a>: Provide Canonical XML and Exclusive XML Canonicalization</li><li><a href="libxml-catalog.html">catalog</a>: interfaces to the Catalog handling system</li><li><a href="libxml-chvalid.html">chvalid</a>: Unicode character range checking</li><li><a href="libxml-debugXML.html">debugXML</a>: Tree debugging APIs</li><li><a href="libxml-dict.html">dict</a>: string dictionnary</li><li><a href="libxml-encoding.html">encoding</a>: interface for the encoding conversion functions</li><li><a href="libxml-entities.html">entities</a>: interface for the XML entities handling</li><li><a href="libxml-globals.html">globals</a>: interface for all global variables of the library</li><li><a href="libxml-hash.html">hash</a>: Chained hash tables</li><li><a href="libxml-list.html">list</a>: lists interfaces</li><li><a href="libxml-nanoftp.html">nanoftp</a>: minimal FTP implementation</li><li><a href="libxml-nanohttp.html">nanohttp</a>: minimal HTTP implementation</li><li><a href="libxml-parser.html">parser</a>: the core parser module</li><li><a href="libxml-parserInternals.html">parserInternals</a>: internals routines and limits exported by the parser.</li><li><a href="libxml-pattern.html">pattern</a>: pattern expression handling</li><li><a href="libxml-relaxng.html">relaxng</a>: implementation of the Relax-NG validation</li><li><a href="libxml-schemasInternals.html">schemasInternals</a>: internal interfaces for XML Schemas</li><li><a href="libxml-schematron.html">schematron</a>: XML Schemastron implementation</li><li><a href="libxml-threads.html">threads</a>: interfaces for thread handling</li><li><a href="libxml-tree.html">tree</a>: interfaces for tree manipulation</li><li><a href="libxml-uri.html">uri</a>: library of generic URI related routines</li><li><a href="libxml-valid.html">valid</a>: The DTD validation</li><li><a href="libxml-xinclude.html">xinclude</a>: implementation of XInclude</li><li><a href="libxml-xlink.html">xlink</a>: unfinished XLink detection module</li><li><a href="libxml-xmlIO.html">xmlIO</a>: interface for the I/O interfaces used by the parser</li><li><a href="libxml-xmlautomata.html">xmlautomata</a>: API to build regexp automata</li><li><a href="libxml-xmlerror.html">xmlerror</a>: error handling</li><li><a href="libxml-xmlexports.html">xmlexports</a>: macros for marking symbols as exportable/importable.</li><li><a href="libxml-xmlmemory.html">xmlmemory</a>: interface for the memory allocator</li><li><a href="libxml-xmlmodule.html">xmlmodule</a>: dynamic module loading</li><li><a href="libxml-xmlreader.html">xmlreader</a>: the XMLReader implementation</li><li><a href="libxml-xmlregexp.html">xmlregexp</a>: regular expressions handling</li><li><a href="libxml-xmlsave.html">xmlsave</a>: the XML document serializer</li><li><a href="libxml-xmlschemas.html">xmlschemas</a>: incomplete XML Schemas structure implementation</li><li><a href="libxml-xmlschemastypes.html">xmlschemastypes</a>: implementation of XML Schema Datatypes</li><li><a href="libxml-xmlstring.html">xmlstring</a>: set of routines to process strings</li><li><a href="libxml-xmlunicode.html">xmlunicode</a>: Unicode character APIs</li><li><a href="libxml-xmlversion.html">xmlversion</a>: compile-time version informations</li><li><a href="libxml-xmlwriter.html">xmlwriter</a>: text writing API for XML</li><li><a href="libxml-xpath.html">xpath</a>: XML Path Language implementation</li><li><a href="libxml-xpathInternals.html">xpathInternals</a>: internal interfaces for XML Path Language implementation</li><li><a href="libxml-xpointer.html">xpointer</a>: API to handle XML Pointers</li></ul><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
+    </style><title>Reference Manual for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Reference Manual for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2>Table of Contents</h2><ul><li><a href="libxml-DOCBparser.html">DOCBparser</a>: old DocBook SGML parser</li><li><a href="libxml-HTMLparser.html">HTMLparser</a>: interface for an HTML 4.0 non-verifying parser</li><li><a href="libxml-HTMLtree.html">HTMLtree</a>: specific APIs to process HTML tree, especially serialization</li><li><a href="libxml-SAX.html">SAX</a>: Old SAX version 1 handler, deprecated</li><li><a href="libxml-SAX2.html">SAX2</a>: SAX2 parser interface used to build the DOM tree</li><li><a href="libxml-c14n.html">c14n</a>: Provide Canonical XML and Exclusive XML Canonicalization</li><li><a href="libxml-catalog.html">catalog</a>: interfaces to the Catalog handling system</li><li><a href="libxml-chvalid.html">chvalid</a>: Unicode character range checking</li><li><a href="libxml-debugXML.html">debugXML</a>: Tree debugging APIs</li><li><a href="libxml-dict.html">dict</a>: string dictionary</li><li><a href="libxml-encoding.html">encoding</a>: interface for the encoding conversion functions</li><li><a href="libxml-entities.html">entities</a>: interface for the XML entities handling</li><li><a href="libxml-globals.html">globals</a>: interface for all global variables of the library</li><li><a href="libxml-hash.html">hash</a>: Chained hash tables</li><li><a href="libxml-list.html">list</a>: lists interfaces</li><li><a href="libxml-nanoftp.html">nanoftp</a>: minimal FTP implementation</li><li><a href="libxml-nanohttp.html">nanohttp</a>: minimal HTTP implementation</li><li><a href="libxml-parser.html">parser</a>: the core parser module</li><li><a href="libxml-parserInternals.html">parserInternals</a>: internals routines and limits exported by the parser.</li><li><a href="libxml-pattern.html">pattern</a>: pattern expression handling</li><li><a href="libxml-relaxng.html">relaxng</a>: implementation of the Relax-NG validation</li><li><a href="libxml-schemasInternals.html">schemasInternals</a>: internal interfaces for XML Schemas</li><li><a href="libxml-schematron.html">schematron</a>: XML Schemastron implementation</li><li><a href="libxml-threads.html">threads</a>: interfaces for thread handling</li><li><a href="libxml-tree.html">tree</a>: interfaces for tree manipulation</li><li><a href="libxml-uri.html">uri</a>: library of generic URI related routines</li><li><a href="libxml-valid.html">valid</a>: The DTD validation</li><li><a href="libxml-xinclude.html">xinclude</a>: implementation of XInclude</li><li><a href="libxml-xlink.html">xlink</a>: unfinished XLink detection module</li><li><a href="libxml-xmlIO.html">xmlIO</a>: interface for the I/O interfaces used by the parser</li><li><a href="libxml-xmlautomata.html">xmlautomata</a>: API to build regexp automata</li><li><a href="libxml-xmlerror.html">xmlerror</a>: error handling</li><li><a href="libxml-xmlexports.html">xmlexports</a>: macros for marking symbols as exportable/importable.</li><li><a href="libxml-xmlmemory.html">xmlmemory</a>: interface for the memory allocator</li><li><a href="libxml-xmlmodule.html">xmlmodule</a>: dynamic module loading</li><li><a href="libxml-xmlreader.html">xmlreader</a>: the XMLReader implementation</li><li><a href="libxml-xmlregexp.html">xmlregexp</a>: regular expressions handling</li><li><a href="libxml-xmlsave.html">xmlsave</a>: the XML document serializer</li><li><a href="libxml-xmlschemas.html">xmlschemas</a>: incomplete XML Schemas structure implementation</li><li><a href="libxml-xmlschemastypes.html">xmlschemastypes</a>: implementation of XML Schema Datatypes</li><li><a href="libxml-xmlstring.html">xmlstring</a>: set of routines to process strings</li><li><a href="libxml-xmlunicode.html">xmlunicode</a>: Unicode character APIs</li><li><a href="libxml-xmlversion.html">xmlversion</a>: compile-time version informations</li><li><a href="libxml-xmlwriter.html">xmlwriter</a>: text writing API for XML</li><li><a href="libxml-xpath.html">xpath</a>: XML Path Language implementation</li><li><a href="libxml-xpathInternals.html">xpathInternals</a>: internal interfaces for XML Path Language implementation</li><li><a href="libxml-xpointer.html">xpointer</a>: API to handle XML Pointers</li></ul><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
index bdd21f4..74e243b 100644 (file)
@@ -33,26 +33,26 @@ The content of this structure is not made public by the API.
 </pre><p>Free the dictionary mutex. Do not call unless sure the library is not in use anymore !</p>
 <h3><a name="xmlDictCreate" id="xmlDictCreate"></a>Function: xmlDictCreate</h3><pre class="programlisting"><a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a>        xmlDictCreate           (void)<br />
 </pre><p>Create a new dictionary</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created dictionnary, or NULL if an error occured.</td></tr></tbody></table></div><h3><a name="xmlDictCreateSub" id="xmlDictCreateSub"></a>Function: xmlDictCreateSub</h3><pre class="programlisting"><a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a>  xmlDictCreateSub        (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> sub)<br />
-</pre><p>Create a new dictionary, inheriting strings from the read-only dictionnary @sub. On lookup, strings are first searched in the new dictionnary, then in @sub, and if not found are created in the new dictionnary.</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>sub</tt></i>:</span></td><td>an existing dictionnary</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created dictionnary, or NULL if an error occured.</td></tr></tbody></table></div><h3><a name="xmlDictExists" id="xmlDictExists"></a>Function: xmlDictExists</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *    xmlDictExists           (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br />                                       const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br />                                        int len)<br />
-</pre><p>Check if the @name exists in the dictionnary @dict.</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the name, if -1 it is recomputed</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal copy of the name or NULL if not found.</td></tr></tbody></table></div><h3><a name="xmlDictFree" id="xmlDictFree"></a>Function: xmlDictFree</h3><pre class="programlisting">void       xmlDictFree                     (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br />
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created dictionary, or NULL if an error occured.</td></tr></tbody></table></div><h3><a name="xmlDictCreateSub" id="xmlDictCreateSub"></a>Function: xmlDictCreateSub</h3><pre class="programlisting"><a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a>   xmlDictCreateSub        (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> sub)<br />
+</pre><p>Create a new dictionary, inheriting strings from the read-only dictionary @sub. On lookup, strings are first searched in the new dictionary, then in @sub, and if not found are created in the new dictionary.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>sub</tt></i>:</span></td><td>an existing dictionary</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created dictionary, or NULL if an error occured.</td></tr></tbody></table></div><h3><a name="xmlDictExists" id="xmlDictExists"></a>Function: xmlDictExists</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *      xmlDictExists           (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br />                                       const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br />                                        int len)<br />
+</pre><p>Check if the @name exists in the dictionary @dict.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionary</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the name, if -1 it is recomputed</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal copy of the name or NULL if not found.</td></tr></tbody></table></div><h3><a name="xmlDictFree" id="xmlDictFree"></a>Function: xmlDictFree</h3><pre class="programlisting">void        xmlDictFree                     (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br />
 </pre><p>Free the hash @dict and its contents. The userdata is deallocated with @f if provided.</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr></tbody></table></div><h3><a name="xmlDictGetUsage" id="xmlDictGetUsage"></a>Function: xmlDictGetUsage</h3><pre class="programlisting">size_t  xmlDictGetUsage                 (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br />
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionary</td></tr></tbody></table></div><h3><a name="xmlDictGetUsage" id="xmlDictGetUsage"></a>Function: xmlDictGetUsage</h3><pre class="programlisting">size_t   xmlDictGetUsage                 (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br />
 </pre><p>Get how much memory is used by a dictionary for strings Added in 2.9.0</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the amount of strings allocated</td></tr></tbody></table></div><h3><a name="xmlDictLookup" id="xmlDictLookup"></a>Function: xmlDictLookup</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *       xmlDictLookup           (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br />                                       const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br />                                        int len)<br />
-</pre><p>Add the @name to the dictionnary @dict if not present.</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the name, if -1 it is recomputed</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal copy of the name or NULL in case of internal error</td></tr></tbody></table></div><h3><a name="xmlDictOwns" id="xmlDictOwns"></a>Function: xmlDictOwns</h3><pre class="programlisting">int    xmlDictOwns                     (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br />                                       const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)<br />
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionary</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the amount of strings allocated</td></tr></tbody></table></div><h3><a name="xmlDictLookup" id="xmlDictLookup"></a>Function: xmlDictLookup</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *        xmlDictLookup           (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br />                                       const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br />                                        int len)<br />
+</pre><p>Add the @name to the dictionary @dict if not present.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionary</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the name, if -1 it is recomputed</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal copy of the name or NULL in case of internal error</td></tr></tbody></table></div><h3><a name="xmlDictOwns" id="xmlDictOwns"></a>Function: xmlDictOwns</h3><pre class="programlisting">int     xmlDictOwns                     (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br />                                       const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)<br />
 </pre><p>check if a string is owned by the disctionary</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true, 0 if false and -1 in case of error -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlDictQLookup" id="xmlDictQLookup"></a>Function: xmlDictQLookup</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *       xmlDictQLookup          (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br />                                       const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br />                                      const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionary</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true, 0 if false and -1 in case of error -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlDictQLookup" id="xmlDictQLookup"></a>Function: xmlDictQLookup</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *        xmlDictQLookup          (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br />                                       const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br />                                      const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
 </pre><p>Add the QName @prefix:@name to the hash @dict if not present.</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the prefix</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal copy of the QName or NULL in case of internal error</td></tr></tbody></table></div><h3><a name="xmlDictReference" id="xmlDictReference"></a>Function: xmlDictReference</h3><pre class="programlisting">int     xmlDictReference                (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br />
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionary</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the prefix</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal copy of the QName or NULL in case of internal error</td></tr></tbody></table></div><h3><a name="xmlDictReference" id="xmlDictReference"></a>Function: xmlDictReference</h3><pre class="programlisting">int      xmlDictReference                (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br />
 </pre><p>Increment the <a href="libxml-SAX.html#reference">reference</a> counter of a dictionary</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlDictSetLimit" id="xmlDictSetLimit"></a>Function: xmlDictSetLimit</h3><pre class="programlisting">size_t xmlDictSetLimit                 (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br />                                       size_t limit)<br />
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionary</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlDictSetLimit" id="xmlDictSetLimit"></a>Function: xmlDictSetLimit</h3><pre class="programlisting">size_t  xmlDictSetLimit                 (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br />                                       size_t limit)<br />
 </pre><p>Set a size limit for the dictionary Added in 2.9.0</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>limit</tt></i>:</span></td><td>the limit in bytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the previous limit of the dictionary or 0</td></tr></tbody></table></div><h3><a name="xmlDictSize" id="xmlDictSize"></a>Function: xmlDictSize</h3><pre class="programlisting">int      xmlDictSize                     (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br />
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionary</td></tr><tr><td><span class="term"><i><tt>limit</tt></i>:</span></td><td>the limit in bytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the previous limit of the dictionary or 0</td></tr></tbody></table></div><h3><a name="xmlDictSize" id="xmlDictSize"></a>Function: xmlDictSize</h3><pre class="programlisting">int       xmlDictSize                     (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br />
 </pre><p>Query the number of elements installed in the hash @dict.</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of elements in the dictionnary or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlInitializeDict" id="xmlInitializeDict"></a>Function: xmlInitializeDict</h3><pre class="programlisting">int  xmlInitializeDict               (void)<br />
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionary</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of elements in the dictionary or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlInitializeDict" id="xmlInitializeDict"></a>Function: xmlInitializeDict</h3><pre class="programlisting">int    xmlInitializeDict               (void)<br />
 </pre><p>Do the dictionary mutex initialization. this function is deprecated</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if initialization was already done, and 1 if that call led to the initialization</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
index 1a58210..42d71a6 100644 (file)
@@ -10,4 +10,4 @@ A:link, A:visited, A:active { text-decoration: underline }
 </style><style type="text/css">
       div.deprecated pre.programlisting {border-style: double;border-color:red}
       pre.programlisting {border-style: double;background: #EECFA1}
-    </style><title>Reference Manual for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Reference Manual for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2>Table of Contents</h2><ul><li><a href="libxml-DOCBparser.html">DOCBparser</a>: old DocBook SGML parser</li><li><a href="libxml-HTMLparser.html">HTMLparser</a>: interface for an HTML 4.0 non-verifying parser</li><li><a href="libxml-HTMLtree.html">HTMLtree</a>: specific APIs to process HTML tree, especially serialization</li><li><a href="libxml-SAX.html">SAX</a>: Old SAX version 1 handler, deprecated</li><li><a href="libxml-SAX2.html">SAX2</a>: SAX2 parser interface used to build the DOM tree</li><li><a href="libxml-c14n.html">c14n</a>: Provide Canonical XML and Exclusive XML Canonicalization</li><li><a href="libxml-catalog.html">catalog</a>: interfaces to the Catalog handling system</li><li><a href="libxml-chvalid.html">chvalid</a>: Unicode character range checking</li><li><a href="libxml-debugXML.html">debugXML</a>: Tree debugging APIs</li><li><a href="libxml-dict.html">dict</a>: string dictionnary</li><li><a href="libxml-encoding.html">encoding</a>: interface for the encoding conversion functions</li><li><a href="libxml-entities.html">entities</a>: interface for the XML entities handling</li><li><a href="libxml-globals.html">globals</a>: interface for all global variables of the library</li><li><a href="libxml-hash.html">hash</a>: Chained hash tables</li><li><a href="libxml-list.html">list</a>: lists interfaces</li><li><a href="libxml-nanoftp.html">nanoftp</a>: minimal FTP implementation</li><li><a href="libxml-nanohttp.html">nanohttp</a>: minimal HTTP implementation</li><li><a href="libxml-parser.html">parser</a>: the core parser module</li><li><a href="libxml-parserInternals.html">parserInternals</a>: internals routines and limits exported by the parser.</li><li><a href="libxml-pattern.html">pattern</a>: pattern expression handling</li><li><a href="libxml-relaxng.html">relaxng</a>: implementation of the Relax-NG validation</li><li><a href="libxml-schemasInternals.html">schemasInternals</a>: internal interfaces for XML Schemas</li><li><a href="libxml-schematron.html">schematron</a>: XML Schemastron implementation</li><li><a href="libxml-threads.html">threads</a>: interfaces for thread handling</li><li><a href="libxml-tree.html">tree</a>: interfaces for tree manipulation</li><li><a href="libxml-uri.html">uri</a>: library of generic URI related routines</li><li><a href="libxml-valid.html">valid</a>: The DTD validation</li><li><a href="libxml-xinclude.html">xinclude</a>: implementation of XInclude</li><li><a href="libxml-xlink.html">xlink</a>: unfinished XLink detection module</li><li><a href="libxml-xmlIO.html">xmlIO</a>: interface for the I/O interfaces used by the parser</li><li><a href="libxml-xmlautomata.html">xmlautomata</a>: API to build regexp automata</li><li><a href="libxml-xmlerror.html">xmlerror</a>: error handling</li><li><a href="libxml-xmlexports.html">xmlexports</a>: macros for marking symbols as exportable/importable.</li><li><a href="libxml-xmlmemory.html">xmlmemory</a>: interface for the memory allocator</li><li><a href="libxml-xmlmodule.html">xmlmodule</a>: dynamic module loading</li><li><a href="libxml-xmlreader.html">xmlreader</a>: the XMLReader implementation</li><li><a href="libxml-xmlregexp.html">xmlregexp</a>: regular expressions handling</li><li><a href="libxml-xmlsave.html">xmlsave</a>: the XML document serializer</li><li><a href="libxml-xmlschemas.html">xmlschemas</a>: incomplete XML Schemas structure implementation</li><li><a href="libxml-xmlschemastypes.html">xmlschemastypes</a>: implementation of XML Schema Datatypes</li><li><a href="libxml-xmlstring.html">xmlstring</a>: set of routines to process strings</li><li><a href="libxml-xmlunicode.html">xmlunicode</a>: Unicode character APIs</li><li><a href="libxml-xmlversion.html">xmlversion</a>: compile-time version informations</li><li><a href="libxml-xmlwriter.html">xmlwriter</a>: text writing API for XML</li><li><a href="libxml-xpath.html">xpath</a>: XML Path Language implementation</li><li><a href="libxml-xpathInternals.html">xpathInternals</a>: internal interfaces for XML Path Language implementation</li><li><a href="libxml-xpointer.html">xpointer</a>: API to handle XML Pointers</li></ul><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
+    </style><title>Reference Manual for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Reference Manual for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2>Table of Contents</h2><ul><li><a href="libxml-DOCBparser.html">DOCBparser</a>: old DocBook SGML parser</li><li><a href="libxml-HTMLparser.html">HTMLparser</a>: interface for an HTML 4.0 non-verifying parser</li><li><a href="libxml-HTMLtree.html">HTMLtree</a>: specific APIs to process HTML tree, especially serialization</li><li><a href="libxml-SAX.html">SAX</a>: Old SAX version 1 handler, deprecated</li><li><a href="libxml-SAX2.html">SAX2</a>: SAX2 parser interface used to build the DOM tree</li><li><a href="libxml-c14n.html">c14n</a>: Provide Canonical XML and Exclusive XML Canonicalization</li><li><a href="libxml-catalog.html">catalog</a>: interfaces to the Catalog handling system</li><li><a href="libxml-chvalid.html">chvalid</a>: Unicode character range checking</li><li><a href="libxml-debugXML.html">debugXML</a>: Tree debugging APIs</li><li><a href="libxml-dict.html">dict</a>: string dictionary</li><li><a href="libxml-encoding.html">encoding</a>: interface for the encoding conversion functions</li><li><a href="libxml-entities.html">entities</a>: interface for the XML entities handling</li><li><a href="libxml-globals.html">globals</a>: interface for all global variables of the library</li><li><a href="libxml-hash.html">hash</a>: Chained hash tables</li><li><a href="libxml-list.html">list</a>: lists interfaces</li><li><a href="libxml-nanoftp.html">nanoftp</a>: minimal FTP implementation</li><li><a href="libxml-nanohttp.html">nanohttp</a>: minimal HTTP implementation</li><li><a href="libxml-parser.html">parser</a>: the core parser module</li><li><a href="libxml-parserInternals.html">parserInternals</a>: internals routines and limits exported by the parser.</li><li><a href="libxml-pattern.html">pattern</a>: pattern expression handling</li><li><a href="libxml-relaxng.html">relaxng</a>: implementation of the Relax-NG validation</li><li><a href="libxml-schemasInternals.html">schemasInternals</a>: internal interfaces for XML Schemas</li><li><a href="libxml-schematron.html">schematron</a>: XML Schemastron implementation</li><li><a href="libxml-threads.html">threads</a>: interfaces for thread handling</li><li><a href="libxml-tree.html">tree</a>: interfaces for tree manipulation</li><li><a href="libxml-uri.html">uri</a>: library of generic URI related routines</li><li><a href="libxml-valid.html">valid</a>: The DTD validation</li><li><a href="libxml-xinclude.html">xinclude</a>: implementation of XInclude</li><li><a href="libxml-xlink.html">xlink</a>: unfinished XLink detection module</li><li><a href="libxml-xmlIO.html">xmlIO</a>: interface for the I/O interfaces used by the parser</li><li><a href="libxml-xmlautomata.html">xmlautomata</a>: API to build regexp automata</li><li><a href="libxml-xmlerror.html">xmlerror</a>: error handling</li><li><a href="libxml-xmlexports.html">xmlexports</a>: macros for marking symbols as exportable/importable.</li><li><a href="libxml-xmlmemory.html">xmlmemory</a>: interface for the memory allocator</li><li><a href="libxml-xmlmodule.html">xmlmodule</a>: dynamic module loading</li><li><a href="libxml-xmlreader.html">xmlreader</a>: the XMLReader implementation</li><li><a href="libxml-xmlregexp.html">xmlregexp</a>: regular expressions handling</li><li><a href="libxml-xmlsave.html">xmlsave</a>: the XML document serializer</li><li><a href="libxml-xmlschemas.html">xmlschemas</a>: incomplete XML Schemas structure implementation</li><li><a href="libxml-xmlschemastypes.html">xmlschemastypes</a>: implementation of XML Schema Datatypes</li><li><a href="libxml-xmlstring.html">xmlstring</a>: set of routines to process strings</li><li><a href="libxml-xmlunicode.html">xmlunicode</a>: Unicode character APIs</li><li><a href="libxml-xmlversion.html">xmlversion</a>: compile-time version informations</li><li><a href="libxml-xmlwriter.html">xmlwriter</a>: text writing API for XML</li><li><a href="libxml-xpath.html">xpath</a>: XML Path Language implementation</li><li><a href="libxml-xpathInternals.html">xpathInternals</a>: internal interfaces for XML Path Language implementation</li><li><a href="libxml-xpointer.html">xpointer</a>: API to handle XML Pointers</li></ul><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
index 98123f7..4d890c6 100644 (file)
@@ -279,7 +279,7 @@ void        <a href="#xmlParserInputDeallocate">xmlParserInputDeallocate</a>        (<a href="
     <a name="XML_PARSE_SAX1" id="XML_PARSE_SAX1">XML_PARSE_SAX1</a> = 512 : use the SAX1 interface internally
     <a name="XML_PARSE_XINCLUDE" id="XML_PARSE_XINCLUDE">XML_PARSE_XINCLUDE</a> = 1024 : Implement XInclude substitition
     <a name="XML_PARSE_NONET" id="XML_PARSE_NONET">XML_PARSE_NONET</a> = 2048 : Forbid network access
-    <a name="XML_PARSE_NODICT" id="XML_PARSE_NODICT">XML_PARSE_NODICT</a> = 4096 : Do not reuse the context dictionnary
+    <a name="XML_PARSE_NODICT" id="XML_PARSE_NODICT">XML_PARSE_NODICT</a> = 4096 : Do not reuse the context dictionary
     <a name="XML_PARSE_NSCLEAN" id="XML_PARSE_NSCLEAN">XML_PARSE_NSCLEAN</a> = 8192 : remove redundant namespaces declarations
     <a name="XML_PARSE_NOCDATA" id="XML_PARSE_NOCDATA">XML_PARSE_NOCDATA</a> = 16384 : merge CDATA as text nodes
     <a name="XML_PARSE_NOXINCNODE" id="XML_PARSE_NOXINCNODE">XML_PARSE_NOXINCNODE</a> = 32768 : do not generate XINCLUDE START/END nodes
index e2081cc..d95872d 100644 (file)
@@ -305,6 +305,7 @@ The content of this structure is not made public by the API.
     <a name="XML_BUFFER_ALLOC_IMMUTABLE" id="XML_BUFFER_ALLOC_IMMUTABLE">XML_BUFFER_ALLOC_IMMUTABLE</a> = 3 : immutable buffer
     <a name="XML_BUFFER_ALLOC_IO" id="XML_BUFFER_ALLOC_IO">XML_BUFFER_ALLOC_IO</a> = 4 : special allocation scheme used for I/O
     <a name="XML_BUFFER_ALLOC_HYBRID" id="XML_BUFFER_ALLOC_HYBRID">XML_BUFFER_ALLOC_HYBRID</a> = 5 : exact up to a threshold, and doubleit thereafter
+    <a name="XML_BUFFER_ALLOC_BOUNDED" id="XML_BUFFER_ALLOC_BOUNDED">XML_BUFFER_ALLOC_BOUNDED</a> = 6 : limit the upper size of the buffer
 }
 </pre><h3><a name="xmlDOMWrapCtxt" id="xmlDOMWrapCtxt">Structure xmlDOMWrapCtxt</a></h3><pre class="programlisting">Structure xmlDOMWrapCtxt<br />struct _xmlDOMWrapCtxt {
     void *     _private        : * The type of this context, just in case
@@ -554,7 +555,7 @@ The content of this structure is not made public by the API.
     void *     catalogs        : document's own catalog
     int        recovery        : run in recovery mode
     int        progressive     : is this a progressive parsing
-    <a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a>       dict    : dictionnary for the parser
+    <a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a>       dict    : dictionary for the parser
     const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * *      atts    : array for the attributes callbacks
     int        maxatts : the size of the array
     int        docdict : * pre-interned strings *
index d653775..3406e09 100644 (file)
@@ -65,7 +65,7 @@ void  xmlFreeFunc                     (void * mem)
 </pre><p>Initialize the memory layer.</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success</td></tr></tbody></table></div><h3><a name="xmlMallocAtomicLoc" id="xmlMallocAtomicLoc"></a>Function: xmlMallocAtomicLoc</h3><pre class="programlisting">void * xmlMallocAtomicLoc              (size_t size, <br />                                     const char * file, <br />                                       int line)<br />
 </pre><p>a malloc() equivalent, with logging of the allocation info.</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>an int specifying the size in byte to allocate.</td></tr><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>the file name or NULL</td></tr><tr><td><span class="term"><i><tt>line</tt></i>:</span></td><td>the line number</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the allocated area or NULL in case of lack of memory.</td></tr></tbody></table></div><h3><a name="xmlMallocFunc" id="xmlMallocFunc"></a>Function type: xmlMallocFunc</h3><pre class="programlisting">Function type: xmlMallocFunc
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>an unsigned int specifying the size in byte to allocate.</td></tr><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>the file name or NULL</td></tr><tr><td><span class="term"><i><tt>line</tt></i>:</span></td><td>the line number</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the allocated area or NULL in case of lack of memory.</td></tr></tbody></table></div><h3><a name="xmlMallocFunc" id="xmlMallocFunc"></a>Function type: xmlMallocFunc</h3><pre class="programlisting">Function type: xmlMallocFunc
 void * xmlMallocFunc                   (size_t size)
 </pre><p>Signature for a malloc() implementation.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size requested in bytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the newly allocated block or NULL in case of error.</td></tr></tbody></table></div><br />
 <h3><a name="xmlMallocLoc" id="xmlMallocLoc"></a>Function: xmlMallocLoc</h3><pre class="programlisting">void * xmlMallocLoc                    (size_t size, <br />                                     const char * file, <br />                                       int line)<br />
index 8dda699..564f65e 100644 (file)
@@ -101,7 +101,7 @@ The content of this structure is not made public by the API.
 </pre><p>Get the atom associated to this name from that context</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the atom name</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the atom name length in byte (or -1);</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the node or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlExpNewCtxt" id="xmlExpNewCtxt"></a>Function: xmlExpNewCtxt</h3><pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a>     xmlExpNewCtxt           (int maxNodes, <br />                                    <a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br />
 </pre><p>Creates a new context for manipulating expressions</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>maxNodes</tt></i>:</span></td><td>the maximum number of nodes</td></tr><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>optional dictionnary to use internally</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlExpNewOr" id="xmlExpNewOr"></a>Function: xmlExpNewOr</h3><pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a>    xmlExpNewOr             (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br />                                    <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> left, <br />                                    <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> right)<br />
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>maxNodes</tt></i>:</span></td><td>the maximum number of nodes</td></tr><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>optional dictionary to use internally</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlExpNewOr" id="xmlExpNewOr"></a>Function: xmlExpNewOr</h3><pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a>     xmlExpNewOr             (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br />                                    <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> left, <br />                                    <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> right)<br />
 </pre><p>Get the atom associated to the choice @left | @right Note that @left and @right are consumed in the operation, to keep an handle on them use xmlExpRef() and use xmlExpFree() to release them, this is true even in case of failure (unless ctxt == NULL).</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>left</tt></i>:</span></td><td>left expression</td></tr><tr><td><span class="term"><i><tt>right</tt></i>:</span></td><td>right expression</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the node or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlExpNewRange" id="xmlExpNewRange"></a>Function: xmlExpNewRange</h3><pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a>   xmlExpNewRange          (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br />                                    <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> subset, <br />                                  int min, <br />                                         int max)<br />
 </pre><p>Get the atom associated to the range (@subset){@min, @max} Note that @subset is consumed in the operation, to keep an handle on it use xmlExpRef() and use xmlExpFree() to release it, this is true even in case of failure (unless ctxt == NULL).</p>
index 4f12cc7..89e9809 100644 (file)
@@ -16,9 +16,9 @@ A:link, A:visited, A:active { text-decoration: underline }
 <pre class="programlisting">int        <a href="#xmlCheckUTF8">xmlCheckUTF8</a>                        (const unsigned char * utf)</pre>
 <pre class="programlisting">int        <a href="#xmlGetUTF8Char">xmlGetUTF8Char</a>                    (const unsigned char * utf, <br />                                       int * len)</pre>
 <pre class="programlisting">int        <a href="#xmlStrEqual">xmlStrEqual</a>                  (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str1, <br />                                        const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str2)</pre>
-<pre class="programlisting">int        <a href="#xmlStrPrintf">xmlStrPrintf</a>                        (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * buf, <br />                                       int len, <br />                                         const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * msg, <br />                                         ... ...)</pre>
+<pre class="programlisting">int        <a href="#xmlStrPrintf">xmlStrPrintf</a>                        (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * buf, <br />                                       int len, <br />                                         const char * msg, <br />                                        ... ...)</pre>
 <pre class="programlisting">int        <a href="#xmlStrQEqual">xmlStrQEqual</a>                        (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pref, <br />                                        const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br />                                        const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)</pre>
-<pre class="programlisting">int        <a href="#xmlStrVPrintf">xmlStrVPrintf</a>                      (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * buf, <br />                                       int len, <br />                                         const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * msg, <br />                                         va_list ap)</pre>
+<pre class="programlisting">int        <a href="#xmlStrVPrintf">xmlStrVPrintf</a>                      (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * buf, <br />                                       int len, <br />                                         const char * msg, <br />                                        va_list ap)</pre>
 <pre class="programlisting">int        <a href="#xmlStrcasecmp">xmlStrcasecmp</a>                      (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str1, <br />                                        const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str2)</pre>
 <pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *        <a href="#xmlStrcasestr">xmlStrcasestr</a>              (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br />                                         const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * val)</pre>
 <pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *      <a href="#xmlStrcat">xmlStrcat</a>              (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br />                                       const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * add)</pre>
@@ -55,11 +55,11 @@ A:link, A:visited, A:active { text-decoration: underline }
 </pre><p>Read the first UTF8 character from @utf</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>utf</tt></i>:</span></td><td>a sequence of UTF-8 encoded bytes</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>a pointer to the minimum number of bytes present in the sequence. This is used to assure the next character is completely contained within the sequence.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the char value or -1 in case of error, and sets *len to the actual number of bytes consumed (0 in case of error)</td></tr></tbody></table></div><h3><a name="xmlStrEqual" id="xmlStrEqual"></a>Function: xmlStrEqual</h3><pre class="programlisting">int  xmlStrEqual                     (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str1, <br />                                        const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str2)<br />
 </pre><p>Check if both strings are equal of have same content. Should be a bit more readable and faster than xmlStrcmp()</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>the first <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>the second <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if they are equal, 0 if they are different</td></tr></tbody></table></div><h3><a name="xmlStrPrintf" id="xmlStrPrintf"></a>Function: xmlStrPrintf</h3><pre class="programlisting">int   xmlStrPrintf                    (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * buf, <br />                                       int len, <br />                                         const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * msg, <br />                                         ... ...)<br />
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>the first <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>the second <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if they are equal, 0 if they are different</td></tr></tbody></table></div><h3><a name="xmlStrPrintf" id="xmlStrPrintf"></a>Function: xmlStrPrintf</h3><pre class="programlisting">int   xmlStrPrintf                    (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * buf, <br />                                       int len, <br />                                         const char * msg, <br />                                        ... ...)<br />
 </pre><p>Formats @msg and places result into @buf.</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the result buffer.</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the result buffer length.</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message with printf formatting.</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the message.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of <a href="libxml-SAX.html#characters">characters</a> written to @buf or -1 if an error occurs.</td></tr></tbody></table></div><h3><a name="xmlStrQEqual" id="xmlStrQEqual"></a>Function: xmlStrQEqual</h3><pre class="programlisting">int    xmlStrQEqual                    (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pref, <br />                                        const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br />                                        const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)<br />
 </pre><p>Check if a QName is Equal to a given string</p>
-<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pref</tt></i>:</span></td><td>the prefix of the QName</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the localname of the QName</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the second <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if they are equal, 0 if they are different</td></tr></tbody></table></div><h3><a name="xmlStrVPrintf" id="xmlStrVPrintf"></a>Function: xmlStrVPrintf</h3><pre class="programlisting">int     xmlStrVPrintf                   (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * buf, <br />                                       int len, <br />                                         const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * msg, <br />                                         va_list ap)<br />
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pref</tt></i>:</span></td><td>the prefix of the QName</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the localname of the QName</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the second <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if they are equal, 0 if they are different</td></tr></tbody></table></div><h3><a name="xmlStrVPrintf" id="xmlStrVPrintf"></a>Function: xmlStrVPrintf</h3><pre class="programlisting">int     xmlStrVPrintf                   (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * buf, <br />                                       int len, <br />                                         const char * msg, <br />                                        va_list ap)<br />
 </pre><p>Formats @msg and places result into @buf.</p>
 <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the result buffer.</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the result buffer length.</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message with printf formatting.</td></tr><tr><td><span class="term"><i><tt>ap</tt></i>:</span></td><td>extra parameters for the message.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of <a href="libxml-SAX.html#characters">characters</a> written to @buf or -1 if an error occurs.</td></tr></tbody></table></div><h3><a name="xmlStrcasecmp" id="xmlStrcasecmp"></a>Function: xmlStrcasecmp</h3><pre class="programlisting">int  xmlStrcasecmp                   (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str1, <br />                                        const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str2)<br />
 </pre><p>a strcasecmp for xmlChar's</p>
index 578f288..1895d84 100755 (executable)
@@ -49,7 +49,7 @@ def callback(ctx, str):
 libxml2.registerErrorHandler(callback, None)
 
 #
-# The dictionnary of tables required and the SQL command needed
+# The dictionary of tables required and the SQL command needed
 # to create them
 #
 TABLES={
@@ -438,12 +438,12 @@ def updateWordArchive(name, id, relevance):
            print """UPDATE wordsArchive SET relevance='%d' where name='%s' and ID='%d'""" % (relevance, name, id)
            print sys.exc_type, sys.exc_value
            return -1
-            
+
     return ret
 
 #########################################################################
 #                                                                      #
-#                  Word dictionnary and analysis routines              #
+#                  Word dictionary and analysis routines               #
 #                                                                      #
 #########################################################################
 
index f83d14f..a0a0117 100644 (file)
      <exports symbol='xmlShell' type='function'/>
     </file>
     <file name='dict'>
-     <summary>string dictionnary</summary>
+     <summary>string dictionary</summary>
      <description>dictionary of reusable strings, just used to avoid allocation and freeing operations. </description>
      <author>Daniel Veillard </author>
      <exports symbol='xmlDict' type='typedef'/>
      <exports symbol='XML_DOC_DTDVALID' type='enum'/>
      <exports symbol='XML_ELEMENT_TYPE_ANY' type='enum'/>
      <exports symbol='XML_DOC_NSVALID' type='enum'/>
-     <exports symbol='XML_ELEMENT_CONTENT_ONCE' type='enum'/>
+     <exports symbol='XML_BUFFER_ALLOC_BOUNDED' type='enum'/>
      <exports symbol='XML_ELEMENT_CONTENT_PCDATA' type='enum'/>
      <exports symbol='XML_ATTRIBUTE_FIXED' type='enum'/>
      <exports symbol='XML_DOCUMENT_TYPE_NODE' type='enum'/>
      <exports symbol='XML_DOC_HTML' type='enum'/>
-     <exports symbol='XML_ELEMENT_CONTENT_OPT' type='enum'/>
+     <exports symbol='XML_ELEMENT_CONTENT_ONCE' type='enum'/>
      <exports symbol='XML_NAMESPACE_DECL' type='enum'/>
      <exports symbol='XML_ATTRIBUTE_NOTATION' type='enum'/>
      <exports symbol='XML_ELEMENT_TYPE_MIXED' type='enum'/>
      <exports symbol='XML_NOTATION_NODE' type='enum'/>
      <exports symbol='XML_ELEMENT_CONTENT_SEQ' type='enum'/>
      <exports symbol='XML_ELEMENT_TYPE_EMPTY' type='enum'/>
+     <exports symbol='XML_ELEMENT_CONTENT_OPT' type='enum'/>
      <exports symbol='XML_ATTRIBUTE_ENUMERATION' type='enum'/>
      <exports symbol='XML_DOC_OLD10' type='enum'/>
      <exports symbol='XML_HTML_DOCUMENT_NODE' type='enum'/>
     <enum name='XML_ATTRIBUTE_NONE' file='tree' value='1' type='xmlAttributeDefault'/>
     <enum name='XML_ATTRIBUTE_NOTATION' file='tree' value='10' type='xmlAttributeType'/>
     <enum name='XML_ATTRIBUTE_REQUIRED' file='tree' value='2' type='xmlAttributeDefault'/>
+    <enum name='XML_BUFFER_ALLOC_BOUNDED' file='tree' value='6' type='xmlBufferAllocationScheme' info=' limit the upper size of the buffer'/>
     <enum name='XML_BUFFER_ALLOC_DOUBLEIT' file='tree' value='1' type='xmlBufferAllocationScheme' info='double each time one need to grow'/>
     <enum name='XML_BUFFER_ALLOC_EXACT' file='tree' value='2' type='xmlBufferAllocationScheme' info='grow only to the minimal size'/>
-    <enum name='XML_BUFFER_ALLOC_HYBRID' file='tree' value='5' type='xmlBufferAllocationScheme' info=' exact up to a threshold, and doubleit thereafter'/>
+    <enum name='XML_BUFFER_ALLOC_HYBRID' file='tree' value='5' type='xmlBufferAllocationScheme' info='exact up to a threshold, and doubleit thereafter'/>
     <enum name='XML_BUFFER_ALLOC_IMMUTABLE' file='tree' value='3' type='xmlBufferAllocationScheme' info='immutable buffer'/>
     <enum name='XML_BUFFER_ALLOC_IO' file='tree' value='4' type='xmlBufferAllocationScheme' info='special allocation scheme used for I/O'/>
     <enum name='XML_BUF_OVERFLOW' file='xmlerror' value='7000' type='xmlParserErrors'/>
@@ -5140,7 +5142,7 @@ crash if you try to modify the tree)'/>
     <enum name='XML_PARSE_NOBASEFIX' file='parser' value='262144' type='xmlParserOption' info='do not fixup XINCLUDE xml:base uris'/>
     <enum name='XML_PARSE_NOBLANKS' file='parser' value='256' type='xmlParserOption' info='remove blank nodes'/>
     <enum name='XML_PARSE_NOCDATA' file='parser' value='16384' type='xmlParserOption' info='merge CDATA as text nodes'/>
-    <enum name='XML_PARSE_NODICT' file='parser' value='4096' type='xmlParserOption' info='Do not reuse the context dictionnary'/>
+    <enum name='XML_PARSE_NODICT' file='parser' value='4096' type='xmlParserOption' info='Do not reuse the context dictionary'/>
     <enum name='XML_PARSE_NOENT' file='parser' value='2' type='xmlParserOption' info='substitute entities'/>
     <enum name='XML_PARSE_NOERROR' file='parser' value='32' type='xmlParserOption' info='suppress error reports'/>
     <enum name='XML_PARSE_NONET' file='parser' value='2048' type='xmlParserOption' info='Forbid network access'/>
@@ -6408,7 +6410,7 @@ actually an xmlCharEncoding'/>
       <field name='catalogs' type='void *' info=' document&apos;s own catalog'/>
       <field name='recovery' type='int' info=' run in recovery mode'/>
       <field name='progressive' type='int' info=' is this a progressive parsing'/>
-      <field name='dict' type='xmlDictPtr' info=' dictionnary for the parser'/>
+      <field name='dict' type='xmlDictPtr' info=' dictionary for the parser'/>
       <field name='atts' type='const xmlChar * *' info=' array for the attributes callbacks'/>
       <field name='maxatts' type='int' info=' the size of the array'/>
       <field name='docdict' type='int' info='* pre-interned strings
@@ -9502,65 +9504,65 @@ Could we use @subtypes for this?'/>
     </function>
     <function name='xmlDictCreate' file='dict' module='dict'>
       <info>Create a new dictionary</info>
-      <return type='xmlDictPtr' info='the newly created dictionnary, or NULL if an error occured.'/>
+      <return type='xmlDictPtr' info='the newly created dictionary, or NULL if an error occured.'/>
     </function>
     <function name='xmlDictCreateSub' file='dict' module='dict'>
-      <info>Create a new dictionary, inheriting strings from the read-only dictionnary @sub. On lookup, strings are first searched in the new dictionnary, then in @sub, and if not found are created in the new dictionnary.</info>
-      <return type='xmlDictPtr' info='the newly created dictionnary, or NULL if an error occured.'/>
-      <arg name='sub' type='xmlDictPtr' info='an existing dictionnary'/>
+      <info>Create a new dictionary, inheriting strings from the read-only dictionary @sub. On lookup, strings are first searched in the new dictionary, then in @sub, and if not found are created in the new dictionary.</info>
+      <return type='xmlDictPtr' info='the newly created dictionary, or NULL if an error occured.'/>
+      <arg name='sub' type='xmlDictPtr' info='an existing dictionary'/>
     </function>
     <function name='xmlDictExists' file='dict' module='dict'>
-      <info>Check if the @name exists in the dictionnary @dict.</info>
+      <info>Check if the @name exists in the dictionary @dict.</info>
       <return type='const xmlChar *' info='the internal copy of the name or NULL if not found.'/>
-      <arg name='dict' type='xmlDictPtr' info='the dictionnary'/>
+      <arg name='dict' type='xmlDictPtr' info='the dictionary'/>
       <arg name='name' type='const xmlChar *' info='the name of the userdata'/>
       <arg name='len' type='int' info='the length of the name, if -1 it is recomputed'/>
     </function>
     <function name='xmlDictFree' file='dict' module='dict'>
       <info>Free the hash @dict and its contents. The userdata is deallocated with @f if provided.</info>
       <return type='void'/>
-      <arg name='dict' type='xmlDictPtr' info='the dictionnary'/>
+      <arg name='dict' type='xmlDictPtr' info='the dictionary'/>
     </function>
     <function name='xmlDictGetUsage' file='dict' module='dict'>
       <info>Get how much memory is used by a dictionary for strings Added in 2.9.0</info>
       <return type='size_t' info='the amount of strings allocated'/>
-      <arg name='dict' type='xmlDictPtr' info='the dictionnary'/>
+      <arg name='dict' type='xmlDictPtr' info='the dictionary'/>
     </function>
     <function name='xmlDictLookup' file='dict' module='dict'>
-      <info>Add the @name to the dictionnary @dict if not present.</info>
+      <info>Add the @name to the dictionary @dict if not present.</info>
       <return type='const xmlChar *' info='the internal copy of the name or NULL in case of internal error'/>
-      <arg name='dict' type='xmlDictPtr' info='the dictionnary'/>
+      <arg name='dict' type='xmlDictPtr' info='the dictionary'/>
       <arg name='name' type='const xmlChar *' info='the name of the userdata'/>
       <arg name='len' type='int' info='the length of the name, if -1 it is recomputed'/>
     </function>
     <function name='xmlDictOwns' file='dict' module='dict'>
       <info>check if a string is owned by the disctionary</info>
       <return type='int' info='1 if true, 0 if false and -1 in case of error -1 in case of error'/>
-      <arg name='dict' type='xmlDictPtr' info='the dictionnary'/>
+      <arg name='dict' type='xmlDictPtr' info='the dictionary'/>
       <arg name='str' type='const xmlChar *' info='the string'/>
     </function>
     <function name='xmlDictQLookup' file='dict' module='dict'>
       <info>Add the QName @prefix:@name to the hash @dict if not present.</info>
       <return type='const xmlChar *' info='the internal copy of the QName or NULL in case of internal error'/>
-      <arg name='dict' type='xmlDictPtr' info='the dictionnary'/>
+      <arg name='dict' type='xmlDictPtr' info='the dictionary'/>
       <arg name='prefix' type='const xmlChar *' info='the prefix'/>
       <arg name='name' type='const xmlChar *' info='the name'/>
     </function>
     <function name='xmlDictReference' file='dict' module='dict'>
       <info>Increment the reference counter of a dictionary</info>
       <return type='int' info='0 in case of success and -1 in case of error'/>
-      <arg name='dict' type='xmlDictPtr' info='the dictionnary'/>
+      <arg name='dict' type='xmlDictPtr' info='the dictionary'/>
     </function>
     <function name='xmlDictSetLimit' file='dict' module='dict'>
       <info>Set a size limit for the dictionary Added in 2.9.0</info>
       <return type='size_t' info='the previous limit of the dictionary or 0'/>
-      <arg name='dict' type='xmlDictPtr' info='the dictionnary'/>
+      <arg name='dict' type='xmlDictPtr' info='the dictionary'/>
       <arg name='limit' type='size_t' info='the limit in bytes'/>
     </function>
     <function name='xmlDictSize' file='dict' module='dict'>
       <info>Query the number of elements installed in the hash @dict.</info>
-      <return type='int' info='the number of elements in the dictionnary or -1 in case of error'/>
-      <arg name='dict' type='xmlDictPtr' info='the dictionnary'/>
+      <return type='int' info='the number of elements in the dictionary or -1 in case of error'/>
+      <arg name='dict' type='xmlDictPtr' info='the dictionary'/>
     </function>
     <function name='xmlDllMain' file='threads' module='threads'>
       <info></info>
@@ -9825,7 +9827,7 @@ Could we use @subtypes for this?'/>
       <info>Creates a new context for manipulating expressions</info>
       <return type='xmlExpCtxtPtr' info='the context or NULL in case of error'/>
       <arg name='maxNodes' type='int' info='the maximum number of nodes'/>
-      <arg name='dict' type='xmlDictPtr' info='optional dictionnary to use internally'/>
+      <arg name='dict' type='xmlDictPtr' info='optional dictionary to use internally'/>
     </function>
     <function name='xmlExpNewOr' file='xmlregexp' module='xmlregexp'>
       <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_EXPR_ENABLED)</cond>
@@ -10983,7 +10985,7 @@ Could we use @subtypes for this?'/>
     <function name='xmlMallocAtomicLoc' file='xmlmemory' module='xmlmemory'>
       <info>a malloc() equivalent, with logging of the allocation info.</info>
       <return type='void *' info='a pointer to the allocated area or NULL in case of lack of memory.'/>
-      <arg name='size' type='size_t' info='an int specifying the size in byte to allocate.'/>
+      <arg name='size' type='size_t' info='an unsigned int specifying the size in byte to allocate.'/>
       <arg name='file' type='const char *' info='the file name or NULL'/>
       <arg name='line' type='int' info='the line number'/>
     </function>
@@ -14485,7 +14487,7 @@ Could we use @subtypes for this?'/>
       <return type='int' info='the number of characters written to @buf or -1 if an error occurs.'/>
       <arg name='buf' type='xmlChar *' info='the result buffer.'/>
       <arg name='len' type='int' info='the result buffer length.'/>
-      <arg name='msg' type='const xmlChar *' info='the message with printf formatting.'/>
+      <arg name='msg' type='const char *' info='the message with printf formatting.'/>
       <arg name='...' type='...' info='extra parameters for the message.'/>
     </function>
     <function name='xmlStrQEqual' file='xmlstring' module='xmlstring'>
@@ -14500,7 +14502,7 @@ Could we use @subtypes for this?'/>
       <return type='int' info='the number of characters written to @buf or -1 if an error occurs.'/>
       <arg name='buf' type='xmlChar *' info='the result buffer.'/>
       <arg name='len' type='int' info='the result buffer length.'/>
-      <arg name='msg' type='const xmlChar *' info='the message with printf formatting.'/>
+      <arg name='msg' type='const char *' info='the message with printf formatting.'/>
       <arg name='ap' type='va_list' info='extra parameters for the message.'/>
     </function>
     <function name='xmlStrcasecmp' file='xmlstring' module='xmlstring'>
index da61d57..0d4b8fe 100644 (file)
@@ -8,95 +8,73 @@
   </vendor>
   <product id="libxml2">
     <name>libxml2</name>
-    <version>2.9.1</version>
-    <last-release> Apr 19 2013</last-release>
+    <version>v2.9.3</version>
+    <last-release> Nov 20 2015</last-release>
     <info-url>http://xmlsoft.org/</info-url>
-    <changes>   -  Features:
-    Support for Python3 (Daniel Veillard),
-    Add xmlXPathSetContextNode and xmlXPathNodeEval (Alex Bligh)
+    <changes>   - Security:
+  CVE-2015-8242 Buffer overead with HTML parser in push mode (Hugh Davenport),
+  CVE-2015-7500 Fix memory access error due to incorrect entities boundaries (Daniel Veillard),
+  CVE-2015-7499-2 Detect incoherency on GROW (Daniel Veillard),
+  CVE-2015-7499-1 Add xmlHaltParser() to stop the parser (Daniel Veillard),
+  CVE-2015-5312 Another entity expansion issue (David Drysdale),
+  CVE-2015-7497 Avoid an heap buffer overflow in xmlDictComputeFastQKey (David Drysdale),
+  CVE-2015-7498 Avoid processing entities after encoding conversion failures (Daniel Veillard),
+  CVE-2015-8035 Fix XZ compression support loop (Daniel Veillard),
+  CVE-2015-7942-2 Fix an error in previous Conditional section patch (Daniel Veillard),
+  CVE-2015-7942 Another variation of overflow in Conditional sections (Daniel Veillard),
+  CVE-2015-1819 Enforce the reader to run in constant memory (Daniel Veillard)
+  CVE-2015-7941_2 Cleanup conditional section error handling (Daniel Veillard),
+  CVE-2015-7941_1 Stop parsing on entities boundaries errors (Daniel Veillard),
   
-   -  Documentation:
-    Add documentation for xmllint --xpath (Daniel Veillard),
-    Fix the URL of the SAX documentation from James (Daniel Veillard),
-    Fix spelling of "length". (Michael Wood)
+   - Documentation:
+  Correct spelling of "calling" (Alex Henrie),
+  Fix a small error in xmllint --format description (Fabien Degomme),
+  Avoid XSS on the search of xmlsoft.org (Daniel Veillard)
   
-   -  Portability:
-    Fix python bindings with versions older than 2.7 (Daniel Veillard),
-    rebuild docs:Makefile.am (Roumen Petrov),
-    elfgcchack.h after rebuild in doc (Roumen Petrov),
-    elfgcchack for buf module (Roumen Petrov),
-    Fix a uneeded and wrong extra link parameter (Daniel Veillard),
-    Few cleanup patches for Windows (Denis Pauk),
-    Fix rpmbuild --nocheck (Mark Salter),
-    Fix for win32/configure.js and WITH_THREAD_ALLOC (Daniel Richard),
-    Fix Broken multi-arch support in xml2-config (Daniel Veillard),
-    Fix a portability issue for GCC &lt; 3.4.0 (Daniel Veillard),
-    Windows build fixes (Daniel Richard),
-    Fix a thread portability problem (Friedrich Haubensak),
-    Downgrade autoconf requirement to 2.63 (Daniel Veillard)
+   - Portability:
+  threads: use forward declarations only for glibc (Michael Heimpold),
+  Update Win32 configure.js to search for configure.ac (Daniel Veillard)
   
-   -  Bug Fixes:
-    Fix a linking error for python bindings (Daniel Veillard),
-    Fix a couple of return without value (Jüri Aedla),
-    Improve the hashing functions (Daniel Franke),
-    Improve handling of xmlStopParser() (Daniel Veillard),
-    Remove risk of lockup in dictionary initialization (Daniel Veillard),
-    Activate detection of encoding in external subset (Daniel Veillard),
-    Fix an output buffer flushing conversion bug (Mikhail Titov),
-    Fix an old bug in xmlSchemaValidateOneElement (Csaba László),
-    Fix configure cannot remove messages (Gilles Espinasse),
-    fix schema validation in combination with xsi:nil (Daniel Veillard),
-    xmlCtxtReadFile doesn't work with literal IPv6 URLs (Steve Wolf),
-    Fix a few problems with setEntityLoader (Alexey Neyman),
-    Detect excessive entities expansion upon replacement (Daniel Veillard),
-    Fix the flushing out of raw buffers on encoding conversions (Daniel,
-Veillard),
-    Fix some buffer conversion issues (Daniel Veillard),
-    When calling xmlNodeDump make sure we grow the buffer quickly (Daniel,
-Veillard),
-    Fix an error in the progressive DTD parsing code (Dan Winship),
-    xmllint should not load DTD by default when using the reader (Daniel,
-Veillard),
-    Try IBM-037 when looking for EBCDIC handlers (Petr Sumbera),
-    Fix potential out of bound access (Daniel Veillard),
-    Fix large parse of file from memory (Daniel Veillard),
-    Fix a bug in the nsclean option of the parser (Daniel Veillard),
-    Fix a regression in 2.9.0 breaking validation while streaming (Daniel,
-Veillard),
-    Remove potential calls to exit() (Daniel Veillard)
+   - Bug Fixes:
+  Bug on creating new stream from entity (Daniel Veillard),
+  Fix some loop issues embedding NEXT (Daniel Veillard),
+  Do not print error context when there is none (Daniel Veillard),
+  Avoid extra processing of MarkupDecl when EOF (Hugh Davenport),
+  Fix parsing short unclosed comment uninitialized access (Daniel Veillard),
+  Add missing Null check in xmlParseExternalEntityPrivate (Gaurav Gupta),
+  Fix a bug in CData error handling in the push parser (Daniel Veillard),
+  Fix a bug on name parsing at the end of current input buffer (Daniel Veillard),
+  Fix the spurious ID already defined error (Daniel Veillard),
+  Fix previous change to node sort order (Nick Wellnhofer),
+  Fix a self assignment issue raised by clang (Scott Graham),
+  Fail parsing early on if encoding conversion failed (Daniel Veillard),
+  Do not process encoding values if the declaration if broken (Daniel Veillard),
+  Silence clang's -Wunknown-attribute (Michael Catanzaro),
+  xmlMemUsed is not thread-safe (Martin von Gagern),
+  Fix support for except in nameclasses (Daniel Veillard),
+  Fix order of root nodes (Nick Wellnhofer),
+  Allow attributes on descendant-or-self axis (Nick Wellnhofer),
+  Fix the fix to Windows locking (Steve Nairn),
+  Fix timsort invariant loop re: Envisage article (Christopher Swenson),
+  Don't add IDs in xmlSetTreeDoc (Nick Wellnhofer),
+  Account for ID attributes in xmlSetTreeDoc (Nick Wellnhofer),
+  Remove various unused value assignments (Philip Withnall),
+  Fix missing entities after CVE-2014-3660 fix (Daniel Veillard),
+  Revert "Missing initialization for the catalog module" (Daniel Veillard)
   
-   -  Improvements:
-    Regenerated API, and testapi, rebuild documentation (Daniel Veillard),
-    Fix tree iterators broken by 2to3 script (Daniel Veillard),
-    update all tests for Python3 and Python2 (Daniel Veillard),
-    A few more fixes for python 3 affecting libxml2.py (Daniel Veillard),
-    Fix compilation on Python3 (Daniel Veillard),
-    Converting apibuild.py to python3 (Daniel Veillard),
-    First pass at starting porting to python3 (Daniel Veillard),
-    updated configure.in for python3 (Daniel Veillard),
-    Add support for xpathRegisterVariable in Python (Shaun McCance),
-    Added a regression tests from bug 694228 data (Daniel Veillard),
-    Cache presence of '&lt;' in entities content (Daniel Veillard),
-    Avoid extra processing on entities (Daniel Veillard),
-    Python binding for xmlRegisterInputCallback (Alexey Neyman),
-    Python bindings: DOM casts everything to xmlNode (Alexey Neyman),
-    Define LIBXML_THREAD_ALLOC_ENABLED via xmlversion.h (Tim Starling),
-    Adding streaming validation to runtest checks (Daniel Veillard),
-    Add a --pushsmall option to xmllint (Daniel Veillard)
+   - Improvements:
+  Reuse xmlHaltParser() where it makes sense (Daniel Veillard),
+  xmlStopParser reset errNo (Daniel Veillard),
+  Reenable xz support by default (Daniel Veillard),
+  Recover unescaped less-than character in HTML recovery parsing (Daniel Veillard),
+  Allow HTML serializer to output HTML5 DOCTYPE (Shaun McCance),
+  Regression test for bug #695699 (Nick Wellnhofer),
+  Add a couple of XPath tests (Nick Wellnhofer),
+  Add Python 3 rpm subpackage (Tomas Radej),
+  libxml2-config.cmake.in: update include directories (Samuel Martin),
+  Adding example from bugs 738805 to regression tests (Daniel Veillard)
   
-   -  Cleanups:
-    Switched comment in file to UTF-8 encoding (Daniel Veillard),
-    Extend gitignore (Daniel Veillard),
-    Silent the new python test on input (Alexey Neyman),
-    Cleanup of a duplicate test (Daniel Veillard),
-    Cleanup on duplicate test expressions (Daniel Veillard),
-    Fix compiler warning after 153cf15905cf4ec080612ada6703757d10caba1e (Patrick,
-Gansterer),
-    Spec cleanups and a fix for multiarch support (Daniel Veillard),
-    Silence a clang warning (Daniel Veillard),
-    Cleanup the Copyright to be pure MIT Licence wording (Daniel Veillard),
-    rand_seed should be static in dict.c (Wouter Van Rooy),
-    Fix typos in parser comments (Jan Pokorný)
+   - Cleanups:
   
 
 </changes>
index 5c03ba3..0c692c8 100644 (file)
@@ -8,7 +8,168 @@ H2 {font-family: Verdana,Arial,Helvetica}
 H3 {font-family: Verdana,Arial,Helvetica}
 A:link, A:visited, A:active { text-decoration: underline }
 </style><title>Releases</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Releases</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>The <a href="ChangeLog.html">change log</a> describes the recents commits
-to the <a href="http://git.gnome.org/browse/libxml2/">GIT</a> code base.</p><p>Here is the list of public releases:</p><h3>2.9.2: Oct 16 2014</h3><ul>
+to the <a href="http://git.gnome.org/browse/libxml2/">GIT</a> code base.</p><p>Here is the list of public releases:</p><h3>2.9.4: May 23 2016</h3><ul>
+  <li>Security:<br />
+  More format string warnings with possible format string vulnerability (David Kilzer),<br />
+  Avoid building recursive entities (Daniel Veillard),<br />
+  Heap-based buffer overread in htmlCurrentChar (Pranjal Jumde),<br />
+  Heap-based buffer-underreads due to xmlParseName (David Kilzer),<br />
+  Heap use-after-free in xmlSAX2AttributeNs (Pranjal Jumde),<br />
+  Heap use-after-free in htmlParsePubidLiteral and htmlParseSystemiteral (Pranjal Jumde),<br />
+  Fix some format string warnings with possible format string vulnerability (David Kilzer),<br />
+  Detect change of encoding when parsing HTML names (Hugh Davenport),<br />
+  Fix inappropriate fetch of entities content (Daniel Veillard),<br />
+  Bug 759398: Heap use-after-free in xmlDictComputeFastKey &lt;https://bugzilla.gnome.org/show_bug.cgi?id=759398&gt; (Pranjal Jumde),<br />
+  Bug 758605: Heap-based buffer overread in xmlDictAddString &lt;https://bugzilla.gnome.org/show_bug.cgi?id=758605&gt; (Pranjal Jumde),<br />
+  Bug 758588: Heap-based buffer overread in xmlParserPrintFileContextInternal &lt;https://bugzilla.gnome.org/show_bug.cgi?id=758588&gt; (David Kilzer),<br />
+  Bug 757711: heap-buffer-overflow in xmlFAParsePosCharGroup &lt;https://bugzilla.gnome.org/show_bug.cgi?id=757711&gt; (Pranjal Jumde),<br />
+  Add missing increments of recursion depth counter to XML parser. (Peter Simons)<br />
+  </li>
+
+  <li>Documentation:<br />
+  Fix typo: s{ ec -&gt; cr }cipt (Jan Pokorný),<br />
+  Fix typos: dictio{ nn -&gt; n }ar{y,ies} (Jan Pokorný),<br />
+  Fix typos: PATH_{ SEAPARATOR -&gt; SEPARATOR } (Jan Pokorný),<br />
+  Correct a typo. (Shlomi Fish)<br />
+  </li>
+
+  <li>Portability:<br />
+  Correct the usage of LDFLAGS (Mattias Hansson),<br />
+  Revert the use of SAVE_LDFLAGS in configure.ac (Mattias Hansson),<br />
+  libxml2 hardcodes -L/lib in zlib/lzma tests which breaks cross-compiles (Mike Frysinger),<br />
+  Fix apibuild for a recently added construct (Daniel Veillard),<br />
+  Use pkg-config to locate zlib when possible (Stewart Brodie),<br />
+  Use pkg-config to locate ICU when possible (Stewart Brodie),<br />
+  Portability to non C99 compliant compilers (Patrick Monnerat),<br />
+  dict.h: Move xmlDictPtr definition before includes to allow direct inclusion. (Patrick Monnerat),<br />
+  os400: tell about xmllint and xmlcatalog in README400. (Patrick Monnerat),<br />
+  os400: properly process SGML add in XMLCATALOG command. (Patrick Monnerat),<br />
+  os400: implement CL command XMLCATALOG. (Patrick Monnerat),<br />
+  os400: compile and install program xmlcatalog (qshell-only). (Patrick Monnerat),<br />
+  os400: expand tabs in sources, strip trailing blanks. (Patrick Monnerat),<br />
+  os400: implement CL command XMLLINT. (Patrick Monnerat),<br />
+  os400: compile and install program xmllint (qshell-only). (Patrick Monnerat),<br />
+  os400: initscript make_module(): Use options instead of positional parameters. (Patrick Monnerat),<br />
+  os400: c14n.rpgle: allow *omit for nullable reference parameters. (Patrick Monnerat),<br />
+  os400: use like() for double type. (Patrick Monnerat),<br />
+  os400: use like() for int type. (Patrick Monnerat),<br />
+  os400: use like() for unsigned int type. (Patrick Monnerat),<br />
+  os400: use like() for enum types. (Patrick Monnerat),<br />
+  Add xz to xml2-config --libs output (Baruch Siach),<br />
+  Bug 760190: configure.ac should be able to build --with-icu without icu-config tool &lt;https://bugzilla.gnome.org/show_bug.cgi?id=760190&gt; (David Kilzer),<br />
+  win32\VC10\config.h and VS 2015 (Bruce Dawson),<br />
+  Add configure maintainer mode (orzen)<br />
+  </li>
+
+  <li>Bug Fixes:<br />
+  Avoid an out of bound access when serializing malformed strings (Daniel Veillard),<br />
+  Unsigned addition may overflow in xmlMallocAtomicLoc() (David Kilzer),<br />
+  Integer signed/unsigned type mismatch in xmlParserInputGrow() (David Kilzer),<br />
+  Bug 763071: heap-buffer-overflow in xmlStrncat &lt;https://bugzilla.gnome.org/show_bug.cgi?id=763071&gt; (Pranjal Jumde),<br />
+  Integer overflow parsing port number in URI (Michael Paddon),<br />
+  Fix an error with regexp on nullable counted char transition (Daniel Veillard),<br />
+  Fix memory leak with XPath namespace nodes (Nick Wellnhofer),<br />
+  Fix namespace axis traversal (Nick Wellnhofer),<br />
+      Fix null pointer deref in docs with no root element (Hugh Davenport),<br />
+  Fix XSD validation of URIs with ampersands (Alex Henrie),<br />
+  xmlschemastypes.c: accept endOfDayFrag Times set to "24:00:00" mean "end of day" and should not cause an error. (Patrick Monnerat),<br />
+  xmlcatalog: flush stdout before interactive shell input. (Patrick Monnerat),<br />
+  xmllint: flush stdout before interactive shell input. (Patrick Monnerat),<br />
+  Don't recurse into OP_VALUEs in xmlXPathOptimizeExpression (Nick Wellnhofer),<br />
+  Fix namespace::node() XPath expression (Nick Wellnhofer),<br />
+  Fix OOB write in xmlXPathEmptyNodeSet (Nick Wellnhofer),<br />
+  Fix parsing of NCNames in XPath (Nick Wellnhofer),<br />
+  Fix OOB read with invalid UTF-8 in xmlUTF8Strsize (Nick Wellnhofer),<br />
+  Do normalize string-based datatype value in RelaxNG facet checking (Audric Schiltknecht),<br />
+  Bug 760921: REGRESSION (8eb55d78): doc/examples/io1 test fails after fix for "xmlSaveUri() incorrectly recomposes URIs with rootless paths" &lt;https://bugzilla.gnome.org/show_bug.cgi?id=760921&gt; (David Kilzer),<br />
+  Bug 760861: REGRESSION (bf9c1dad): Missing results for test/schemas/regexp-char-ref_[01].xsd &lt;https://bugzilla.gnome.org/show_bug.cgi?id=760861&gt; (David Kilzer),<br />
+  error.c: *input-&gt;cur == 0 does not mean no error (Pavel Raiskup),<br />
+  Add missing RNG test files (David Kilzer),<br />
+  Bug 760183: REGRESSION (v2.9.3): XML push parser fails with bogus UTF-8 encoding error when multi-byte character in large CDATA section is split across buffer &lt;https://bugzilla.gnome.org/show_bug.cgi?id=760183&gt; (David Kilzer),<br />
+  Bug 758572: ASAN crash in make check &lt;https://bugzilla.gnome.org/show_bug.cgi?id=758572&gt; (David Kilzer),<br />
+  Bug 721158: Missing ICU string when doing --version on xmllint &lt;https://bugzilla.gnome.org/show_bug.cgi?id=721158&gt; (David Kilzer),<br />
+  python 3: libxml2.c wrappers create Unicode str already (Michael Stahl),<br />
+  Add autogen.sh to distrib (orzen),<br />
+  Heap-based buffer overread in xmlNextChar (Daniel Veillard)<br />
+  </li>
+
+  <li>Improvements:<br />
+  Add more debugging info to runtest (Daniel Veillard),<br />
+  Implement "runtest -u" mode (David Kilzer),<br />
+  Add a make rule to rebuild for ASAN (Daniel Veillard)<br />
+  </li>
+</ul><h3>v2.9.3: Nov 20 2015</h3><ul>
+  <li>Security:<br />
+  CVE-2015-8242 Buffer overead with HTML parser in push mode (Hugh Davenport),<br />
+  CVE-2015-7500 Fix memory access error due to incorrect entities boundaries (Daniel Veillard),<br />
+  CVE-2015-7499-2 Detect incoherency on GROW (Daniel Veillard),<br />
+  CVE-2015-7499-1 Add xmlHaltParser() to stop the parser (Daniel Veillard),<br />
+  CVE-2015-5312 Another entity expansion issue (David Drysdale),<br />
+  CVE-2015-7497 Avoid an heap buffer overflow in xmlDictComputeFastQKey (David Drysdale),<br />
+  CVE-2015-7498 Avoid processing entities after encoding conversion failures (Daniel Veillard),<br />
+  CVE-2015-8035 Fix XZ compression support loop (Daniel Veillard),<br />
+  CVE-2015-7942-2 Fix an error in previous Conditional section patch (Daniel Veillard),<br />
+  CVE-2015-7942 Another variation of overflow in Conditional sections (Daniel Veillard),<br />
+  CVE-2015-1819 Enforce the reader to run in constant memory (Daniel Veillard)<br />
+  CVE-2015-7941_2 Cleanup conditional section error handling (Daniel Veillard),<br />
+  CVE-2015-7941_1 Stop parsing on entities boundaries errors (Daniel Veillard),<br />
+  </li>
+
+  <li>Documentation:<br />
+  Correct spelling of "calling" (Alex Henrie),<br />
+  Fix a small error in xmllint --format description (Fabien Degomme),<br />
+  Avoid XSS on the search of xmlsoft.org (Daniel Veillard)<br />
+  </li>
+
+  <li>Portability:<br />
+  threads: use forward declarations only for glibc (Michael Heimpold),<br />
+  Update Win32 configure.js to search for configure.ac (Daniel Veillard)<br />
+  </li>
+
+  <li>Bug Fixes:<br />
+  Bug on creating new stream from entity (Daniel Veillard),<br />
+  Fix some loop issues embedding NEXT (Daniel Veillard),<br />
+  Do not print error context when there is none (Daniel Veillard),<br />
+  Avoid extra processing of MarkupDecl when EOF (Hugh Davenport),<br />
+  Fix parsing short unclosed comment uninitialized access (Daniel Veillard),<br />
+  Add missing Null check in xmlParseExternalEntityPrivate (Gaurav Gupta),<br />
+  Fix a bug in CData error handling in the push parser (Daniel Veillard),<br />
+  Fix a bug on name parsing at the end of current input buffer (Daniel Veillard),<br />
+  Fix the spurious ID already defined error (Daniel Veillard),<br />
+  Fix previous change to node sort order (Nick Wellnhofer),<br />
+  Fix a self assignment issue raised by clang (Scott Graham),<br />
+  Fail parsing early on if encoding conversion failed (Daniel Veillard),<br />
+  Do not process encoding values if the declaration if broken (Daniel Veillard),<br />
+  Silence clang's -Wunknown-attribute (Michael Catanzaro),<br />
+  xmlMemUsed is not thread-safe (Martin von Gagern),<br />
+  Fix support for except in nameclasses (Daniel Veillard),<br />
+  Fix order of root nodes (Nick Wellnhofer),<br />
+  Allow attributes on descendant-or-self axis (Nick Wellnhofer),<br />
+  Fix the fix to Windows locking (Steve Nairn),<br />
+  Fix timsort invariant loop re: Envisage article (Christopher Swenson),<br />
+  Don't add IDs in xmlSetTreeDoc (Nick Wellnhofer),<br />
+  Account for ID attributes in xmlSetTreeDoc (Nick Wellnhofer),<br />
+  Remove various unused value assignments (Philip Withnall),<br />
+  Fix missing entities after CVE-2014-3660 fix (Daniel Veillard),<br />
+  Revert "Missing initialization for the catalog module" (Daniel Veillard)<br />
+  </li>
+
+  <li>Improvements:<br />
+  Reuse xmlHaltParser() where it makes sense (Daniel Veillard),<br />
+  xmlStopParser reset errNo (Daniel Veillard),<br />
+  Reenable xz support by default (Daniel Veillard),<br />
+  Recover unescaped less-than character in HTML recovery parsing (Daniel Veillard),<br />
+  Allow HTML serializer to output HTML5 DOCTYPE (Shaun McCance),<br />
+  Regression test for bug #695699 (Nick Wellnhofer),<br />
+  Add a couple of XPath tests (Nick Wellnhofer),<br />
+  Add Python 3 rpm subpackage (Tomas Radej),<br />
+  libxml2-config.cmake.in: update include directories (Samuel Martin),<br />
+  Adding example from bugs 738805 to regression tests (Daniel Veillard)<br />
+  </li>
+
+  <li>Cleanups:<br />
+  </li>
+</ul><h3>2.9.2: Oct 16 2014</h3><ul>
   <li>Security:<br />
   Fix for CVE-2014-3660 billion laugh variant (Daniel Veillard),<br />
   CVE-2014-0191 Do not fetch external parameter entities (Daniel Veillard)<br />
index ce1a25f..c94e87e 100644 (file)
@@ -102,13 +102,14 @@ A:link, A:visited, A:active { text-decoration: underline }
     $scope = ltrim ($scope);
     if ($scope == "")
         $scope = "any";
+    $querystr = htmlspecialchars($query, ENT_QUOTES, 'UTF-8');
 
 ?>
 <p> The search service indexes the libxml2 and libxslt APIs and documentation as well as the xml@gnome.org and xslt@gnome.org mailing-list archives. To use it simply provide a set of keywords:
 <p>
 <form action="<?php echo "$PHP_SELF", "?query=", rawurlencode($query) ?>"
       enctype="application/x-www-form-urlencoded" method="GET">
-  <input name="query" type="TEXT" size="50" value="<?php echo $query?>">
+  <input name="query" type="TEXT" size="50" value="<?php echo $querystr?>">
   <select name="scope">
     <option value="any">Search All</option>
     <option value="XML" <?php if ($scope == 'XML') print "selected"?>>XML resources</option>
@@ -446,7 +447,7 @@ A:link, A:visited, A:active { text-decoration: underline }
            }
            mysql_close($link);
            $nb = count($results);
-           echo "<h3 align='center'>Found $nb results for query $query</h3>\n";
+           echo "<h3 align='center'>Found $nb results for query $querystr</h3>\n";
            usort($results, "resSort");
 
             if ($nb > 0) {
index 373285d..d035934 100644 (file)
@@ -709,6 +709,171 @@ to the <a href="http://git.gnome.org/browse/libxml2/">GIT</a> code base.</p>
 
 <p>Here is the list of public releases:</p>
 
+<h3>2.9.4: May 23 2016</h3>
+<ul>
+  <li>Security:<br/>
+  More format string warnings with possible format string vulnerability (David Kilzer),<br/>
+  Avoid building recursive entities (Daniel Veillard),<br/>
+  Heap-based buffer overread in htmlCurrentChar (Pranjal Jumde),<br/>
+  Heap-based buffer-underreads due to xmlParseName (David Kilzer),<br/>
+  Heap use-after-free in xmlSAX2AttributeNs (Pranjal Jumde),<br/>
+  Heap use-after-free in htmlParsePubidLiteral and htmlParseSystemiteral (Pranjal Jumde),<br/>
+  Fix some format string warnings with possible format string vulnerability (David Kilzer),<br/>
+  Detect change of encoding when parsing HTML names (Hugh Davenport),<br/>
+  Fix inappropriate fetch of entities content (Daniel Veillard),<br/>
+  Bug 759398: Heap use-after-free in xmlDictComputeFastKey &lt;https://bugzilla.gnome.org/show_bug.cgi?id=759398&gt; (Pranjal Jumde),<br/>
+  Bug 758605: Heap-based buffer overread in xmlDictAddString &lt;https://bugzilla.gnome.org/show_bug.cgi?id=758605&gt; (Pranjal Jumde),<br/>
+  Bug 758588: Heap-based buffer overread in xmlParserPrintFileContextInternal &lt;https://bugzilla.gnome.org/show_bug.cgi?id=758588&gt; (David Kilzer),<br/>
+  Bug 757711: heap-buffer-overflow in xmlFAParsePosCharGroup &lt;https://bugzilla.gnome.org/show_bug.cgi?id=757711&gt; (Pranjal Jumde),<br/>
+  Add missing increments of recursion depth counter to XML parser. (Peter Simons)<br/>
+  </li>
+
+  <li>Documentation:<br/>
+  Fix typo: s{ ec -&gt; cr }cipt (Jan Pokorný),<br/>
+  Fix typos: dictio{ nn -&gt; n }ar{y,ies} (Jan Pokorný),<br/>
+  Fix typos: PATH_{ SEAPARATOR -&gt; SEPARATOR } (Jan Pokorný),<br/>
+  Correct a typo. (Shlomi Fish)<br/>
+  </li>
+
+  <li>Portability:<br/>
+  Correct the usage of LDFLAGS (Mattias Hansson),<br/>
+  Revert the use of SAVE_LDFLAGS in configure.ac (Mattias Hansson),<br/>
+  libxml2 hardcodes -L/lib in zlib/lzma tests which breaks cross-compiles (Mike Frysinger),<br/>
+  Fix apibuild for a recently added construct (Daniel Veillard),<br/>
+  Use pkg-config to locate zlib when possible (Stewart Brodie),<br/>
+  Use pkg-config to locate ICU when possible (Stewart Brodie),<br/>
+  Portability to non C99 compliant compilers (Patrick Monnerat),<br/>
+  dict.h: Move xmlDictPtr definition before includes to allow direct inclusion. (Patrick Monnerat),<br/>
+  os400: tell about xmllint and xmlcatalog in README400. (Patrick Monnerat),<br/>
+  os400: properly process SGML add in XMLCATALOG command. (Patrick Monnerat),<br/>
+  os400: implement CL command XMLCATALOG. (Patrick Monnerat),<br/>
+  os400: compile and install program xmlcatalog (qshell-only). (Patrick Monnerat),<br/>
+  os400: expand tabs in sources, strip trailing blanks. (Patrick Monnerat),<br/>
+  os400: implement CL command XMLLINT. (Patrick Monnerat),<br/>
+  os400: compile and install program xmllint (qshell-only). (Patrick Monnerat),<br/>
+  os400: initscript make_module(): Use options instead of positional parameters. (Patrick Monnerat),<br/>
+  os400: c14n.rpgle: allow *omit for nullable reference parameters. (Patrick Monnerat),<br/>
+  os400: use like() for double type. (Patrick Monnerat),<br/>
+  os400: use like() for int type. (Patrick Monnerat),<br/>
+  os400: use like() for unsigned int type. (Patrick Monnerat),<br/>
+  os400: use like() for enum types. (Patrick Monnerat),<br/>
+  Add xz to xml2-config --libs output (Baruch Siach),<br/>
+  Bug 760190: configure.ac should be able to build --with-icu without icu-config tool &lt;https://bugzilla.gnome.org/show_bug.cgi?id=760190&gt; (David Kilzer),<br/>
+  win32\VC10\config.h and VS 2015 (Bruce Dawson),<br/>
+  Add configure maintainer mode (orzen)<br/>
+  </li>
+
+  <li>Bug Fixes:<br/>
+  Avoid an out of bound access when serializing malformed strings (Daniel Veillard),<br/>
+  Unsigned addition may overflow in xmlMallocAtomicLoc() (David Kilzer),<br/>
+  Integer signed/unsigned type mismatch in xmlParserInputGrow() (David Kilzer),<br/>
+  Bug 763071: heap-buffer-overflow in xmlStrncat &lt;https://bugzilla.gnome.org/show_bug.cgi?id=763071&gt; (Pranjal Jumde),<br/>
+  Integer overflow parsing port number in URI (Michael Paddon),<br/>
+  Fix an error with regexp on nullable counted char transition (Daniel Veillard),<br/>
+  Fix memory leak with XPath namespace nodes (Nick Wellnhofer),<br/>
+  Fix namespace axis traversal (Nick Wellnhofer),<br/>
+      Fix null pointer deref in docs with no root element (Hugh Davenport),<br/>
+  Fix XSD validation of URIs with ampersands (Alex Henrie),<br/>
+  xmlschemastypes.c: accept endOfDayFrag Times set to "24:00:00" mean "end of day" and should not cause an error. (Patrick Monnerat),<br/>
+  xmlcatalog: flush stdout before interactive shell input. (Patrick Monnerat),<br/>
+  xmllint: flush stdout before interactive shell input. (Patrick Monnerat),<br/>
+  Don't recurse into OP_VALUEs in xmlXPathOptimizeExpression (Nick Wellnhofer),<br/>
+  Fix namespace::node() XPath expression (Nick Wellnhofer),<br/>
+  Fix OOB write in xmlXPathEmptyNodeSet (Nick Wellnhofer),<br/>
+  Fix parsing of NCNames in XPath (Nick Wellnhofer),<br/>
+  Fix OOB read with invalid UTF-8 in xmlUTF8Strsize (Nick Wellnhofer),<br/>
+  Do normalize string-based datatype value in RelaxNG facet checking (Audric Schiltknecht),<br/>
+  Bug 760921: REGRESSION (8eb55d78): doc/examples/io1 test fails after fix for "xmlSaveUri() incorrectly recomposes URIs with rootless paths" &lt;https://bugzilla.gnome.org/show_bug.cgi?id=760921&gt; (David Kilzer),<br/>
+  Bug 760861: REGRESSION (bf9c1dad): Missing results for test/schemas/regexp-char-ref_[01].xsd &lt;https://bugzilla.gnome.org/show_bug.cgi?id=760861&gt; (David Kilzer),<br/>
+  error.c: *input-&gt;cur == 0 does not mean no error (Pavel Raiskup),<br/>
+  Add missing RNG test files (David Kilzer),<br/>
+  Bug 760183: REGRESSION (v2.9.3): XML push parser fails with bogus UTF-8 encoding error when multi-byte character in large CDATA section is split across buffer &lt;https://bugzilla.gnome.org/show_bug.cgi?id=760183&gt; (David Kilzer),<br/>
+  Bug 758572: ASAN crash in make check &lt;https://bugzilla.gnome.org/show_bug.cgi?id=758572&gt; (David Kilzer),<br/>
+  Bug 721158: Missing ICU string when doing --version on xmllint &lt;https://bugzilla.gnome.org/show_bug.cgi?id=721158&gt; (David Kilzer),<br/>
+  python 3: libxml2.c wrappers create Unicode str already (Michael Stahl),<br/>
+  Add autogen.sh to distrib (orzen),<br/>
+  Heap-based buffer overread in xmlNextChar (Daniel Veillard)<br/>
+  </li>
+
+  <li>Improvements:<br/>
+  Add more debugging info to runtest (Daniel Veillard),<br/>
+  Implement "runtest -u" mode (David Kilzer),<br/>
+  Add a make rule to rebuild for ASAN (Daniel Veillard)<br/>
+  </li>
+</ul>
+<h3>v2.9.3: Nov 20 2015</h3>
+<ul>
+  <li>Security:<br/>
+  CVE-2015-8242 Buffer overead with HTML parser in push mode (Hugh Davenport),<br/>
+  CVE-2015-7500 Fix memory access error due to incorrect entities boundaries (Daniel Veillard),<br/>
+  CVE-2015-7499-2 Detect incoherency on GROW (Daniel Veillard),<br/>
+  CVE-2015-7499-1 Add xmlHaltParser() to stop the parser (Daniel Veillard),<br/>
+  CVE-2015-5312 Another entity expansion issue (David Drysdale),<br/>
+  CVE-2015-7497 Avoid an heap buffer overflow in xmlDictComputeFastQKey (David Drysdale),<br/>
+  CVE-2015-7498 Avoid processing entities after encoding conversion failures (Daniel Veillard),<br/>
+  CVE-2015-8035 Fix XZ compression support loop (Daniel Veillard),<br/>
+  CVE-2015-7942-2 Fix an error in previous Conditional section patch (Daniel Veillard),<br/>
+  CVE-2015-7942 Another variation of overflow in Conditional sections (Daniel Veillard),<br/>
+  CVE-2015-1819 Enforce the reader to run in constant memory (Daniel Veillard)<br/>
+  CVE-2015-7941_2 Cleanup conditional section error handling (Daniel Veillard),<br/>
+  CVE-2015-7941_1 Stop parsing on entities boundaries errors (Daniel Veillard),<br/>
+  </li>
+
+  <li>Documentation:<br/>
+  Correct spelling of "calling" (Alex Henrie),<br/>
+  Fix a small error in xmllint --format description (Fabien Degomme),<br/>
+  Avoid XSS on the search of xmlsoft.org (Daniel Veillard)<br/>
+  </li>
+
+  <li>Portability:<br/>
+  threads: use forward declarations only for glibc (Michael Heimpold),<br/>
+  Update Win32 configure.js to search for configure.ac (Daniel Veillard)<br/>
+  </li>
+
+  <li>Bug Fixes:<br/>
+  Bug on creating new stream from entity (Daniel Veillard),<br/>
+  Fix some loop issues embedding NEXT (Daniel Veillard),<br/>
+  Do not print error context when there is none (Daniel Veillard),<br/>
+  Avoid extra processing of MarkupDecl when EOF (Hugh Davenport),<br/>
+  Fix parsing short unclosed comment uninitialized access (Daniel Veillard),<br/>
+  Add missing Null check in xmlParseExternalEntityPrivate (Gaurav Gupta),<br/>
+  Fix a bug in CData error handling in the push parser (Daniel Veillard),<br/>
+  Fix a bug on name parsing at the end of current input buffer (Daniel Veillard),<br/>
+  Fix the spurious ID already defined error (Daniel Veillard),<br/>
+  Fix previous change to node sort order (Nick Wellnhofer),<br/>
+  Fix a self assignment issue raised by clang (Scott Graham),<br/>
+  Fail parsing early on if encoding conversion failed (Daniel Veillard),<br/>
+  Do not process encoding values if the declaration if broken (Daniel Veillard),<br/>
+  Silence clang's -Wunknown-attribute (Michael Catanzaro),<br/>
+  xmlMemUsed is not thread-safe (Martin von Gagern),<br/>
+  Fix support for except in nameclasses (Daniel Veillard),<br/>
+  Fix order of root nodes (Nick Wellnhofer),<br/>
+  Allow attributes on descendant-or-self axis (Nick Wellnhofer),<br/>
+  Fix the fix to Windows locking (Steve Nairn),<br/>
+  Fix timsort invariant loop re: Envisage article (Christopher Swenson),<br/>
+  Don't add IDs in xmlSetTreeDoc (Nick Wellnhofer),<br/>
+  Account for ID attributes in xmlSetTreeDoc (Nick Wellnhofer),<br/>
+  Remove various unused value assignments (Philip Withnall),<br/>
+  Fix missing entities after CVE-2014-3660 fix (Daniel Veillard),<br/>
+  Revert "Missing initialization for the catalog module" (Daniel Veillard)<br/>
+  </li>
+
+  <li>Improvements:<br/>
+  Reuse xmlHaltParser() where it makes sense (Daniel Veillard),<br/>
+  xmlStopParser reset errNo (Daniel Veillard),<br/>
+  Reenable xz support by default (Daniel Veillard),<br/>
+  Recover unescaped less-than character in HTML recovery parsing (Daniel Veillard),<br/>
+  Allow HTML serializer to output HTML5 DOCTYPE (Shaun McCance),<br/>
+  Regression test for bug #695699 (Nick Wellnhofer),<br/>
+  Add a couple of XPath tests (Nick Wellnhofer),<br/>
+  Add Python 3 rpm subpackage (Tomas Radej),<br/>
+  libxml2-config.cmake.in: update include directories (Samuel Martin),<br/>
+  Adding example from bugs 738805 to regression tests (Daniel Veillard)<br/>
+  </li>
+
+  <li>Cleanups:<br/>
+  </li>
+</ul>
 <h3>2.9.2: Oct 16 2014</h3>
 <ul>
   <li>Security:<br/>
index 574e1ae..e49c7f8 100644 (file)
@@ -93,7 +93,7 @@ xmlEncodingErrMemory(const char *extra)
  *
  * n encoding error
  */
-static void
+static void LIBXML_ATTR_FORMAT(2,0)
 xmlEncodingErr(xmlParserErrors error, const char *msg, const char *val)
 {
     __xmlRaiseError(NULL, NULL, NULL, NULL, NULL,
index a72afb3..64808ff 100644 (file)
@@ -83,7 +83,7 @@ xmlEntitiesErrMemory(const char *extra)
  *
  * Handle an out of memory condition
  */
-static void
+static void LIBXML_ATTR_FORMAT(2,0)
 xmlEntitiesErr(xmlParserErrors code, const char *msg)
 {
     __xmlSimpleError(XML_FROM_TREE, code, NULL, msg, NULL);
diff --git a/error.c b/error.c
index cbcf5c9..9606f13 100644 (file)
--- a/error.c
+++ b/error.c
@@ -18,7 +18,7 @@
 
 void XMLCDECL xmlGenericErrorDefaultFunc       (void *ctx ATTRIBUTE_UNUSED,
                                 const char *msg,
-                                ...);
+                                ...) LIBXML_ATTR_FORMAT(2,3);
 
 #define XML_GET_VAR_STR(msg, str) {                            \
     int       size, prev_size = -1;                            \
@@ -177,7 +177,9 @@ xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
     xmlChar  content[81]; /* space for 80 chars + line terminator */
     xmlChar *ctnt;
 
-    if (input == NULL) return;
+    if ((input == NULL) || (input->cur == NULL))
+        return;
+
     cur = input->cur;
     base = input->base;
     /* skip backwards over any end-of-lines */
index dea6d65..069e953 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,8 +90,6 @@ build_triplet = @build@
 host_triplet = @host@
 noinst_PROGRAMS = gjobread$(EXEEXT)
 subdir = example
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(top_srcdir)/depcomp
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
@@ -89,6 +97,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -166,6 +175,7 @@ am__define_uniq_tagged_files = \
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -207,6 +217,7 @@ HTML_DIR = @HTML_DIR@
 HTML_OBJ = @HTML_OBJ@
 HTTP_OBJ = @HTTP_OBJ@
 ICONV_LIBS = @ICONV_LIBS@
+ICU_CFLAGS = @ICU_CFLAGS@
 ICU_LIBS = @ICU_LIBS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
@@ -228,8 +239,10 @@ LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 LZMA_CFLAGS = @LZMA_CFLAGS@
 LZMA_LIBS = @LZMA_LIBS@
+MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -404,7 +417,7 @@ all: all-am
 
 .SUFFIXES:
 .SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@ -416,7 +429,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu example/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu example/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -429,9 +441,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 
-$(top_srcdir)/configure:  $(am__configure_deps)
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
 
@@ -461,14 +473,14 @@ distclean-compile:
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
 
 .c.obj:
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 
 .c.lo:
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -686,6 +698,8 @@ uninstall-am:
        mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
        tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index c7aea1b..ce7de63 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -78,7 +88,6 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = include
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
@@ -86,6 +95,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -145,6 +155,7 @@ am__define_uniq_tagged_files = \
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -211,6 +222,7 @@ HTML_DIR = @HTML_DIR@
 HTML_OBJ = @HTML_OBJ@
 HTTP_OBJ = @HTTP_OBJ@
 ICONV_LIBS = @ICONV_LIBS@
+ICU_CFLAGS = @ICU_CFLAGS@
 ICU_LIBS = @ICU_LIBS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
@@ -232,8 +244,10 @@ LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 LZMA_CFLAGS = @LZMA_CFLAGS@
 LZMA_LIBS = @LZMA_LIBS@
+MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -405,7 +419,7 @@ EXTRA_DIST = win32config.h wsockcompat.h
 all: all-recursive
 
 .SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@ -417,7 +431,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu include/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -430,9 +443,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 
-$(top_srcdir)/configure:  $(am__configure_deps)
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
 
@@ -712,6 +725,8 @@ uninstall-am:
        mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
        ps ps-am tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index ce84b54..10159d8 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,8 +89,6 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = include/libxml
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(srcdir)/xmlversion.h.in $(xmlinc_HEADERS)
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
@@ -88,6 +96,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(xmlinc_HEADERS) \
+       $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES = xmlversion.h
@@ -159,6 +169,7 @@ am__define_uniq_tagged_files = \
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/xmlversion.h.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -200,6 +211,7 @@ HTML_DIR = @HTML_DIR@
 HTML_OBJ = @HTML_OBJ@
 HTTP_OBJ = @HTTP_OBJ@
 ICONV_LIBS = @ICONV_LIBS@
+ICU_CFLAGS = @ICU_CFLAGS@
 ICU_LIBS = @ICU_LIBS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
@@ -221,8 +233,10 @@ LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 LZMA_CFLAGS = @LZMA_CFLAGS@
 LZMA_LIBS = @LZMA_LIBS@
+MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -443,7 +457,7 @@ EXTRA_DIST = xmlversion.h.in
 all: all-am
 
 .SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@ -455,7 +469,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/libxml/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu include/libxml/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -468,9 +481,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 
-$(top_srcdir)/configure:  $(am__configure_deps)
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
 xmlversion.h: $(top_builddir)/config.status $(srcdir)/xmlversion.h.in
@@ -703,6 +716,8 @@ uninstall-am: uninstall-xmlincHEADERS
        mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
        tags tags-am uninstall uninstall-am uninstall-xmlincHEADERS
 
+.PRECIOUS: Makefile
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index 7022ec8..b83db59 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Summary: string dictionnary
+ * Summary: string dictionary
  * Description: dictionary of reusable strings, just used to avoid allocation
  *         and freeing operations.
  *
 #ifndef __XML_DICT_H__
 #define __XML_DICT_H__
 
+#ifdef __cplusplus
+#define __XML_EXTERNC  extern "C"
+#else
+#define __XML_EXTERNC
+#endif
+
+/*
+ * The dictionary.
+ */
+__XML_EXTERNC typedef struct _xmlDict xmlDict;
+__XML_EXTERNC typedef xmlDict *xmlDictPtr;
+
 #include <limits.h>
 #include <libxml/xmlversion.h>
 #include <libxml/tree.h>
@@ -20,12 +32,6 @@ extern "C" {
 #endif
 
 /*
- * The dictionnary.
- */
-typedef struct _xmlDict xmlDict;
-typedef xmlDict *xmlDictPtr;
-
-/*
  * Initializer
  */
 XMLPUBFUN int XMLCALL  xmlInitializeDict(void);
@@ -48,7 +54,7 @@ XMLPUBFUN void XMLCALL
                        xmlDictFree     (xmlDictPtr dict);
 
 /*
- * Lookup of entry in the dictionnary.
+ * Lookup of entry in the dictionary.
  */
 XMLPUBFUN const xmlChar * XMLCALL
                        xmlDictLookup   (xmlDictPtr dict,
index 3f5730d..47fbec0 100644 (file)
@@ -260,7 +260,7 @@ struct _xmlParserCtxt {
     void              *catalogs;      /* document's own catalog */
     int                recovery;      /* run in recovery mode */
     int                progressive;   /* is this a progressive parsing */
-    xmlDictPtr         dict;          /* dictionnary for the parser */
+    xmlDictPtr         dict;          /* dictionary for the parser */
     const xmlChar *   *atts;          /* array for the attributes callbacks */
     int                maxatts;       /* the size of the array */
     int                docdict;       /* use strings from dict to build tree */
@@ -1099,7 +1099,7 @@ typedef enum {
     XML_PARSE_SAX1     = 1<<9, /* use the SAX1 interface internally */
     XML_PARSE_XINCLUDE = 1<<10,/* Implement XInclude substitition  */
     XML_PARSE_NONET    = 1<<11,/* Forbid network access */
-    XML_PARSE_NODICT   = 1<<12,/* Do not reuse the context dictionnary */
+    XML_PARSE_NODICT   = 1<<12,/* Do not reuse the context dictionary */
     XML_PARSE_NSCLEAN  = 1<<13,/* remove redundant namespaces declarations */
     XML_PARSE_NOCDATA  = 1<<14,/* merge CDATA as text nodes */
     XML_PARSE_NOXINCNODE= 1<<15,/* do not generate XINCLUDE START/END nodes */
index 6065320..f30fc68 100644 (file)
@@ -351,7 +351,7 @@ XMLPUBFUN void XMLCALL
                                                 xmlParserErrors xmlerr,
                                                 const char *msg,
                                                 const xmlChar * str1,
-                                                const xmlChar * str2);
+                                                const xmlChar * str2) LIBXML_ATTR_FORMAT(3,0);
 #endif
 
 /**
index 4f0ca9a..c7cf552 100644 (file)
@@ -28,52 +28,52 @@ extern "C" {
 
 typedef enum {
     XML_SCHEMAS_UNKNOWN = 0,
-    XML_SCHEMAS_STRING,
-    XML_SCHEMAS_NORMSTRING,
-    XML_SCHEMAS_DECIMAL,
-    XML_SCHEMAS_TIME,
-    XML_SCHEMAS_GDAY,
-    XML_SCHEMAS_GMONTH,
-    XML_SCHEMAS_GMONTHDAY,
-    XML_SCHEMAS_GYEAR,
-    XML_SCHEMAS_GYEARMONTH,
-    XML_SCHEMAS_DATE,
-    XML_SCHEMAS_DATETIME,
-    XML_SCHEMAS_DURATION,
-    XML_SCHEMAS_FLOAT,
-    XML_SCHEMAS_DOUBLE,
-    XML_SCHEMAS_BOOLEAN,
-    XML_SCHEMAS_TOKEN,
-    XML_SCHEMAS_LANGUAGE,
-    XML_SCHEMAS_NMTOKEN,
-    XML_SCHEMAS_NMTOKENS,
-    XML_SCHEMAS_NAME,
-    XML_SCHEMAS_QNAME,
-    XML_SCHEMAS_NCNAME,
-    XML_SCHEMAS_ID,
-    XML_SCHEMAS_IDREF,
-    XML_SCHEMAS_IDREFS,
-    XML_SCHEMAS_ENTITY,
-    XML_SCHEMAS_ENTITIES,
-    XML_SCHEMAS_NOTATION,
-    XML_SCHEMAS_ANYURI,
-    XML_SCHEMAS_INTEGER,
-    XML_SCHEMAS_NPINTEGER,
-    XML_SCHEMAS_NINTEGER,
-    XML_SCHEMAS_NNINTEGER,
-    XML_SCHEMAS_PINTEGER,
-    XML_SCHEMAS_INT,
-    XML_SCHEMAS_UINT,
-    XML_SCHEMAS_LONG,
-    XML_SCHEMAS_ULONG,
-    XML_SCHEMAS_SHORT,
-    XML_SCHEMAS_USHORT,
-    XML_SCHEMAS_BYTE,
-    XML_SCHEMAS_UBYTE,
-    XML_SCHEMAS_HEXBINARY,
-    XML_SCHEMAS_BASE64BINARY,
-    XML_SCHEMAS_ANYTYPE,
-    XML_SCHEMAS_ANYSIMPLETYPE
+    XML_SCHEMAS_STRING = 1,
+    XML_SCHEMAS_NORMSTRING = 2,
+    XML_SCHEMAS_DECIMAL = 3,
+    XML_SCHEMAS_TIME = 4,
+    XML_SCHEMAS_GDAY = 5,
+    XML_SCHEMAS_GMONTH = 6,
+    XML_SCHEMAS_GMONTHDAY = 7,
+    XML_SCHEMAS_GYEAR = 8,
+    XML_SCHEMAS_GYEARMONTH = 9,
+    XML_SCHEMAS_DATE = 10,
+    XML_SCHEMAS_DATETIME = 11,
+    XML_SCHEMAS_DURATION = 12,
+    XML_SCHEMAS_FLOAT = 13,
+    XML_SCHEMAS_DOUBLE = 14,
+    XML_SCHEMAS_BOOLEAN = 15,
+    XML_SCHEMAS_TOKEN = 16,
+    XML_SCHEMAS_LANGUAGE = 17,
+    XML_SCHEMAS_NMTOKEN = 18,
+    XML_SCHEMAS_NMTOKENS = 19,
+    XML_SCHEMAS_NAME = 20,
+    XML_SCHEMAS_QNAME = 21,
+    XML_SCHEMAS_NCNAME = 22,
+    XML_SCHEMAS_ID = 23,
+    XML_SCHEMAS_IDREF = 24,
+    XML_SCHEMAS_IDREFS = 25,
+    XML_SCHEMAS_ENTITY = 26,
+    XML_SCHEMAS_ENTITIES = 27,
+    XML_SCHEMAS_NOTATION = 28,
+    XML_SCHEMAS_ANYURI = 29,
+    XML_SCHEMAS_INTEGER = 30,
+    XML_SCHEMAS_NPINTEGER = 31,
+    XML_SCHEMAS_NINTEGER = 32,
+    XML_SCHEMAS_NNINTEGER = 33,
+    XML_SCHEMAS_PINTEGER = 34,
+    XML_SCHEMAS_INT = 35,
+    XML_SCHEMAS_UINT = 36,
+    XML_SCHEMAS_LONG = 37,
+    XML_SCHEMAS_ULONG = 38,
+    XML_SCHEMAS_SHORT = 39,
+    XML_SCHEMAS_USHORT = 40,
+    XML_SCHEMAS_BYTE = 41,
+    XML_SCHEMAS_UBYTE = 42,
+    XML_SCHEMAS_HEXBINARY = 43,
+    XML_SCHEMAS_BASE64BINARY = 44,
+    XML_SCHEMAS_ANYTYPE = 45,
+    XML_SCHEMAS_ANYSIMPLETYPE = 46
 } xmlSchemaValType;
 
 /*
index 2f90717..4a9b3bc 100644 (file)
@@ -76,7 +76,8 @@ typedef enum {
     XML_BUFFER_ALLOC_EXACT,    /* grow only to the minimal size */
     XML_BUFFER_ALLOC_IMMUTABLE, /* immutable buffer */
     XML_BUFFER_ALLOC_IO,       /* special allocation scheme used for I/O */
-    XML_BUFFER_ALLOC_HYBRID    /* exact up to a threshold, and doubleit thereafter */
+    XML_BUFFER_ALLOC_HYBRID,   /* exact up to a threshold, and doubleit thereafter */
+    XML_BUFFER_ALLOC_BOUNDED   /* limit the upper size of the buffer */
 } xmlBufferAllocationScheme;
 
 /**
index 43e68ca..037c16d 100644 (file)
@@ -937,7 +937,7 @@ XMLPUBFUN void XMLCALL
                                 int code,
                                 xmlNodePtr node,
                                 const char *msg,
-                                const char *extra);
+                                const char *extra) LIBXML_ATTR_FORMAT(4,0);
 #endif
 #ifdef __cplusplus
 }
index 2036236..2d0b2d1 100644 (file)
@@ -97,13 +97,13 @@ XMLPUBFUN xmlChar * XMLCALL
 XMLPUBFUN int XMLCALL
                 xmlStrPrintf             (xmlChar *buf,
                                          int len,
-                                         const xmlChar *msg,
-                                         ...);
+                                         const char *msg,
+                                         ...) LIBXML_ATTR_FORMAT(3,4);
 XMLPUBFUN int XMLCALL
                 xmlStrVPrintf                (xmlChar *buf,
                                          int len,
-                                         const xmlChar *msg,
-                                         va_list ap);
+                                         const char *msg,
+                                         va_list ap) LIBXML_ATTR_FORMAT(3,0);
 
 XMLPUBFUN int XMLCALL
         xmlGetUTF8Char                   (const unsigned char *utf,
index ffd42ea..59ba74f 100644 (file)
@@ -29,28 +29,28 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
  *
  * the version string like "1.2.3"
  */
-#define LIBXML_DOTTED_VERSION "2.9.2"
+#define LIBXML_DOTTED_VERSION "2.9.4"
 
 /**
  * LIBXML_VERSION:
  *
  * the version number: 1.2.3 value is 10203
  */
-#define LIBXML_VERSION 20902
+#define LIBXML_VERSION 20904
 
 /**
  * LIBXML_VERSION_STRING:
  *
  * the version number string, 1.2.3 value is "10203"
  */
-#define LIBXML_VERSION_STRING "20902"
+#define LIBXML_VERSION_STRING "20904"
 
 /**
  * LIBXML_VERSION_EXTRA:
  *
  * extra version information, used to show a CVS compilation
  */
-#define LIBXML_VERSION_EXTRA "-GITv2.9.2-rc2-10-gbe2a7ed"
+#define LIBXML_VERSION_EXTRA "-GITCVE-2016-1834-21-g502f6a6"
 
 /**
  * LIBXML_TEST_VERSION:
@@ -58,7 +58,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
  * Macro to check that the libxml version in use is compatible with
  * the version the software has been compiled against
  */
-#define LIBXML_TEST_VERSION xmlCheckVersion(20902);
+#define LIBXML_TEST_VERSION xmlCheckVersion(20904);
 
 #ifndef VMS
 #if 0
@@ -435,7 +435,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
  */
 
 #ifndef LIBXML_ATTR_ALLOC_SIZE
-# if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))
+# if (!defined(__clang__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))))
 #  define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
 # else
 #  define LIBXML_ATTR_ALLOC_SIZE(x)
index 00a836f..b173be9 100644 (file)
@@ -435,7 +435,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
  */
 
 #ifndef LIBXML_ATTR_ALLOC_SIZE
-# if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))
+# if (!defined(__clang__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))))
 #  define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
 # else
 #  define LIBXML_ATTR_ALLOC_SIZE(x)
index 70c9db9..76a6b48 100644 (file)
@@ -229,7 +229,7 @@ XMLPUBFUN void * XMLCALL
  * Empties a node-set.
  */
 #define xmlXPathEmptyNodeSet(ns)                                       \
-    { while ((ns)->nodeNr > 0) (ns)->nodeTab[(ns)->nodeNr--] = NULL; }
+    { while ((ns)->nodeNr > 0) (ns)->nodeTab[--(ns)->nodeNr] = NULL; }
 
 /**
  * CHECK_ERROR:
index 377bb86..0b0fdcb 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2011-11-20.07; # UTC
+scriptversion=2013-12-25.23; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC
 # This script is compatible with the BSD install script, but was written
 # from scratch.
 
+tab='  '
 nl='
 '
-IFS=" ""       $nl"
+IFS=" $tab$nl"
 
-# set DOITPROG to echo to test this script
+# Set DOITPROG to "echo" to test this script.
 
-# Don't use :- since 4.3BSD and earlier shells don't like it.
 doit=${DOITPROG-}
-if test -z "$doit"; then
-  doit_exec=exec
-else
-  doit_exec=$doit
-fi
+doit_exec=${doit:-exec}
 
 # Put in absolute file names if you don't have them in your path;
 # or use environment vars.
@@ -68,17 +64,6 @@ mvprog=${MVPROG-mv}
 rmprog=${RMPROG-rm}
 stripprog=${STRIPPROG-strip}
 
-posix_glob='?'
-initialize_posix_glob='
-  test "$posix_glob" != "?" || {
-    if (set -f) 2>/dev/null; then
-      posix_glob=
-    else
-      posix_glob=:
-    fi
-  }
-'
-
 posix_mkdir=
 
 # Desired mode of installed file.
@@ -97,7 +82,7 @@ dir_arg=
 dst_arg=
 
 copy_on_change=false
-no_target_directory=
+is_target_a_directory=possibly
 
 usage="\
 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@@ -137,46 +122,57 @@ while test $# -ne 0; do
     -d) dir_arg=true;;
 
     -g) chgrpcmd="$chgrpprog $2"
-       shift;;
+        shift;;
 
     --help) echo "$usage"; exit $?;;
 
     -m) mode=$2
-       case $mode in
-         *' '* | *'    '* | *'
-'*       | *'*'* | *'?'* | *'['*)
-           echo "$0: invalid mode: $mode" >&2
-           exit 1;;
-       esac
-       shift;;
+        case $mode in
+          *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+            echo "$0: invalid mode: $mode" >&2
+            exit 1;;
+        esac
+        shift;;
 
     -o) chowncmd="$chownprog $2"
-       shift;;
+        shift;;
 
     -s) stripcmd=$stripprog;;
 
-    -t) dst_arg=$2
-       # Protect names problematic for 'test' and other utilities.
-       case $dst_arg in
-         -* | [=\(\)!]) dst_arg=./$dst_arg;;
-       esac
-       shift;;
+    -t)
+        is_target_a_directory=always
+        dst_arg=$2
+        # Protect names problematic for 'test' and other utilities.
+        case $dst_arg in
+          -* | [=\(\)!]) dst_arg=./$dst_arg;;
+        esac
+        shift;;
 
-    -T) no_target_directory=true;;
+    -T) is_target_a_directory=never;;
 
     --version) echo "$0 $scriptversion"; exit $?;;
 
-    --)        shift
-       break;;
+    --) shift
+        break;;
 
-    -*)        echo "$0: invalid option: $1" >&2
-       exit 1;;
+    -*) echo "$0: invalid option: $1" >&2
+        exit 1;;
 
     *)  break;;
   esac
   shift
 done
 
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
+
+if test -n "$dir_arg"; then
+  if test -n "$dst_arg"; then
+    echo "$0: target directory not allowed when installing a directory." >&2
+    exit 1
+  fi
+fi
+
 if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
   # When -d is used, all remaining arguments are directories to create.
   # When -t is used, the destination is already specified.
@@ -208,6 +204,15 @@ if test $# -eq 0; then
 fi
 
 if test -z "$dir_arg"; then
+  if test $# -gt 1 || test "$is_target_a_directory" = always; then
+    if test ! -d "$dst_arg"; then
+      echo "$0: $dst_arg: Is not a directory." >&2
+      exit 1
+    fi
+  fi
+fi
+
+if test -z "$dir_arg"; then
   do_exit='(exit $ret); exit $ret'
   trap "ret=129; $do_exit" 1
   trap "ret=130; $do_exit" 2
@@ -223,16 +228,16 @@ if test -z "$dir_arg"; then
 
     *[0-7])
       if test -z "$stripcmd"; then
-       u_plus_rw=
+        u_plus_rw=
       else
-       u_plus_rw='% 200'
+        u_plus_rw='% 200'
       fi
       cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
     *)
       if test -z "$stripcmd"; then
-       u_plus_rw=
+        u_plus_rw=
       else
-       u_plus_rw=,u+rw
+        u_plus_rw=,u+rw
       fi
       cp_umask=$mode$u_plus_rw;;
   esac
@@ -269,41 +274,15 @@ do
     # If destination is a directory, append the input filename; won't work
     # if double slashes aren't ignored.
     if test -d "$dst"; then
-      if test -n "$no_target_directory"; then
-       echo "$0: $dst_arg: Is a directory" >&2
-       exit 1
+      if test "$is_target_a_directory" = never; then
+        echo "$0: $dst_arg: Is a directory" >&2
+        exit 1
       fi
       dstdir=$dst
       dst=$dstdir/`basename "$src"`
       dstdir_status=0
     else
-      # Prefer dirname, but fall back on a substitute if dirname fails.
-      dstdir=`
-       (dirname "$dst") 2>/dev/null ||
-       expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-            X"$dst" : 'X\(//\)[^/]' \| \
-            X"$dst" : 'X\(//\)$' \| \
-            X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
-       echo X"$dst" |
-           sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-                  s//\1/
-                  q
-                }
-                /^X\(\/\/\)[^/].*/{
-                  s//\1/
-                  q
-                }
-                /^X\(\/\/\)$/{
-                  s//\1/
-                  q
-                }
-                /^X\(\/\).*/{
-                  s//\1/
-                  q
-                }
-                s/.*/./; q'
-      `
-
+      dstdir=`dirname "$dst"`
       test -d "$dstdir"
       dstdir_status=$?
     fi
@@ -314,74 +293,74 @@ do
   if test $dstdir_status != 0; then
     case $posix_mkdir in
       '')
-       # Create intermediate dirs using mode 755 as modified by the umask.
-       # This is like FreeBSD 'install' as of 1997-10-28.
-       umask=`umask`
-       case $stripcmd.$umask in
-         # Optimize common cases.
-         *[2367][2367]) mkdir_umask=$umask;;
-         .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
-         *[0-7])
-           mkdir_umask=`expr $umask + 22 \
-             - $umask % 100 % 40 + $umask % 20 \
-             - $umask % 10 % 4 + $umask % 2
-           `;;
-         *) mkdir_umask=$umask,go-w;;
-       esac
-
-       # With -d, create the new directory with the user-specified mode.
-       # Otherwise, rely on $mkdir_umask.
-       if test -n "$dir_arg"; then
-         mkdir_mode=-m$mode
-       else
-         mkdir_mode=
-       fi
-
-       posix_mkdir=false
-       case $umask in
-         *[123567][0-7][0-7])
-           # POSIX mkdir -p sets u+wx bits regardless of umask, which
-           # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
-           ;;
-         *)
-           tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
-           trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
-           if (umask $mkdir_umask &&
-               exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
-           then
-             if test -z "$dir_arg" || {
-                  # Check for POSIX incompatibilities with -m.
-                  # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
-                  # other-writable bit of parent directory when it shouldn't.
-                  # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
-                  ls_ld_tmpdir=`ls -ld "$tmpdir"`
-                  case $ls_ld_tmpdir in
-                    d????-?r-*) different_mode=700;;
-                    d????-?--*) different_mode=755;;
-                    *) false;;
-                  esac &&
-                  $mkdirprog -m$different_mode -p -- "$tmpdir" && {
-                    ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
-                    test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
-                  }
-                }
-             then posix_mkdir=:
-             fi
-             rmdir "$tmpdir/d" "$tmpdir"
-           else
-             # Remove any dirs left behind by ancient mkdir implementations.
-             rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
-           fi
-           trap '' 0;;
-       esac;;
+        # Create intermediate dirs using mode 755 as modified by the umask.
+        # This is like FreeBSD 'install' as of 1997-10-28.
+        umask=`umask`
+        case $stripcmd.$umask in
+          # Optimize common cases.
+          *[2367][2367]) mkdir_umask=$umask;;
+          .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+          *[0-7])
+            mkdir_umask=`expr $umask + 22 \
+              - $umask % 100 % 40 + $umask % 20 \
+              - $umask % 10 % 4 + $umask % 2
+            `;;
+          *) mkdir_umask=$umask,go-w;;
+        esac
+
+        # With -d, create the new directory with the user-specified mode.
+        # Otherwise, rely on $mkdir_umask.
+        if test -n "$dir_arg"; then
+          mkdir_mode=-m$mode
+        else
+          mkdir_mode=
+        fi
+
+        posix_mkdir=false
+        case $umask in
+          *[123567][0-7][0-7])
+            # POSIX mkdir -p sets u+wx bits regardless of umask, which
+            # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+            ;;
+          *)
+            tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+            trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+            if (umask $mkdir_umask &&
+                exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+            then
+              if test -z "$dir_arg" || {
+                   # Check for POSIX incompatibilities with -m.
+                   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+                   # other-writable bit of parent directory when it shouldn't.
+                   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+                   ls_ld_tmpdir=`ls -ld "$tmpdir"`
+                   case $ls_ld_tmpdir in
+                     d????-?r-*) different_mode=700;;
+                     d????-?--*) different_mode=755;;
+                     *) false;;
+                   esac &&
+                   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+                     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+                     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+                   }
+                 }
+              then posix_mkdir=:
+              fi
+              rmdir "$tmpdir/d" "$tmpdir"
+            else
+              # Remove any dirs left behind by ancient mkdir implementations.
+              rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+            fi
+            trap '' 0;;
+        esac;;
     esac
 
     if
       $posix_mkdir && (
-       umask $mkdir_umask &&
-       $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+        umask $mkdir_umask &&
+        $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
       )
     then :
     else
@@ -391,53 +370,51 @@ do
       # directory the slow way, step by step, checking for races as we go.
 
       case $dstdir in
-       /*) prefix='/';;
-       [-=\(\)!]*) prefix='./';;
-       *)  prefix='';;
+        /*) prefix='/';;
+        [-=\(\)!]*) prefix='./';;
+        *)  prefix='';;
       esac
 
-      eval "$initialize_posix_glob"
-
       oIFS=$IFS
       IFS=/
-      $posix_glob set -f
+      set -f
       set fnord $dstdir
       shift
-      $posix_glob set +f
+      set +f
       IFS=$oIFS
 
       prefixes=
 
       for d
       do
-       test X"$d" = X && continue
-
-       prefix=$prefix$d
-       if test -d "$prefix"; then
-         prefixes=
-       else
-         if $posix_mkdir; then
-           (umask=$mkdir_umask &&
-            $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
-           # Don't fail if two instances are running concurrently.
-           test -d "$prefix" || exit 1
-         else
-           case $prefix in
-             *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
-             *) qprefix=$prefix;;
-           esac
-           prefixes="$prefixes '$qprefix'"
-         fi
-       fi
-       prefix=$prefix/
+        test X"$d" = X && continue
+
+        prefix=$prefix$d
+        if test -d "$prefix"; then
+          prefixes=
+        else
+          if $posix_mkdir; then
+            (umask=$mkdir_umask &&
+             $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+            # Don't fail if two instances are running concurrently.
+            test -d "$prefix" || exit 1
+          else
+            case $prefix in
+              *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+              *) qprefix=$prefix;;
+            esac
+            prefixes="$prefixes '$qprefix'"
+          fi
+        fi
+        prefix=$prefix/
       done
 
       if test -n "$prefixes"; then
-       # Don't fail if two instances are running concurrently.
-       (umask $mkdir_umask &&
-        eval "\$doit_exec \$mkdirprog $prefixes") ||
-         test -d "$dstdir" || exit 1
-       obsolete_mkdir_used=true
+        # Don't fail if two instances are running concurrently.
+        (umask $mkdir_umask &&
+         eval "\$doit_exec \$mkdirprog $prefixes") ||
+          test -d "$dstdir" || exit 1
+        obsolete_mkdir_used=true
       fi
     fi
   fi
@@ -472,15 +449,12 @@ do
 
     # If -C, don't bother to copy if it wouldn't change the file.
     if $copy_on_change &&
-       old=`LC_ALL=C ls -dlL "$dst"    2>/dev/null` &&
-       new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
-
-       eval "$initialize_posix_glob" &&
-       $posix_glob set -f &&
+       old=`LC_ALL=C ls -dlL "$dst"     2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"  2>/dev/null` &&
+       set -f &&
        set X $old && old=:$2:$4:$5:$6 &&
        set X $new && new=:$2:$4:$5:$6 &&
-       $posix_glob set +f &&
-
+       set +f &&
        test "$old" = "$new" &&
        $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
     then
@@ -493,24 +467,24 @@ do
       # to itself, or perhaps because mv is so ancient that it does not
       # support -f.
       {
-       # Now remove or move aside any old file at destination location.
-       # We try this two ways since rm can't unlink itself on some
-       # systems and the destination file might be busy for other
-       # reasons.  In this case, the final cleanup might fail but the new
-       # file should still install successfully.
-       {
-         test ! -f "$dst" ||
-         $doit $rmcmd -f "$dst" 2>/dev/null ||
-         { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
-           { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
-         } ||
-         { echo "$0: cannot unlink or rename $dst" >&2
-           (exit 1); exit 1
-         }
-       } &&
-
-       # Now rename the file to the real destination.
-       $doit $mvcmd "$dsttmp" "$dst"
+        # Now remove or move aside any old file at destination location.
+        # We try this two ways since rm can't unlink itself on some
+        # systems and the destination file might be busy for other
+        # reasons.  In this case, the final cleanup might fail but the new
+        # file should still install successfully.
+        {
+          test ! -f "$dst" ||
+          $doit $rmcmd -f "$dst" 2>/dev/null ||
+          { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+            { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+          } ||
+          { echo "$0: cannot unlink or rename $dst" >&2
+            (exit 1); exit 1
+          }
+        } &&
+
+        # Now rename the file to the real destination.
+        $doit $mvcmd "$dsttmp" "$dst"
       }
     fi || exit 1
 
index 2da9044..88e515f 100644 (file)
--- a/libxml.h
+++ b/libxml.h
@@ -9,6 +9,8 @@
 #ifndef __XML_LIBXML_H__
 #define __XML_LIBXML_H__
 
+#include <libxml/xmlstring.h>
+
 #ifndef NO_LARGEFILE_SOURCE
 #ifndef _LARGEFILE_SOURCE
 #define _LARGEFILE_SOURCE
@@ -68,7 +70,7 @@ extern int __xmlRegisterCallbacks;
  * internal error reporting routines, shared but not partof the API.
  */
 void __xmlIOErr(int domain, int code, const char *extra);
-void __xmlLoaderErr(void *ctx, const char *msg, const char *filename);
+void __xmlLoaderErr(void *ctx, const char *msg, const char *filename) LIBXML_ATTR_FORMAT(2,0);
 #ifdef LIBXML_HTML_ENABLED
 /*
  * internal function of HTML parser needed for xmlParseInNodeContext
@@ -93,6 +95,7 @@ int __xmlInitializeDict(void);
 int __xmlRandom(void);
 #endif
 
+XMLPUBFUN xmlChar * XMLCALL xmlEscapeFormatString(xmlChar **msg);
 int xmlNop(void);
 
 #ifdef IN_LIBXML
index 242a4fe..9029a18 100644 (file)
@@ -1,3 +1,5 @@
+%global with_python3 1
+
 Summary: Library providing XML and HTML support
 Name: libxml2
 Version: @VERSION@
@@ -6,7 +8,13 @@ License: MIT
 Group: Development/Libraries
 Source: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
-BuildRequires: python python-devel zlib-devel pkgconfig xz-devel
+BuildRequires: python-devel
+%if 0%{?with_python3}
+BuildRequires: python3-devel
+%endif # with_python3
+BuildRequires: zlib-devel
+BuildRequires: pkgconfig
+BuildRequires: xz-devel
 URL: http://xmlsoft.org/
 
 %description
@@ -55,8 +63,8 @@ Group: Development/Libraries
 Requires: libxml2 = %{version}-%{release}
 
 %description python
-The libxml2-python package contains a module that permits applications
-written in the Python programming language to use the interface
+The libxml2-python package contains a Python 2 module that permits applications
+written in the Python programming language, version 2, to use the interface
 supplied by the libxml2 library to manipulate XML files.
 
 This library allows to manipulate XML files. It includes support
@@ -64,6 +72,23 @@ to read, modify and write XML and HTML files. There is DTDs support
 this includes parsing and validation even with complex DTDs, either
 at parse time or later once the document has been modified.
 
+%if 0%{?with_python3}
+%package python3
+Summary: Python 3 bindings for the libxml2 library
+Group: Development/Libraries
+Requires: libxml2 = %{version}-%{release}
+
+%description python3
+The libxml2-python3 package contains a Python 3 module that permits
+applications written in the Python programming language, version 3, to use the
+interface supplied by the libxml2 library to manipulate XML files.
+
+This library allows to manipulate XML files. It includes support
+to read, modify and write XML and HTML files. There is DTDs support
+this includes parsing and validation even with complex DTDs, either
+at parse time or later once the document has been modified.
+%endif # with_python3
+
 %prep
 %setup -q
 
@@ -76,6 +101,13 @@ rm -fr %{buildroot}
 
 make install DESTDIR=%{buildroot}
 
+%if 0%{?with_python3}
+make clean
+%configure --with-python=%{__python3}
+make install DESTDIR=%{buildroot}
+%endif # with_python3
+
+
 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
 rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.a
 rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la
@@ -136,14 +168,30 @@ rm -fr %{buildroot}
 %files python
 %defattr(-, root, root)
 
-%{_libdir}/python*/site-packages/libxml2.py*
-%{_libdir}/python*/site-packages/drv_libxml2.py*
-%{_libdir}/python*/site-packages/libxml2mod*
+%{_libdir}/python2*/site-packages/libxml2.py*
+%{_libdir}/python2*/site-packages/drv_libxml2.py*
+%{_libdir}/python2*/site-packages/libxml2mod*
+%doc python/TODO
+%doc python/libxml2class.txt
+%doc python/tests/*.py
+%doc doc/*.py
+%doc doc/python.html
+
+%if 0%{?with_python3}
+%files python3
+%defattr(-, root, root)
+
+%{_libdir}/python3*/site-packages/libxml2.py*
+%{_libdir}/python3*/site-packages/drv_libxml2.py*
+%{_libdir}/python3*/site-packages/__pycache__/libxml2.cpython-34.py*
+%{_libdir}/python3*/site-packages/__pycache__/drv_libxml2.cpython-34.py*
+%{_libdir}/python3*/site-packages/libxml2mod*
 %doc python/TODO
 %doc python/libxml2class.txt
 %doc python/tests/*.py
 %doc doc/*.py
 %doc doc/python.html
+%endif # with_python3
 
 %changelog
 * @RELDATE@ Daniel Veillard <veillard@redhat.com>
index ac29329..6b16fc2 100644 (file)
@@ -21,7 +21,7 @@ set(LIBXML2_VERSION_MINOR  @LIBXML_MINOR_VERSION@)
 set(LIBXML2_VERSION_MICRO  @LIBXML_MICRO_VERSION@)
 set(LIBXML2_VERSION_STRING "@VERSION@")
 set(LIBXML2_INSTALL_PREFIX ${_libxml2_rootdir})
-set(LIBXML2_INCLUDE_DIRS   ${_libxml2_rootdir}/include)
+set(LIBXML2_INCLUDE_DIRS   ${_libxml2_rootdir}/include ${_libxml2_rootdir}/include/libxml2)
 set(LIBXML2_LIBRARY_DIR    ${_libxml2_rootdir}/lib)
 set(LIBXML2_LIBRARIES      -L${LIBXML2_LIBRARY_DIR} -lxml2)
 
index 130cda7..c39646b 100644 (file)
@@ -1,12 +1,20 @@
+%global with_python3 1
+
 Summary: Library providing XML and HTML support
 Name: libxml2
-Version: 2.9.2
+Version: 2.9.4
 Release: 1%{?dist}%{?extra_release}
 License: MIT
 Group: Development/Libraries
 Source: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
-BuildRequires: python python-devel zlib-devel pkgconfig xz-devel
+BuildRequires: python-devel
+%if 0%{?with_python3}
+BuildRequires: python3-devel
+%endif # with_python3
+BuildRequires: zlib-devel
+BuildRequires: pkgconfig
+BuildRequires: xz-devel
 URL: http://xmlsoft.org/
 
 %description
@@ -55,8 +63,8 @@ Group: Development/Libraries
 Requires: libxml2 = %{version}-%{release}
 
 %description python
-The libxml2-python package contains a module that permits applications
-written in the Python programming language to use the interface
+The libxml2-python package contains a Python 2 module that permits applications
+written in the Python programming language, version 2, to use the interface
 supplied by the libxml2 library to manipulate XML files.
 
 This library allows to manipulate XML files. It includes support
@@ -64,6 +72,23 @@ to read, modify and write XML and HTML files. There is DTDs support
 this includes parsing and validation even with complex DTDs, either
 at parse time or later once the document has been modified.
 
+%if 0%{?with_python3}
+%package python3
+Summary: Python 3 bindings for the libxml2 library
+Group: Development/Libraries
+Requires: libxml2 = %{version}-%{release}
+
+%description python3
+The libxml2-python3 package contains a Python 3 module that permits
+applications written in the Python programming language, version 3, to use the
+interface supplied by the libxml2 library to manipulate XML files.
+
+This library allows to manipulate XML files. It includes support
+to read, modify and write XML and HTML files. There is DTDs support
+this includes parsing and validation even with complex DTDs, either
+at parse time or later once the document has been modified.
+%endif # with_python3
+
 %prep
 %setup -q
 
@@ -76,6 +101,13 @@ rm -fr %{buildroot}
 
 make install DESTDIR=%{buildroot}
 
+%if 0%{?with_python3}
+make clean
+%configure --with-python=%{__python3}
+make install DESTDIR=%{buildroot}
+%endif # with_python3
+
+
 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
 rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.a
 rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la
@@ -136,16 +168,32 @@ rm -fr %{buildroot}
 %files python
 %defattr(-, root, root)
 
-%{_libdir}/python*/site-packages/libxml2.py*
-%{_libdir}/python*/site-packages/drv_libxml2.py*
-%{_libdir}/python*/site-packages/libxml2mod*
+%{_libdir}/python2*/site-packages/libxml2.py*
+%{_libdir}/python2*/site-packages/drv_libxml2.py*
+%{_libdir}/python2*/site-packages/libxml2mod*
+%doc python/TODO
+%doc python/libxml2class.txt
+%doc python/tests/*.py
+%doc doc/*.py
+%doc doc/python.html
+
+%if 0%{?with_python3}
+%files python3
+%defattr(-, root, root)
+
+%{_libdir}/python3*/site-packages/libxml2.py*
+%{_libdir}/python3*/site-packages/drv_libxml2.py*
+%{_libdir}/python3*/site-packages/__pycache__/libxml2.cpython-34.py*
+%{_libdir}/python3*/site-packages/__pycache__/drv_libxml2.cpython-34.py*
+%{_libdir}/python3*/site-packages/libxml2mod*
 %doc python/TODO
 %doc python/libxml2class.txt
 %doc python/tests/*.py
 %doc doc/*.py
 %doc doc/python.html
+%endif # with_python3
 
 %changelog
-* Thu Oct 16 2014 Daniel Veillard <veillard@redhat.com>
-- upstream release 2.9.2 see http://xmlsoft.org/news.html
+* Mon May 23 2016 Daniel Veillard <veillard@redhat.com>
+- upstream release 2.9.4 see http://xmlsoft.org/news.html
 
index 63ae69d..0f0a2da 100644 (file)
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -1,9 +1,12 @@
+#! /bin/sh
+## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
+##               by inline-source v2014-01-03.01
 
-# libtool (GNU libtool) 2.4.2
+# libtool (GNU libtool) 2.4.6
+# Provide generalized library-building support services.
 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
-# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 1996-2015 Free Software Foundation, Inc.
 # This is free software; see the source for copying conditions.  There is NO
 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING.  If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html,
-# or obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Usage: $progname [OPTION]... [MODE-ARG]...
-#
-# Provide generalized library-building support services.
-#
-#       --config             show all configuration variables
-#       --debug              enable verbose shell tracing
-#   -n, --dry-run            display commands without modifying any files
-#       --features           display basic configuration information and exit
-#       --mode=MODE          use operation mode MODE
-#       --preserve-dup-deps  don't remove duplicate dependency libraries
-#       --quiet, --silent    don't print informational messages
-#       --no-quiet, --no-silent
-#                            print informational messages (default)
-#       --no-warn            don't display warning messages
-#       --tag=TAG            use configuration variables from tag TAG
-#   -v, --verbose            print more informational messages than default
-#       --no-verbose         don't print the extra informational messages
-#       --version            print version information
-#   -h, --help, --help-all   print short, long, or detailed help message
-#
-# MODE must be one of the following:
-#
-#         clean              remove files from the build directory
-#         compile            compile a source file into a libtool object
-#         execute            automatically set library path, then run a program
-#         finish             complete the installation of libtool libraries
-#         install            install libraries or executables
-#         link               create a library or an executable
-#         uninstall          remove libraries from an installed directory
-#
-# MODE-ARGS vary depending on the MODE.  When passed as first option,
-# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
-# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
-#
-# When reporting a bug, please describe a test case to reproduce it and
-# include the following information:
-#
-#         host-triplet:        $host
-#         shell:               $SHELL
-#         compiler:            $LTCC
-#         compiler flags:              $LTCFLAGS
-#         linker:              $LD (gnu? $with_gnu_ld)
-#         $progname:   (GNU libtool) 2.4.2
-#         automake:    $automake_version
-#         autoconf:    $autoconf_version
-#
-# Report bugs to <bug-libtool@gnu.org>.
-# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
-# General help using GNU software: <http://www.gnu.org/gethelp/>.
 
 PROGRAM=libtool
 PACKAGE=libtool
-VERSION=2.4.2
-TIMESTAMP=""
-package_revision=1.3337
+VERSION=2.4.6
+package_revision=2.4.6
 
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Run './libtool --help' for help with using this script from the
+# command line.
+
+
+## ------------------------------- ##
+## User overridable command paths. ##
+## ------------------------------- ##
+
+# After configure completes, it has a better idea of some of the
+# shell tools we need than the defaults used by the functions shared
+# with bootstrap, so set those here where they can still be over-
+# ridden by the user, but otherwise take precedence.
+
+: ${AUTOCONF="autoconf"}
+: ${AUTOMAKE="automake"}
+
+
+## -------------------------- ##
+## Source external libraries. ##
+## -------------------------- ##
+
+# Much of our low-level functionality needs to be sourced from external
+# libraries, which are installed to $pkgauxdir.
+
+# Set a version string for this script.
+scriptversion=2015-01-20.17; # UTC
+
+# General shell script boiler plate, and helper functions.
+# Written by Gary V. Vaughan, 2004
+
+# Copyright (C) 2004-2015 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions.  There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# As a special exception to the GNU General Public License, if you distribute
+# this file as part of a program or library that is built using GNU Libtool,
+# you may include this file under the same distribution terms that you use
+# for the rest of that program.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Please report bugs or propose patches to gary@gnu.org.
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Evaluate this file near the top of your script to gain access to
+# the functions and variables defined here:
+#
+#   . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh
+#
+# If you need to override any of the default environment variable
+# settings, do that before evaluating this file.
+
+
+## -------------------- ##
+## Shell normalisation. ##
+## -------------------- ##
+
+# Some shells need a little help to be as Bourne compatible as possible.
+# Before doing anything else, make sure all that help has been provided!
+
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
   emulate sh
   NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac
 fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# A function that is used when there is no print builtin or printf.
-func_fallback_echo ()
-{
-  eval 'cat <<_LTECHO_EOF
-$1
-_LTECHO_EOF'
-}
 
-# NLS nuisances: We save the old values to restore during execute mode.
-lt_user_locale=
-lt_safe_locale=
-for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+# NLS nuisances: We save the old values in case they are required later.
+_G_user_locale=
+_G_safe_locale=
+for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
 do
-  eval "if test \"\${$lt_var+set}\" = set; then
-          save_$lt_var=\$$lt_var
-          $lt_var=C
-         export $lt_var
-         lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
-         lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
+  eval "if test set = \"\${$_G_var+set}\"; then
+          save_$_G_var=\$$_G_var
+          $_G_var=C
+         export $_G_var
+         _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\"
+         _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
        fi"
 done
-LC_ALL=C
-LANGUAGE=C
-export LANGUAGE LC_ALL
 
-$lt_unset CDPATH
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
+# Make sure IFS has a sensible default
+sp=' '
+nl='
+'
+IFS="$sp       $nl"
+
+# There are apparently some retarded systems that use ';' as a PATH separator!
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
 
-# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
-# is ksh but when the shell is invoked as "sh" and the current value of
-# the _XPG environment variable is not equal to 1 (one), the special
-# positional parameter $0, within a function call, is the name of the
-# function.
-progpath="$0"
 
 
+## ------------------------- ##
+## Locate command utilities. ##
+## ------------------------- ##
+
+
+# func_executable_p FILE
+# ----------------------
+# Check that FILE is an executable regular file.
+func_executable_p ()
+{
+    test -f "$1" && test -x "$1"
+}
+
+
+# func_path_progs PROGS_LIST CHECK_FUNC [PATH]
+# --------------------------------------------
+# Search for either a program that responds to --version with output
+# containing "GNU", or else returned by CHECK_FUNC otherwise, by
+# trying all the directories in PATH with each of the elements of
+# PROGS_LIST.
+#
+# CHECK_FUNC should accept the path to a candidate program, and
+# set $func_check_prog_result if it truncates its output less than
+# $_G_path_prog_max characters.
+func_path_progs ()
+{
+    _G_progs_list=$1
+    _G_check_func=$2
+    _G_PATH=${3-"$PATH"}
+
+    _G_path_prog_max=0
+    _G_path_prog_found=false
+    _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:}
+    for _G_dir in $_G_PATH; do
+      IFS=$_G_save_IFS
+      test -z "$_G_dir" && _G_dir=.
+      for _G_prog_name in $_G_progs_list; do
+        for _exeext in '' .EXE; do
+          _G_path_prog=$_G_dir/$_G_prog_name$_exeext
+          func_executable_p "$_G_path_prog" || continue
+          case `"$_G_path_prog" --version 2>&1` in
+            *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;;
+            *)     $_G_check_func $_G_path_prog
+                  func_path_progs_result=$func_check_prog_result
+                  ;;
+          esac
+          $_G_path_prog_found && break 3
+        done
+      done
+    done
+    IFS=$_G_save_IFS
+    test -z "$func_path_progs_result" && {
+      echo "no acceptable sed could be found in \$PATH" >&2
+      exit 1
+    }
+}
+
+
+# We want to be able to use the functions in this file before configure
+# has figured out where the best binaries are kept, which means we have
+# to search for them ourselves - except when the results are already set
+# where we skip the searches.
+
+# Unless the user overrides by setting SED, search the path for either GNU
+# sed, or the sed that truncates its output the least.
+test -z "$SED" && {
+  _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+  for _G_i in 1 2 3 4 5 6 7; do
+    _G_sed_script=$_G_sed_script$nl$_G_sed_script
+  done
+  echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed
+  _G_sed_script=
+
+  func_check_prog_sed ()
+  {
+    _G_path_prog=$1
+
+    _G_count=0
+    printf 0123456789 >conftest.in
+    while :
+    do
+      cat conftest.in conftest.in >conftest.tmp
+      mv conftest.tmp conftest.in
+      cp conftest.in conftest.nl
+      echo '' >> conftest.nl
+      "$_G_path_prog" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
+      diff conftest.out conftest.nl >/dev/null 2>&1 || break
+      _G_count=`expr $_G_count + 1`
+      if test "$_G_count" -gt "$_G_path_prog_max"; then
+        # Best one so far, save it but keep looking for a better one
+        func_check_prog_result=$_G_path_prog
+        _G_path_prog_max=$_G_count
+      fi
+      # 10*(2^10) chars as input seems more than enough
+      test 10 -lt "$_G_count" && break
+    done
+    rm -f conftest.in conftest.tmp conftest.nl conftest.out
+  }
+
+  func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
+  rm -f conftest.sed
+  SED=$func_path_progs_result
+}
+
+
+# Unless the user overrides by setting GREP, search the path for either GNU
+# grep, or the grep that truncates its output the least.
+test -z "$GREP" && {
+  func_check_prog_grep ()
+  {
+    _G_path_prog=$1
+
+    _G_count=0
+    _G_path_prog_max=0
+    printf 0123456789 >conftest.in
+    while :
+    do
+      cat conftest.in conftest.in >conftest.tmp
+      mv conftest.tmp conftest.in
+      cp conftest.in conftest.nl
+      echo 'GREP' >> conftest.nl
+      "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' <conftest.nl >conftest.out 2>/dev/null || break
+      diff conftest.out conftest.nl >/dev/null 2>&1 || break
+      _G_count=`expr $_G_count + 1`
+      if test "$_G_count" -gt "$_G_path_prog_max"; then
+        # Best one so far, save it but keep looking for a better one
+        func_check_prog_result=$_G_path_prog
+        _G_path_prog_max=$_G_count
+      fi
+      # 10*(2^10) chars as input seems more than enough
+      test 10 -lt "$_G_count" && break
+    done
+    rm -f conftest.in conftest.tmp conftest.nl conftest.out
+  }
+
+  func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
+  GREP=$func_path_progs_result
+}
+
+
+## ------------------------------- ##
+## User overridable command paths. ##
+## ------------------------------- ##
+
+# All uppercase variable names are used for environment variables.  These
+# variables can be overridden by the user before calling a script that
+# uses them if a suitable command of that name is not already available
+# in the command search PATH.
 
 : ${CP="cp -f"}
-test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
+: ${ECHO="printf %s\n"}
+: ${EGREP="$GREP -E"}
+: ${FGREP="$GREP -F"}
+: ${LN_S="ln -s"}
 : ${MAKE="make"}
 : ${MKDIR="mkdir"}
 : ${MV="mv -f"}
 : ${RM="rm -f"}
 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
-: ${Xsed="$SED -e 1s/^X//"}
-
-# Global variables:
-EXIT_SUCCESS=0
-EXIT_FAILURE=1
-EXIT_MISMATCH=63  # $? = 63 is used to indicate version mismatch to missing.
-EXIT_SKIP=77     # $? = 77 is used to indicate a skipped test to automake.
-
-exit_status=$EXIT_SUCCESS
-
-# Make sure IFS has a sensible default
-lt_nl='
-'
-IFS="  $lt_nl"
 
-dirname="s,/[^/]*$,,"
-basename="s,^.*/,,"
 
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
-    func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
-    if test "X$func_dirname_result" = "X${1}"; then
-      func_dirname_result="${3}"
-    else
-      func_dirname_result="$func_dirname_result${2}"
-    fi
-} # func_dirname may be replaced by extended shell implementation
+## -------------------- ##
+## Useful sed snippets. ##
+## -------------------- ##
 
+sed_dirname='s|/[^/]*$||'
+sed_basename='s|^.*/||'
 
-# func_basename file
-func_basename ()
-{
-    func_basename_result=`$ECHO "${1}" | $SED "$basename"`
-} # func_basename may be replaced by extended shell implementation
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s|\([`"$\\]\)|\\\1|g'
 
+# Same as above, but do not quote variable references.
+sed_double_quote_subst='s/\(["`\\]\)/\\\1/g'
 
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-#   dirname:  Compute the dirname of FILE.  If nonempty,
-#             add APPEND to the result, otherwise set result
-#             to NONDIR_REPLACEMENT.
-#             value returned in "$func_dirname_result"
-#   basename: Compute filename of FILE.
-#             value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
-    # Extract subdirectory from the argument.
-    func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
-    if test "X$func_dirname_result" = "X${1}"; then
-      func_dirname_result="${3}"
-    else
-      func_dirname_result="$func_dirname_result${2}"
-    fi
-    func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
-} # func_dirname_and_basename may be replaced by extended shell implementation
+# Sed substitution that turns a string into a regex matching for the
+# string literally.
+sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g'
 
+# Sed substitution that converts a w32 file name or path
+# that contains forward slashes, into one that contains
+# (escaped) backslashes.  A very naive implementation.
+sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
+# Re-'\' parameter expansions in output of sed_double_quote_subst that
+# were '\'-ed in input to the same.  If an odd number of '\' preceded a
+# '$' in input to sed_double_quote_subst, that '$' was protected from
+# expansion.  Since each input '\' is now two '\'s, look for any number
+# of runs of four '\'s followed by two '\'s and then a '$'.  '\' that '$'.
+_G_bs='\\'
+_G_bs2='\\\\'
+_G_bs4='\\\\\\\\'
+_G_dollar='\$'
+sed_double_backslash="\
+  s/$_G_bs4/&\\
+/g
+  s/^$_G_bs2$_G_dollar/$_G_bs&/
+  s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
+  s/\n//g"
 
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-# func_strip_suffix prefix name
-func_stripname ()
-{
-    case ${2} in
-      .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
-      *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
-    esac
-} # func_stripname may be replaced by extended shell implementation
 
+## ----------------- ##
+## Global variables. ##
+## ----------------- ##
 
-# These SED scripts presuppose an absolute path with a trailing slash.
-pathcar='s,^/\([^/]*\).*$,\1,'
-pathcdr='s,^/[^/]*,,'
-removedotparts=':dotsl
-               s@/\./@/@g
-               t dotsl
-               s,/\.$,/,'
-collapseslashes='s@/\{1,\}@/@g'
-finalslash='s,/*$,/,'
+# Except for the global variables explicitly listed below, the following
+# functions in the '^func_' namespace, and the '^require_' namespace
+# variables initialised in the 'Resource management' section, sourcing
+# this file will not pollute your global namespace with anything
+# else. There's no portable way to scope variables in Bourne shell
+# though, so actually running these functions will sometimes place
+# results into a variable named after the function, and often use
+# temporary variables in the '^_G_' namespace. If you are careful to
+# avoid using those namespaces casually in your sourcing script, things
+# should continue to work as you expect. And, of course, you can freely
+# overwrite any of the functions or variables defined here before
+# calling anything to customize them.
 
-# func_normal_abspath PATH
-# Remove doubled-up and trailing slashes, "." path components,
-# and cancel out any ".." path components in PATH after making
-# it an absolute path.
-#             value returned in "$func_normal_abspath_result"
-func_normal_abspath ()
-{
-  # Start from root dir and reassemble the path.
-  func_normal_abspath_result=
-  func_normal_abspath_tpath=$1
-  func_normal_abspath_altnamespace=
-  case $func_normal_abspath_tpath in
-    "")
-      # Empty path, that just means $cwd.
-      func_stripname '' '/' "`pwd`"
-      func_normal_abspath_result=$func_stripname_result
-      return
-    ;;
-    # The next three entries are used to spot a run of precisely
-    # two leading slashes without using negated character classes;
-    # we take advantage of case's first-match behaviour.
-    ///*)
-      # Unusual form of absolute path, do nothing.
-    ;;
-    //*)
-      # Not necessarily an ordinary path; POSIX reserves leading '//'
-      # and for example Cygwin uses it to access remote file shares
-      # over CIFS/SMB, so we conserve a leading double slash if found.
-      func_normal_abspath_altnamespace=/
-    ;;
-    /*)
-      # Absolute path, do nothing.
-    ;;
-    *)
-      # Relative path, prepend $cwd.
-      func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
-    ;;
-  esac
-  # Cancel out all the simple stuff to save iterations.  We also want
-  # the path to end with a slash for ease of parsing, so make sure
-  # there is one (and only one) here.
-  func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
-        -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
-  while :; do
-    # Processed it all yet?
-    if test "$func_normal_abspath_tpath" = / ; then
-      # If we ascended to the root using ".." the result may be empty now.
-      if test -z "$func_normal_abspath_result" ; then
-        func_normal_abspath_result=/
-      fi
-      break
-    fi
-    func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
-        -e "$pathcar"`
-    func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
-        -e "$pathcdr"`
-    # Figure out what to do with it
-    case $func_normal_abspath_tcomponent in
-      "")
-        # Trailing empty path component, ignore it.
-      ;;
-      ..)
-        # Parent dir; strip last assembled component from result.
-        func_dirname "$func_normal_abspath_result"
-        func_normal_abspath_result=$func_dirname_result
-      ;;
-      *)
-        # Actual path component, append it.
-        func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
-      ;;
-    esac
-  done
-  # Restore leading double-slash if one was found on entry.
-  func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
-}
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63  # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77     # $? = 77 is used to indicate a skipped test to automake.
 
-# func_relative_path SRCDIR DSTDIR
-# generates a relative path from SRCDIR to DSTDIR, with a trailing
-# slash if non-empty, suitable for immediately appending a filename
-# without needing to append a separator.
-#             value returned in "$func_relative_path_result"
-func_relative_path ()
-{
-  func_relative_path_result=
-  func_normal_abspath "$1"
-  func_relative_path_tlibdir=$func_normal_abspath_result
-  func_normal_abspath "$2"
-  func_relative_path_tbindir=$func_normal_abspath_result
-
-  # Ascend the tree starting from libdir
-  while :; do
-    # check if we have found a prefix of bindir
-    case $func_relative_path_tbindir in
-      $func_relative_path_tlibdir)
-        # found an exact match
-        func_relative_path_tcancelled=
-        break
-        ;;
-      $func_relative_path_tlibdir*)
-        # found a matching prefix
-        func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
-        func_relative_path_tcancelled=$func_stripname_result
-        if test -z "$func_relative_path_result"; then
-          func_relative_path_result=.
-        fi
-        break
-        ;;
-      *)
-        func_dirname $func_relative_path_tlibdir
-        func_relative_path_tlibdir=${func_dirname_result}
-        if test "x$func_relative_path_tlibdir" = x ; then
-          # Have to descend all the way to the root!
-          func_relative_path_result=../$func_relative_path_result
-          func_relative_path_tcancelled=$func_relative_path_tbindir
-          break
-        fi
-        func_relative_path_result=../$func_relative_path_result
-        ;;
-    esac
-  done
+# Allow overriding, eg assuming that you follow the convention of
+# putting '$debug_cmd' at the start of all your functions, you can get
+# bash to show function call trace with:
+#
+#    debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
+debug_cmd=${debug_cmd-":"}
+exit_cmd=:
 
-  # Now calculate path; take care to avoid doubling-up slashes.
-  func_stripname '' '/' "$func_relative_path_result"
-  func_relative_path_result=$func_stripname_result
-  func_stripname '/' '/' "$func_relative_path_tcancelled"
-  if test "x$func_stripname_result" != x ; then
-    func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
-  fi
+# By convention, finish your script with:
+#
+#    exit $exit_status
+#
+# so that you can set exit_status to non-zero if you want to indicate
+# something went wrong during execution without actually bailing out at
+# the point of failure.
+exit_status=$EXIT_SUCCESS
 
-  # Normalisation. If bindir is libdir, return empty string,
-  # else relative path ending with a slash; either way, target
-  # file name can be directly appended.
-  if test ! -z "$func_relative_path_result"; then
-    func_stripname './' '' "$func_relative_path_result/"
-    func_relative_path_result=$func_stripname_result
-  fi
-}
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath=$0
 
-# The name of this program:
-func_dirname_and_basename "$progpath"
-progname=$func_basename_result
+# The name of this program.
+progname=`$ECHO "$progpath" |$SED "$sed_basename"`
 
-# Make sure we have an absolute path for reexecution:
+# Make sure we have an absolute progpath for reexecution:
 case $progpath in
   [\\/]*|[A-Za-z]:\\*) ;;
   *[\\/]*)
-     progdir=$func_dirname_result
+     progdir=`$ECHO "$progpath" |$SED "$sed_dirname"`
      progdir=`cd "$progdir" && pwd`
-     progpath="$progdir/$progname"
+     progpath=$progdir/$progname
      ;;
   *)
-     save_IFS="$IFS"
+     _G_IFS=$IFS
      IFS=${PATH_SEPARATOR-:}
      for progdir in $PATH; do
-       IFS="$save_IFS"
+       IFS=$_G_IFS
        test -x "$progdir/$progname" && break
      done
-     IFS="$save_IFS"
+     IFS=$_G_IFS
      test -n "$progdir" || progdir=`pwd`
-     progpath="$progdir/$progname"
+     progpath=$progdir/$progname
      ;;
 esac
 
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed="${SED}"' -e 1s/^X//'
-sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\(["`\\]\)/\\\1/g'
 
-# Sed substitution that turns a string into a regex matching for the
-# string literally.
-sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
+## ----------------- ##
+## Standard options. ##
+## ----------------- ##
 
-# Sed substitution that converts a w32 file name or path
-# which contains forward slashes, into one that contains
-# (escaped) backslashes.  A very naive implementation.
-lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
-
-# Re-`\' parameter expansions in output of double_quote_subst that were
-# `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
-# in input to double_quote_subst, that '$' was protected from expansion.
-# Since each input `\' is now two `\'s, look for any number of runs of
-# four `\'s followed by two `\'s and then a '$'.  `\' that '$'.
-bs='\\'
-bs2='\\\\'
-bs4='\\\\\\\\'
-dollar='\$'
-sed_double_backslash="\
-  s/$bs4/&\\
-/g
-  s/^$bs2$dollar/$bs&/
-  s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
-  s/\n//g"
+# The following options affect the operation of the functions defined
+# below, and should be set appropriately depending on run-time para-
+# meters passed on the command line.
 
-# Standard options:
 opt_dry_run=false
-opt_help=false
 opt_quiet=false
 opt_verbose=false
-opt_warning=:
 
-# func_echo arg...
-# Echo program name prefixed message, along with the current mode
-# name if it has been set yet.
-func_echo ()
-{
-    $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
-}
+# Categories 'all' and 'none' are always available.  Append any others
+# you will pass as the first argument to func_warning from your own
+# code.
+warning_categories=
 
-# func_verbose arg...
-# Echo program name prefixed message in verbose mode only.
-func_verbose ()
-{
-    $opt_verbose && func_echo ${1+"$@"}
+# By default, display warnings according to 'opt_warning_types'.  Set
+# 'warning_func'  to ':' to elide all warnings, or func_fatal_error to
+# treat the next displayed warning as a fatal error.
+warning_func=func_warn_and_continue
 
-    # A bug in bash halts the script if the last line of a function
-    # fails when set -e is in force, so we need another command to
-    # work around that:
-    :
-}
+# Set to 'all' to display all warnings, 'none' to suppress all
+# warnings, or a space delimited list of some subset of
+# 'warning_categories' to display only the listed warnings.
+opt_warning_types=all
 
-# func_echo_all arg...
-# Invoke $ECHO with all args, space-separated.
-func_echo_all ()
-{
-    $ECHO "$*"
-}
 
-# func_error arg...
-# Echo program name prefixed message to standard error.
-func_error ()
-{
-    $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
-}
+## -------------------- ##
+## Resource management. ##
+## -------------------- ##
 
-# func_warning arg...
-# Echo program name prefixed warning message to standard error.
-func_warning ()
-{
-    $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
+# This section contains definitions for functions that each ensure a
+# particular resource (a file, or a non-empty configuration variable for
+# example) is available, and if appropriate to extract default values
+# from pertinent package files. Call them using their associated
+# 'require_*' variable to ensure that they are executed, at most, once.
+#
+# It's entirely deliberate that calling these functions can set
+# variables that don't obey the namespace limitations obeyed by the rest
+# of this file, in order that that they be as useful as possible to
+# callers.
 
-    # bash bug again:
-    :
-}
 
-# func_fatal_error arg...
-# Echo program name prefixed message to standard error, and exit.
-func_fatal_error ()
+# require_term_colors
+# -------------------
+# Allow display of bold text on terminals that support it.
+require_term_colors=func_require_term_colors
+func_require_term_colors ()
 {
-    func_error ${1+"$@"}
-    exit $EXIT_FAILURE
-}
+    $debug_cmd
+
+    test -t 1 && {
+      # COLORTERM and USE_ANSI_COLORS environment variables take
+      # precedence, because most terminfo databases neglect to describe
+      # whether color sequences are supported.
+      test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"}
+
+      if test 1 = "$USE_ANSI_COLORS"; then
+        # Standard ANSI escape sequences
+        tc_reset='\e[0m'
+        tc_bold='\e[1m';   tc_standout='\e[7m'
+        tc_red='\e[31m';   tc_green='\e[32m'
+        tc_blue='\e[34m';  tc_cyan='\e[36m'
+      else
+        # Otherwise trust the terminfo database after all.
+        test -n "`tput sgr0 2>/dev/null`" && {
+          tc_reset=`tput sgr0`
+          test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold`
+          tc_standout=$tc_bold
+          test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso`
+          test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1`
+          test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2`
+          test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4`
+          test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5`
+        }
+      fi
+    }
 
-# func_fatal_help arg...
-# Echo program name prefixed message to standard error, followed by
-# a help hint, and exit.
-func_fatal_help ()
-{
-    func_error ${1+"$@"}
-    func_fatal_error "$help"
+    require_term_colors=:
 }
-help="Try \`$progname --help' for more information."  ## default
 
 
-# func_grep expression filename
+## ----------------- ##
+## Function library. ##
+## ----------------- ##
+
+# This section contains a variety of useful functions to call in your
+# scripts. Take note of the portable wrappers for features provided by
+# some modern shells, which will fall back to slower equivalents on
+# less featureful shells.
+
+
+# func_append VAR VALUE
+# ---------------------
+# Append VALUE onto the existing contents of VAR.
+
+  # We should try to minimise forks, especially on Windows where they are
+  # unreasonably slow, so skip the feature probes when bash or zsh are
+  # being used:
+  if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
+    : ${_G_HAVE_ARITH_OP="yes"}
+    : ${_G_HAVE_XSI_OPS="yes"}
+    # The += operator was introduced in bash 3.1
+    case $BASH_VERSION in
+      [12].* | 3.0 | 3.0*) ;;
+      *)
+        : ${_G_HAVE_PLUSEQ_OP="yes"}
+        ;;
+    esac
+  fi
+
+  # _G_HAVE_PLUSEQ_OP
+  # Can be empty, in which case the shell is probed, "yes" if += is
+  # useable or anything else if it does not work.
+  test -z "$_G_HAVE_PLUSEQ_OP" \
+    && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
+    && _G_HAVE_PLUSEQ_OP=yes
+
+if test yes = "$_G_HAVE_PLUSEQ_OP"
+then
+  # This is an XSI compatible shell, allowing a faster implementation...
+  eval 'func_append ()
+  {
+    $debug_cmd
+
+    eval "$1+=\$2"
+  }'
+else
+  # ...otherwise fall back to using expr, which is often a shell builtin.
+  func_append ()
+  {
+    $debug_cmd
+
+    eval "$1=\$$1\$2"
+  }
+fi
+
+
+# func_append_quoted VAR VALUE
+# ----------------------------
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+if test yes = "$_G_HAVE_PLUSEQ_OP"; then
+  eval 'func_append_quoted ()
+  {
+    $debug_cmd
+
+    func_quote_for_eval "$2"
+    eval "$1+=\\ \$func_quote_for_eval_result"
+  }'
+else
+  func_append_quoted ()
+  {
+    $debug_cmd
+
+    func_quote_for_eval "$2"
+    eval "$1=\$$1\\ \$func_quote_for_eval_result"
+  }
+fi
+
+
+# func_append_uniq VAR VALUE
+# --------------------------
+# Append unique VALUE onto the existing contents of VAR, assuming
+# entries are delimited by the first character of VALUE.  For example:
+#
+#   func_append_uniq options " --another-option option-argument"
+#
+# will only append to $options if " --another-option option-argument "
+# is not already present somewhere in $options already (note spaces at
+# each end implied by leading space in second argument).
+func_append_uniq ()
+{
+    $debug_cmd
+
+    eval _G_current_value='`$ECHO $'$1'`'
+    _G_delim=`expr "$2" : '\(.\)'`
+
+    case $_G_delim$_G_current_value$_G_delim in
+      *"$2$_G_delim"*) ;;
+      *) func_append "$@" ;;
+    esac
+}
+
+
+# func_arith TERM...
+# ------------------
+# Set func_arith_result to the result of evaluating TERMs.
+  test -z "$_G_HAVE_ARITH_OP" \
+    && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \
+    && _G_HAVE_ARITH_OP=yes
+
+if test yes = "$_G_HAVE_ARITH_OP"; then
+  eval 'func_arith ()
+  {
+    $debug_cmd
+
+    func_arith_result=$(( $* ))
+  }'
+else
+  func_arith ()
+  {
+    $debug_cmd
+
+    func_arith_result=`expr "$@"`
+  }
+fi
+
+
+# func_basename FILE
+# ------------------
+# Set func_basename_result to FILE with everything up to and including
+# the last / stripped.
+if test yes = "$_G_HAVE_XSI_OPS"; then
+  # If this shell supports suffix pattern removal, then use it to avoid
+  # forking. Hide the definitions single quotes in case the shell chokes
+  # on unsupported syntax...
+  _b='func_basename_result=${1##*/}'
+  _d='case $1 in
+        */*) func_dirname_result=${1%/*}$2 ;;
+        *  ) func_dirname_result=$3        ;;
+      esac'
+
+else
+  # ...otherwise fall back to using sed.
+  _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`'
+  _d='func_dirname_result=`$ECHO "$1"  |$SED "$sed_dirname"`
+      if test "X$func_dirname_result" = "X$1"; then
+        func_dirname_result=$3
+      else
+        func_append func_dirname_result "$2"
+      fi'
+fi
+
+eval 'func_basename ()
+{
+    $debug_cmd
+
+    '"$_b"'
+}'
+
+
+# func_dirname FILE APPEND NONDIR_REPLACEMENT
+# -------------------------------------------
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+eval 'func_dirname ()
+{
+    $debug_cmd
+
+    '"$_d"'
+}'
+
+
+# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT
+# --------------------------------------------------------
+# Perform func_basename and func_dirname in a single function
+# call:
+#   dirname:  Compute the dirname of FILE.  If nonempty,
+#             add APPEND to the result, otherwise set result
+#             to NONDIR_REPLACEMENT.
+#             value returned in "$func_dirname_result"
+#   basename: Compute filename of FILE.
+#             value retuned in "$func_basename_result"
+# For efficiency, we do not delegate to the functions above but instead
+# duplicate the functionality here.
+eval 'func_dirname_and_basename ()
+{
+    $debug_cmd
+
+    '"$_b"'
+    '"$_d"'
+}'
+
+
+# func_echo ARG...
+# ----------------
+# Echo program name prefixed message.
+func_echo ()
+{
+    $debug_cmd
+
+    _G_message=$*
+
+    func_echo_IFS=$IFS
+    IFS=$nl
+    for _G_line in $_G_message; do
+      IFS=$func_echo_IFS
+      $ECHO "$progname: $_G_line"
+    done
+    IFS=$func_echo_IFS
+}
+
+
+# func_echo_all ARG...
+# --------------------
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO "$*"
+}
+
+
+# func_echo_infix_1 INFIX ARG...
+# ------------------------------
+# Echo program name, followed by INFIX on the first line, with any
+# additional lines not showing INFIX.
+func_echo_infix_1 ()
+{
+    $debug_cmd
+
+    $require_term_colors
+
+    _G_infix=$1; shift
+    _G_indent=$_G_infix
+    _G_prefix="$progname: $_G_infix: "
+    _G_message=$*
+
+    # Strip color escape sequences before counting printable length
+    for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan"
+    do
+      test -n "$_G_tc" && {
+        _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"`
+        _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"`
+      }
+    done
+    _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`"  " ## exclude from sc_prohibit_nested_quotes
+
+    func_echo_infix_1_IFS=$IFS
+    IFS=$nl
+    for _G_line in $_G_message; do
+      IFS=$func_echo_infix_1_IFS
+      $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2
+      _G_prefix=$_G_indent
+    done
+    IFS=$func_echo_infix_1_IFS
+}
+
+
+# func_error ARG...
+# -----------------
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+    $debug_cmd
+
+    $require_term_colors
+
+    func_echo_infix_1 "  $tc_standout${tc_red}error$tc_reset" "$*" >&2
+}
+
+
+# func_fatal_error ARG...
+# -----------------------
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+    $debug_cmd
+
+    func_error "$*"
+    exit $EXIT_FAILURE
+}
+
+
+# func_grep EXPRESSION FILENAME
+# -----------------------------
 # Check whether EXPRESSION matches any line of FILENAME, without output.
 func_grep ()
 {
+    $debug_cmd
+
     $GREP "$1" "$2" >/dev/null 2>&1
 }
 
 
-# func_mkdir_p directory-path
+# func_len STRING
+# ---------------
+# Set func_len_result to the length of STRING. STRING may not
+# start with a hyphen.
+  test -z "$_G_HAVE_XSI_OPS" \
+    && (eval 'x=a/b/c;
+      test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
+    && _G_HAVE_XSI_OPS=yes
+
+if test yes = "$_G_HAVE_XSI_OPS"; then
+  eval 'func_len ()
+  {
+    $debug_cmd
+
+    func_len_result=${#1}
+  }'
+else
+  func_len ()
+  {
+    $debug_cmd
+
+    func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+  }
+fi
+
+
+# func_mkdir_p DIRECTORY-PATH
+# ---------------------------
 # Make sure the entire path to DIRECTORY-PATH is available.
 func_mkdir_p ()
 {
-    my_directory_path="$1"
-    my_dir_list=
+    $debug_cmd
 
-    if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+    _G_directory_path=$1
+    _G_dir_list=
 
-      # Protect directory names starting with `-'
-      case $my_directory_path in
-        -*) my_directory_path="./$my_directory_path" ;;
+    if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then
+
+      # Protect directory names starting with '-'
+      case $_G_directory_path in
+        -*) _G_directory_path=./$_G_directory_path ;;
       esac
 
       # While some portion of DIR does not yet exist...
-      while test ! -d "$my_directory_path"; do
+      while test ! -d "$_G_directory_path"; do
         # ...make a list in topmost first order.  Use a colon delimited
        # list incase some portion of path contains whitespace.
-        my_dir_list="$my_directory_path:$my_dir_list"
+        _G_dir_list=$_G_directory_path:$_G_dir_list
 
         # If the last portion added has no slash in it, the list is done
-        case $my_directory_path in */*) ;; *) break ;; esac
+        case $_G_directory_path in */*) ;; *) break ;; esac
 
         # ...otherwise throw away the child directory and loop
-        my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
+        _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"`
       done
-      my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
+      _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'`
 
-      save_mkdir_p_IFS="$IFS"; IFS=':'
-      for my_dir in $my_dir_list; do
-       IFS="$save_mkdir_p_IFS"
-        # mkdir can fail with a `File exist' error if two processes
+      func_mkdir_p_IFS=$IFS; IFS=:
+      for _G_dir in $_G_dir_list; do
+       IFS=$func_mkdir_p_IFS
+        # mkdir can fail with a 'File exist' error if two processes
         # try to create one of the directories concurrently.  Don't
         # stop in that case!
-        $MKDIR "$my_dir" 2>/dev/null || :
+        $MKDIR "$_G_dir" 2>/dev/null || :
       done
-      IFS="$save_mkdir_p_IFS"
+      IFS=$func_mkdir_p_IFS
 
       # Bail out if we (or some other process) failed to create a directory.
-      test -d "$my_directory_path" || \
-        func_fatal_error "Failed to create \`$1'"
+      test -d "$_G_directory_path" || \
+        func_fatal_error "Failed to create '$1'"
     fi
 }
 
 
-# func_mktempdir [string]
+# func_mktempdir [BASENAME]
+# -------------------------
 # Make a temporary directory that won't clash with other running
 # libtool processes, and avoids race conditions if possible.  If
-# given, STRING is the basename for that directory.
+# given, BASENAME is the basename for that directory.
 func_mktempdir ()
 {
-    my_template="${TMPDIR-/tmp}/${1-$progname}"
+    $debug_cmd
+
+    _G_template=${TMPDIR-/tmp}/${1-$progname}
 
-    if test "$opt_dry_run" = ":"; then
+    if test : = "$opt_dry_run"; then
       # Return a directory name, but don't create it in dry-run mode
-      my_tmpdir="${my_template}-$$"
+      _G_tmpdir=$_G_template-$$
     else
 
       # If mktemp works, use that first and foremost
-      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+      _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null`
 
-      if test ! -d "$my_tmpdir"; then
+      if test ! -d "$_G_tmpdir"; then
         # Failing that, at least try and use $RANDOM to avoid a race
-        my_tmpdir="${my_template}-${RANDOM-0}$$"
+        _G_tmpdir=$_G_template-${RANDOM-0}$$
 
-        save_mktempdir_umask=`umask`
+        func_mktempdir_umask=`umask`
         umask 0077
-        $MKDIR "$my_tmpdir"
-        umask $save_mktempdir_umask
+        $MKDIR "$_G_tmpdir"
+        umask $func_mktempdir_umask
       fi
 
       # If we're not in dry-run mode, bomb out on failure
-      test -d "$my_tmpdir" || \
-        func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
+      test -d "$_G_tmpdir" || \
+        func_fatal_error "cannot create temporary directory '$_G_tmpdir'"
+    fi
+
+    $ECHO "$_G_tmpdir"
+}
+
+
+# func_normal_abspath PATH
+# ------------------------
+# Remove doubled-up and trailing slashes, "." path components,
+# and cancel out any ".." path components in PATH after making
+# it an absolute path.
+func_normal_abspath ()
+{
+    $debug_cmd
+
+    # These SED scripts presuppose an absolute path with a trailing slash.
+    _G_pathcar='s|^/\([^/]*\).*$|\1|'
+    _G_pathcdr='s|^/[^/]*||'
+    _G_removedotparts=':dotsl
+               s|/\./|/|g
+               t dotsl
+               s|/\.$|/|'
+    _G_collapseslashes='s|/\{1,\}|/|g'
+    _G_finalslash='s|/*$|/|'
+
+    # Start from root dir and reassemble the path.
+    func_normal_abspath_result=
+    func_normal_abspath_tpath=$1
+    func_normal_abspath_altnamespace=
+    case $func_normal_abspath_tpath in
+      "")
+        # Empty path, that just means $cwd.
+        func_stripname '' '/' "`pwd`"
+        func_normal_abspath_result=$func_stripname_result
+        return
+        ;;
+      # The next three entries are used to spot a run of precisely
+      # two leading slashes without using negated character classes;
+      # we take advantage of case's first-match behaviour.
+      ///*)
+        # Unusual form of absolute path, do nothing.
+        ;;
+      //*)
+        # Not necessarily an ordinary path; POSIX reserves leading '//'
+        # and for example Cygwin uses it to access remote file shares
+        # over CIFS/SMB, so we conserve a leading double slash if found.
+        func_normal_abspath_altnamespace=/
+        ;;
+      /*)
+        # Absolute path, do nothing.
+        ;;
+      *)
+        # Relative path, prepend $cwd.
+        func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
+        ;;
+    esac
+
+    # Cancel out all the simple stuff to save iterations.  We also want
+    # the path to end with a slash for ease of parsing, so make sure
+    # there is one (and only one) here.
+    func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+          -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"`
+    while :; do
+      # Processed it all yet?
+      if test / = "$func_normal_abspath_tpath"; then
+        # If we ascended to the root using ".." the result may be empty now.
+        if test -z "$func_normal_abspath_result"; then
+          func_normal_abspath_result=/
+        fi
+        break
+      fi
+      func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
+          -e "$_G_pathcar"`
+      func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+          -e "$_G_pathcdr"`
+      # Figure out what to do with it
+      case $func_normal_abspath_tcomponent in
+        "")
+          # Trailing empty path component, ignore it.
+          ;;
+        ..)
+          # Parent dir; strip last assembled component from result.
+          func_dirname "$func_normal_abspath_result"
+          func_normal_abspath_result=$func_dirname_result
+          ;;
+        *)
+          # Actual path component, append it.
+          func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent"
+          ;;
+      esac
+    done
+    # Restore leading double-slash if one was found on entry.
+    func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
+}
+
+
+# func_notquiet ARG...
+# --------------------
+# Echo program name prefixed message only when not in quiet mode.
+func_notquiet ()
+{
+    $debug_cmd
+
+    $opt_quiet || func_echo ${1+"$@"}
+
+    # A bug in bash halts the script if the last line of a function
+    # fails when set -e is in force, so we need another command to
+    # work around that:
+    :
+}
+
+
+# func_relative_path SRCDIR DSTDIR
+# --------------------------------
+# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR.
+func_relative_path ()
+{
+    $debug_cmd
+
+    func_relative_path_result=
+    func_normal_abspath "$1"
+    func_relative_path_tlibdir=$func_normal_abspath_result
+    func_normal_abspath "$2"
+    func_relative_path_tbindir=$func_normal_abspath_result
+
+    # Ascend the tree starting from libdir
+    while :; do
+      # check if we have found a prefix of bindir
+      case $func_relative_path_tbindir in
+        $func_relative_path_tlibdir)
+          # found an exact match
+          func_relative_path_tcancelled=
+          break
+          ;;
+        $func_relative_path_tlibdir*)
+          # found a matching prefix
+          func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
+          func_relative_path_tcancelled=$func_stripname_result
+          if test -z "$func_relative_path_result"; then
+            func_relative_path_result=.
+          fi
+          break
+          ;;
+        *)
+          func_dirname $func_relative_path_tlibdir
+          func_relative_path_tlibdir=$func_dirname_result
+          if test -z "$func_relative_path_tlibdir"; then
+            # Have to descend all the way to the root!
+            func_relative_path_result=../$func_relative_path_result
+            func_relative_path_tcancelled=$func_relative_path_tbindir
+            break
+          fi
+          func_relative_path_result=../$func_relative_path_result
+          ;;
+      esac
+    done
+
+    # Now calculate path; take care to avoid doubling-up slashes.
+    func_stripname '' '/' "$func_relative_path_result"
+    func_relative_path_result=$func_stripname_result
+    func_stripname '/' '/' "$func_relative_path_tcancelled"
+    if test -n "$func_stripname_result"; then
+      func_append func_relative_path_result "/$func_stripname_result"
+    fi
+
+    # Normalisation. If bindir is libdir, return '.' else relative path.
+    if test -n "$func_relative_path_result"; then
+      func_stripname './' '' "$func_relative_path_result"
+      func_relative_path_result=$func_stripname_result
     fi
 
-    $ECHO "$my_tmpdir"
+    test -n "$func_relative_path_result" || func_relative_path_result=.
+
+    :
+}
+
+
+# func_quote_for_eval ARG...
+# --------------------------
+# Aesthetically quote ARGs to be evaled later.
+# This function returns two values:
+#   i) func_quote_for_eval_result
+#      double-quoted, suitable for a subsequent eval
+#  ii) func_quote_for_eval_unquoted_result
+#      has all characters that are still active within double
+#      quotes backslashified.
+func_quote_for_eval ()
+{
+    $debug_cmd
+
+    func_quote_for_eval_unquoted_result=
+    func_quote_for_eval_result=
+    while test 0 -lt $#; do
+      case $1 in
+        *[\\\`\"\$]*)
+         _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
+        *)
+          _G_unquoted_arg=$1 ;;
+      esac
+      if test -n "$func_quote_for_eval_unquoted_result"; then
+       func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
+      else
+        func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
+      fi
+
+      case $_G_unquoted_arg in
+        # Double-quote args containing shell metacharacters to delay
+        # word splitting, command substitution and variable expansion
+        # for a subsequent eval.
+        # Many Bourne shells cannot handle close brackets correctly
+        # in scan sets, so we specify it separately.
+        *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \  ]*|*]*|"")
+          _G_quoted_arg=\"$_G_unquoted_arg\"
+          ;;
+        *)
+          _G_quoted_arg=$_G_unquoted_arg
+         ;;
+      esac
+
+      if test -n "$func_quote_for_eval_result"; then
+       func_append func_quote_for_eval_result " $_G_quoted_arg"
+      else
+        func_append func_quote_for_eval_result "$_G_quoted_arg"
+      fi
+      shift
+    done
+}
+
+
+# func_quote_for_expand ARG
+# -------------------------
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+    $debug_cmd
+
+    case $1 in
+      *[\\\`\"]*)
+       _G_arg=`$ECHO "$1" | $SED \
+           -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
+      *)
+        _G_arg=$1 ;;
+    esac
+
+    case $_G_arg in
+      # Double-quote args containing shell metacharacters to delay
+      # word splitting and command substitution for a subsequent eval.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
+        _G_arg=\"$_G_arg\"
+        ;;
+    esac
+
+    func_quote_for_expand_result=$_G_arg
+}
+
+
+# func_stripname PREFIX SUFFIX NAME
+# ---------------------------------
+# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+if test yes = "$_G_HAVE_XSI_OPS"; then
+  eval 'func_stripname ()
+  {
+    $debug_cmd
+
+    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+    # positional parameters, so assign one to ordinary variable first.
+    func_stripname_result=$3
+    func_stripname_result=${func_stripname_result#"$1"}
+    func_stripname_result=${func_stripname_result%"$2"}
+  }'
+else
+  func_stripname ()
+  {
+    $debug_cmd
+
+    case $2 in
+      .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;;
+      *)  func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;;
+    esac
+  }
+fi
+
+
+# func_show_eval CMD [FAIL_EXP]
+# -----------------------------
+# Unless opt_quiet is true, then output CMD.  Then, if opt_dryrun is
+# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+    $debug_cmd
+
+    _G_cmd=$1
+    _G_fail_exp=${2-':'}
+
+    func_quote_for_expand "$_G_cmd"
+    eval "func_notquiet $func_quote_for_expand_result"
+
+    $opt_dry_run || {
+      eval "$_G_cmd"
+      _G_status=$?
+      if test 0 -ne "$_G_status"; then
+       eval "(exit $_G_status); $_G_fail_exp"
+      fi
+    }
+}
+
+
+# func_show_eval_locale CMD [FAIL_EXP]
+# ------------------------------------
+# Unless opt_quiet is true, then output CMD.  Then, if opt_dryrun is
+# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.  Use the saved locale for evaluation.
+func_show_eval_locale ()
+{
+    $debug_cmd
+
+    _G_cmd=$1
+    _G_fail_exp=${2-':'}
+
+    $opt_quiet || {
+      func_quote_for_expand "$_G_cmd"
+      eval "func_echo $func_quote_for_expand_result"
+    }
+
+    $opt_dry_run || {
+      eval "$_G_user_locale
+           $_G_cmd"
+      _G_status=$?
+      eval "$_G_safe_locale"
+      if test 0 -ne "$_G_status"; then
+       eval "(exit $_G_status); $_G_fail_exp"
+      fi
+    }
+}
+
+
+# func_tr_sh
+# ----------
+# Turn $1 into a string suitable for a shell variable name.
+# Result is stored in $func_tr_sh_result.  All characters
+# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
+# if $1 begins with a digit, a '_' is prepended as well.
+func_tr_sh ()
+{
+    $debug_cmd
+
+    case $1 in
+    [0-9]* | *[!a-zA-Z0-9_]*)
+      func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'`
+      ;;
+    * )
+      func_tr_sh_result=$1
+      ;;
+    esac
+}
+
+
+# func_verbose ARG...
+# -------------------
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+    $debug_cmd
+
+    $opt_verbose && func_echo "$*"
+
+    :
+}
+
+
+# func_warn_and_continue ARG...
+# -----------------------------
+# Echo program name prefixed warning message to standard error.
+func_warn_and_continue ()
+{
+    $debug_cmd
+
+    $require_term_colors
+
+    func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2
+}
+
+
+# func_warning CATEGORY ARG...
+# ----------------------------
+# Echo program name prefixed warning message to standard error. Warning
+# messages can be filtered according to CATEGORY, where this function
+# elides messages where CATEGORY is not listed in the global variable
+# 'opt_warning_types'.
+func_warning ()
+{
+    $debug_cmd
+
+    # CATEGORY must be in the warning_categories list!
+    case " $warning_categories " in
+      *" $1 "*) ;;
+      *) func_internal_error "invalid warning category '$1'" ;;
+    esac
+
+    _G_category=$1
+    shift
+
+    case " $opt_warning_types " in
+      *" $_G_category "*) $warning_func ${1+"$@"} ;;
+    esac
+}
+
+
+# func_sort_ver VER1 VER2
+# -----------------------
+# 'sort -V' is not generally available.
+# Note this deviates from the version comparison in automake
+# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
+# but this should suffice as we won't be specifying old
+# version formats or redundant trailing .0 in bootstrap.conf.
+# If we did want full compatibility then we should probably
+# use m4_version_compare from autoconf.
+func_sort_ver ()
+{
+    $debug_cmd
+
+    printf '%s\n%s\n' "$1" "$2" \
+      | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n
+}
+
+# func_lt_ver PREV CURR
+# ---------------------
+# Return true if PREV and CURR are in the correct order according to
+# func_sort_ver, otherwise false.  Use it like this:
+#
+#  func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..."
+func_lt_ver ()
+{
+    $debug_cmd
+
+    test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q`
+}
+
+
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
+#! /bin/sh
+
+# Set a version string for this script.
+scriptversion=2014-01-07.03; # UTC
+
+# A portable, pluggable option parser for Bourne shell.
+# Written by Gary V. Vaughan, 2010
+
+# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions.  There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Please report bugs or propose patches to gary@gnu.org.
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# This file is a library for parsing options in your shell scripts along
+# with assorted other useful supporting features that you can make use
+# of too.
+#
+# For the simplest scripts you might need only:
+#
+#   #!/bin/sh
+#   . relative/path/to/funclib.sh
+#   . relative/path/to/options-parser
+#   scriptversion=1.0
+#   func_options ${1+"$@"}
+#   eval set dummy "$func_options_result"; shift
+#   ...rest of your script...
+#
+# In order for the '--version' option to work, you will need to have a
+# suitably formatted comment like the one at the top of this file
+# starting with '# Written by ' and ending with '# warranty; '.
+#
+# For '-h' and '--help' to work, you will also need a one line
+# description of your script's purpose in a comment directly above the
+# '# Written by ' line, like the one at the top of this file.
+#
+# The default options also support '--debug', which will turn on shell
+# execution tracing (see the comment above debug_cmd below for another
+# use), and '--verbose' and the func_verbose function to allow your script
+# to display verbose messages only when your user has specified
+# '--verbose'.
+#
+# After sourcing this file, you can plug processing for additional
+# options by amending the variables from the 'Configuration' section
+# below, and following the instructions in the 'Option parsing'
+# section further down.
+
+## -------------- ##
+## Configuration. ##
+## -------------- ##
+
+# You should override these variables in your script after sourcing this
+# file so that they reflect the customisations you have added to the
+# option parser.
+
+# The usage line for option parsing errors and the start of '-h' and
+# '--help' output messages. You can embed shell variables for delayed
+# expansion at the time the message is displayed, but you will need to
+# quote other shell meta-characters carefully to prevent them being
+# expanded when the contents are evaled.
+usage='$progpath [OPTION]...'
+
+# Short help message in response to '-h' and '--help'.  Add to this or
+# override it after sourcing this library to reflect the full set of
+# options your script accepts.
+usage_message="\
+       --debug        enable verbose shell tracing
+   -W, --warnings=CATEGORY
+                      report the warnings falling in CATEGORY [all]
+   -v, --verbose      verbosely report processing
+       --version      print version information and exit
+   -h, --help         print short or long help message and exit
+"
+
+# Additional text appended to 'usage_message' in response to '--help'.
+long_help_message="
+Warning categories include:
+       'all'          show all warnings
+       'none'         turn off all the warnings
+       'error'        warnings are treated as fatal errors"
+
+# Help message printed before fatal option parsing errors.
+fatal_help="Try '\$progname --help' for more information."
+
+
+
+## ------------------------- ##
+## Hook function management. ##
+## ------------------------- ##
+
+# This section contains functions for adding, removing, and running hooks
+# to the main code.  A hook is just a named list of of function, that can
+# be run in order later on.
+
+# func_hookable FUNC_NAME
+# -----------------------
+# Declare that FUNC_NAME will run hooks added with
+# 'func_add_hook FUNC_NAME ...'.
+func_hookable ()
+{
+    $debug_cmd
+
+    func_append hookable_fns " $1"
+}
+
+
+# func_add_hook FUNC_NAME HOOK_FUNC
+# ---------------------------------
+# Request that FUNC_NAME call HOOK_FUNC before it returns.  FUNC_NAME must
+# first have been declared "hookable" by a call to 'func_hookable'.
+func_add_hook ()
+{
+    $debug_cmd
+
+    case " $hookable_fns " in
+      *" $1 "*) ;;
+      *) func_fatal_error "'$1' does not accept hook functions." ;;
+    esac
+
+    eval func_append ${1}_hooks '" $2"'
+}
+
+
+# func_remove_hook FUNC_NAME HOOK_FUNC
+# ------------------------------------
+# Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
+func_remove_hook ()
+{
+    $debug_cmd
+
+    eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`'
+}
+
+
+# func_run_hooks FUNC_NAME [ARG]...
+# ---------------------------------
+# Run all hook functions registered to FUNC_NAME.
+# It is assumed that the list of hook functions contains nothing more
+# than a whitespace-delimited list of legal shell function names, and
+# no effort is wasted trying to catch shell meta-characters or preserve
+# whitespace.
+func_run_hooks ()
+{
+    $debug_cmd
+
+    case " $hookable_fns " in
+      *" $1 "*) ;;
+      *) func_fatal_error "'$1' does not support hook funcions.n" ;;
+    esac
+
+    eval _G_hook_fns=\$$1_hooks; shift
+
+    for _G_hook in $_G_hook_fns; do
+      eval $_G_hook '"$@"'
+
+      # store returned options list back into positional
+      # parameters for next 'cmd' execution.
+      eval _G_hook_result=\$${_G_hook}_result
+      eval set dummy "$_G_hook_result"; shift
+    done
+
+    func_quote_for_eval ${1+"$@"}
+    func_run_hooks_result=$func_quote_for_eval_result
+}
+
+
+
+## --------------- ##
+## Option parsing. ##
+## --------------- ##
+
+# In order to add your own option parsing hooks, you must accept the
+# full positional parameter list in your hook function, remove any
+# options that you action, and then pass back the remaining unprocessed
+# options in '<hooked_function_name>_result', escaped suitably for
+# 'eval'.  Like this:
+#
+#    my_options_prep ()
+#    {
+#        $debug_cmd
+#
+#        # Extend the existing usage message.
+#        usage_message=$usage_message'
+#      -s, --silent       don'\''t print informational messages
+#    '
+#
+#        func_quote_for_eval ${1+"$@"}
+#        my_options_prep_result=$func_quote_for_eval_result
+#    }
+#    func_add_hook func_options_prep my_options_prep
+#
+#
+#    my_silent_option ()
+#    {
+#        $debug_cmd
+#
+#        # Note that for efficiency, we parse as many options as we can
+#        # recognise in a loop before passing the remainder back to the
+#        # caller on the first unrecognised argument we encounter.
+#        while test $# -gt 0; do
+#          opt=$1; shift
+#          case $opt in
+#            --silent|-s) opt_silent=: ;;
+#            # Separate non-argument short options:
+#            -s*)         func_split_short_opt "$_G_opt"
+#                         set dummy "$func_split_short_opt_name" \
+#                             "-$func_split_short_opt_arg" ${1+"$@"}
+#                         shift
+#                         ;;
+#            *)            set dummy "$_G_opt" "$*"; shift; break ;;
+#          esac
+#        done
+#
+#        func_quote_for_eval ${1+"$@"}
+#        my_silent_option_result=$func_quote_for_eval_result
+#    }
+#    func_add_hook func_parse_options my_silent_option
+#
+#
+#    my_option_validation ()
+#    {
+#        $debug_cmd
+#
+#        $opt_silent && $opt_verbose && func_fatal_help "\
+#    '--silent' and '--verbose' options are mutually exclusive."
+#
+#        func_quote_for_eval ${1+"$@"}
+#        my_option_validation_result=$func_quote_for_eval_result
+#    }
+#    func_add_hook func_validate_options my_option_validation
+#
+# You'll alse need to manually amend $usage_message to reflect the extra
+# options you parse.  It's preferable to append if you can, so that
+# multiple option parsing hooks can be added safely.
+
+
+# func_options [ARG]...
+# ---------------------
+# All the functions called inside func_options are hookable. See the
+# individual implementations for details.
+func_hookable func_options
+func_options ()
+{
+    $debug_cmd
+
+    func_options_prep ${1+"$@"}
+    eval func_parse_options \
+        ${func_options_prep_result+"$func_options_prep_result"}
+    eval func_validate_options \
+        ${func_parse_options_result+"$func_parse_options_result"}
+
+    eval func_run_hooks func_options \
+        ${func_validate_options_result+"$func_validate_options_result"}
+
+    # save modified positional parameters for caller
+    func_options_result=$func_run_hooks_result
 }
 
 
-# func_quote_for_eval arg
-# Aesthetically quote ARG to be evaled later.
-# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
-# is double-quoted, suitable for a subsequent eval, whereas
-# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
-# which are still active within double quotes backslashified.
-func_quote_for_eval ()
+# func_options_prep [ARG]...
+# --------------------------
+# All initialisations required before starting the option parse loop.
+# Note that when calling hook functions, we pass through the list of
+# positional parameters.  If a hook function modifies that list, and
+# needs to propogate that back to rest of this script, then the complete
+# modified list must be put in 'func_run_hooks_result' before
+# returning.
+func_hookable func_options_prep
+func_options_prep ()
 {
-    case $1 in
-      *[\\\`\"\$]*)
-       func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
-      *)
-        func_quote_for_eval_unquoted_result="$1" ;;
-    esac
+    $debug_cmd
 
-    case $func_quote_for_eval_unquoted_result in
-      # Double-quote args containing shell metacharacters to delay
-      # word splitting, command substitution and and variable
-      # expansion for a subsequent eval.
-      # Many Bourne shells cannot handle close brackets correctly
-      # in scan sets, so we specify it separately.
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
-        func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
-        ;;
-      *)
-        func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
-    esac
+    # Option defaults:
+    opt_verbose=false
+    opt_warning_types=
+
+    func_run_hooks func_options_prep ${1+"$@"}
+
+    # save modified positional parameters for caller
+    func_options_prep_result=$func_run_hooks_result
 }
 
 
-# func_quote_for_expand arg
-# Aesthetically quote ARG to be evaled later; same as above,
-# but do not quote variable references.
-func_quote_for_expand ()
+# func_parse_options [ARG]...
+# ---------------------------
+# The main option parsing loop.
+func_hookable func_parse_options
+func_parse_options ()
 {
-    case $1 in
-      *[\\\`\"]*)
-       my_arg=`$ECHO "$1" | $SED \
-           -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
-      *)
-        my_arg="$1" ;;
-    esac
+    $debug_cmd
 
-    case $my_arg in
-      # Double-quote args containing shell metacharacters to delay
-      # word splitting and command substitution for a subsequent eval.
-      # Many Bourne shells cannot handle close brackets correctly
-      # in scan sets, so we specify it separately.
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
-        my_arg="\"$my_arg\""
-        ;;
-    esac
+    func_parse_options_result=
 
-    func_quote_for_expand_result="$my_arg"
-}
+    # this just eases exit handling
+    while test $# -gt 0; do
+      # Defer to hook functions for initial option parsing, so they
+      # get priority in the event of reusing an option name.
+      func_run_hooks func_parse_options ${1+"$@"}
 
+      # Adjust func_parse_options positional parameters to match
+      eval set dummy "$func_run_hooks_result"; shift
 
-# func_show_eval cmd [fail_exp]
-# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
-# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
-# is given, then evaluate it.
-func_show_eval ()
-{
-    my_cmd="$1"
-    my_fail_exp="${2-:}"
+      # Break out of the loop if we already parsed every option.
+      test $# -gt 0 || break
 
-    ${opt_silent-false} || {
-      func_quote_for_expand "$my_cmd"
-      eval "func_echo $func_quote_for_expand_result"
-    }
+      _G_opt=$1
+      shift
+      case $_G_opt in
+        --debug|-x)   debug_cmd='set -x'
+                      func_echo "enabling shell trace mode"
+                      $debug_cmd
+                      ;;
+
+        --no-warnings|--no-warning|--no-warn)
+                      set dummy --warnings none ${1+"$@"}
+                      shift
+                     ;;
 
-    if ${opt_dry_run-false}; then :; else
-      eval "$my_cmd"
-      my_status=$?
-      if test "$my_status" -eq 0; then :; else
-       eval "(exit $my_status); $my_fail_exp"
-      fi
-    fi
+        --warnings|--warning|-W)
+                      test $# = 0 && func_missing_arg $_G_opt && break
+                      case " $warning_categories $1" in
+                        *" $1 "*)
+                          # trailing space prevents matching last $1 above
+                          func_append_uniq opt_warning_types " $1"
+                          ;;
+                        *all)
+                          opt_warning_types=$warning_categories
+                          ;;
+                        *none)
+                          opt_warning_types=none
+                          warning_func=:
+                          ;;
+                        *error)
+                          opt_warning_types=$warning_categories
+                          warning_func=func_fatal_error
+                          ;;
+                        *)
+                          func_fatal_error \
+                             "unsupported warning category: '$1'"
+                          ;;
+                      esac
+                      shift
+                      ;;
+
+        --verbose|-v) opt_verbose=: ;;
+        --version)    func_version ;;
+        -\?|-h)       func_usage ;;
+        --help)       func_help ;;
+
+       # Separate optargs to long options (plugins may need this):
+       --*=*)        func_split_equals "$_G_opt"
+                     set dummy "$func_split_equals_lhs" \
+                          "$func_split_equals_rhs" ${1+"$@"}
+                      shift
+                      ;;
+
+       # Separate optargs to short options:
+        -W*)
+                      func_split_short_opt "$_G_opt"
+                      set dummy "$func_split_short_opt_name" \
+                          "$func_split_short_opt_arg" ${1+"$@"}
+                      shift
+                      ;;
+
+        # Separate non-argument short options:
+        -\?*|-h*|-v*|-x*)
+                      func_split_short_opt "$_G_opt"
+                      set dummy "$func_split_short_opt_name" \
+                          "-$func_split_short_opt_arg" ${1+"$@"}
+                      shift
+                      ;;
+
+        --)           break ;;
+        -*)           func_fatal_help "unrecognised option: '$_G_opt'" ;;
+        *)            set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+      esac
+    done
+
+    # save modified positional parameters for caller
+    func_quote_for_eval ${1+"$@"}
+    func_parse_options_result=$func_quote_for_eval_result
 }
 
 
-# func_show_eval_locale cmd [fail_exp]
-# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
-# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
-# is given, then evaluate it.  Use the saved locale for evaluation.
-func_show_eval_locale ()
+# func_validate_options [ARG]...
+# ------------------------------
+# Perform any sanity checks on option settings and/or unconsumed
+# arguments.
+func_hookable func_validate_options
+func_validate_options ()
 {
-    my_cmd="$1"
-    my_fail_exp="${2-:}"
+    $debug_cmd
 
-    ${opt_silent-false} || {
-      func_quote_for_expand "$my_cmd"
-      eval "func_echo $func_quote_for_expand_result"
-    }
+    # Display all warnings if -W was not given.
+    test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
 
-    if ${opt_dry_run-false}; then :; else
-      eval "$lt_user_locale
-           $my_cmd"
-      my_status=$?
-      eval "$lt_safe_locale"
-      if test "$my_status" -eq 0; then :; else
-       eval "(exit $my_status); $my_fail_exp"
-      fi
-    fi
-}
+    func_run_hooks func_validate_options ${1+"$@"}
 
-# func_tr_sh
-# Turn $1 into a string suitable for a shell variable name.
-# Result is stored in $func_tr_sh_result.  All characters
-# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
-# if $1 begins with a digit, a '_' is prepended as well.
-func_tr_sh ()
-{
-  case $1 in
-  [0-9]* | *[!a-zA-Z0-9_]*)
-    func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
-    ;;
-  * )
-    func_tr_sh_result=$1
-    ;;
-  esac
+    # Bail if the options were screwed!
+    $exit_cmd $EXIT_FAILURE
+
+    # save modified positional parameters for caller
+    func_validate_options_result=$func_run_hooks_result
 }
 
 
-# func_version
-# Echo version message to standard output and exit.
-func_version ()
-{
-    $opt_debug
 
-    $SED -n '/(C)/!b go
-       :more
-       /\./!{
-         N
-         s/\n# / /
-         b more
-       }
-       :go
-       /^# '$PROGRAM' (GNU /,/# warranty; / {
-        s/^# //
-       s/^# *$//
-        s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
-        p
-     }' < "$progpath"
-     exit $?
-}
+## ----------------- ##
+## Helper functions. ##
+## ----------------- ##
 
-# func_usage
-# Echo short help message to standard output and exit.
-func_usage ()
+# This section contains the helper functions used by the rest of the
+# hookable option parser framework in ascii-betical order.
+
+
+# func_fatal_help ARG...
+# ----------------------
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
 {
-    $opt_debug
+    $debug_cmd
 
-    $SED -n '/^# Usage:/,/^#  *.*--help/ {
-        s/^# //
-       s/^# *$//
-       s/\$progname/'$progname'/
-       p
-    }' < "$progpath"
-    echo
-    $ECHO "run \`$progname --help | more' for full usage"
-    exit $?
+    eval \$ECHO \""Usage: $usage"\"
+    eval \$ECHO \""$fatal_help"\"
+    func_error ${1+"$@"}
+    exit $EXIT_FAILURE
 }
 
-# func_help [NOEXIT]
-# Echo long help message to standard output and exit,
-# unless 'noexit' is passed as argument.
+
+# func_help
+# ---------
+# Echo long help message to standard output and exit.
 func_help ()
 {
-    $opt_debug
-
-    $SED -n '/^# Usage:/,/# Report bugs to/ {
-       :print
-        s/^# //
-       s/^# *$//
-       s*\$progname*'$progname'*
-       s*\$host*'"$host"'*
-       s*\$SHELL*'"$SHELL"'*
-       s*\$LTCC*'"$LTCC"'*
-       s*\$LTCFLAGS*'"$LTCFLAGS"'*
-       s*\$LD*'"$LD"'*
-       s/\$with_gnu_ld/'"$with_gnu_ld"'/
-       s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
-       s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
-       p
-       d
-     }
-     /^# .* home page:/b print
-     /^# General help using/b print
-     ' < "$progpath"
-    ret=$?
-    if test -z "$1"; then
-      exit $ret
-    fi
+    $debug_cmd
+
+    func_usage_message
+    $ECHO "$long_help_message"
+    exit 0
 }
 
-# func_missing_arg argname
+
+# func_missing_arg ARGNAME
+# ------------------------
 # Echo program name prefixed message to standard error and set global
 # exit_cmd.
 func_missing_arg ()
 {
-    $opt_debug
+    $debug_cmd
 
-    func_error "missing argument for $1."
+    func_error "Missing argument for '$1'."
     exit_cmd=exit
 }
 
 
-# func_split_short_opt shortopt
+# func_split_equals STRING
+# ------------------------
+# Set func_split_equals_lhs and func_split_equals_rhs shell variables after
+# splitting STRING at the '=' sign.
+test -z "$_G_HAVE_XSI_OPS" \
+    && (eval 'x=a/b/c;
+      test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
+    && _G_HAVE_XSI_OPS=yes
+
+if test yes = "$_G_HAVE_XSI_OPS"
+then
+  # This is an XSI compatible shell, allowing a faster implementation...
+  eval 'func_split_equals ()
+  {
+      $debug_cmd
+
+      func_split_equals_lhs=${1%%=*}
+      func_split_equals_rhs=${1#*=}
+      test "x$func_split_equals_lhs" = "x$1" \
+        && func_split_equals_rhs=
+  }'
+else
+  # ...otherwise fall back to using expr, which is often a shell builtin.
+  func_split_equals ()
+  {
+      $debug_cmd
+
+      func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
+      func_split_equals_rhs=
+      test "x$func_split_equals_lhs" = "x$1" \
+        || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
+  }
+fi #func_split_equals
+
+
+# func_split_short_opt SHORTOPT
+# -----------------------------
 # Set func_split_short_opt_name and func_split_short_opt_arg shell
 # variables after splitting SHORTOPT after the 2nd character.
-func_split_short_opt ()
+if test yes = "$_G_HAVE_XSI_OPS"
+then
+  # This is an XSI compatible shell, allowing a faster implementation...
+  eval 'func_split_short_opt ()
+  {
+      $debug_cmd
+
+      func_split_short_opt_arg=${1#??}
+      func_split_short_opt_name=${1%"$func_split_short_opt_arg"}
+  }'
+else
+  # ...otherwise fall back to using expr, which is often a shell builtin.
+  func_split_short_opt ()
+  {
+      $debug_cmd
+
+      func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
+      func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
+  }
+fi #func_split_short_opt
+
+
+# func_usage
+# ----------
+# Echo short help message to standard output and exit.
+func_usage ()
 {
-    my_sed_short_opt='1s/^\(..\).*$/\1/;q'
-    my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
+    $debug_cmd
 
-    func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
-    func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
-} # func_split_short_opt may be replaced by extended shell implementation
+    func_usage_message
+    $ECHO "Run '$progname --help |${PAGER-more}' for full usage"
+    exit 0
+}
 
 
-# func_split_long_opt longopt
-# Set func_split_long_opt_name and func_split_long_opt_arg shell
-# variables after splitting LONGOPT at the `=' sign.
-func_split_long_opt ()
+# func_usage_message
+# ------------------
+# Echo short help message to standard output.
+func_usage_message ()
 {
-    my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
-    my_sed_long_arg='1s/^--[^=]*=//'
+    $debug_cmd
 
-    func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
-    func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
-} # func_split_long_opt may be replaced by extended shell implementation
+    eval \$ECHO \""Usage: $usage"\"
+    echo
+    $SED -n 's|^# ||
+        /^Written by/{
+          x;p;x
+        }
+       h
+       /^Written by/q' < "$progpath"
+    echo
+    eval \$ECHO \""$usage_message"\"
+}
 
-exit_cmd=:
 
+# func_version
+# ------------
+# Echo version message to standard output and exit.
+func_version ()
+{
+    $debug_cmd
 
+    printf '%s\n' "$progname $scriptversion"
+    $SED -n '
+        /(C)/!b go
+        :more
+        /\./!{
+          N
+          s|\n# | |
+          b more
+        }
+        :go
+        /^# Written by /,/# warranty; / {
+          s|^# ||
+          s|^# *$||
+          s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
+          p
+        }
+        /^# Written by / {
+          s|^# ||
+          p
+        }
+        /^warranty; /q' < "$progpath"
 
+    exit $?
+}
 
 
-magic="%%%MAGIC variable%%%"
-magic_exe="%%%MAGIC EXE variable%%%"
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
 
-# Global variables.
-nonopt=
-preserve_args=
-lo2o="s/\\.lo\$/.${objext}/"
-o2lo="s/\\.${objext}\$/.lo/"
-extracted_archives=
-extracted_serial=0
+# Set a version string.
+scriptversion='(GNU libtool) 2.4.6'
 
-# If this variable is set in any of the actions, the command in it
-# will be execed at the end.  This prevents here-documents from being
-# left over by shells.
-exec_cmd=
 
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
+# func_echo ARG...
+# ----------------
+# Libtool also displays the current mode in messages, so override
+# funclib.sh func_echo with this custom definition.
+func_echo ()
 {
-    eval "${1}=\$${1}\${2}"
-} # func_append may be replaced by extended shell implementation
+    $debug_cmd
 
-# func_append_quoted var value
-# Quote VALUE and append to the end of shell variable VAR, separated
-# by a space.
-func_append_quoted ()
-{
-    func_quote_for_eval "${2}"
-    eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
-} # func_append_quoted may be replaced by extended shell implementation
+    _G_message=$*
 
+    func_echo_IFS=$IFS
+    IFS=$nl
+    for _G_line in $_G_message; do
+      IFS=$func_echo_IFS
+      $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line"
+    done
+    IFS=$func_echo_IFS
+}
 
-# func_arith arithmetic-term...
-func_arith ()
+
+# func_warning ARG...
+# -------------------
+# Libtool warnings are not categorized, so override funclib.sh
+# func_warning with this simpler definition.
+func_warning ()
 {
-    func_arith_result=`expr "${@}"`
-} # func_arith may be replaced by extended shell implementation
+    $debug_cmd
 
+    $warning_func ${1+"$@"}
+}
 
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-    func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
-} # func_len may be replaced by extended shell implementation
 
+## ---------------- ##
+## Options parsing. ##
+## ---------------- ##
+
+# Hook in the functions to make sure our own options are parsed during
+# the option parsing loop.
+
+usage='$progpath [OPTION]... [MODE-ARG]...'
+
+# Short help message in response to '-h'.
+usage_message="Options:
+       --config             show all configuration variables
+       --debug              enable verbose shell tracing
+   -n, --dry-run            display commands without modifying any files
+       --features           display basic configuration information and exit
+       --mode=MODE          use operation mode MODE
+       --no-warnings        equivalent to '-Wnone'
+       --preserve-dup-deps  don't remove duplicate dependency libraries
+       --quiet, --silent    don't print informational messages
+       --tag=TAG            use configuration variables from tag TAG
+   -v, --verbose            print more informational messages than default
+       --version            print version information
+   -W, --warnings=CATEGORY  report the warnings falling in CATEGORY [all]
+   -h, --help, --help-all   print short, long, or detailed help message
+"
 
-# func_lo2o object
-func_lo2o ()
+# Additional text appended to 'usage_message' in response to '--help'.
+func_help ()
 {
-    func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
-} # func_lo2o may be replaced by extended shell implementation
+    $debug_cmd
+
+    func_usage_message
+    $ECHO "$long_help_message
+
+MODE must be one of the following:
+
+       clean           remove files from the build directory
+       compile         compile a source file into a libtool object
+       execute         automatically set library path, then run a program
+       finish          complete the installation of libtool libraries
+       install         install libraries or executables
+       link            create a library or an executable
+       uninstall       remove libraries from an installed directory
+
+MODE-ARGS vary depending on the MODE.  When passed as first option,
+'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that.
+Try '$progname --help --mode=MODE' for a more detailed description of MODE.
+
+When reporting a bug, please describe a test case to reproduce it and
+include the following information:
+
+       host-triplet:   $host
+       shell:          $SHELL
+       compiler:       $LTCC
+       compiler flags: $LTCFLAGS
+       linker:         $LD (gnu? $with_gnu_ld)
+       version:        $progname (GNU libtool) 2.4.6
+       automake:       `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
+       autoconf:       `($AUTOCONF --version) 2>/dev/null |$SED 1q`
+
+Report bugs to <bug-libtool@gnu.org>.
+GNU libtool home page: <http://www.gnu.org/software/libtool/>.
+General help using GNU software: <http://www.gnu.org/gethelp/>."
+    exit 0
+}
 
 
-# func_xform libobj-or-source
-func_xform ()
-{
-    func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
-} # func_xform may be replaced by extended shell implementation
+# func_lo2o OBJECT-NAME
+# ---------------------
+# Transform OBJECT-NAME from a '.lo' suffix to the platform specific
+# object suffix.
+
+lo2o=s/\\.lo\$/.$objext/
+o2lo=s/\\.$objext\$/.lo/
+
+if test yes = "$_G_HAVE_XSI_OPS"; then
+  eval 'func_lo2o ()
+  {
+    case $1 in
+      *.lo) func_lo2o_result=${1%.lo}.$objext ;;
+      *   ) func_lo2o_result=$1               ;;
+    esac
+  }'
+
+  # func_xform LIBOBJ-OR-SOURCE
+  # ---------------------------
+  # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise)
+  # suffix to a '.lo' libtool-object suffix.
+  eval 'func_xform ()
+  {
+    func_xform_result=${1%.*}.lo
+  }'
+else
+  # ...otherwise fall back to using sed.
+  func_lo2o ()
+  {
+    func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"`
+  }
+
+  func_xform ()
+  {
+    func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'`
+  }
+fi
 
 
-# func_fatal_configuration arg...
+# func_fatal_configuration ARG...
+# -------------------------------
 # Echo program name prefixed message to standard error, followed by
 # a configuration failure hint, and exit.
 func_fatal_configuration ()
 {
-    func_error ${1+"$@"}
-    func_error "See the $PACKAGE documentation for more information."
-    func_fatal_error "Fatal configuration error."
+    func__fatal_error ${1+"$@"} \
+      "See the $PACKAGE documentation for more information." \
+      "Fatal configuration error."
 }
 
 
 # func_config
+# -----------
 # Display the configuration for all the tags in this script.
 func_config ()
 {
@@ -915,17 +2149,19 @@ func_config ()
     exit $?
 }
 
+
 # func_features
+# -------------
 # Display the features supported by this script.
 func_features ()
 {
     echo "host: $host"
-    if test "$build_libtool_libs" = yes; then
+    if test yes = "$build_libtool_libs"; then
       echo "enable shared libraries"
     else
       echo "disable shared libraries"
     fi
-    if test "$build_old_libs" = yes; then
+    if test yes = "$build_old_libs"; then
       echo "enable static libraries"
     else
       echo "disable static libraries"
@@ -934,314 +2170,350 @@ func_features ()
     exit $?
 }
 
-# func_enable_tag tagname
+
+# func_enable_tag TAGNAME
+# -----------------------
 # Verify that TAGNAME is valid, and either flag an error and exit, or
 # enable the TAGNAME tag.  We also add TAGNAME to the global $taglist
 # variable here.
 func_enable_tag ()
 {
-  # Global variable:
-  tagname="$1"
+    # Global variable:
+    tagname=$1
 
-  re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
-  re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
-  sed_extractcf="/$re_begincf/,/$re_endcf/p"
+    re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+    re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+    sed_extractcf=/$re_begincf/,/$re_endcf/p
 
-  # Validate tagname.
-  case $tagname in
-    *[!-_A-Za-z0-9,/]*)
-      func_fatal_error "invalid tag name: $tagname"
-      ;;
-  esac
+    # Validate tagname.
+    case $tagname in
+      *[!-_A-Za-z0-9,/]*)
+        func_fatal_error "invalid tag name: $tagname"
+        ;;
+    esac
 
-  # Don't test for the "default" C tag, as we know it's
-  # there but not specially marked.
-  case $tagname in
-    CC) ;;
+    # Don't test for the "default" C tag, as we know it's
+    # there but not specially marked.
+    case $tagname in
+        CC) ;;
     *)
-      if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
-       taglist="$taglist $tagname"
-
-       # Evaluate the configuration.  Be careful to quote the path
-       # and the sed script, to avoid splitting on whitespace, but
-       # also don't use non-portable quotes within backquotes within
-       # quotes we have to do it in 2 steps:
-       extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
-       eval "$extractedcf"
-      else
-       func_error "ignoring unknown tag $tagname"
-      fi
-      ;;
-  esac
+        if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+         taglist="$taglist $tagname"
+
+         # Evaluate the configuration.  Be careful to quote the path
+         # and the sed script, to avoid splitting on whitespace, but
+         # also don't use non-portable quotes within backquotes within
+         # quotes we have to do it in 2 steps:
+         extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+         eval "$extractedcf"
+        else
+         func_error "ignoring unknown tag $tagname"
+        fi
+        ;;
+    esac
 }
 
+
 # func_check_version_match
+# ------------------------
 # Ensure that we are using m4 macros, and libtool script from the same
 # release of libtool.
 func_check_version_match ()
 {
-  if test "$package_revision" != "$macro_revision"; then
-    if test "$VERSION" != "$macro_version"; then
-      if test -z "$macro_version"; then
-        cat >&2 <<_LT_EOF
+    if test "$package_revision" != "$macro_revision"; then
+      if test "$VERSION" != "$macro_version"; then
+        if test -z "$macro_version"; then
+          cat >&2 <<_LT_EOF
 $progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
 $progname: definition of this LT_INIT comes from an older release.
 $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
 $progname: and run autoconf again.
 _LT_EOF
-      else
-        cat >&2 <<_LT_EOF
+        else
+          cat >&2 <<_LT_EOF
 $progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
 $progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
 $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
 $progname: and run autoconf again.
 _LT_EOF
-      fi
-    else
-      cat >&2 <<_LT_EOF
+        fi
+      else
+        cat >&2 <<_LT_EOF
 $progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
 $progname: but the definition of this LT_INIT comes from revision $macro_revision.
 $progname: You should recreate aclocal.m4 with macros from revision $package_revision
 $progname: of $PACKAGE $VERSION and run autoconf again.
 _LT_EOF
-    fi
+      fi
 
-    exit $EXIT_MISMATCH
-  fi
+      exit $EXIT_MISMATCH
+    fi
 }
 
 
-# Shorthand for --mode=foo, only valid as the first argument
-case $1 in
-clean|clea|cle|cl)
-  shift; set dummy --mode clean ${1+"$@"}; shift
-  ;;
-compile|compil|compi|comp|com|co|c)
-  shift; set dummy --mode compile ${1+"$@"}; shift
-  ;;
-execute|execut|execu|exec|exe|ex|e)
-  shift; set dummy --mode execute ${1+"$@"}; shift
-  ;;
-finish|finis|fini|fin|fi|f)
-  shift; set dummy --mode finish ${1+"$@"}; shift
-  ;;
-install|instal|insta|inst|ins|in|i)
-  shift; set dummy --mode install ${1+"$@"}; shift
-  ;;
-link|lin|li|l)
-  shift; set dummy --mode link ${1+"$@"}; shift
-  ;;
-uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
-  shift; set dummy --mode uninstall ${1+"$@"}; shift
-  ;;
-esac
+# libtool_options_prep [ARG]...
+# -----------------------------
+# Preparation for options parsed by libtool.
+libtool_options_prep ()
+{
+    $debug_mode
 
+    # Option defaults:
+    opt_config=false
+    opt_dlopen=
+    opt_dry_run=false
+    opt_help=false
+    opt_mode=
+    opt_preserve_dup_deps=false
+    opt_quiet=false
 
+    nonopt=
+    preserve_args=
 
-# Option defaults:
-opt_debug=:
-opt_dry_run=false
-opt_config=false
-opt_preserve_dup_deps=false
-opt_features=false
-opt_finish=false
-opt_help=false
-opt_help_all=false
-opt_silent=:
-opt_warning=:
-opt_verbose=:
-opt_silent=false
-opt_verbose=false
+    # Shorthand for --mode=foo, only valid as the first argument
+    case $1 in
+    clean|clea|cle|cl)
+      shift; set dummy --mode clean ${1+"$@"}; shift
+      ;;
+    compile|compil|compi|comp|com|co|c)
+      shift; set dummy --mode compile ${1+"$@"}; shift
+      ;;
+    execute|execut|execu|exec|exe|ex|e)
+      shift; set dummy --mode execute ${1+"$@"}; shift
+      ;;
+    finish|finis|fini|fin|fi|f)
+      shift; set dummy --mode finish ${1+"$@"}; shift
+      ;;
+    install|instal|insta|inst|ins|in|i)
+      shift; set dummy --mode install ${1+"$@"}; shift
+      ;;
+    link|lin|li|l)
+      shift; set dummy --mode link ${1+"$@"}; shift
+      ;;
+    uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+      shift; set dummy --mode uninstall ${1+"$@"}; shift
+      ;;
+    esac
+
+    # Pass back the list of options.
+    func_quote_for_eval ${1+"$@"}
+    libtool_options_prep_result=$func_quote_for_eval_result
+}
+func_add_hook func_options_prep libtool_options_prep
 
 
-# Parse options once, thoroughly.  This comes as soon as possible in the
-# script to make things like `--version' happen as quickly as we can.
+# libtool_parse_options [ARG]...
+# ---------------------------------
+# Provide handling for libtool specific options.
+libtool_parse_options ()
 {
-  # this just eases exit handling
-  while test $# -gt 0; do
-    opt="$1"
-    shift
-    case $opt in
-      --debug|-x)      opt_debug='set -x'
-                       func_echo "enabling shell trace mode"
-                       $opt_debug
-                       ;;
-      --dry-run|--dryrun|-n)
-                       opt_dry_run=:
-                       ;;
-      --config)
-                       opt_config=:
-func_config
-                       ;;
-      --dlopen|-dlopen)
-                       optarg="$1"
-                       opt_dlopen="${opt_dlopen+$opt_dlopen
-}$optarg"
-                       shift
-                       ;;
-      --preserve-dup-deps)
-                       opt_preserve_dup_deps=:
-                       ;;
-      --features)
-                       opt_features=:
-func_features
-                       ;;
-      --finish)
-                       opt_finish=:
-set dummy --mode finish ${1+"$@"}; shift
-                       ;;
-      --help)
-                       opt_help=:
-                       ;;
-      --help-all)
-                       opt_help_all=:
-opt_help=': help-all'
-                       ;;
-      --mode)
-                       test $# = 0 && func_missing_arg $opt && break
-                       optarg="$1"
-                       opt_mode="$optarg"
-case $optarg in
-  # Valid mode arguments:
-  clean|compile|execute|finish|install|link|relink|uninstall) ;;
-
-  # Catch anything else as an error
-  *) func_error "invalid argument for $opt"
-     exit_cmd=exit
-     break
-     ;;
-esac
-                       shift
-                       ;;
-      --no-silent|--no-quiet)
-                       opt_silent=false
-func_append preserve_args " $opt"
-                       ;;
-      --no-warning|--no-warn)
-                       opt_warning=false
-func_append preserve_args " $opt"
-                       ;;
-      --no-verbose)
-                       opt_verbose=false
-func_append preserve_args " $opt"
-                       ;;
-      --silent|--quiet)
-                       opt_silent=:
-func_append preserve_args " $opt"
-        opt_verbose=false
-                       ;;
-      --verbose|-v)
-                       opt_verbose=:
-func_append preserve_args " $opt"
-opt_silent=false
-                       ;;
-      --tag)
-                       test $# = 0 && func_missing_arg $opt && break
-                       optarg="$1"
-                       opt_tag="$optarg"
-func_append preserve_args " $opt $optarg"
-func_enable_tag "$optarg"
-                       shift
-                       ;;
-
-      -\?|-h)          func_usage                              ;;
-      --help)          func_help                               ;;
-      --version)       func_version                            ;;
-
-      # Separate optargs to long options:
-      --*=*)
-                       func_split_long_opt "$opt"
-                       set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
-                       shift
-                       ;;
-
-      # Separate non-argument short options:
-      -\?*|-h*|-n*|-v*)
-                       func_split_short_opt "$opt"
-                       set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
-                       shift
-                       ;;
-
-      --)              break                                   ;;
-      -*)              func_fatal_help "unrecognized option \`$opt'" ;;
-      *)               set dummy "$opt" ${1+"$@"};     shift; break  ;;
-    esac
-  done
+    $debug_cmd
 
-  # Validate options:
+    # Perform our own loop to consume as many options as possible in
+    # each iteration.
+    while test $# -gt 0; do
+      _G_opt=$1
+      shift
+      case $_G_opt in
+        --dry-run|--dryrun|-n)
+                        opt_dry_run=:
+                        ;;
+
+        --config)       func_config ;;
+
+        --dlopen|-dlopen)
+                        opt_dlopen="${opt_dlopen+$opt_dlopen
+}$1"
+                        shift
+                        ;;
+
+        --preserve-dup-deps)
+                        opt_preserve_dup_deps=: ;;
+
+        --features)     func_features ;;
+
+        --finish)       set dummy --mode finish ${1+"$@"}; shift ;;
+
+        --help)         opt_help=: ;;
+
+        --help-all)     opt_help=': help-all' ;;
+
+        --mode)         test $# = 0 && func_missing_arg $_G_opt && break
+                        opt_mode=$1
+                        case $1 in
+                          # Valid mode arguments:
+                          clean|compile|execute|finish|install|link|relink|uninstall) ;;
+
+                          # Catch anything else as an error
+                          *) func_error "invalid argument for $_G_opt"
+                             exit_cmd=exit
+                             break
+                             ;;
+                        esac
+                        shift
+                        ;;
+
+        --no-silent|--no-quiet)
+                        opt_quiet=false
+                        func_append preserve_args " $_G_opt"
+                        ;;
+
+        --no-warnings|--no-warning|--no-warn)
+                        opt_warning=false
+                        func_append preserve_args " $_G_opt"
+                        ;;
+
+        --no-verbose)
+                        opt_verbose=false
+                        func_append preserve_args " $_G_opt"
+                        ;;
+
+        --silent|--quiet)
+                        opt_quiet=:
+                        opt_verbose=false
+                        func_append preserve_args " $_G_opt"
+                        ;;
+
+        --tag)          test $# = 0 && func_missing_arg $_G_opt && break
+                        opt_tag=$1
+                        func_append preserve_args " $_G_opt $1"
+                        func_enable_tag "$1"
+                        shift
+                        ;;
+
+        --verbose|-v)   opt_quiet=false
+                        opt_verbose=:
+                        func_append preserve_args " $_G_opt"
+                        ;;
+
+       # An option not handled by this hook function:
+        *)             set dummy "$_G_opt" ${1+"$@"};  shift; break  ;;
+      esac
+    done
 
-  # save first non-option argument
-  if test "$#" -gt 0; then
-    nonopt="$opt"
-    shift
-  fi
 
-  # preserve --debug
-  test "$opt_debug" = : || func_append preserve_args " --debug"
+    # save modified positional parameters for caller
+    func_quote_for_eval ${1+"$@"}
+    libtool_parse_options_result=$func_quote_for_eval_result
+}
+func_add_hook func_parse_options libtool_parse_options
 
-  case $host in
-    *cygwin* | *mingw* | *pw32* | *cegcc*)
-      # don't eliminate duplications in $postdeps and $predeps
-      opt_duplicate_compiler_generated_deps=:
-      ;;
-    *)
-      opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
-      ;;
-  esac
 
-  $opt_help || {
-    # Sanity checks first:
-    func_check_version_match
 
-    if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
-      func_fatal_configuration "not configured to build any kind of library"
+# libtool_validate_options [ARG]...
+# ---------------------------------
+# Perform any sanity checks on option settings and/or unconsumed
+# arguments.
+libtool_validate_options ()
+{
+    # save first non-option argument
+    if test 0 -lt $#; then
+      nonopt=$1
+      shift
     fi
 
-    # Darwin sucks
-    eval std_shrext=\"$shrext_cmds\"
+    # preserve --debug
+    test : = "$debug_cmd" || func_append preserve_args " --debug"
 
-    # Only execute mode is allowed to have -dlopen flags.
-    if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
-      func_error "unrecognized option \`-dlopen'"
-      $ECHO "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
+    case $host in
+      # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
+      # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
+      *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
+        # don't eliminate duplications in $postdeps and $predeps
+        opt_duplicate_compiler_generated_deps=:
+        ;;
+      *)
+        opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
+        ;;
+    esac
 
-    # Change the help message to a mode-specific one.
-    generic_help="$help"
-    help="Try \`$progname --help --mode=$opt_mode' for more information."
-  }
+    $opt_help || {
+      # Sanity checks first:
+      func_check_version_match
+
+      test yes != "$build_libtool_libs" \
+        && test yes != "$build_old_libs" \
+        && func_fatal_configuration "not configured to build any kind of library"
+
+      # Darwin sucks
+      eval std_shrext=\"$shrext_cmds\"
+
+      # Only execute mode is allowed to have -dlopen flags.
+      if test -n "$opt_dlopen" && test execute != "$opt_mode"; then
+        func_error "unrecognized option '-dlopen'"
+        $ECHO "$help" 1>&2
+        exit $EXIT_FAILURE
+      fi
 
+      # Change the help message to a mode-specific one.
+      generic_help=$help
+      help="Try '$progname --help --mode=$opt_mode' for more information."
+    }
 
-  # Bail if the options were screwed
-  $exit_cmd $EXIT_FAILURE
+    # Pass back the unparsed argument list
+    func_quote_for_eval ${1+"$@"}
+    libtool_validate_options_result=$func_quote_for_eval_result
 }
+func_add_hook func_validate_options libtool_validate_options
 
 
+# Process options as early as possible so that --help and --version
+# can return quickly.
+func_options ${1+"$@"}
+eval set dummy "$func_options_result"; shift
+
 
 
 ## ----------- ##
 ##    Main.    ##
 ## ----------- ##
 
+magic='%%%MAGIC variable%%%'
+magic_exe='%%%MAGIC EXE variable%%%'
+
+# Global variables.
+extracted_archives=
+extracted_serial=0
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end.  This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+}
+
+# func_generated_by_libtool
+# True iff stdin has been generated by Libtool. This function is only
+# a basic sanity check; it will hardly flush out determined imposters.
+func_generated_by_libtool_p ()
+{
+  $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
 # func_lalib_p file
-# True iff FILE is a libtool `.la' library or `.lo' object file.
+# True iff FILE is a libtool '.la' library or '.lo' object file.
 # This function is only a basic sanity check; it will hardly flush out
 # determined imposters.
 func_lalib_p ()
 {
     test -f "$1" &&
-      $SED -e 4q "$1" 2>/dev/null \
-        | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+      $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p
 }
 
 # func_lalib_unsafe_p file
-# True iff FILE is a libtool `.la' library or `.lo' object file.
+# True iff FILE is a libtool '.la' library or '.lo' object file.
 # This function implements the same check as func_lalib_p without
 # resorting to external programs.  To this end, it redirects stdin and
 # closes it afterwards, without saving the original file descriptor.
 # As a safety measure, use it only where a negative result would be
-# fatal anyway.  Works if `file' does not exist.
+# fatal anyway.  Works if 'file' does not exist.
 func_lalib_unsafe_p ()
 {
     lalib_p=no
@@ -1249,13 +2521,13 @@ func_lalib_unsafe_p ()
        for lalib_p_l in 1 2 3 4
        do
            read lalib_p_line
-           case "$lalib_p_line" in
+           case $lalib_p_line in
                \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
            esac
        done
        exec 0<&5 5<&-
     fi
-    test "$lalib_p" = yes
+    test yes = "$lalib_p"
 }
 
 # func_ltwrapper_script_p file
@@ -1264,7 +2536,8 @@ func_lalib_unsafe_p ()
 # determined imposters.
 func_ltwrapper_script_p ()
 {
-    func_lalib_p "$1"
+    test -f "$1" &&
+      $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p
 }
 
 # func_ltwrapper_executable_p file
@@ -1289,7 +2562,7 @@ func_ltwrapper_scriptname ()
 {
     func_dirname_and_basename "$1" "" "."
     func_stripname '' '.exe' "$func_basename_result"
-    func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
+    func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper
 }
 
 # func_ltwrapper_p file
@@ -1308,11 +2581,13 @@ func_ltwrapper_p ()
 # FAIL_CMD may read-access the current command in variable CMD!
 func_execute_cmds ()
 {
-    $opt_debug
+    $debug_cmd
+
     save_ifs=$IFS; IFS='~'
     for cmd in $1; do
-      IFS=$save_ifs
+      IFS=$sp$nl
       eval cmd=\"$cmd\"
+      IFS=$save_ifs
       func_show_eval "$cmd" "${2-:}"
     done
     IFS=$save_ifs
@@ -1324,10 +2599,11 @@ func_execute_cmds ()
 # Note that it is not necessary on cygwin/mingw to append a dot to
 # FILE even if both FILE and FILE.exe exist: automatic-append-.exe
 # behavior happens only for exec(3), not for open(2)!  Also, sourcing
-# `FILE.' does not work on cygwin managed mounts.
+# 'FILE.' does not work on cygwin managed mounts.
 func_source ()
 {
-    $opt_debug
+    $debug_cmd
+
     case $1 in
     */* | *\\*)        . "$1" ;;
     *)         . "./$1" ;;
@@ -1354,10 +2630,10 @@ func_resolve_sysroot ()
 # store the result into func_replace_sysroot_result.
 func_replace_sysroot ()
 {
-  case "$lt_sysroot:$1" in
+  case $lt_sysroot:$1 in
   ?*:"$lt_sysroot"*)
     func_stripname "$lt_sysroot" '' "$1"
-    func_replace_sysroot_result="=$func_stripname_result"
+    func_replace_sysroot_result='='$func_stripname_result
     ;;
   *)
     # Including no sysroot.
@@ -1374,7 +2650,8 @@ func_replace_sysroot ()
 # arg is usually of the form 'gcc ...'
 func_infer_tag ()
 {
-    $opt_debug
+    $debug_cmd
+
     if test -n "$available_tags" && test -z "$tagname"; then
       CC_quoted=
       for arg in $CC; do
@@ -1393,7 +2670,7 @@ func_infer_tag ()
        for z in $available_tags; do
          if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
            # Evaluate the configuration.
-           eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+           eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
            CC_quoted=
            for arg in $CC; do
              # Double-quote args containing other shell metacharacters.
@@ -1418,7 +2695,7 @@ func_infer_tag ()
        # line option must be used.
        if test -z "$tagname"; then
          func_echo "unable to infer tagged configuration"
-         func_fatal_error "specify a tag with \`--tag'"
+         func_fatal_error "specify a tag with '--tag'"
 #      else
 #        func_verbose "using $tagname tagged configuration"
        fi
@@ -1434,15 +2711,15 @@ func_infer_tag ()
 # but don't create it if we're doing a dry run.
 func_write_libtool_object ()
 {
-    write_libobj=${1}
-    if test "$build_libtool_libs" = yes; then
-      write_lobj=\'${2}\'
+    write_libobj=$1
+    if test yes = "$build_libtool_libs"; then
+      write_lobj=\'$2\'
     else
       write_lobj=none
     fi
 
-    if test "$build_old_libs" = yes; then
-      write_oldobj=\'${3}\'
+    if test yes = "$build_old_libs"; then
+      write_oldobj=\'$3\'
     else
       write_oldobj=none
     fi
@@ -1450,7 +2727,7 @@ func_write_libtool_object ()
     $opt_dry_run || {
       cat >${write_libobj}T <<EOF
 # $write_libobj - a libtool object file
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
 #
 # Please DO NOT delete this file!
 # It is necessary for linking the library.
@@ -1462,7 +2739,7 @@ pic_object=$write_lobj
 non_pic_object=$write_oldobj
 
 EOF
-      $MV "${write_libobj}T" "${write_libobj}"
+      $MV "${write_libobj}T" "$write_libobj"
     }
 }
 
@@ -1482,8 +2759,9 @@ EOF
 # be empty on error (or when ARG is empty)
 func_convert_core_file_wine_to_w32 ()
 {
-  $opt_debug
-  func_convert_core_file_wine_to_w32_result="$1"
+  $debug_cmd
+
+  func_convert_core_file_wine_to_w32_result=$1
   if test -n "$1"; then
     # Unfortunately, winepath does not exit with a non-zero error code, so we
     # are forced to check the contents of stdout. On the other hand, if the
@@ -1491,9 +2769,9 @@ func_convert_core_file_wine_to_w32 ()
     # *an error message* to stdout. So we must check for both error code of
     # zero AND non-empty stdout, which explains the odd construction:
     func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
-    if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
+    if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then
       func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
-        $SED -e "$lt_sed_naive_backslashify"`
+        $SED -e "$sed_naive_backslashify"`
     else
       func_convert_core_file_wine_to_w32_result=
     fi
@@ -1514,18 +2792,19 @@ func_convert_core_file_wine_to_w32 ()
 # are convertible, then the result may be empty.
 func_convert_core_path_wine_to_w32 ()
 {
-  $opt_debug
+  $debug_cmd
+
   # unfortunately, winepath doesn't convert paths, only file names
-  func_convert_core_path_wine_to_w32_result=""
+  func_convert_core_path_wine_to_w32_result=
   if test -n "$1"; then
     oldIFS=$IFS
     IFS=:
     for func_convert_core_path_wine_to_w32_f in $1; do
       IFS=$oldIFS
       func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
-      if test -n "$func_convert_core_file_wine_to_w32_result" ; then
+      if test -n "$func_convert_core_file_wine_to_w32_result"; then
         if test -z "$func_convert_core_path_wine_to_w32_result"; then
-          func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
+          func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result
         else
           func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
         fi
@@ -1554,7 +2833,8 @@ func_convert_core_path_wine_to_w32 ()
 # environment variable; do not put it in $PATH.
 func_cygpath ()
 {
-  $opt_debug
+  $debug_cmd
+
   if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
     func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
     if test "$?" -ne 0; then
@@ -1563,7 +2843,7 @@ func_cygpath ()
     fi
   else
     func_cygpath_result=
-    func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
+    func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'"
   fi
 }
 #end: func_cygpath
@@ -1574,10 +2854,11 @@ func_cygpath ()
 # result in func_convert_core_msys_to_w32_result.
 func_convert_core_msys_to_w32 ()
 {
-  $opt_debug
+  $debug_cmd
+
   # awkward: cmd appends spaces to result
   func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
-    $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
+    $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"`
 }
 #end: func_convert_core_msys_to_w32
 
@@ -1588,13 +2869,14 @@ func_convert_core_msys_to_w32 ()
 # func_to_host_file_result to ARG1).
 func_convert_file_check ()
 {
-  $opt_debug
-  if test -z "$2" && test -n "$1" ; then
+  $debug_cmd
+
+  if test -z "$2" && test -n "$1"; then
     func_error "Could not determine host file name corresponding to"
-    func_error "  \`$1'"
+    func_error "  '$1'"
     func_error "Continuing, but uninstalled executables may not work."
     # Fallback:
-    func_to_host_file_result="$1"
+    func_to_host_file_result=$1
   fi
 }
 # end func_convert_file_check
@@ -1606,10 +2888,11 @@ func_convert_file_check ()
 # func_to_host_file_result to a simplistic fallback value (see below).
 func_convert_path_check ()
 {
-  $opt_debug
+  $debug_cmd
+
   if test -z "$4" && test -n "$3"; then
     func_error "Could not determine the host path corresponding to"
-    func_error "  \`$3'"
+    func_error "  '$3'"
     func_error "Continuing, but uninstalled executables may not work."
     # Fallback.  This is a deliberately simplistic "conversion" and
     # should not be "improved".  See libtool.info.
@@ -1618,7 +2901,7 @@ func_convert_path_check ()
       func_to_host_path_result=`echo "$3" |
         $SED -e "$lt_replace_pathsep_chars"`
     else
-      func_to_host_path_result="$3"
+      func_to_host_path_result=$3
     fi
   fi
 }
@@ -1630,9 +2913,10 @@ func_convert_path_check ()
 # and appending REPL if ORIG matches BACKPAT.
 func_convert_path_front_back_pathsep ()
 {
-  $opt_debug
+  $debug_cmd
+
   case $4 in
-  $1 ) func_to_host_path_result="$3$func_to_host_path_result"
+  $1 ) func_to_host_path_result=$3$func_to_host_path_result
     ;;
   esac
   case $4 in
@@ -1646,7 +2930,7 @@ func_convert_path_front_back_pathsep ()
 ##################################################
 # $build to $host FILE NAME CONVERSION FUNCTIONS #
 ##################################################
-# invoked via `$to_host_file_cmd ARG'
+# invoked via '$to_host_file_cmd ARG'
 #
 # In each case, ARG is the path to be converted from $build to $host format.
 # Result will be available in $func_to_host_file_result.
@@ -1657,7 +2941,8 @@ func_convert_path_front_back_pathsep ()
 # in func_to_host_file_result.
 func_to_host_file ()
 {
-  $opt_debug
+  $debug_cmd
+
   $to_host_file_cmd "$1"
 }
 # end func_to_host_file
@@ -1669,7 +2954,8 @@ func_to_host_file ()
 # in (the comma separated) LAZY, no conversion takes place.
 func_to_tool_file ()
 {
-  $opt_debug
+  $debug_cmd
+
   case ,$2, in
     *,"$to_tool_file_cmd",*)
       func_to_tool_file_result=$1
@@ -1687,7 +2973,7 @@ func_to_tool_file ()
 # Copy ARG to func_to_host_file_result.
 func_convert_file_noop ()
 {
-  func_to_host_file_result="$1"
+  func_to_host_file_result=$1
 }
 # end func_convert_file_noop
 
@@ -1698,11 +2984,12 @@ func_convert_file_noop ()
 # func_to_host_file_result.
 func_convert_file_msys_to_w32 ()
 {
-  $opt_debug
-  func_to_host_file_result="$1"
+  $debug_cmd
+
+  func_to_host_file_result=$1
   if test -n "$1"; then
     func_convert_core_msys_to_w32 "$1"
-    func_to_host_file_result="$func_convert_core_msys_to_w32_result"
+    func_to_host_file_result=$func_convert_core_msys_to_w32_result
   fi
   func_convert_file_check "$1" "$func_to_host_file_result"
 }
@@ -1714,8 +3001,9 @@ func_convert_file_msys_to_w32 ()
 # func_to_host_file_result.
 func_convert_file_cygwin_to_w32 ()
 {
-  $opt_debug
-  func_to_host_file_result="$1"
+  $debug_cmd
+
+  func_to_host_file_result=$1
   if test -n "$1"; then
     # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
     # LT_CYGPATH in this case.
@@ -1731,11 +3019,12 @@ func_convert_file_cygwin_to_w32 ()
 # and a working winepath. Returns result in func_to_host_file_result.
 func_convert_file_nix_to_w32 ()
 {
-  $opt_debug
-  func_to_host_file_result="$1"
+  $debug_cmd
+
+  func_to_host_file_result=$1
   if test -n "$1"; then
     func_convert_core_file_wine_to_w32 "$1"
-    func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
+    func_to_host_file_result=$func_convert_core_file_wine_to_w32_result
   fi
   func_convert_file_check "$1" "$func_to_host_file_result"
 }
@@ -1747,12 +3036,13 @@ func_convert_file_nix_to_w32 ()
 # Returns result in func_to_host_file_result.
 func_convert_file_msys_to_cygwin ()
 {
-  $opt_debug
-  func_to_host_file_result="$1"
+  $debug_cmd
+
+  func_to_host_file_result=$1
   if test -n "$1"; then
     func_convert_core_msys_to_w32 "$1"
     func_cygpath -u "$func_convert_core_msys_to_w32_result"
-    func_to_host_file_result="$func_cygpath_result"
+    func_to_host_file_result=$func_cygpath_result
   fi
   func_convert_file_check "$1" "$func_to_host_file_result"
 }
@@ -1765,13 +3055,14 @@ func_convert_file_msys_to_cygwin ()
 # in func_to_host_file_result.
 func_convert_file_nix_to_cygwin ()
 {
-  $opt_debug
-  func_to_host_file_result="$1"
+  $debug_cmd
+
+  func_to_host_file_result=$1
   if test -n "$1"; then
     # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
     func_convert_core_file_wine_to_w32 "$1"
     func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
-    func_to_host_file_result="$func_cygpath_result"
+    func_to_host_file_result=$func_cygpath_result
   fi
   func_convert_file_check "$1" "$func_to_host_file_result"
 }
@@ -1781,7 +3072,7 @@ func_convert_file_nix_to_cygwin ()
 #############################################
 # $build to $host PATH CONVERSION FUNCTIONS #
 #############################################
-# invoked via `$to_host_path_cmd ARG'
+# invoked via '$to_host_path_cmd ARG'
 #
 # In each case, ARG is the path to be converted from $build to $host format.
 # The result will be available in $func_to_host_path_result.
@@ -1805,10 +3096,11 @@ func_convert_file_nix_to_cygwin ()
 to_host_path_cmd=
 func_init_to_host_path_cmd ()
 {
-  $opt_debug
+  $debug_cmd
+
   if test -z "$to_host_path_cmd"; then
     func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
-    to_host_path_cmd="func_convert_path_${func_stripname_result}"
+    to_host_path_cmd=func_convert_path_$func_stripname_result
   fi
 }
 
@@ -1818,7 +3110,8 @@ func_init_to_host_path_cmd ()
 # in func_to_host_path_result.
 func_to_host_path ()
 {
-  $opt_debug
+  $debug_cmd
+
   func_init_to_host_path_cmd
   $to_host_path_cmd "$1"
 }
@@ -1829,7 +3122,7 @@ func_to_host_path ()
 # Copy ARG to func_to_host_path_result.
 func_convert_path_noop ()
 {
-  func_to_host_path_result="$1"
+  func_to_host_path_result=$1
 }
 # end func_convert_path_noop
 
@@ -1840,8 +3133,9 @@ func_convert_path_noop ()
 # func_to_host_path_result.
 func_convert_path_msys_to_w32 ()
 {
-  $opt_debug
-  func_to_host_path_result="$1"
+  $debug_cmd
+
+  func_to_host_path_result=$1
   if test -n "$1"; then
     # Remove leading and trailing path separator characters from ARG.  MSYS
     # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
@@ -1849,7 +3143,7 @@ func_convert_path_msys_to_w32 ()
     func_stripname : : "$1"
     func_to_host_path_tmp1=$func_stripname_result
     func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
-    func_to_host_path_result="$func_convert_core_msys_to_w32_result"
+    func_to_host_path_result=$func_convert_core_msys_to_w32_result
     func_convert_path_check : ";" \
       "$func_to_host_path_tmp1" "$func_to_host_path_result"
     func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
@@ -1863,8 +3157,9 @@ func_convert_path_msys_to_w32 ()
 # func_to_host_file_result.
 func_convert_path_cygwin_to_w32 ()
 {
-  $opt_debug
-  func_to_host_path_result="$1"
+  $debug_cmd
+
+  func_to_host_path_result=$1
   if test -n "$1"; then
     # See func_convert_path_msys_to_w32:
     func_stripname : : "$1"
@@ -1883,14 +3178,15 @@ func_convert_path_cygwin_to_w32 ()
 # a working winepath.  Returns result in func_to_host_file_result.
 func_convert_path_nix_to_w32 ()
 {
-  $opt_debug
-  func_to_host_path_result="$1"
+  $debug_cmd
+
+  func_to_host_path_result=$1
   if test -n "$1"; then
     # See func_convert_path_msys_to_w32:
     func_stripname : : "$1"
     func_to_host_path_tmp1=$func_stripname_result
     func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
-    func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
+    func_to_host_path_result=$func_convert_core_path_wine_to_w32_result
     func_convert_path_check : ";" \
       "$func_to_host_path_tmp1" "$func_to_host_path_result"
     func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
@@ -1904,15 +3200,16 @@ func_convert_path_nix_to_w32 ()
 # Returns result in func_to_host_file_result.
 func_convert_path_msys_to_cygwin ()
 {
-  $opt_debug
-  func_to_host_path_result="$1"
+  $debug_cmd
+
+  func_to_host_path_result=$1
   if test -n "$1"; then
     # See func_convert_path_msys_to_w32:
     func_stripname : : "$1"
     func_to_host_path_tmp1=$func_stripname_result
     func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
     func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
-    func_to_host_path_result="$func_cygpath_result"
+    func_to_host_path_result=$func_cygpath_result
     func_convert_path_check : : \
       "$func_to_host_path_tmp1" "$func_to_host_path_result"
     func_convert_path_front_back_pathsep ":*" "*:" : "$1"
@@ -1927,8 +3224,9 @@ func_convert_path_msys_to_cygwin ()
 # func_to_host_file_result.
 func_convert_path_nix_to_cygwin ()
 {
-  $opt_debug
-  func_to_host_path_result="$1"
+  $debug_cmd
+
+  func_to_host_path_result=$1
   if test -n "$1"; then
     # Remove leading and trailing path separator characters from
     # ARG. msys behavior is inconsistent here, cygpath turns them
@@ -1937,7 +3235,7 @@ func_convert_path_nix_to_cygwin ()
     func_to_host_path_tmp1=$func_stripname_result
     func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
     func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
-    func_to_host_path_result="$func_cygpath_result"
+    func_to_host_path_result=$func_cygpath_result
     func_convert_path_check : : \
       "$func_to_host_path_tmp1" "$func_to_host_path_result"
     func_convert_path_front_back_pathsep ":*" "*:" : "$1"
@@ -1946,13 +3244,31 @@ func_convert_path_nix_to_cygwin ()
 # end func_convert_path_nix_to_cygwin
 
 
+# func_dll_def_p FILE
+# True iff FILE is a Windows DLL '.def' file.
+# Keep in sync with _LT_DLL_DEF_P in libtool.m4
+func_dll_def_p ()
+{
+  $debug_cmd
+
+  func_dll_def_p_tmp=`$SED -n \
+    -e 's/^[    ]*//' \
+    -e '/^\(;.*\)*$/d' \
+    -e 's/^\(EXPORTS\|LIBRARY\)\([      ].*\)*$/DEF/p' \
+    -e q \
+    "$1"`
+  test DEF = "$func_dll_def_p_tmp"
+}
+
+
 # func_mode_compile arg...
 func_mode_compile ()
 {
-    $opt_debug
+    $debug_cmd
+
     # Get the compilation command and the source file.
     base_compile=
-    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
+    srcfile=$nonopt  #  always keep a non-empty value in "srcfile"
     suppress_opt=yes
     suppress_output=
     arg_mode=normal
@@ -1965,12 +3281,12 @@ func_mode_compile ()
       case $arg_mode in
       arg  )
        # do not "continue".  Instead, add this to base_compile
-       lastarg="$arg"
+       lastarg=$arg
        arg_mode=normal
        ;;
 
       target )
-       libobj="$arg"
+       libobj=$arg
        arg_mode=normal
        continue
        ;;
@@ -1980,7 +3296,7 @@ func_mode_compile ()
        case $arg in
        -o)
          test -n "$libobj" && \
-           func_fatal_error "you cannot specify \`-o' more than once"
+           func_fatal_error "you cannot specify '-o' more than once"
          arg_mode=target
          continue
          ;;
@@ -2009,12 +3325,12 @@ func_mode_compile ()
          func_stripname '-Wc,' '' "$arg"
          args=$func_stripname_result
          lastarg=
-         save_ifs="$IFS"; IFS=','
+         save_ifs=$IFS; IFS=,
          for arg in $args; do
-           IFS="$save_ifs"
+           IFS=$save_ifs
            func_append_quoted lastarg "$arg"
          done
-         IFS="$save_ifs"
+         IFS=$save_ifs
          func_stripname ' ' '' "$lastarg"
          lastarg=$func_stripname_result
 
@@ -2027,8 +3343,8 @@ func_mode_compile ()
          # Accept the current argument as the source file.
          # The previous "srcfile" becomes the current argument.
          #
-         lastarg="$srcfile"
-         srcfile="$arg"
+         lastarg=$srcfile
+         srcfile=$arg
          ;;
        esac  #  case $arg
        ;;
@@ -2043,13 +3359,13 @@ func_mode_compile ()
       func_fatal_error "you must specify an argument for -Xcompile"
       ;;
     target)
-      func_fatal_error "you must specify a target with \`-o'"
+      func_fatal_error "you must specify a target with '-o'"
       ;;
     *)
       # Get the name of the library object.
       test -z "$libobj" && {
        func_basename "$srcfile"
-       libobj="$func_basename_result"
+       libobj=$func_basename_result
       }
       ;;
     esac
@@ -2069,7 +3385,7 @@ func_mode_compile ()
     case $libobj in
     *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
     *)
-      func_fatal_error "cannot determine name of library object from \`$libobj'"
+      func_fatal_error "cannot determine name of library object from '$libobj'"
       ;;
     esac
 
@@ -2078,8 +3394,8 @@ func_mode_compile ()
     for arg in $later; do
       case $arg in
       -shared)
-       test "$build_libtool_libs" != yes && \
-         func_fatal_configuration "can not build a shared library"
+       test yes = "$build_libtool_libs" \
+         || func_fatal_configuration "cannot build a shared library"
        build_old_libs=no
        continue
        ;;
@@ -2105,17 +3421,17 @@ func_mode_compile ()
     func_quote_for_eval "$libobj"
     test "X$libobj" != "X$func_quote_for_eval_result" \
       && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"'   &()|`$[]' \
-      && func_warning "libobj name \`$libobj' may not contain shell special characters."
+      && func_warning "libobj name '$libobj' may not contain shell special characters."
     func_dirname_and_basename "$obj" "/" ""
-    objname="$func_basename_result"
-    xdir="$func_dirname_result"
-    lobj=${xdir}$objdir/$objname
+    objname=$func_basename_result
+    xdir=$func_dirname_result
+    lobj=$xdir$objdir/$objname
 
     test -z "$base_compile" && \
       func_fatal_help "you must specify a compilation command"
 
     # Delete any leftover library objects.
-    if test "$build_old_libs" = yes; then
+    if test yes = "$build_old_libs"; then
       removelist="$obj $lobj $libobj ${libobj}T"
     else
       removelist="$lobj $libobj ${libobj}T"
@@ -2127,16 +3443,16 @@ func_mode_compile ()
       pic_mode=default
       ;;
     esac
-    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+    if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then
       # non-PIC code in shared libraries is not supported
       pic_mode=default
     fi
 
     # Calculate the filename of the output object if compiler does
     # not support -o with -c
-    if test "$compiler_c_o" = no; then
-      output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
-      lockfile="$output_obj.lock"
+    if test no = "$compiler_c_o"; then
+      output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext
+      lockfile=$output_obj.lock
     else
       output_obj=
       need_locks=no
@@ -2145,12 +3461,12 @@ func_mode_compile ()
 
     # Lock this critical section if it is needed
     # We use this script file to make the link, it avoids creating a new file
-    if test "$need_locks" = yes; then
+    if test yes = "$need_locks"; then
       until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
        func_echo "Waiting for $lockfile to be removed"
        sleep 2
       done
-    elif test "$need_locks" = warn; then
+    elif test warn = "$need_locks"; then
       if test -f "$lockfile"; then
        $ECHO "\
 *** ERROR, $lockfile exists and contains:
@@ -2158,7 +3474,7 @@ func_mode_compile ()
 
 This indicates that another process is trying to use the same
 temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
+your compiler does not support '-c' and '-o' together.  If you
 repeat this compilation, it may succeed, by chance, but you had better
 avoid parallel builds (make -j) in this platform, or get a better
 compiler."
@@ -2180,11 +3496,11 @@ compiler."
     qsrcfile=$func_quote_for_eval_result
 
     # Only build a PIC object if we are building libtool libraries.
-    if test "$build_libtool_libs" = yes; then
+    if test yes = "$build_libtool_libs"; then
       # Without this assignment, base_compile gets emptied.
       fbsd_hideous_sh_bug=$base_compile
 
-      if test "$pic_mode" != no; then
+      if test no != "$pic_mode"; then
        command="$base_compile $qsrcfile $pic_flag"
       else
        # Don't build PIC code
@@ -2201,7 +3517,7 @@ compiler."
       func_show_eval_locale "$command" \
           'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
 
-      if test "$need_locks" = warn &&
+      if test warn = "$need_locks" &&
         test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
        $ECHO "\
 *** ERROR, $lockfile contains:
@@ -2212,7 +3528,7 @@ $srcfile
 
 This indicates that another process is trying to use the same
 temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
+your compiler does not support '-c' and '-o' together.  If you
 repeat this compilation, it may succeed, by chance, but you had better
 avoid parallel builds (make -j) in this platform, or get a better
 compiler."
@@ -2228,20 +3544,20 @@ compiler."
       fi
 
       # Allow error messages only from the first compilation.
-      if test "$suppress_opt" = yes; then
+      if test yes = "$suppress_opt"; then
        suppress_output=' >/dev/null 2>&1'
       fi
     fi
 
     # Only build a position-dependent object if we build old libraries.
-    if test "$build_old_libs" = yes; then
-      if test "$pic_mode" != yes; then
+    if test yes = "$build_old_libs"; then
+      if test yes != "$pic_mode"; then
        # Don't build PIC code
        command="$base_compile $qsrcfile$pie_flag"
       else
        command="$base_compile $qsrcfile $pic_flag"
       fi
-      if test "$compiler_c_o" = yes; then
+      if test yes = "$compiler_c_o"; then
        func_append command " -o $obj"
       fi
 
@@ -2250,7 +3566,7 @@ compiler."
       func_show_eval_locale "$command" \
         '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
 
-      if test "$need_locks" = warn &&
+      if test warn = "$need_locks" &&
         test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
        $ECHO "\
 *** ERROR, $lockfile contains:
@@ -2261,7 +3577,7 @@ $srcfile
 
 This indicates that another process is trying to use the same
 temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
+your compiler does not support '-c' and '-o' together.  If you
 repeat this compilation, it may succeed, by chance, but you had better
 avoid parallel builds (make -j) in this platform, or get a better
 compiler."
@@ -2281,7 +3597,7 @@ compiler."
       func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
 
       # Unlock the critical section if it was locked
-      if test "$need_locks" != no; then
+      if test no != "$need_locks"; then
        removelist=$lockfile
         $RM "$lockfile"
       fi
@@ -2291,7 +3607,7 @@ compiler."
 }
 
 $opt_help || {
-  test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
+  test compile = "$opt_mode" && func_mode_compile ${1+"$@"}
 }
 
 func_mode_help ()
@@ -2311,7 +3627,7 @@ func_mode_help ()
 Remove files from the build directory.
 
 RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+(typically '/bin/rm').  RM-OPTIONS are options (such as '-f') to be passed
 to RM.
 
 If FILE is a libtool library, object or program, all the files associated
@@ -2330,16 +3646,16 @@ This mode accepts the following additional options:
   -no-suppress      do not suppress compiler output for multiple passes
   -prefer-pic       try to build PIC objects only
   -prefer-non-pic   try to build non-PIC objects only
-  -shared           do not build a \`.o' file suitable for static linking
-  -static           only build a \`.o' file suitable for static linking
+  -shared           do not build a '.o' file suitable for static linking
+  -static           only build a '.o' file suitable for static linking
   -Wc,FLAG          pass FLAG directly to the compiler
 
-COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+COMPILE-COMMAND is a command to be used in creating a 'standard' object file
 from the given SOURCEFILE.
 
 The output file name is determined by removing the directory component from
-SOURCEFILE, then substituting the C source code suffix \`.c' with the
-library object suffix, \`.lo'."
+SOURCEFILE, then substituting the C source code suffix '.c' with the
+library object suffix, '.lo'."
         ;;
 
       execute)
@@ -2352,7 +3668,7 @@ This mode accepts the following additional options:
 
   -dlopen FILE      add the directory containing FILE to the library path
 
-This mode sets the library path environment variable according to \`-dlopen'
+This mode sets the library path environment variable according to '-dlopen'
 flags.
 
 If any of the ARGS are libtool executable wrappers, then they are translated
@@ -2371,7 +3687,7 @@ Complete the installation of libtool libraries.
 Each LIBDIR is a directory that contains libtool libraries.
 
 The commands that this mode executes may require superuser privileges.  Use
-the \`--dry-run' option if you just want to see what would be executed."
+the '--dry-run' option if you just want to see what would be executed."
         ;;
 
       install)
@@ -2381,7 +3697,7 @@ the \`--dry-run' option if you just want to see what would be executed."
 Install executables or libraries.
 
 INSTALL-COMMAND is the installation command.  The first component should be
-either the \`install' or \`cp' program.
+either the 'install' or 'cp' program.
 
 The following components of INSTALL-COMMAND are treated specially:
 
@@ -2407,7 +3723,7 @@ The following components of LINK-COMMAND are treated specially:
   -avoid-version    do not add a version suffix if possible
   -bindir BINDIR    specify path to binaries directory (for systems where
                     libraries must be found in the PATH setting at runtime)
-  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
+  -dlopen FILE      '-dlpreopen' FILE if it cannot be dlopened at runtime
   -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
   -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
   -export-symbols SYMFILE
@@ -2421,7 +3737,8 @@ The following components of LINK-COMMAND are treated specially:
   -no-install       link a not-installable executable
   -no-undefined     declare that a library does not refer to external symbols
   -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
-  -objectlist FILE  Use a list of object files found in FILE to specify objects
+  -objectlist FILE  use a list of object files found in FILE to specify objects
+  -os2dllname NAME  force a short DLL name on OS/2 (no effect on other OSes)
   -precious-files-regex REGEX
                     don't remove output files matching REGEX
   -release RELEASE  specify package release information
@@ -2441,20 +3758,20 @@ The following components of LINK-COMMAND are treated specially:
   -Xlinker FLAG     pass linker-specific FLAG directly to the linker
   -XCClinker FLAG   pass link-specific FLAG to the compiler driver (CC)
 
-All other options (arguments beginning with \`-') are ignored.
+All other options (arguments beginning with '-') are ignored.
 
-Every other argument is treated as a filename.  Files ending in \`.la' are
+Every other argument is treated as a filename.  Files ending in '.la' are
 treated as uninstalled libtool libraries, other files are standard or library
 object files.
 
-If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
-only library objects (\`.lo' files) may be specified, and \`-rpath' is
+If the OUTPUT-FILE ends in '.la', then a libtool library is created,
+only library objects ('.lo' files) may be specified, and '-rpath' is
 required, except when creating a convenience library.
 
-If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
-using \`ar' and \`ranlib', or on Windows using \`lib'.
+If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created
+using 'ar' and 'ranlib', or on Windows using 'lib'.
 
-If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file
 is created, otherwise an executable program is created."
         ;;
 
@@ -2465,7 +3782,7 @@ is created, otherwise an executable program is created."
 Remove libraries from an installation directory.
 
 RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+(typically '/bin/rm').  RM-OPTIONS are options (such as '-f') to be passed
 to RM.
 
 If FILE is a libtool library, all the files associated with it are deleted.
@@ -2473,17 +3790,17 @@ Otherwise, only FILE itself is deleted using RM."
         ;;
 
       *)
-        func_fatal_help "invalid operation mode \`$opt_mode'"
+        func_fatal_help "invalid operation mode '$opt_mode'"
         ;;
     esac
 
     echo
-    $ECHO "Try \`$progname --help' for more information about other modes."
+    $ECHO "Try '$progname --help' for more information about other modes."
 }
 
 # Now that we've collected a possible --mode arg, show help if necessary
 if $opt_help; then
-  if test "$opt_help" = :; then
+  if test : = "$opt_help"; then
     func_mode_help
   else
     {
@@ -2491,7 +3808,7 @@ if $opt_help; then
       for opt_mode in compile link execute install finish uninstall clean; do
        func_mode_help
       done
-    } | sed -n '1p; 2,$s/^Usage:/  or: /p'
+    } | $SED -n '1p; 2,$s/^Usage:/  or: /p'
     {
       func_help noexit
       for opt_mode in compile link execute install finish uninstall clean; do
@@ -2499,7 +3816,7 @@ if $opt_help; then
        func_mode_help
       done
     } |
-    sed '1d
+    $SED '1d
       /^When reporting/,/^Report/{
        H
        d
@@ -2516,16 +3833,17 @@ fi
 # func_mode_execute arg...
 func_mode_execute ()
 {
-    $opt_debug
+    $debug_cmd
+
     # The first argument is the command name.
-    cmd="$nonopt"
+    cmd=$nonopt
     test -z "$cmd" && \
       func_fatal_help "you must specify a COMMAND"
 
     # Handle -dlopen flags immediately.
     for file in $opt_dlopen; do
       test -f "$file" \
-       || func_fatal_help "\`$file' is not a file"
+       || func_fatal_help "'$file' is not a file"
 
       dir=
       case $file in
@@ -2535,7 +3853,7 @@ func_mode_execute ()
 
        # Check to see that this really is a libtool archive.
        func_lalib_unsafe_p "$file" \
-         || func_fatal_help "\`$lib' is not a valid libtool archive"
+         || func_fatal_help "'$lib' is not a valid libtool archive"
 
        # Read the libtool library.
        dlname=
@@ -2546,18 +3864,18 @@ func_mode_execute ()
        if test -z "$dlname"; then
          # Warn if it was a shared library.
          test -n "$library_names" && \
-           func_warning "\`$file' was not linked with \`-export-dynamic'"
+           func_warning "'$file' was not linked with '-export-dynamic'"
          continue
        fi
 
        func_dirname "$file" "" "."
-       dir="$func_dirname_result"
+       dir=$func_dirname_result
 
        if test -f "$dir/$objdir/$dlname"; then
          func_append dir "/$objdir"
        else
          if test ! -f "$dir/$dlname"; then
-           func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
+           func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'"
          fi
        fi
        ;;
@@ -2565,18 +3883,18 @@ func_mode_execute ()
       *.lo)
        # Just add the directory containing the .lo file.
        func_dirname "$file" "" "."
-       dir="$func_dirname_result"
+       dir=$func_dirname_result
        ;;
 
       *)
-       func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
+       func_warning "'-dlopen' is ignored for non-libtool libraries and objects"
        continue
        ;;
       esac
 
       # Get the absolute pathname.
       absdir=`cd "$dir" && pwd`
-      test -n "$absdir" && dir="$absdir"
+      test -n "$absdir" && dir=$absdir
 
       # Now add the directory to shlibpath_var.
       if eval "test -z \"\$$shlibpath_var\""; then
@@ -2588,7 +3906,7 @@ func_mode_execute ()
 
     # This variable tells wrapper scripts just to set shlibpath_var
     # rather than running their programs.
-    libtool_execute_magic="$magic"
+    libtool_execute_magic=$magic
 
     # Check if any of the arguments is a wrapper script.
     args=
@@ -2601,12 +3919,12 @@ func_mode_execute ()
        if func_ltwrapper_script_p "$file"; then
          func_source "$file"
          # Transform arg to wrapped name.
-         file="$progdir/$program"
+         file=$progdir/$program
        elif func_ltwrapper_executable_p "$file"; then
          func_ltwrapper_scriptname "$file"
          func_source "$func_ltwrapper_scriptname_result"
          # Transform arg to wrapped name.
-         file="$progdir/$program"
+         file=$progdir/$program
        fi
        ;;
       esac
@@ -2614,7 +3932,15 @@ func_mode_execute ()
       func_append_quoted args "$file"
     done
 
-    if test "X$opt_dry_run" = Xfalse; then
+    if $opt_dry_run; then
+      # Display what would be done.
+      if test -n "$shlibpath_var"; then
+       eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+       echo "export $shlibpath_var"
+      fi
+      $ECHO "$cmd$args"
+      exit $EXIT_SUCCESS
+    else
       if test -n "$shlibpath_var"; then
        # Export the shlibpath_var.
        eval "export $shlibpath_var"
@@ -2631,25 +3957,18 @@ func_mode_execute ()
       done
 
       # Now prepare to actually exec the command.
-      exec_cmd="\$cmd$args"
-    else
-      # Display what would be done.
-      if test -n "$shlibpath_var"; then
-       eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
-       echo "export $shlibpath_var"
-      fi
-      $ECHO "$cmd$args"
-      exit $EXIT_SUCCESS
+      exec_cmd=\$cmd$args
     fi
 }
 
-test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
+test execute = "$opt_mode" && func_mode_execute ${1+"$@"}
 
 
 # func_mode_finish arg...
 func_mode_finish ()
 {
-    $opt_debug
+    $debug_cmd
+
     libs=
     libdirs=
     admincmds=
@@ -2663,11 +3982,11 @@ func_mode_finish ()
        if func_lalib_unsafe_p "$opt"; then
          func_append libs " $opt"
        else
-         func_warning "\`$opt' is not a valid libtool archive"
+         func_warning "'$opt' is not a valid libtool archive"
        fi
 
       else
-       func_fatal_error "invalid argument \`$opt'"
+       func_fatal_error "invalid argument '$opt'"
       fi
     done
 
@@ -2682,12 +4001,12 @@ func_mode_finish ()
       # Remove sysroot references
       if $opt_dry_run; then
         for lib in $libs; do
-          echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
+          echo "removing references to $lt_sysroot and '=' prefixes from $lib"
         done
       else
         tmpdir=`func_mktempdir`
         for lib in $libs; do
-         sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
+         $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
            > $tmpdir/tmp-la
          mv -f $tmpdir/tmp-la $lib
        done
@@ -2712,7 +4031,7 @@ func_mode_finish ()
     fi
 
     # Exit here if they wanted silent mode.
-    $opt_silent && exit $EXIT_SUCCESS
+    $opt_quiet && exit $EXIT_SUCCESS
 
     if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
       echo "----------------------------------------------------------------------"
@@ -2723,27 +4042,27 @@ func_mode_finish ()
       echo
       echo "If you ever happen to want to link against installed libraries"
       echo "in a given directory, LIBDIR, you must either use libtool, and"
-      echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+      echo "specify the full pathname of the library, or use the '-LLIBDIR'"
       echo "flag during linking and do at least one of the following:"
       if test -n "$shlibpath_var"; then
-       echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
+       echo "   - add LIBDIR to the '$shlibpath_var' environment variable"
        echo "     during execution"
       fi
       if test -n "$runpath_var"; then
-       echo "   - add LIBDIR to the \`$runpath_var' environment variable"
+       echo "   - add LIBDIR to the '$runpath_var' environment variable"
        echo "     during linking"
       fi
       if test -n "$hardcode_libdir_flag_spec"; then
        libdir=LIBDIR
        eval flag=\"$hardcode_libdir_flag_spec\"
 
-       $ECHO "   - use the \`$flag' linker flag"
+       $ECHO "   - use the '$flag' linker flag"
       fi
       if test -n "$admincmds"; then
        $ECHO "   - have your system administrator run these commands:$admincmds"
       fi
       if test -f /etc/ld.so.conf; then
-       echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+       echo "   - have your system administrator add LIBDIR to '/etc/ld.so.conf'"
       fi
       echo
 
@@ -2762,18 +4081,20 @@ func_mode_finish ()
     exit $EXIT_SUCCESS
 }
 
-test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
+test finish = "$opt_mode" && func_mode_finish ${1+"$@"}
 
 
 # func_mode_install arg...
 func_mode_install ()
 {
-    $opt_debug
+    $debug_cmd
+
     # There may be an optional sh(1) argument at the beginning of
     # install_prog (especially on Windows NT).
-    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+    if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" ||
        # Allow the use of GNU shtool's install command.
-       case $nonopt in *shtool*) :;; *) false;; esac; then
+       case $nonopt in *shtool*) :;; *) false;; esac
+    then
       # Aesthetically quote it.
       func_quote_for_eval "$nonopt"
       install_prog="$func_quote_for_eval_result "
@@ -2800,7 +4121,7 @@ func_mode_install ()
     opts=
     prev=
     install_type=
-    isdir=no
+    isdir=false
     stripme=
     no_mode=:
     for arg
@@ -2813,7 +4134,7 @@ func_mode_install ()
       fi
 
       case $arg in
-      -d) isdir=yes ;;
+      -d) isdir=: ;;
       -f)
        if $install_cp; then :; else
          prev=$arg
@@ -2831,7 +4152,7 @@ func_mode_install ()
       *)
        # If the previous option needed an argument, then skip it.
        if test -n "$prev"; then
-         if test "x$prev" = x-m && test -n "$install_override_mode"; then
+         if test X-m = "X$prev" && test -n "$install_override_mode"; then
            arg2=$install_override_mode
            no_mode=false
          fi
@@ -2856,7 +4177,7 @@ func_mode_install ()
       func_fatal_help "you must specify an install program"
 
     test -n "$prev" && \
-      func_fatal_help "the \`$prev' option requires an argument"
+      func_fatal_help "the '$prev' option requires an argument"
 
     if test -n "$install_override_mode" && $no_mode; then
       if $install_cp; then :; else
@@ -2878,19 +4199,19 @@ func_mode_install ()
     dest=$func_stripname_result
 
     # Check to see that the destination is a directory.
-    test -d "$dest" && isdir=yes
-    if test "$isdir" = yes; then
-      destdir="$dest"
+    test -d "$dest" && isdir=:
+    if $isdir; then
+      destdir=$dest
       destname=
     else
       func_dirname_and_basename "$dest" "" "."
-      destdir="$func_dirname_result"
-      destname="$func_basename_result"
+      destdir=$func_dirname_result
+      destname=$func_basename_result
 
       # Not a directory, so check to see that there is only one file specified.
       set dummy $files; shift
       test "$#" -gt 1 && \
-       func_fatal_help "\`$dest' is not a directory"
+       func_fatal_help "'$dest' is not a directory"
     fi
     case $destdir in
     [\\/]* | [A-Za-z]:[\\/]*) ;;
@@ -2899,7 +4220,7 @@ func_mode_install ()
        case $file in
        *.lo) ;;
        *)
-         func_fatal_help "\`$destdir' must be an absolute directory name"
+         func_fatal_help "'$destdir' must be an absolute directory name"
          ;;
        esac
       done
@@ -2908,7 +4229,7 @@ func_mode_install ()
 
     # This variable tells wrapper scripts just to set variables rather
     # than running their programs.
-    libtool_install_magic="$magic"
+    libtool_install_magic=$magic
 
     staticlibs=
     future_libdirs=
@@ -2928,7 +4249,7 @@ func_mode_install ()
 
        # Check to see that this really is a libtool archive.
        func_lalib_unsafe_p "$file" \
-         || func_fatal_help "\`$file' is not a valid libtool archive"
+         || func_fatal_help "'$file' is not a valid libtool archive"
 
        library_names=
        old_library=
@@ -2950,7 +4271,7 @@ func_mode_install ()
        fi
 
        func_dirname "$file" "/" ""
-       dir="$func_dirname_result"
+       dir=$func_dirname_result
        func_append dir "$objdir"
 
        if test -n "$relink_command"; then
@@ -2964,7 +4285,7 @@ func_mode_install ()
          # are installed into $libdir/../bin (currently, that works fine)
          # but it's something to keep an eye on.
          test "$inst_prefix_dir" = "$destdir" && \
-           func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
+           func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir"
 
          if test -n "$inst_prefix_dir"; then
            # Stick the inst_prefix_dir data into the link command.
@@ -2973,29 +4294,36 @@ func_mode_install ()
            relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
          fi
 
-         func_warning "relinking \`$file'"
+         func_warning "relinking '$file'"
          func_show_eval "$relink_command" \
-           'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
+           'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"'
        fi
 
        # See the names of the shared library.
        set dummy $library_names; shift
        if test -n "$1"; then
-         realname="$1"
+         realname=$1
          shift
 
-         srcname="$realname"
-         test -n "$relink_command" && srcname="$realname"T
+         srcname=$realname
+         test -n "$relink_command" && srcname=${realname}T
 
          # Install the shared library and build the symlinks.
          func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
              'exit $?'
-         tstripme="$stripme"
+         tstripme=$stripme
          case $host_os in
          cygwin* | mingw* | pw32* | cegcc*)
            case $realname in
            *.dll.a)
-             tstripme=""
+             tstripme=
+             ;;
+           esac
+           ;;
+         os2*)
+           case $realname in
+           *_dll.a)
+             tstripme=
              ;;
            esac
            ;;
@@ -3006,7 +4334,7 @@ func_mode_install ()
 
          if test "$#" -gt 0; then
            # Delete the old symlinks, and create new ones.
-           # Try `ln -sf' first, because the `ln' binary might depend on
+           # Try 'ln -sf' first, because the 'ln' binary might depend on
            # the symlink we replace!  Solaris /bin/ln does not understand -f,
            # so we also need to try rm && ln -s.
            for linkname
@@ -3017,14 +4345,14 @@ func_mode_install ()
          fi
 
          # Do each command in the postinstall commands.
-         lib="$destdir/$realname"
+         lib=$destdir/$realname
          func_execute_cmds "$postinstall_cmds" 'exit $?'
        fi
 
        # Install the pseudo-library for information purposes.
        func_basename "$file"
-       name="$func_basename_result"
-       instname="$dir/$name"i
+       name=$func_basename_result
+       instname=$dir/${name}i
        func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
 
        # Maybe install the static library, too.
@@ -3036,11 +4364,11 @@ func_mode_install ()
 
        # Figure out destination file name, if it wasn't already specified.
        if test -n "$destname"; then
-         destfile="$destdir/$destname"
+         destfile=$destdir/$destname
        else
          func_basename "$file"
-         destfile="$func_basename_result"
-         destfile="$destdir/$destfile"
+         destfile=$func_basename_result
+         destfile=$destdir/$destfile
        fi
 
        # Deduce the name of the destination old-style object file.
@@ -3050,11 +4378,11 @@ func_mode_install ()
          staticdest=$func_lo2o_result
          ;;
        *.$objext)
-         staticdest="$destfile"
+         staticdest=$destfile
          destfile=
          ;;
        *)
-         func_fatal_help "cannot copy a libtool object to \`$destfile'"
+         func_fatal_help "cannot copy a libtool object to '$destfile'"
          ;;
        esac
 
@@ -3063,7 +4391,7 @@ func_mode_install ()
          func_show_eval "$install_prog $file $destfile" 'exit $?'
 
        # Install the old object if enabled.
-       if test "$build_old_libs" = yes; then
+       if test yes = "$build_old_libs"; then
          # Deduce the name of the old-style object file.
          func_lo2o "$file"
          staticobj=$func_lo2o_result
@@ -3075,23 +4403,23 @@ func_mode_install ()
       *)
        # Figure out destination file name, if it wasn't already specified.
        if test -n "$destname"; then
-         destfile="$destdir/$destname"
+         destfile=$destdir/$destname
        else
          func_basename "$file"
-         destfile="$func_basename_result"
-         destfile="$destdir/$destfile"
+         destfile=$func_basename_result
+         destfile=$destdir/$destfile
        fi
 
        # If the file is missing, and there is a .exe on the end, strip it
        # because it is most likely a libtool script we actually want to
        # install
-       stripped_ext=""
+       stripped_ext=
        case $file in
          *.exe)
            if test ! -f "$file"; then
              func_stripname '' '.exe' "$file"
              file=$func_stripname_result
-             stripped_ext=".exe"
+             stripped_ext=.exe
            fi
            ;;
        esac
@@ -3119,19 +4447,19 @@ func_mode_install ()
 
          # Check the variables that should have been set.
          test -z "$generated_by_libtool_version" && \
-           func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+           func_fatal_error "invalid libtool wrapper script '$wrapper'"
 
-         finalize=yes
+         finalize=:
          for lib in $notinst_deplibs; do
            # Check to see that each library is installed.
            libdir=
            if test -f "$lib"; then
              func_source "$lib"
            fi
-           libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
+           libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'`
            if test -n "$libdir" && test ! -f "$libfile"; then
-             func_warning "\`$lib' has not been installed in \`$libdir'"
-             finalize=no
+             func_warning "'$lib' has not been installed in '$libdir'"
+             finalize=false
            fi
          done
 
@@ -3139,29 +4467,29 @@ func_mode_install ()
          func_source "$wrapper"
 
          outputname=
-         if test "$fast_install" = no && test -n "$relink_command"; then
+         if test no = "$fast_install" && test -n "$relink_command"; then
            $opt_dry_run || {
-             if test "$finalize" = yes; then
+             if $finalize; then
                tmpdir=`func_mktempdir`
                func_basename "$file$stripped_ext"
-               file="$func_basename_result"
-               outputname="$tmpdir/$file"
+               file=$func_basename_result
+               outputname=$tmpdir/$file
                # Replace the output file specification.
                relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
 
-               $opt_silent || {
+               $opt_quiet || {
                  func_quote_for_expand "$relink_command"
                  eval "func_echo $func_quote_for_expand_result"
                }
                if eval "$relink_command"; then :
                  else
-                 func_error "error: relink \`$file' with the above command before installing it"
+                 func_error "error: relink '$file' with the above command before installing it"
                  $opt_dry_run || ${RM}r "$tmpdir"
                  continue
                fi
-               file="$outputname"
+               file=$outputname
              else
-               func_warning "cannot relink \`$file'"
+               func_warning "cannot relink '$file'"
              fi
            }
          else
@@ -3198,10 +4526,10 @@ func_mode_install ()
 
     for file in $staticlibs; do
       func_basename "$file"
-      name="$func_basename_result"
+      name=$func_basename_result
 
       # Set up the ranlib parameters.
-      oldlib="$destdir/$name"
+      oldlib=$destdir/$name
       func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
       tool_oldlib=$func_to_tool_file_result
 
@@ -3216,18 +4544,18 @@ func_mode_install ()
     done
 
     test -n "$future_libdirs" && \
-      func_warning "remember to run \`$progname --finish$future_libdirs'"
+      func_warning "remember to run '$progname --finish$future_libdirs'"
 
     if test -n "$current_libdirs"; then
       # Maybe just do a dry run.
       $opt_dry_run && current_libdirs=" -n$current_libdirs"
-      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+      exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs'
     else
       exit $EXIT_SUCCESS
     fi
 }
 
-test "$opt_mode" = install && func_mode_install ${1+"$@"}
+test install = "$opt_mode" && func_mode_install ${1+"$@"}
 
 
 # func_generate_dlsyms outputname originator pic_p
@@ -3235,16 +4563,17 @@ test "$opt_mode" = install && func_mode_install ${1+"$@"}
 # a dlpreopen symbol table.
 func_generate_dlsyms ()
 {
-    $opt_debug
-    my_outputname="$1"
-    my_originator="$2"
-    my_pic_p="${3-no}"
-    my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+    $debug_cmd
+
+    my_outputname=$1
+    my_originator=$2
+    my_pic_p=${3-false}
+    my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'`
     my_dlsyms=
 
-    if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+    if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
       if test -n "$NM" && test -n "$global_symbol_pipe"; then
-       my_dlsyms="${my_outputname}S.c"
+       my_dlsyms=${my_outputname}S.c
       else
        func_error "not configured to extract global symbols from dlpreopened files"
       fi
@@ -3255,7 +4584,7 @@ func_generate_dlsyms ()
       "") ;;
       *.c)
        # Discover the nlist of each of the dlfiles.
-       nlist="$output_objdir/${my_outputname}.nm"
+       nlist=$output_objdir/$my_outputname.nm
 
        func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
 
@@ -3263,34 +4592,36 @@ func_generate_dlsyms ()
        func_verbose "creating $output_objdir/$my_dlsyms"
 
        $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
-/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
-/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
+/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */
 
 #ifdef __cplusplus
 extern \"C\" {
 #endif
 
-#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
 #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
 #endif
 
 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
-/* DATA imports from DLLs on WIN32 con't be const, because runtime
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
    relocations are performed -- see ld's documentation on pseudo-relocs.  */
 # define LT_DLSYM_CONST
-#elif defined(__osf__)
+#elif defined __osf__
 /* This system does not cope well with relocations in const data.  */
 # define LT_DLSYM_CONST
 #else
 # define LT_DLSYM_CONST const
 #endif
 
+#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
+
 /* External symbol declarations for the compiler. */\
 "
 
-       if test "$dlself" = yes; then
-         func_verbose "generating symbol list for \`$output'"
+       if test yes = "$dlself"; then
+         func_verbose "generating symbol list for '$output'"
 
          $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
 
@@ -3298,7 +4629,7 @@ extern \"C\" {
          progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
          for progfile in $progfiles; do
            func_to_tool_file "$progfile" func_convert_file_msys_to_w32
-           func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
+           func_verbose "extracting global C symbols from '$func_to_tool_file_result'"
            $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
          done
 
@@ -3318,10 +4649,10 @@ extern \"C\" {
 
          # Prepare the list of exported symbols
          if test -z "$export_symbols"; then
-           export_symbols="$output_objdir/$outputname.exp"
+           export_symbols=$output_objdir/$outputname.exp
            $opt_dry_run || {
              $RM $export_symbols
-             eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+             eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
              case $host in
              *cygwin* | *mingw* | *cegcc* )
                 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
@@ -3331,7 +4662,7 @@ extern \"C\" {
            }
          else
            $opt_dry_run || {
-             eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+             eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
              eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
              eval '$MV "$nlist"T "$nlist"'
              case $host in
@@ -3345,22 +4676,22 @@ extern \"C\" {
        fi
 
        for dlprefile in $dlprefiles; do
-         func_verbose "extracting global C symbols from \`$dlprefile'"
+         func_verbose "extracting global C symbols from '$dlprefile'"
          func_basename "$dlprefile"
-         name="$func_basename_result"
+         name=$func_basename_result
           case $host in
            *cygwin* | *mingw* | *cegcc* )
              # if an import library, we need to obtain dlname
              if func_win32_import_lib_p "$dlprefile"; then
                func_tr_sh "$dlprefile"
                eval "curr_lafile=\$libfile_$func_tr_sh_result"
-               dlprefile_dlbasename=""
+               dlprefile_dlbasename=
                if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
                  # Use subshell, to avoid clobbering current variable values
                  dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
-                 if test -n "$dlprefile_dlname" ; then
+                 if test -n "$dlprefile_dlname"; then
                    func_basename "$dlprefile_dlname"
-                   dlprefile_dlbasename="$func_basename_result"
+                   dlprefile_dlbasename=$func_basename_result
                  else
                    # no lafile. user explicitly requested -dlpreopen <import library>.
                    $sharedlib_from_linklib_cmd "$dlprefile"
@@ -3368,7 +4699,7 @@ extern \"C\" {
                  fi
                fi
                $opt_dry_run || {
-                 if test -n "$dlprefile_dlbasename" ; then
+                 if test -n "$dlprefile_dlbasename"; then
                    eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
                  else
                    func_warning "Could not compute DLL name from $name"
@@ -3424,6 +4755,11 @@ extern \"C\" {
            echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
          fi
 
+         func_show_eval '$RM "${nlist}I"'
+         if test -n "$global_symbol_to_import"; then
+           eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I'
+         fi
+
          echo >> "$output_objdir/$my_dlsyms" "\
 
 /* The mapping between symbol names and symbols.  */
@@ -3432,11 +4768,30 @@ typedef struct {
   void *address;
 } lt_dlsymlist;
 extern LT_DLSYM_CONST lt_dlsymlist
-lt_${my_prefix}_LTX_preloaded_symbols[];
+lt_${my_prefix}_LTX_preloaded_symbols[];\
+"
+
+         if test -s "$nlist"I; then
+           echo >> "$output_objdir/$my_dlsyms" "\
+static void lt_syminit(void)
+{
+  LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols;
+  for (; symbol->name; ++symbol)
+    {"
+           $SED 's/.*/      if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms"
+           echo >> "$output_objdir/$my_dlsyms" "\
+    }
+}"
+         fi
+         echo >> "$output_objdir/$my_dlsyms" "\
 LT_DLSYM_CONST lt_dlsymlist
 lt_${my_prefix}_LTX_preloaded_symbols[] =
-{\
-  { \"$my_originator\", (void *) 0 },"
+{ {\"$my_originator\", (void *) 0},"
+
+         if test -s "$nlist"I; then
+           echo >> "$output_objdir/$my_dlsyms" "\
+  {\"@INIT@\", (void *) &lt_syminit},"
+         fi
 
          case $need_lib_prefix in
          no)
@@ -3478,9 +4833,7 @@ static const void *lt_preloaded_setup() {
          *-*-hpux*)
            pic_flag_for_symtable=" $pic_flag"  ;;
          *)
-           if test "X$my_pic_p" != Xno; then
-             pic_flag_for_symtable=" $pic_flag"
-           fi
+           $my_pic_p && pic_flag_for_symtable=" $pic_flag"
            ;;
          esac
          ;;
@@ -3497,10 +4850,10 @@ static const void *lt_preloaded_setup() {
        func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
 
        # Clean up the generated files.
-       func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
+       func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"'
 
        # Transform the symbol file into the correct name.
-       symfileobj="$output_objdir/${my_outputname}S.$objext"
+       symfileobj=$output_objdir/${my_outputname}S.$objext
        case $host in
        *cygwin* | *mingw* | *cegcc* )
          if test -f "$output_objdir/$my_outputname.def"; then
@@ -3518,7 +4871,7 @@ static const void *lt_preloaded_setup() {
        esac
        ;;
       *)
-       func_fatal_error "unknown suffix for \`$my_dlsyms'"
+       func_fatal_error "unknown suffix for '$my_dlsyms'"
        ;;
       esac
     else
@@ -3532,6 +4885,32 @@ static const void *lt_preloaded_setup() {
     fi
 }
 
+# func_cygming_gnu_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is a GNU/binutils-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_gnu_implib_p ()
+{
+  $debug_cmd
+
+  func_to_tool_file "$1" func_convert_file_msys_to_w32
+  func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
+  test -n "$func_cygming_gnu_implib_tmp"
+}
+
+# func_cygming_ms_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is an MS-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_ms_implib_p ()
+{
+  $debug_cmd
+
+  func_to_tool_file "$1" func_convert_file_msys_to_w32
+  func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
+  test -n "$func_cygming_ms_implib_tmp"
+}
+
 # func_win32_libid arg
 # return the library type of file 'arg'
 #
@@ -3541,8 +4920,9 @@ static const void *lt_preloaded_setup() {
 # Despite the name, also deal with 64 bit binaries.
 func_win32_libid ()
 {
-  $opt_debug
-  win32_libid_type="unknown"
+  $debug_cmd
+
+  win32_libid_type=unknown
   win32_fileres=`file -L $1 2>/dev/null`
   case $win32_fileres in
   *ar\ archive\ import\ library*) # definitely import
@@ -3552,16 +4932,29 @@ func_win32_libid ()
     # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
     if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
        $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
-      func_to_tool_file "$1" func_convert_file_msys_to_w32
-      win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
-       $SED -n -e '
+      case $nm_interface in
+      "MS dumpbin")
+       if func_cygming_ms_implib_p "$1" ||
+          func_cygming_gnu_implib_p "$1"
+       then
+         win32_nmres=import
+       else
+         win32_nmres=
+       fi
+       ;;
+      *)
+       func_to_tool_file "$1" func_convert_file_msys_to_w32
+       win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
+         $SED -n -e '
            1,100{
                / I /{
-                   s,.*,import,
+                   s|.*|import|
                    p
                    q
                }
            }'`
+       ;;
+      esac
       case $win32_nmres in
       import*)  win32_libid_type="x86 archive import";;
       *)        win32_libid_type="x86 archive static";;
@@ -3593,7 +4986,8 @@ func_win32_libid ()
 #    $sharedlib_from_linklib_result
 func_cygming_dll_for_implib ()
 {
-  $opt_debug
+  $debug_cmd
+
   sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
 }
 
@@ -3610,7 +5004,8 @@ func_cygming_dll_for_implib ()
 # specified import library.
 func_cygming_dll_for_implib_fallback_core ()
 {
-  $opt_debug
+  $debug_cmd
+
   match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
   $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
     $SED '/^Contents of section '"$match_literal"':/{
@@ -3646,8 +5041,8 @@ func_cygming_dll_for_implib_fallback_core ()
       /./p' |
     # we now have a list, one entry per line, of the stringified
     # contents of the appropriate section of all members of the
-    # archive which possess that section. Heuristic: eliminate
-    # all those which have a first or second character that is
+    # archive that possess that section. Heuristic: eliminate
+    # all those that have a first or second character that is
     # a '.' (that is, objdump's representation of an unprintable
     # character.) This should work for all archives with less than
     # 0x302f exports -- but will fail for DLLs whose name actually
@@ -3658,30 +5053,6 @@ func_cygming_dll_for_implib_fallback_core ()
     $SED -e '/^\./d;/^.\./d;q'
 }
 
-# func_cygming_gnu_implib_p ARG
-# This predicate returns with zero status (TRUE) if
-# ARG is a GNU/binutils-style import library. Returns
-# with nonzero status (FALSE) otherwise.
-func_cygming_gnu_implib_p ()
-{
-  $opt_debug
-  func_to_tool_file "$1" func_convert_file_msys_to_w32
-  func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
-  test -n "$func_cygming_gnu_implib_tmp"
-}
-
-# func_cygming_ms_implib_p ARG
-# This predicate returns with zero status (TRUE) if
-# ARG is an MS-style import library. Returns
-# with nonzero status (FALSE) otherwise.
-func_cygming_ms_implib_p ()
-{
-  $opt_debug
-  func_to_tool_file "$1" func_convert_file_msys_to_w32
-  func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
-  test -n "$func_cygming_ms_implib_tmp"
-}
-
 # func_cygming_dll_for_implib_fallback ARG
 # Platform-specific function to extract the
 # name of the DLL associated with the specified
@@ -3695,16 +5066,17 @@ func_cygming_ms_implib_p ()
 #    $sharedlib_from_linklib_result
 func_cygming_dll_for_implib_fallback ()
 {
-  $opt_debug
-  if func_cygming_gnu_implib_p "$1" ; then
+  $debug_cmd
+
+  if func_cygming_gnu_implib_p "$1"; then
     # binutils import library
     sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
-  elif func_cygming_ms_implib_p "$1" ; then
+  elif func_cygming_ms_implib_p "$1"; then
     # ms-generated import library
     sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
   else
     # unknown
-    sharedlib_from_linklib_result=""
+    sharedlib_from_linklib_result=
   fi
 }
 
@@ -3712,10 +5084,11 @@ func_cygming_dll_for_implib_fallback ()
 # func_extract_an_archive dir oldlib
 func_extract_an_archive ()
 {
-    $opt_debug
-    f_ex_an_ar_dir="$1"; shift
-    f_ex_an_ar_oldlib="$1"
-    if test "$lock_old_archive_extraction" = yes; then
+    $debug_cmd
+
+    f_ex_an_ar_dir=$1; shift
+    f_ex_an_ar_oldlib=$1
+    if test yes = "$lock_old_archive_extraction"; then
       lockfile=$f_ex_an_ar_oldlib.lock
       until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
        func_echo "Waiting for $lockfile to be removed"
@@ -3724,7 +5097,7 @@ func_extract_an_archive ()
     fi
     func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
                   'stat=$?; rm -f "$lockfile"; exit $stat'
-    if test "$lock_old_archive_extraction" = yes; then
+    if test yes = "$lock_old_archive_extraction"; then
       $opt_dry_run || rm -f "$lockfile"
     fi
     if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
@@ -3738,22 +5111,23 @@ func_extract_an_archive ()
 # func_extract_archives gentop oldlib ...
 func_extract_archives ()
 {
-    $opt_debug
-    my_gentop="$1"; shift
+    $debug_cmd
+
+    my_gentop=$1; shift
     my_oldlibs=${1+"$@"}
-    my_oldobjs=""
-    my_xlib=""
-    my_xabs=""
-    my_xdir=""
+    my_oldobjs=
+    my_xlib=
+    my_xabs=
+    my_xdir=
 
     for my_xlib in $my_oldlibs; do
       # Extract the objects.
       case $my_xlib in
-       [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+       [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;;
        *) my_xabs=`pwd`"/$my_xlib" ;;
       esac
       func_basename "$my_xlib"
-      my_xlib="$func_basename_result"
+      my_xlib=$func_basename_result
       my_xlib_u=$my_xlib
       while :; do
         case " $extracted_archives " in
@@ -3765,7 +5139,7 @@ func_extract_archives ()
        esac
       done
       extracted_archives="$extracted_archives $my_xlib_u"
-      my_xdir="$my_gentop/$my_xlib_u"
+      my_xdir=$my_gentop/$my_xlib_u
 
       func_mkdir_p "$my_xdir"
 
@@ -3778,22 +5152,23 @@ func_extract_archives ()
          cd $my_xdir || exit $?
          darwin_archive=$my_xabs
          darwin_curdir=`pwd`
-         darwin_base_archive=`basename "$darwin_archive"`
+         func_basename "$darwin_archive"
+         darwin_base_archive=$func_basename_result
          darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
          if test -n "$darwin_arches"; then
            darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
            darwin_arch=
            func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
-           for darwin_arch in  $darwin_arches ; do
-             func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
-             $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
-             cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
-             func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+           for darwin_arch in  $darwin_arches; do
+             func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch"
+             $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive"
+             cd "unfat-$$/$darwin_base_archive-$darwin_arch"
+             func_extract_an_archive "`pwd`" "$darwin_base_archive"
              cd "$darwin_curdir"
-             $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+             $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive"
            done # $darwin_arches
             ## Okay now we've a bunch of thin objects, gotta fatten them up :)
-           darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
+           darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u`
            darwin_file=
            darwin_files=
            for darwin_file in $darwin_filelist; do
@@ -3815,7 +5190,7 @@ func_extract_archives ()
       my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
     done
 
-    func_extract_archives_result="$my_oldobjs"
+    func_extract_archives_result=$my_oldobjs
 }
 
 
@@ -3830,7 +5205,7 @@ func_extract_archives ()
 #
 # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
 # variable will take.  If 'yes', then the emitted script
-# will assume that the directory in which it is stored is
+# will assume that the directory where it is stored is
 # the $objdir directory.  This is a cygwin/mingw-specific
 # behavior.
 func_emit_wrapper ()
@@ -3841,7 +5216,7 @@ func_emit_wrapper ()
 #! $SHELL
 
 # $output - temporary wrapper script for $objdir/$outputname
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
 #
 # The $output program cannot be directly executed until all the libtool
 # libraries that it depends on are installed.
@@ -3898,9 +5273,9 @@ _LTECHO_EOF'
 
 # Very basic option parsing. These options are (a) specific to
 # the libtool wrapper, (b) are identical between the wrapper
-# /script/ and the wrapper /executable/ which is used only on
+# /script/ and the wrapper /executable/ that is used only on
 # windows platforms, and (c) all begin with the string "--lt-"
-# (application programs are unlikely to have options which match
+# (application programs are unlikely to have options that match
 # this pattern).
 #
 # There are only two supported options: --lt-debug and
@@ -3933,7 +5308,7 @@ func_parse_lt_options ()
 
   # Print the debug banner immediately:
   if test -n \"\$lt_option_debug\"; then
-    echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
+    echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2
   fi
 }
 
@@ -3944,7 +5319,7 @@ func_lt_dump_args ()
   lt_dump_args_N=1;
   for lt_arg
   do
-    \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
+    \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\"
     lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
   done
 }
@@ -3958,7 +5333,7 @@ func_exec_program_core ()
   *-*-mingw | *-*-os2* | *-cegcc*)
     $ECHO "\
       if test -n \"\$lt_option_debug\"; then
-        \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
+        \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2
         func_lt_dump_args \${1+\"\$@\"} 1>&2
       fi
       exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
@@ -3968,7 +5343,7 @@ func_exec_program_core ()
   *)
     $ECHO "\
       if test -n \"\$lt_option_debug\"; then
-        \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
+        \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2
         func_lt_dump_args \${1+\"\$@\"} 1>&2
       fi
       exec \"\$progdir/\$program\" \${1+\"\$@\"}
@@ -4043,13 +5418,13 @@ func_exec_program ()
   test -n \"\$absdir\" && thisdir=\"\$absdir\"
 "
 
-       if test "$fast_install" = yes; then
+       if test yes = "$fast_install"; then
          $ECHO "\
   program=lt-'$outputname'$exeext
   progdir=\"\$thisdir/$objdir\"
 
   if test ! -f \"\$progdir/\$program\" ||
-     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\
        test \"X\$file\" != \"X\$progdir/\$program\"; }; then
 
     file=\"\$\$-\$program\"
@@ -4066,7 +5441,7 @@ func_exec_program ()
     if test -n \"\$relink_command\"; then
       if relink_command_output=\`eval \$relink_command 2>&1\`; then :
       else
-       $ECHO \"\$relink_command_output\" >&2
+       \$ECHO \"\$relink_command_output\" >&2
        $RM \"\$progdir/\$file\"
        exit 1
       fi
@@ -4101,7 +5476,7 @@ func_exec_program ()
        fi
 
        # Export our shlibpath_var if we have one.
-       if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+       if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
          $ECHO "\
     # Add our own library path to $shlibpath_var
     $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
@@ -4121,7 +5496,7 @@ func_exec_program ()
     fi
   else
     # The program doesn't exist.
-    \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+    \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2
     \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
     \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
     exit 1
@@ -4140,7 +5515,7 @@ func_emit_cwrapperexe_src ()
        cat <<EOF
 
 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
-   Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+   Generated by $PROGRAM (GNU $PACKAGE) $VERSION
 
    The $output program cannot be directly executed until all the libtool
    libraries that it depends on are installed.
@@ -4175,47 +5550,45 @@ EOF
 #include <fcntl.h>
 #include <sys/stat.h>
 
+#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
+
 /* declarations of non-ANSI functions */
-#if defined(__MINGW32__)
+#if defined __MINGW32__
 # ifdef __STRICT_ANSI__
 int _putenv (const char *);
 # endif
-#elif defined(__CYGWIN__)
+#elif defined __CYGWIN__
 # ifdef __STRICT_ANSI__
 char *realpath (const char *, char *);
 int putenv (char *);
 int setenv (const char *, const char *, int);
 # endif
-/* #elif defined (other platforms) ... */
+/* #elif defined other_platform || defined ... */
 #endif
 
 /* portability defines, excluding path handling macros */
-#if defined(_MSC_VER)
+#if defined _MSC_VER
 # define setmode _setmode
 # define stat    _stat
 # define chmod   _chmod
 # define getcwd  _getcwd
 # define putenv  _putenv
 # define S_IXUSR _S_IEXEC
-# ifndef _INTPTR_T_DEFINED
-#  define _INTPTR_T_DEFINED
-#  define intptr_t int
-# endif
-#elif defined(__MINGW32__)
+#elif defined __MINGW32__
 # define setmode _setmode
 # define stat    _stat
 # define chmod   _chmod
 # define getcwd  _getcwd
 # define putenv  _putenv
-#elif defined(__CYGWIN__)
+#elif defined __CYGWIN__
 # define HAVE_SETENV
 # define FOPEN_WB "wb"
-/* #elif defined (other platforms) ... */
+/* #elif defined other platforms ... */
 #endif
 
-#if defined(PATH_MAX)
+#if defined PATH_MAX
 # define LT_PATHMAX PATH_MAX
-#elif defined(MAXPATHLEN)
+#elif defined MAXPATHLEN
 # define LT_PATHMAX MAXPATHLEN
 #else
 # define LT_PATHMAX 1024
@@ -4234,8 +5607,8 @@ int setenv (const char *, const char *, int);
 # define PATH_SEPARATOR ':'
 #endif
 
-#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
-  defined (__OS2__)
+#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \
+  defined __OS2__
 # define HAVE_DOS_BASED_FILE_SYSTEM
 # define FOPEN_WB "wb"
 # ifndef DIR_SEPARATOR_2
@@ -4268,10 +5641,10 @@ int setenv (const char *, const char *, int);
 
 #define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
 #define XFREE(stale) do { \
-  if (stale) { free ((void *) stale); stale = 0; } \
+  if (stale) { free (stale); stale = 0; } \
 } while (0)
 
-#if defined(LT_DEBUGWRAPPER)
+#if defined LT_DEBUGWRAPPER
 static int lt_debug = 1;
 #else
 static int lt_debug = 0;
@@ -4300,11 +5673,16 @@ void lt_dump_script (FILE *f);
 EOF
 
            cat <<EOF
-volatile const char * MAGIC_EXE = "$magic_exe";
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
+# define externally_visible volatile
+#else
+# define externally_visible __attribute__((externally_visible)) volatile
+#endif
+externally_visible const char * MAGIC_EXE = "$magic_exe";
 const char * LIB_PATH_VARNAME = "$shlibpath_var";
 EOF
 
-           if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+           if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
               func_to_host_path "$temp_rpath"
              cat <<EOF
 const char * LIB_PATH_VALUE   = "$func_to_host_path_result";
@@ -4328,7 +5706,7 @@ const char * EXE_PATH_VALUE   = "";
 EOF
            fi
 
-           if test "$fast_install" = yes; then
+           if test yes = "$fast_install"; then
              cat <<EOF
 const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
 EOF
@@ -4357,12 +5735,12 @@ main (int argc, char *argv[])
   char *actual_cwrapper_name;
   char *target_name;
   char *lt_argv_zero;
-  intptr_t rval = 127;
+  int rval = 127;
 
   int i;
 
   program_name = (char *) xstrdup (base_name (argv[0]));
-  newargz = XMALLOC (char *, argc + 1);
+  newargz = XMALLOC (char *, (size_t) argc + 1);
 
   /* very simple arg parsing; don't want to rely on getopt
    * also, copy all non cwrapper options to newargz, except
@@ -4371,10 +5749,10 @@ main (int argc, char *argv[])
   newargc=0;
   for (i = 1; i < argc; i++)
     {
-      if (strcmp (argv[i], dumpscript_opt) == 0)
+      if (STREQ (argv[i], dumpscript_opt))
        {
 EOF
-           case "$host" in
+           case $host in
              *mingw* | *cygwin* )
                # make stdout use "unix" line endings
                echo "          setmode(1,_O_BINARY);"
@@ -4385,12 +5763,12 @@ EOF
          lt_dump_script (stdout);
          return 0;
        }
-      if (strcmp (argv[i], debug_opt) == 0)
+      if (STREQ (argv[i], debug_opt))
        {
           lt_debug = 1;
           continue;
        }
-      if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
+      if (STREQ (argv[i], ltwrapper_option_prefix))
         {
           /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
              namespace, but it is not one of the ones we know about and
@@ -4413,7 +5791,7 @@ EOF
 EOF
            cat <<EOF
   /* The GNU banner must be the first non-error debug message */
-  lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
+  lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE) $VERSION\n");
 EOF
            cat <<"EOF"
   lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
@@ -4524,7 +5902,7 @@ EOF
                cat <<"EOF"
   /* execv doesn't actually work on mingw as expected on unix */
   newargz = prepare_spawn (newargz);
-  rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+  rval = (int) _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
   if (rval == -1)
     {
       /* failed to start process */
@@ -4569,7 +5947,7 @@ base_name (const char *name)
 {
   const char *base;
 
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
   /* Skip over the disk name in MSDOS pathnames. */
   if (isalpha ((unsigned char) name[0]) && name[1] == ':')
     name += 2;
@@ -4628,7 +6006,7 @@ find_executable (const char *wrapper)
   const char *p_next;
   /* static buffer for getcwd */
   char tmp[LT_PATHMAX + 1];
-  int tmp_len;
+  size_t tmp_len;
   char *concat_name;
 
   lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
@@ -4638,7 +6016,7 @@ find_executable (const char *wrapper)
     return NULL;
 
   /* Absolute path? */
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
   if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
     {
       concat_name = xstrdup (wrapper);
@@ -4656,7 +6034,7 @@ find_executable (const char *wrapper)
            return concat_name;
          XFREE (concat_name);
        }
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
     }
 #endif
 
@@ -4679,7 +6057,7 @@ find_executable (const char *wrapper)
              for (q = p; *q; q++)
                if (IS_PATH_SEPARATOR (*q))
                  break;
-             p_len = q - p;
+             p_len = (size_t) (q - p);
              p_next = (*q == '\0' ? q : q + 1);
              if (p_len == 0)
                {
@@ -4798,7 +6176,7 @@ strendzap (char *str, const char *pat)
   if (patlen <= len)
     {
       str += len - patlen;
-      if (strcmp (str, pat) == 0)
+      if (STREQ (str, pat))
        *str = '\0';
     }
   return str;
@@ -4863,7 +6241,7 @@ lt_setenv (const char *name, const char *value)
     char *str = xstrdup (value);
     setenv (name, str, 1);
 #else
-    int len = strlen (name) + 1 + strlen (value) + 1;
+    size_t len = strlen (name) + 1 + strlen (value) + 1;
     char *str = XMALLOC (char, len);
     sprintf (str, "%s=%s", name, value);
     if (putenv (str) != EXIT_SUCCESS)
@@ -4880,8 +6258,8 @@ lt_extend_str (const char *orig_value, const char *add, int to_end)
   char *new_value;
   if (orig_value && *orig_value)
     {
-      int orig_value_len = strlen (orig_value);
-      int add_len = strlen (add);
+      size_t orig_value_len = strlen (orig_value);
+      size_t add_len = strlen (add);
       new_value = XMALLOC (char, add_len + orig_value_len + 1);
       if (to_end)
         {
@@ -4912,10 +6290,10 @@ lt_update_exe_path (const char *name, const char *value)
     {
       char *new_value = lt_extend_str (getenv (name), value, 0);
       /* some systems can't cope with a ':'-terminated path #' */
-      int len = strlen (new_value);
-      while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+      size_t len = strlen (new_value);
+      while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
         {
-          new_value[len-1] = '\0';
+          new_value[--len] = '\0';
         }
       lt_setenv (name, new_value);
       XFREE (new_value);
@@ -5082,27 +6460,47 @@ EOF
 # True if ARG is an import lib, as indicated by $file_magic_cmd
 func_win32_import_lib_p ()
 {
-    $opt_debug
+    $debug_cmd
+
     case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
     *import*) : ;;
     *) false ;;
     esac
 }
 
+# func_suncc_cstd_abi
+# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!!
+# Several compiler flags select an ABI that is incompatible with the
+# Cstd library. Avoid specifying it if any are in CXXFLAGS.
+func_suncc_cstd_abi ()
+{
+    $debug_cmd
+
+    case " $compile_command " in
+    *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*)
+      suncc_use_cstd_abi=no
+      ;;
+    *)
+      suncc_use_cstd_abi=yes
+      ;;
+    esac
+}
+
 # func_mode_link arg...
 func_mode_link ()
 {
-    $opt_debug
+    $debug_cmd
+
     case $host in
     *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
       # It is impossible to link a dll without this setting, and
       # we shouldn't force the makefile maintainer to figure out
-      # which system we are compiling for in order to pass an extra
+      # what system we are compiling for in order to pass an extra
       # flag for every libtool invocation.
       # allow_undefined=no
 
       # FIXME: Unfortunately, there are problems with the above when trying
-      # to make a dll which has undefined symbols, in which case not
+      # to make a dll that has undefined symbols, in which case not
       # even a static library is built.  For now, we need to specify
       # -no-undefined on the libtool link line when we can be certain
       # that all symbols are satisfied, otherwise we get a static library.
@@ -5146,10 +6544,11 @@ func_mode_link ()
     module=no
     no_install=no
     objs=
+    os2dllname=
     non_pic_objects=
     precious_files_regex=
     prefer_static_libs=no
-    preload=no
+    preload=false
     prev=
     prevarg=
     release=
@@ -5161,7 +6560,7 @@ func_mode_link ()
     vinfo=
     vinfo_number=no
     weak_libs=
-    single_module="${wl}-single_module"
+    single_module=$wl-single_module
     func_infer_tag $base_compile
 
     # We need to know -static, to get the right output filenames.
@@ -5169,15 +6568,15 @@ func_mode_link ()
     do
       case $arg in
       -shared)
-       test "$build_libtool_libs" != yes && \
-         func_fatal_configuration "can not build a shared library"
+       test yes != "$build_libtool_libs" \
+         && func_fatal_configuration "cannot build a shared library"
        build_old_libs=no
        break
        ;;
       -all-static | -static | -static-libtool-libs)
        case $arg in
        -all-static)
-         if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+         if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then
            func_warning "complete static linking is impossible in this configuration"
          fi
          if test -n "$link_static_flag"; then
@@ -5210,7 +6609,7 @@ func_mode_link ()
 
     # Go through the arguments, transforming them on the way.
     while test "$#" -gt 0; do
-      arg="$1"
+      arg=$1
       shift
       func_quote_for_eval "$arg"
       qarg=$func_quote_for_eval_unquoted_result
@@ -5227,21 +6626,21 @@ func_mode_link ()
 
        case $prev in
        bindir)
-         bindir="$arg"
+         bindir=$arg
          prev=
          continue
          ;;
        dlfiles|dlprefiles)
-         if test "$preload" = no; then
+         $preload || {
            # Add the symbol object into the linking commands.
            func_append compile_command " @SYMFILE@"
            func_append finalize_command " @SYMFILE@"
-           preload=yes
-         fi
+           preload=:
+         }
          case $arg in
          *.la | *.lo) ;;  # We handle these cases below.
          force)
-           if test "$dlself" = no; then
+           if test no = "$dlself"; then
              dlself=needless
              export_dynamic=yes
            fi
@@ -5249,9 +6648,9 @@ func_mode_link ()
            continue
            ;;
          self)
-           if test "$prev" = dlprefiles; then
+           if test dlprefiles = "$prev"; then
              dlself=yes
-           elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+           elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then
              dlself=yes
            else
              dlself=needless
@@ -5261,7 +6660,7 @@ func_mode_link ()
            continue
            ;;
          *)
-           if test "$prev" = dlfiles; then
+           if test dlfiles = "$prev"; then
              func_append dlfiles " $arg"
            else
              func_append dlprefiles " $arg"
@@ -5272,14 +6671,14 @@ func_mode_link ()
          esac
          ;;
        expsyms)
-         export_symbols="$arg"
+         export_symbols=$arg
          test -f "$arg" \
-           || func_fatal_error "symbol file \`$arg' does not exist"
+           || func_fatal_error "symbol file '$arg' does not exist"
          prev=
          continue
          ;;
        expsyms_regex)
-         export_symbols_regex="$arg"
+         export_symbols_regex=$arg
          prev=
          continue
          ;;
@@ -5297,7 +6696,13 @@ func_mode_link ()
          continue
          ;;
        inst_prefix)
-         inst_prefix_dir="$arg"
+         inst_prefix_dir=$arg
+         prev=
+         continue
+         ;;
+       mllvm)
+         # Clang does not use LLVM to link, so we can simply discard any
+         # '-mllvm $arg' options when doing the link step.
          prev=
          continue
          ;;
@@ -5321,21 +6726,21 @@ func_mode_link ()
 
                if test -z "$pic_object" ||
                   test -z "$non_pic_object" ||
-                  test "$pic_object" = none &&
-                  test "$non_pic_object" = none; then
-                 func_fatal_error "cannot find name of object for \`$arg'"
+                  test none = "$pic_object" &&
+                  test none = "$non_pic_object"; then
+                 func_fatal_error "cannot find name of object for '$arg'"
                fi
 
                # Extract subdirectory from the argument.
                func_dirname "$arg" "/" ""
-               xdir="$func_dirname_result"
+               xdir=$func_dirname_result
 
-               if test "$pic_object" != none; then
+               if test none != "$pic_object"; then
                  # Prepend the subdirectory the object is found in.
-                 pic_object="$xdir$pic_object"
+                 pic_object=$xdir$pic_object
 
-                 if test "$prev" = dlfiles; then
-                   if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+                 if test dlfiles = "$prev"; then
+                   if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
                      func_append dlfiles " $pic_object"
                      prev=
                      continue
@@ -5346,7 +6751,7 @@ func_mode_link ()
                  fi
 
                  # CHECK ME:  I think I busted this.  -Ossama
-                 if test "$prev" = dlprefiles; then
+                 if test dlprefiles = "$prev"; then
                    # Preload the old-style object.
                    func_append dlprefiles " $pic_object"
                    prev=
@@ -5354,23 +6759,23 @@ func_mode_link ()
 
                  # A PIC object.
                  func_append libobjs " $pic_object"
-                 arg="$pic_object"
+                 arg=$pic_object
                fi
 
                # Non-PIC object.
-               if test "$non_pic_object" != none; then
+               if test none != "$non_pic_object"; then
                  # Prepend the subdirectory the object is found in.
-                 non_pic_object="$xdir$non_pic_object"
+                 non_pic_object=$xdir$non_pic_object
 
                  # A standard non-PIC object
                  func_append non_pic_objects " $non_pic_object"
-                 if test -z "$pic_object" || test "$pic_object" = none ; then
-                   arg="$non_pic_object"
+                 if test -z "$pic_object" || test none = "$pic_object"; then
+                   arg=$non_pic_object
                  fi
                else
                  # If the PIC object exists, use it instead.
                  # $xdir was prepended to $pic_object above.
-                 non_pic_object="$pic_object"
+                 non_pic_object=$pic_object
                  func_append non_pic_objects " $non_pic_object"
                fi
              else
@@ -5378,7 +6783,7 @@ func_mode_link ()
                if $opt_dry_run; then
                  # Extract subdirectory from the argument.
                  func_dirname "$arg" "/" ""
-                 xdir="$func_dirname_result"
+                 xdir=$func_dirname_result
 
                  func_lo2o "$arg"
                  pic_object=$xdir$objdir/$func_lo2o_result
@@ -5386,24 +6791,29 @@ func_mode_link ()
                  func_append libobjs " $pic_object"
                  func_append non_pic_objects " $non_pic_object"
                else
-                 func_fatal_error "\`$arg' is not a valid libtool object"
+                 func_fatal_error "'$arg' is not a valid libtool object"
                fi
              fi
            done
          else
-           func_fatal_error "link input file \`$arg' does not exist"
+           func_fatal_error "link input file '$arg' does not exist"
          fi
          arg=$save_arg
          prev=
          continue
          ;;
+       os2dllname)
+         os2dllname=$arg
+         prev=
+         continue
+         ;;
        precious_regex)
-         precious_files_regex="$arg"
+         precious_files_regex=$arg
          prev=
          continue
          ;;
        release)
-         release="-$arg"
+         release=-$arg
          prev=
          continue
          ;;
@@ -5415,7 +6825,7 @@ func_mode_link ()
            func_fatal_error "only absolute run-paths are allowed"
            ;;
          esac
-         if test "$prev" = rpath; then
+         if test rpath = "$prev"; then
            case "$rpath " in
            *" $arg "*) ;;
            *) func_append rpath " $arg" ;;
@@ -5430,7 +6840,7 @@ func_mode_link ()
          continue
          ;;
        shrext)
-         shrext_cmds="$arg"
+         shrext_cmds=$arg
          prev=
          continue
          ;;
@@ -5470,7 +6880,7 @@ func_mode_link ()
        esac
       fi # test -n "$prev"
 
-      prevarg="$arg"
+      prevarg=$arg
 
       case $arg in
       -all-static)
@@ -5484,7 +6894,7 @@ func_mode_link ()
 
       -allow-undefined)
        # FIXME: remove this flag sometime in the future.
-       func_fatal_error "\`-allow-undefined' must not be used because it is the default"
+       func_fatal_error "'-allow-undefined' must not be used because it is the default"
        ;;
 
       -avoid-version)
@@ -5516,7 +6926,7 @@ func_mode_link ()
        if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
          func_fatal_error "more than one -exported-symbols argument is not allowed"
        fi
-       if test "X$arg" = "X-export-symbols"; then
+       if test X-export-symbols = "X$arg"; then
          prev=expsyms
        else
          prev=expsyms_regex
@@ -5550,9 +6960,9 @@ func_mode_link ()
        func_stripname "-L" '' "$arg"
        if test -z "$func_stripname_result"; then
          if test "$#" -gt 0; then
-           func_fatal_error "require no space between \`-L' and \`$1'"
+           func_fatal_error "require no space between '-L' and '$1'"
          else
-           func_fatal_error "need path for \`-L' option"
+           func_fatal_error "need path for '-L' option"
          fi
        fi
        func_resolve_sysroot "$func_stripname_result"
@@ -5563,8 +6973,8 @@ func_mode_link ()
        *)
          absdir=`cd "$dir" && pwd`
          test -z "$absdir" && \
-           func_fatal_error "cannot determine absolute directory name of \`$dir'"
-         dir="$absdir"
+           func_fatal_error "cannot determine absolute directory name of '$dir'"
+         dir=$absdir
          ;;
        esac
        case "$deplibs " in
@@ -5599,7 +7009,7 @@ func_mode_link ()
        ;;
 
       -l*)
-       if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+       if test X-lc = "X$arg" || test X-lm = "X$arg"; then
          case $host in
          *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
            # These systems don't actually have a C or math library (as such)
@@ -5607,11 +7017,11 @@ func_mode_link ()
            ;;
          *-*-os2*)
            # These systems don't actually have a C library (as such)
-           test "X$arg" = "X-lc" && continue
+           test X-lc = "X$arg" && continue
            ;;
-         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
            # Do not include libc due to us having libc/libc_r.
-           test "X$arg" = "X-lc" && continue
+           test X-lc = "X$arg" && continue
            ;;
          *-*-rhapsody* | *-*-darwin1.[012])
            # Rhapsody C and math libraries are in the System framework
@@ -5620,16 +7030,16 @@ func_mode_link ()
            ;;
          *-*-sco3.2v5* | *-*-sco5v6*)
            # Causes problems with __ctype
-           test "X$arg" = "X-lc" && continue
+           test X-lc = "X$arg" && continue
            ;;
          *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
            # Compiler inserts libc in the correct place for threads to work
-           test "X$arg" = "X-lc" && continue
+           test X-lc = "X$arg" && continue
            ;;
          esac
-       elif test "X$arg" = "X-lc_r"; then
+       elif test X-lc_r = "X$arg"; then
         case $host in
-        *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+        *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
           # Do not include libc_r directly, use -pthread flag.
           continue
           ;;
@@ -5639,6 +7049,11 @@ func_mode_link ()
        continue
        ;;
 
+      -mllvm)
+       prev=mllvm
+       continue
+       ;;
+
       -module)
        module=yes
        continue
@@ -5668,7 +7083,7 @@ func_mode_link ()
        ;;
 
       -multi_module)
-       single_module="${wl}-multi_module"
+       single_module=$wl-multi_module
        continue
        ;;
 
@@ -5682,8 +7097,8 @@ func_mode_link ()
        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
          # The PATH hackery in wrapper scripts is required on Windows
          # and Darwin in order for the loader to find any dlls it needs.
-         func_warning "\`-no-install' is ignored for $host"
-         func_warning "assuming \`-no-fast-install' instead"
+         func_warning "'-no-install' is ignored for $host"
+         func_warning "assuming '-no-fast-install' instead"
          fast_install=no
          ;;
        *) no_install=yes ;;
@@ -5701,6 +7116,11 @@ func_mode_link ()
        continue
        ;;
 
+      -os2dllname)
+       prev=os2dllname
+       continue
+       ;;
+
       -o) prev=output ;;
 
       -precious-files-regex)
@@ -5788,14 +7208,14 @@ func_mode_link ()
        func_stripname '-Wc,' '' "$arg"
        args=$func_stripname_result
        arg=
-       save_ifs="$IFS"; IFS=','
+       save_ifs=$IFS; IFS=,
        for flag in $args; do
-         IFS="$save_ifs"
+         IFS=$save_ifs
           func_quote_for_eval "$flag"
          func_append arg " $func_quote_for_eval_result"
          func_append compiler_flags " $func_quote_for_eval_result"
        done
-       IFS="$save_ifs"
+       IFS=$save_ifs
        func_stripname ' ' '' "$arg"
        arg=$func_stripname_result
        ;;
@@ -5804,15 +7224,15 @@ func_mode_link ()
        func_stripname '-Wl,' '' "$arg"
        args=$func_stripname_result
        arg=
-       save_ifs="$IFS"; IFS=','
+       save_ifs=$IFS; IFS=,
        for flag in $args; do
-         IFS="$save_ifs"
+         IFS=$save_ifs
           func_quote_for_eval "$flag"
          func_append arg " $wl$func_quote_for_eval_result"
          func_append compiler_flags " $wl$func_quote_for_eval_result"
          func_append linker_flags " $func_quote_for_eval_result"
        done
-       IFS="$save_ifs"
+       IFS=$save_ifs
        func_stripname ' ' '' "$arg"
        arg=$func_stripname_result
        ;;
@@ -5835,7 +7255,7 @@ func_mode_link ()
       # -msg_* for osf cc
       -msg_*)
        func_quote_for_eval "$arg"
-       arg="$func_quote_for_eval_result"
+       arg=$func_quote_for_eval_result
        ;;
 
       # Flags to be passed through unchanged, with rationale:
@@ -5847,25 +7267,46 @@ func_mode_link ()
       # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
       # -F/path              path to uninstalled frameworks, gcc on darwin
       # -p, -pg, --coverage, -fprofile-*  profiling flags for GCC
+      # -fstack-protector*   stack protector flags for GCC
       # @file                GCC response files
       # -tp=*                Portland pgcc target processor selection
       # --sysroot=*          for sysroot support
-      # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+      # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+      # -stdlib=*            select c++ std lib with clang
       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
-      -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
+      -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
         func_quote_for_eval "$arg"
-       arg="$func_quote_for_eval_result"
+       arg=$func_quote_for_eval_result
         func_append compile_command " $arg"
         func_append finalize_command " $arg"
         func_append compiler_flags " $arg"
         continue
         ;;
 
+      -Z*)
+        if test os2 = "`expr $host : '.*\(os2\)'`"; then
+          # OS/2 uses -Zxxx to specify OS/2-specific options
+         compiler_flags="$compiler_flags $arg"
+         func_append compile_command " $arg"
+         func_append finalize_command " $arg"
+         case $arg in
+         -Zlinker | -Zstack)
+           prev=xcompiler
+           ;;
+         esac
+         continue
+        else
+         # Otherwise treat like 'Some other compiler flag' below
+         func_quote_for_eval "$arg"
+         arg=$func_quote_for_eval_result
+        fi
+       ;;
+
       # Some other compiler flag.
       -* | +*)
         func_quote_for_eval "$arg"
-       arg="$func_quote_for_eval_result"
+       arg=$func_quote_for_eval_result
        ;;
 
       *.$objext)
@@ -5886,21 +7327,21 @@ func_mode_link ()
 
          if test -z "$pic_object" ||
             test -z "$non_pic_object" ||
-            test "$pic_object" = none &&
-            test "$non_pic_object" = none; then
-           func_fatal_error "cannot find name of object for \`$arg'"
+            test none = "$pic_object" &&
+            test none = "$non_pic_object"; then
+           func_fatal_error "cannot find name of object for '$arg'"
          fi
 
          # Extract subdirectory from the argument.
          func_dirname "$arg" "/" ""
-         xdir="$func_dirname_result"
+         xdir=$func_dirname_result
 
-         if test "$pic_object" != none; then
+         test none = "$pic_object" || {
            # Prepend the subdirectory the object is found in.
-           pic_object="$xdir$pic_object"
+           pic_object=$xdir$pic_object
 
-           if test "$prev" = dlfiles; then
-             if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+           if test dlfiles = "$prev"; then
+             if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
                func_append dlfiles " $pic_object"
                prev=
                continue
@@ -5911,7 +7352,7 @@ func_mode_link ()
            fi
 
            # CHECK ME:  I think I busted this.  -Ossama
-           if test "$prev" = dlprefiles; then
+           if test dlprefiles = "$prev"; then
              # Preload the old-style object.
              func_append dlprefiles " $pic_object"
              prev=
@@ -5919,23 +7360,23 @@ func_mode_link ()
 
            # A PIC object.
            func_append libobjs " $pic_object"
-           arg="$pic_object"
-         fi
+           arg=$pic_object
+         }
 
          # Non-PIC object.
-         if test "$non_pic_object" != none; then
+         if test none != "$non_pic_object"; then
            # Prepend the subdirectory the object is found in.
-           non_pic_object="$xdir$non_pic_object"
+           non_pic_object=$xdir$non_pic_object
 
            # A standard non-PIC object
            func_append non_pic_objects " $non_pic_object"
-           if test -z "$pic_object" || test "$pic_object" = none ; then
-             arg="$non_pic_object"
+           if test -z "$pic_object" || test none = "$pic_object"; then
+             arg=$non_pic_object
            fi
          else
            # If the PIC object exists, use it instead.
            # $xdir was prepended to $pic_object above.
-           non_pic_object="$pic_object"
+           non_pic_object=$pic_object
            func_append non_pic_objects " $non_pic_object"
          fi
        else
@@ -5943,7 +7384,7 @@ func_mode_link ()
          if $opt_dry_run; then
            # Extract subdirectory from the argument.
            func_dirname "$arg" "/" ""
-           xdir="$func_dirname_result"
+           xdir=$func_dirname_result
 
            func_lo2o "$arg"
            pic_object=$xdir$objdir/$func_lo2o_result
@@ -5951,7 +7392,7 @@ func_mode_link ()
            func_append libobjs " $pic_object"
            func_append non_pic_objects " $non_pic_object"
          else
-           func_fatal_error "\`$arg' is not a valid libtool object"
+           func_fatal_error "'$arg' is not a valid libtool object"
          fi
        fi
        ;;
@@ -5967,11 +7408,11 @@ func_mode_link ()
        # A libtool-controlled library.
 
        func_resolve_sysroot "$arg"
-       if test "$prev" = dlfiles; then
+       if test dlfiles = "$prev"; then
          # This library was specified with -dlopen.
          func_append dlfiles " $func_resolve_sysroot_result"
          prev=
-       elif test "$prev" = dlprefiles; then
+       elif test dlprefiles = "$prev"; then
          # The library was specified with -dlpreopen.
          func_append dlprefiles " $func_resolve_sysroot_result"
          prev=
@@ -5986,7 +7427,7 @@ func_mode_link ()
        # Unknown arguments in both finalize_command and compile_command need
        # to be aesthetically quoted because they are evaled later.
        func_quote_for_eval "$arg"
-       arg="$func_quote_for_eval_result"
+       arg=$func_quote_for_eval_result
        ;;
       esac # arg
 
@@ -5998,9 +7439,9 @@ func_mode_link ()
     done # argument parsing loop
 
     test -n "$prev" && \
-      func_fatal_help "the \`$prevarg' option requires an argument"
+      func_fatal_help "the '$prevarg' option requires an argument"
 
-    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+    if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then
       eval arg=\"$export_dynamic_flag_spec\"
       func_append compile_command " $arg"
       func_append finalize_command " $arg"
@@ -6009,20 +7450,23 @@ func_mode_link ()
     oldlibs=
     # calculate the name of the file, without its directory
     func_basename "$output"
-    outputname="$func_basename_result"
-    libobjs_save="$libobjs"
+    outputname=$func_basename_result
+    libobjs_save=$libobjs
 
     if test -n "$shlibpath_var"; then
       # get the directories listed in $shlibpath_var
-      eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
+      eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\`
     else
       shlib_search_path=
     fi
     eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
     eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
 
+    # Definition is injected by LT_CONFIG during libtool generation.
+    func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH"
+
     func_dirname "$output" "/" ""
-    output_objdir="$func_dirname_result$objdir"
+    output_objdir=$func_dirname_result$objdir
     func_to_tool_file "$output_objdir/"
     tool_output_objdir=$func_to_tool_file_result
     # Create the object directory.
@@ -6045,7 +7489,7 @@ func_mode_link ()
     # Find all interdependent deplibs by searching for libraries
     # that are linked more than once (e.g. -la -lb -la)
     for deplib in $deplibs; do
-      if $opt_preserve_dup_deps ; then
+      if $opt_preserve_dup_deps; then
        case "$libs " in
        *" $deplib "*) func_append specialdeplibs " $deplib" ;;
        esac
@@ -6053,7 +7497,7 @@ func_mode_link ()
       func_append libs " $deplib"
     done
 
-    if test "$linkmode" = lib; then
+    if test lib = "$linkmode"; then
       libs="$predeps $libs $compiler_lib_search_path $postdeps"
 
       # Compute libraries that are listed more than once in $predeps
@@ -6085,7 +7529,7 @@ func_mode_link ()
          case $file in
          *.la) ;;
          *)
-           func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
+           func_fatal_help "libraries can '-dlopen' only libtool libraries: $file"
            ;;
          esac
        done
@@ -6093,7 +7537,7 @@ func_mode_link ()
     prog)
        compile_deplibs=
        finalize_deplibs=
-       alldeplibs=no
+       alldeplibs=false
        newdlfiles=
        newdlprefiles=
        passes="conv scan dlopen dlpreopen link"
@@ -6105,29 +7549,29 @@ func_mode_link ()
     for pass in $passes; do
       # The preopen pass in lib mode reverses $deplibs; put it back here
       # so that -L comes before libs that need it for instance...
-      if test "$linkmode,$pass" = "lib,link"; then
+      if test lib,link = "$linkmode,$pass"; then
        ## FIXME: Find the place where the list is rebuilt in the wrong
        ##        order, and fix it there properly
         tmp_deplibs=
        for deplib in $deplibs; do
          tmp_deplibs="$deplib $tmp_deplibs"
        done
-       deplibs="$tmp_deplibs"
+       deplibs=$tmp_deplibs
       fi
 
-      if test "$linkmode,$pass" = "lib,link" ||
-        test "$linkmode,$pass" = "prog,scan"; then
-       libs="$deplibs"
+      if test lib,link = "$linkmode,$pass" ||
+        test prog,scan = "$linkmode,$pass"; then
+       libs=$deplibs
        deplibs=
       fi
-      if test "$linkmode" = prog; then
+      if test prog = "$linkmode"; then
        case $pass in
-       dlopen) libs="$dlfiles" ;;
-       dlpreopen) libs="$dlprefiles" ;;
+       dlopen) libs=$dlfiles ;;
+       dlpreopen) libs=$dlprefiles ;;
        link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
        esac
       fi
-      if test "$linkmode,$pass" = "lib,dlpreopen"; then
+      if test lib,dlpreopen = "$linkmode,$pass"; then
        # Collect and forward deplibs of preopened libtool libs
        for lib in $dlprefiles; do
          # Ignore non-libtool-libs
@@ -6148,26 +7592,26 @@ func_mode_link ()
            esac
          done
        done
-       libs="$dlprefiles"
+       libs=$dlprefiles
       fi
-      if test "$pass" = dlopen; then
+      if test dlopen = "$pass"; then
        # Collect dlpreopened libraries
-       save_deplibs="$deplibs"
+       save_deplibs=$deplibs
        deplibs=
       fi
 
       for deplib in $libs; do
        lib=
-       found=no
+       found=false
        case $deplib in
        -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
         |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
-         if test "$linkmode,$pass" = "prog,link"; then
+         if test prog,link = "$linkmode,$pass"; then
            compile_deplibs="$deplib $compile_deplibs"
            finalize_deplibs="$deplib $finalize_deplibs"
          else
            func_append compiler_flags " $deplib"
-           if test "$linkmode" = lib ; then
+           if test lib = "$linkmode"; then
                case "$new_inherited_linker_flags " in
                    *" $deplib "*) ;;
                    * ) func_append new_inherited_linker_flags " $deplib" ;;
@@ -6177,13 +7621,13 @@ func_mode_link ()
          continue
          ;;
        -l*)
-         if test "$linkmode" != lib && test "$linkmode" != prog; then
-           func_warning "\`-l' is ignored for archives/objects"
+         if test lib != "$linkmode" && test prog != "$linkmode"; then
+           func_warning "'-l' is ignored for archives/objects"
            continue
          fi
          func_stripname '-l' '' "$deplib"
          name=$func_stripname_result
-         if test "$linkmode" = lib; then
+         if test lib = "$linkmode"; then
            searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
          else
            searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
@@ -6191,31 +7635,22 @@ func_mode_link ()
          for searchdir in $searchdirs; do
            for search_ext in .la $std_shrext .so .a; do
              # Search the libtool library
-             lib="$searchdir/lib${name}${search_ext}"
+             lib=$searchdir/lib$name$search_ext
              if test -f "$lib"; then
-               if test "$search_ext" = ".la"; then
-                 found=yes
+               if test .la = "$search_ext"; then
+                 found=:
                else
-                 found=no
+                 found=false
                fi
                break 2
              fi
            done
          done
-         if test "$found" != yes; then
-           # deplib doesn't seem to be a libtool library
-           if test "$linkmode,$pass" = "prog,link"; then
-             compile_deplibs="$deplib $compile_deplibs"
-             finalize_deplibs="$deplib $finalize_deplibs"
-           else
-             deplibs="$deplib $deplibs"
-             test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
-           fi
-           continue
-         else # deplib is a libtool library
+         if $found; then
+           # deplib is a libtool library
            # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
            # We need to do some special things here, and not later.
-           if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+           if test yes = "$allow_libtool_libs_with_static_runtimes"; then
              case " $predeps $postdeps " in
              *" $deplib "*)
                if func_lalib_p "$lib"; then
@@ -6223,19 +7658,19 @@ func_mode_link ()
                  old_library=
                  func_source "$lib"
                  for l in $old_library $library_names; do
-                   ll="$l"
+                   ll=$l
                  done
-                 if test "X$ll" = "X$old_library" ; then # only static version available
-                   found=no
+                 if test "X$ll" = "X$old_library"; then # only static version available
+                   found=false
                    func_dirname "$lib" "" "."
-                   ladir="$func_dirname_result"
+                   ladir=$func_dirname_result
                    lib=$ladir/$old_library
-                   if test "$linkmode,$pass" = "prog,link"; then
+                   if test prog,link = "$linkmode,$pass"; then
                      compile_deplibs="$deplib $compile_deplibs"
                      finalize_deplibs="$deplib $finalize_deplibs"
                    else
                      deplibs="$deplib $deplibs"
-                     test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+                     test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
                    fi
                    continue
                  fi
@@ -6244,15 +7679,25 @@ func_mode_link ()
              *) ;;
              esac
            fi
+         else
+           # deplib doesn't seem to be a libtool library
+           if test prog,link = "$linkmode,$pass"; then
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
+           else
+             deplibs="$deplib $deplibs"
+             test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
+           fi
+           continue
          fi
          ;; # -l
        *.ltframework)
-         if test "$linkmode,$pass" = "prog,link"; then
+         if test prog,link = "$linkmode,$pass"; then
            compile_deplibs="$deplib $compile_deplibs"
            finalize_deplibs="$deplib $finalize_deplibs"
          else
            deplibs="$deplib $deplibs"
-           if test "$linkmode" = lib ; then
+           if test lib = "$linkmode"; then
                case "$new_inherited_linker_flags " in
                    *" $deplib "*) ;;
                    * ) func_append new_inherited_linker_flags " $deplib" ;;
@@ -6265,18 +7710,18 @@ func_mode_link ()
          case $linkmode in
          lib)
            deplibs="$deplib $deplibs"
-           test "$pass" = conv && continue
+           test conv = "$pass" && continue
            newdependency_libs="$deplib $newdependency_libs"
            func_stripname '-L' '' "$deplib"
            func_resolve_sysroot "$func_stripname_result"
            func_append newlib_search_path " $func_resolve_sysroot_result"
            ;;
          prog)
-           if test "$pass" = conv; then
+           if test conv = "$pass"; then
              deplibs="$deplib $deplibs"
              continue
            fi
-           if test "$pass" = scan; then
+           if test scan = "$pass"; then
              deplibs="$deplib $deplibs"
            else
              compile_deplibs="$deplib $compile_deplibs"
@@ -6287,13 +7732,13 @@ func_mode_link ()
            func_append newlib_search_path " $func_resolve_sysroot_result"
            ;;
          *)
-           func_warning "\`-L' is ignored for archives/objects"
+           func_warning "'-L' is ignored for archives/objects"
            ;;
          esac # linkmode
          continue
          ;; # -L
        -R*)
-         if test "$pass" = link; then
+         if test link = "$pass"; then
            func_stripname '-R' '' "$deplib"
            func_resolve_sysroot "$func_stripname_result"
            dir=$func_resolve_sysroot_result
@@ -6311,7 +7756,7 @@ func_mode_link ()
          lib=$func_resolve_sysroot_result
          ;;
        *.$libext)
-         if test "$pass" = conv; then
+         if test conv = "$pass"; then
            deplibs="$deplib $deplibs"
            continue
          fi
@@ -6322,21 +7767,26 @@ func_mode_link ()
            case " $dlpreconveniencelibs " in
            *" $deplib "*) ;;
            *)
-             valid_a_lib=no
+             valid_a_lib=false
              case $deplibs_check_method in
                match_pattern*)
                  set dummy $deplibs_check_method; shift
                  match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
                  if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
                    | $EGREP "$match_pattern_regex" > /dev/null; then
-                   valid_a_lib=yes
+                   valid_a_lib=:
                  fi
                ;;
                pass_all)
-                 valid_a_lib=yes
+                 valid_a_lib=:
                ;;
              esac
-             if test "$valid_a_lib" != yes; then
+             if $valid_a_lib; then
+               echo
+               $ECHO "*** Warning: Linking the shared library $output against the"
+               $ECHO "*** static library $deplib is not portable!"
+               deplibs="$deplib $deplibs"
+             else
                echo
                $ECHO "*** Warning: Trying to link with static lib archive $deplib."
                echo "*** I have the capability to make that library automatically link in when"
@@ -6344,18 +7794,13 @@ func_mode_link ()
                echo "*** shared version of the library, which you do not appear to have"
                echo "*** because the file extensions .$libext of this argument makes me believe"
                echo "*** that it is just a static archive that I should not use here."
-             else
-               echo
-               $ECHO "*** Warning: Linking the shared library $output against the"
-               $ECHO "*** static library $deplib is not portable!"
-               deplibs="$deplib $deplibs"
              fi
              ;;
            esac
            continue
            ;;
          prog)
-           if test "$pass" != link; then
+           if test link != "$pass"; then
              deplibs="$deplib $deplibs"
            else
              compile_deplibs="$deplib $compile_deplibs"
@@ -6366,10 +7811,10 @@ func_mode_link ()
          esac # linkmode
          ;; # *.$libext
        *.lo | *.$objext)
-         if test "$pass" = conv; then
+         if test conv = "$pass"; then
            deplibs="$deplib $deplibs"
-         elif test "$linkmode" = prog; then
-           if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+         elif test prog = "$linkmode"; then
+           if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then
              # If there is no dlopen support or we're linking statically,
              # we need to preload.
              func_append newdlprefiles " $deplib"
@@ -6382,22 +7827,20 @@ func_mode_link ()
          continue
          ;;
        %DEPLIBS%)
-         alldeplibs=yes
+         alldeplibs=:
          continue
          ;;
        esac # case $deplib
 
-       if test "$found" = yes || test -f "$lib"; then :
-       else
-         func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
-       fi
+       $found || test -f "$lib" \
+         || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'"
 
        # Check to see that this really is a libtool archive.
        func_lalib_unsafe_p "$lib" \
-         || func_fatal_error "\`$lib' is not a valid libtool archive"
+         || func_fatal_error "'$lib' is not a valid libtool archive"
 
        func_dirname "$lib" "" "."
-       ladir="$func_dirname_result"
+       ladir=$func_dirname_result
 
        dlname=
        dlopen=
@@ -6427,30 +7870,30 @@ func_mode_link ()
          done
        fi
        dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
-       if test "$linkmode,$pass" = "lib,link" ||
-          test "$linkmode,$pass" = "prog,scan" ||
-          { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+       if test lib,link = "$linkmode,$pass" ||
+          test prog,scan = "$linkmode,$pass" ||
+          { test prog != "$linkmode" && test lib != "$linkmode"; }; then
          test -n "$dlopen" && func_append dlfiles " $dlopen"
          test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
        fi
 
-       if test "$pass" = conv; then
+       if test conv = "$pass"; then
          # Only check for convenience libraries
          deplibs="$lib $deplibs"
          if test -z "$libdir"; then
            if test -z "$old_library"; then
-             func_fatal_error "cannot find name of link library for \`$lib'"
+             func_fatal_error "cannot find name of link library for '$lib'"
            fi
            # It is a libtool convenience library, so add in its objects.
            func_append convenience " $ladir/$objdir/$old_library"
            func_append old_convenience " $ladir/$objdir/$old_library"
-         elif test "$linkmode" != prog && test "$linkmode" != lib; then
-           func_fatal_error "\`$lib' is not a convenience library"
+         elif test prog != "$linkmode" && test lib != "$linkmode"; then
+           func_fatal_error "'$lib' is not a convenience library"
          fi
          tmp_libs=
          for deplib in $dependency_libs; do
            deplibs="$deplib $deplibs"
-           if $opt_preserve_dup_deps ; then
+           if $opt_preserve_dup_deps; then
              case "$tmp_libs " in
              *" $deplib "*) func_append specialdeplibs " $deplib" ;;
              esac
@@ -6464,26 +7907,26 @@ func_mode_link ()
        # Get the name of the library we link against.
        linklib=
        if test -n "$old_library" &&
-          { test "$prefer_static_libs" = yes ||
-            test "$prefer_static_libs,$installed" = "built,no"; }; then
+          { test yes = "$prefer_static_libs" ||
+            test built,no = "$prefer_static_libs,$installed"; }; then
          linklib=$old_library
        else
          for l in $old_library $library_names; do
-           linklib="$l"
+           linklib=$l
          done
        fi
        if test -z "$linklib"; then
-         func_fatal_error "cannot find name of link library for \`$lib'"
+         func_fatal_error "cannot find name of link library for '$lib'"
        fi
 
        # This library was specified with -dlopen.
-       if test "$pass" = dlopen; then
-         if test -z "$libdir"; then
-           func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
-         fi
+       if test dlopen = "$pass"; then
+         test -z "$libdir" \
+           && func_fatal_error "cannot -dlopen a convenience library: '$lib'"
          if test -z "$dlname" ||
-            test "$dlopen_support" != yes ||
-            test "$build_libtool_libs" = no; then
+            test yes != "$dlopen_support" ||
+            test no = "$build_libtool_libs"
+         then
            # If there is no dlname, no dlopen support or we're linking
            # statically, we need to preload.  We also need to preload any
            # dependent libraries so libltdl's deplib preloader doesn't
@@ -6497,40 +7940,40 @@ func_mode_link ()
 
        # We need an absolute path.
        case $ladir in
-       [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+       [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;;
        *)
          abs_ladir=`cd "$ladir" && pwd`
          if test -z "$abs_ladir"; then
-           func_warning "cannot determine absolute directory name of \`$ladir'"
+           func_warning "cannot determine absolute directory name of '$ladir'"
            func_warning "passing it literally to the linker, although it might fail"
-           abs_ladir="$ladir"
+           abs_ladir=$ladir
          fi
          ;;
        esac
        func_basename "$lib"
-       laname="$func_basename_result"
+       laname=$func_basename_result
 
        # Find the relevant object directory and library name.
-       if test "X$installed" = Xyes; then
+       if test yes = "$installed"; then
          if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
-           func_warning "library \`$lib' was moved."
-           dir="$ladir"
-           absdir="$abs_ladir"
-           libdir="$abs_ladir"
+           func_warning "library '$lib' was moved."
+           dir=$ladir
+           absdir=$abs_ladir
+           libdir=$abs_ladir
          else
-           dir="$lt_sysroot$libdir"
-           absdir="$lt_sysroot$libdir"
+           dir=$lt_sysroot$libdir
+           absdir=$lt_sysroot$libdir
          fi
-         test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+         test yes = "$hardcode_automatic" && avoidtemprpath=yes
        else
          if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
-           dir="$ladir"
-           absdir="$abs_ladir"
+           dir=$ladir
+           absdir=$abs_ladir
            # Remove this search path later
            func_append notinst_path " $abs_ladir"
          else
-           dir="$ladir/$objdir"
-           absdir="$abs_ladir/$objdir"
+           dir=$ladir/$objdir
+           absdir=$abs_ladir/$objdir
            # Remove this search path later
            func_append notinst_path " $abs_ladir"
          fi
@@ -6539,11 +7982,11 @@ func_mode_link ()
        name=$func_stripname_result
 
        # This library was specified with -dlpreopen.
-       if test "$pass" = dlpreopen; then
-         if test -z "$libdir" && test "$linkmode" = prog; then
-           func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
+       if test dlpreopen = "$pass"; then
+         if test -z "$libdir" && test prog = "$linkmode"; then
+           func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'"
          fi
-         case "$host" in
+         case $host in
            # special handling for platforms with PE-DLLs.
            *cygwin* | *mingw* | *cegcc* )
              # Linker will automatically link against shared library if both
@@ -6587,9 +8030,9 @@ func_mode_link ()
 
        if test -z "$libdir"; then
          # Link the convenience library
-         if test "$linkmode" = lib; then
+         if test lib = "$linkmode"; then
            deplibs="$dir/$old_library $deplibs"
-         elif test "$linkmode,$pass" = "prog,link"; then
+         elif test prog,link = "$linkmode,$pass"; then
            compile_deplibs="$dir/$old_library $compile_deplibs"
            finalize_deplibs="$dir/$old_library $finalize_deplibs"
          else
@@ -6599,14 +8042,14 @@ func_mode_link ()
        fi
 
 
-       if test "$linkmode" = prog && test "$pass" != link; then
+       if test prog = "$linkmode" && test link != "$pass"; then
          func_append newlib_search_path " $ladir"
          deplibs="$lib $deplibs"
 
-         linkalldeplibs=no
-         if test "$link_all_deplibs" != no || test -z "$library_names" ||
-            test "$build_libtool_libs" = no; then
-           linkalldeplibs=yes
+         linkalldeplibs=false
+         if test no != "$link_all_deplibs" || test -z "$library_names" ||
+            test no = "$build_libtool_libs"; then
+           linkalldeplibs=:
          fi
 
          tmp_libs=
@@ -6618,14 +8061,14 @@ func_mode_link ()
                 ;;
            esac
            # Need to link against all dependency_libs?
-           if test "$linkalldeplibs" = yes; then
+           if $linkalldeplibs; then
              deplibs="$deplib $deplibs"
            else
              # Need to hardcode shared library paths
              # or/and link against static libraries
              newdependency_libs="$deplib $newdependency_libs"
            fi
-           if $opt_preserve_dup_deps ; then
+           if $opt_preserve_dup_deps; then
              case "$tmp_libs " in
              *" $deplib "*) func_append specialdeplibs " $deplib" ;;
              esac
@@ -6635,15 +8078,15 @@ func_mode_link ()
          continue
        fi # $linkmode = prog...
 
-       if test "$linkmode,$pass" = "prog,link"; then
+       if test prog,link = "$linkmode,$pass"; then
          if test -n "$library_names" &&
-            { { test "$prefer_static_libs" = no ||
-                test "$prefer_static_libs,$installed" = "built,yes"; } ||
+            { { test no = "$prefer_static_libs" ||
+                test built,yes = "$prefer_static_libs,$installed"; } ||
               test -z "$old_library"; }; then
            # We need to hardcode the library path
-           if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+           if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then
              # Make sure the rpath contains only unique directories.
-             case "$temp_rpath:" in
+             case $temp_rpath: in
              *"$absdir:"*) ;;
              *) func_append temp_rpath "$absdir:" ;;
              esac
@@ -6672,9 +8115,9 @@ func_mode_link ()
            esac
          fi # $linkmode,$pass = prog,link...
 
-         if test "$alldeplibs" = yes &&
-            { test "$deplibs_check_method" = pass_all ||
-              { test "$build_libtool_libs" = yes &&
+         if $alldeplibs &&
+            { test pass_all = "$deplibs_check_method" ||
+              { test yes = "$build_libtool_libs" &&
                 test -n "$library_names"; }; }; then
            # We only need to search for static libraries
            continue
@@ -6683,19 +8126,19 @@ func_mode_link ()
 
        link_static=no # Whether the deplib will be linked statically
        use_static_libs=$prefer_static_libs
-       if test "$use_static_libs" = built && test "$installed" = yes; then
+       if test built = "$use_static_libs" && test yes = "$installed"; then
          use_static_libs=no
        fi
        if test -n "$library_names" &&
-          { test "$use_static_libs" = no || test -z "$old_library"; }; then
+          { test no = "$use_static_libs" || test -z "$old_library"; }; then
          case $host in
-         *cygwin* | *mingw* | *cegcc*)
+         *cygwin* | *mingw* | *cegcc* | *os2*)
              # No point in relinking DLLs because paths are not encoded
              func_append notinst_deplibs " $lib"
              need_relink=no
            ;;
          *)
-           if test "$installed" = no; then
+           if test no = "$installed"; then
              func_append notinst_deplibs " $lib"
              need_relink=yes
            fi
@@ -6705,24 +8148,24 @@ func_mode_link ()
 
          # Warn about portability, can't link against -module's on some
          # systems (darwin).  Don't bleat about dlopened modules though!
-         dlopenmodule=""
+         dlopenmodule=
          for dlpremoduletest in $dlprefiles; do
            if test "X$dlpremoduletest" = "X$lib"; then
-             dlopenmodule="$dlpremoduletest"
+             dlopenmodule=$dlpremoduletest
              break
            fi
          done
-         if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
+         if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then
            echo
-           if test "$linkmode" = prog; then
+           if test prog = "$linkmode"; then
              $ECHO "*** Warning: Linking the executable $output against the loadable module"
            else
              $ECHO "*** Warning: Linking the shared library $output against the loadable module"
            fi
            $ECHO "*** $linklib is not portable!"
          fi
-         if test "$linkmode" = lib &&
-            test "$hardcode_into_libs" = yes; then
+         if test lib = "$linkmode" &&
+            test yes = "$hardcode_into_libs"; then
            # Hardcode the library path.
            # Skip directories that are in the system default run-time
            # search path.
@@ -6750,43 +8193,43 @@ func_mode_link ()
            # figure out the soname
            set dummy $library_names
            shift
-           realname="$1"
+           realname=$1
            shift
            libname=`eval "\\$ECHO \"$libname_spec\""`
            # use dlname if we got it. it's perfectly good, no?
            if test -n "$dlname"; then
-             soname="$dlname"
+             soname=$dlname
            elif test -n "$soname_spec"; then
              # bleh windows
              case $host in
-             *cygwin* | mingw* | *cegcc*)
+             *cygwin* | mingw* | *cegcc* | *os2*)
                func_arith $current - $age
                major=$func_arith_result
-               versuffix="-$major"
+               versuffix=-$major
                ;;
              esac
              eval soname=\"$soname_spec\"
            else
-             soname="$realname"
+             soname=$realname
            fi
 
            # Make a new name for the extract_expsyms_cmds to use
-           soroot="$soname"
+           soroot=$soname
            func_basename "$soroot"
-           soname="$func_basename_result"
+           soname=$func_basename_result
            func_stripname 'lib' '.dll' "$soname"
            newlib=libimp-$func_stripname_result.a
 
            # If the library has no export list, then create one now
            if test -f "$output_objdir/$soname-def"; then :
            else
-             func_verbose "extracting exported symbol list from \`$soname'"
+             func_verbose "extracting exported symbol list from '$soname'"
              func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
            fi
 
            # Create $newlib
            if test -f "$output_objdir/$newlib"; then :; else
-             func_verbose "generating import library for \`$soname'"
+             func_verbose "generating import library for '$soname'"
              func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
            fi
            # make sure the library variables are pointing to the new library
@@ -6794,58 +8237,58 @@ func_mode_link ()
            linklib=$newlib
          fi # test -n "$old_archive_from_expsyms_cmds"
 
-         if test "$linkmode" = prog || test "$opt_mode" != relink; then
+         if test prog = "$linkmode" || test relink != "$opt_mode"; then
            add_shlibpath=
            add_dir=
            add=
            lib_linked=yes
            case $hardcode_action in
            immediate | unsupported)
-             if test "$hardcode_direct" = no; then
-               add="$dir/$linklib"
+             if test no = "$hardcode_direct"; then
+               add=$dir/$linklib
                case $host in
-                 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
-                 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+                 *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;;
+                 *-*-sysv4*uw2*) add_dir=-L$dir ;;
                  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
-                   *-*-unixware7*) add_dir="-L$dir" ;;
+                   *-*-unixware7*) add_dir=-L$dir ;;
                  *-*-darwin* )
-                   # if the lib is a (non-dlopened) module then we can not
+                   # if the lib is a (non-dlopened) module then we cannot
                    # link against it, someone is ignoring the earlier warnings
                    if /usr/bin/file -L $add 2> /dev/null |
-                        $GREP ": [^:]* bundle" >/dev/null ; then
+                        $GREP ": [^:]* bundle" >/dev/null; then
                      if test "X$dlopenmodule" != "X$lib"; then
                        $ECHO "*** Warning: lib $linklib is a module, not a shared library"
-                       if test -z "$old_library" ; then
+                       if test -z "$old_library"; then
                          echo
                          echo "*** And there doesn't seem to be a static archive available"
                          echo "*** The link will probably fail, sorry"
                        else
-                         add="$dir/$old_library"
+                         add=$dir/$old_library
                        fi
                      elif test -n "$old_library"; then
-                       add="$dir/$old_library"
+                       add=$dir/$old_library
                      fi
                    fi
                esac
-             elif test "$hardcode_minus_L" = no; then
+             elif test no = "$hardcode_minus_L"; then
                case $host in
-               *-*-sunos*) add_shlibpath="$dir" ;;
+               *-*-sunos*) add_shlibpath=$dir ;;
                esac
-               add_dir="-L$dir"
-               add="-l$name"
-             elif test "$hardcode_shlibpath_var" = no; then
-               add_shlibpath="$dir"
-               add="-l$name"
+               add_dir=-L$dir
+               add=-l$name
+             elif test no = "$hardcode_shlibpath_var"; then
+               add_shlibpath=$dir
+               add=-l$name
              else
                lib_linked=no
              fi
              ;;
            relink)
-             if test "$hardcode_direct" = yes &&
-                test "$hardcode_direct_absolute" = no; then
-               add="$dir/$linklib"
-             elif test "$hardcode_minus_L" = yes; then
-               add_dir="-L$absdir"
+             if test yes = "$hardcode_direct" &&
+                test no = "$hardcode_direct_absolute"; then
+               add=$dir/$linklib
+             elif test yes = "$hardcode_minus_L"; then
+               add_dir=-L$absdir
                # Try looking first in the location we're being installed to.
                if test -n "$inst_prefix_dir"; then
                  case $libdir in
@@ -6854,10 +8297,10 @@ func_mode_link ()
                      ;;
                  esac
                fi
-               add="-l$name"
-             elif test "$hardcode_shlibpath_var" = yes; then
-               add_shlibpath="$dir"
-               add="-l$name"
+               add=-l$name
+             elif test yes = "$hardcode_shlibpath_var"; then
+               add_shlibpath=$dir
+               add=-l$name
              else
                lib_linked=no
              fi
@@ -6865,7 +8308,7 @@ func_mode_link ()
            *) lib_linked=no ;;
            esac
 
-           if test "$lib_linked" != yes; then
+           if test yes != "$lib_linked"; then
              func_fatal_configuration "unsupported hardcode properties"
            fi
 
@@ -6875,15 +8318,15 @@ func_mode_link ()
              *) func_append compile_shlibpath "$add_shlibpath:" ;;
              esac
            fi
-           if test "$linkmode" = prog; then
+           if test prog = "$linkmode"; then
              test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
              test -n "$add" && compile_deplibs="$add $compile_deplibs"
            else
              test -n "$add_dir" && deplibs="$add_dir $deplibs"
              test -n "$add" && deplibs="$add $deplibs"
-             if test "$hardcode_direct" != yes &&
-                test "$hardcode_minus_L" != yes &&
-                test "$hardcode_shlibpath_var" = yes; then
+             if test yes != "$hardcode_direct" &&
+                test yes != "$hardcode_minus_L" &&
+                test yes = "$hardcode_shlibpath_var"; then
                case :$finalize_shlibpath: in
                *":$libdir:"*) ;;
                *) func_append finalize_shlibpath "$libdir:" ;;
@@ -6892,33 +8335,33 @@ func_mode_link ()
            fi
          fi
 
-         if test "$linkmode" = prog || test "$opt_mode" = relink; then
+         if test prog = "$linkmode" || test relink = "$opt_mode"; then
            add_shlibpath=
            add_dir=
            add=
            # Finalize command for both is simple: just hardcode it.
-           if test "$hardcode_direct" = yes &&
-              test "$hardcode_direct_absolute" = no; then
-             add="$libdir/$linklib"
-           elif test "$hardcode_minus_L" = yes; then
-             add_dir="-L$libdir"
-             add="-l$name"
-           elif test "$hardcode_shlibpath_var" = yes; then
+           if test yes = "$hardcode_direct" &&
+              test no = "$hardcode_direct_absolute"; then
+             add=$libdir/$linklib
+           elif test yes = "$hardcode_minus_L"; then
+             add_dir=-L$libdir
+             add=-l$name
+           elif test yes = "$hardcode_shlibpath_var"; then
              case :$finalize_shlibpath: in
              *":$libdir:"*) ;;
              *) func_append finalize_shlibpath "$libdir:" ;;
              esac
-             add="-l$name"
-           elif test "$hardcode_automatic" = yes; then
+             add=-l$name
+           elif test yes = "$hardcode_automatic"; then
              if test -n "$inst_prefix_dir" &&
-                test -f "$inst_prefix_dir$libdir/$linklib" ; then
-               add="$inst_prefix_dir$libdir/$linklib"
+                test -f "$inst_prefix_dir$libdir/$linklib"; then
+               add=$inst_prefix_dir$libdir/$linklib
              else
-               add="$libdir/$linklib"
+               add=$libdir/$linklib
              fi
            else
              # We cannot seem to hardcode it, guess we'll fake it.
-             add_dir="-L$libdir"
+             add_dir=-L$libdir
              # Try looking first in the location we're being installed to.
              if test -n "$inst_prefix_dir"; then
                case $libdir in
@@ -6927,10 +8370,10 @@ func_mode_link ()
                    ;;
                esac
              fi
-             add="-l$name"
+             add=-l$name
            fi
 
-           if test "$linkmode" = prog; then
+           if test prog = "$linkmode"; then
              test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
              test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
            else
@@ -6938,43 +8381,43 @@ func_mode_link ()
              test -n "$add" && deplibs="$add $deplibs"
            fi
          fi
-       elif test "$linkmode" = prog; then
+       elif test prog = "$linkmode"; then
          # Here we assume that one of hardcode_direct or hardcode_minus_L
          # is not unsupported.  This is valid on all known static and
          # shared platforms.
-         if test "$hardcode_direct" != unsupported; then
-           test -n "$old_library" && linklib="$old_library"
+         if test unsupported != "$hardcode_direct"; then
+           test -n "$old_library" && linklib=$old_library
            compile_deplibs="$dir/$linklib $compile_deplibs"
            finalize_deplibs="$dir/$linklib $finalize_deplibs"
          else
            compile_deplibs="-l$name -L$dir $compile_deplibs"
            finalize_deplibs="-l$name -L$dir $finalize_deplibs"
          fi
-       elif test "$build_libtool_libs" = yes; then
+       elif test yes = "$build_libtool_libs"; then
          # Not a shared library
-         if test "$deplibs_check_method" != pass_all; then
+         if test pass_all != "$deplibs_check_method"; then
            # We're trying link a shared library against a static one
            # but the system doesn't support it.
 
            # Just print a warning and add the library to dependency_libs so
            # that the program can be linked against the static library.
            echo
-           $ECHO "*** Warning: This system can not link to static lib archive $lib."
+           $ECHO "*** Warning: This system cannot link to static lib archive $lib."
            echo "*** I have the capability to make that library automatically link in when"
            echo "*** you link to this library.  But I can only do this if you have a"
            echo "*** shared version of the library, which you do not appear to have."
-           if test "$module" = yes; then
+           if test yes = "$module"; then
              echo "*** But as you try to build a module library, libtool will still create "
              echo "*** a static module, that should work as long as the dlopening application"
              echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
              if test -z "$global_symbol_pipe"; then
                echo
                echo "*** However, this would only work if libtool was able to extract symbol"
-               echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+               echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
                echo "*** not find such a program.  So, this module is probably useless."
-               echo "*** \`nm' from GNU binutils and a full rebuild may help."
+               echo "*** 'nm' from GNU binutils and a full rebuild may help."
              fi
-             if test "$build_old_libs" = no; then
+             if test no = "$build_old_libs"; then
                build_libtool_libs=module
                build_old_libs=yes
              else
@@ -6987,11 +8430,11 @@ func_mode_link ()
          fi
        fi # link shared/static library?
 
-       if test "$linkmode" = lib; then
+       if test lib = "$linkmode"; then
          if test -n "$dependency_libs" &&
-            { test "$hardcode_into_libs" != yes ||
-              test "$build_old_libs" = yes ||
-              test "$link_static" = yes; }; then
+            { test yes != "$hardcode_into_libs" ||
+              test yes = "$build_old_libs" ||
+              test yes = "$link_static"; }; then
            # Extract -R from dependency_libs
            temp_deplibs=
            for libdir in $dependency_libs; do
@@ -7005,12 +8448,12 @@ func_mode_link ()
              *) func_append temp_deplibs " $libdir";;
              esac
            done
-           dependency_libs="$temp_deplibs"
+           dependency_libs=$temp_deplibs
          fi
 
          func_append newlib_search_path " $absdir"
          # Link against this library
-         test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+         test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
          # ... and its dependency_libs
          tmp_libs=
          for deplib in $dependency_libs; do
@@ -7020,7 +8463,7 @@ func_mode_link ()
                    func_resolve_sysroot "$func_stripname_result";;
               *) func_resolve_sysroot "$deplib" ;;
             esac
-           if $opt_preserve_dup_deps ; then
+           if $opt_preserve_dup_deps; then
              case "$tmp_libs " in
              *" $func_resolve_sysroot_result "*)
                 func_append specialdeplibs " $func_resolve_sysroot_result" ;;
@@ -7029,12 +8472,12 @@ func_mode_link ()
            func_append tmp_libs " $func_resolve_sysroot_result"
          done
 
-         if test "$link_all_deplibs" != no; then
+         if test no != "$link_all_deplibs"; then
            # Add the search paths of all dependency libraries
            for deplib in $dependency_libs; do
              path=
              case $deplib in
-             -L*) path="$deplib" ;;
+             -L*) path=$deplib ;;
              *.la)
                func_resolve_sysroot "$deplib"
                deplib=$func_resolve_sysroot_result
@@ -7042,12 +8485,12 @@ func_mode_link ()
                dir=$func_dirname_result
                # We need an absolute path.
                case $dir in
-               [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+               [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;;
                *)
                  absdir=`cd "$dir" && pwd`
                  if test -z "$absdir"; then
-                   func_warning "cannot determine absolute directory name of \`$dir'"
-                   absdir="$dir"
+                   func_warning "cannot determine absolute directory name of '$dir'"
+                   absdir=$dir
                  fi
                  ;;
                esac
@@ -7055,35 +8498,35 @@ func_mode_link ()
                case $host in
                *-*-darwin*)
                  depdepl=
-                 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
-                 if test -n "$deplibrary_names" ; then
-                   for tmp in $deplibrary_names ; do
+                 eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+                 if test -n "$deplibrary_names"; then
+                   for tmp in $deplibrary_names; do
                      depdepl=$tmp
                    done
-                   if test -f "$absdir/$objdir/$depdepl" ; then
-                     depdepl="$absdir/$objdir/$depdepl"
-                     darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+                   if test -f "$absdir/$objdir/$depdepl"; then
+                     depdepl=$absdir/$objdir/$depdepl
+                     darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
                       if test -z "$darwin_install_name"; then
-                          darwin_install_name=`${OTOOL64} -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`
+                          darwin_install_name=`$OTOOL64 -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`
                       fi
-                     func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
-                     func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
+                     func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl"
+                     func_append linker_flags " -dylib_file $darwin_install_name:$depdepl"
                      path=
                    fi
                  fi
                  ;;
                *)
-                 path="-L$absdir/$objdir"
+                 path=-L$absdir/$objdir
                  ;;
                esac
                else
-                 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+                 eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
                  test -z "$libdir" && \
-                   func_fatal_error "\`$deplib' is not a valid libtool archive"
+                   func_fatal_error "'$deplib' is not a valid libtool archive"
                  test "$absdir" != "$libdir" && \
-                   func_warning "\`$deplib' seems to be moved"
+                   func_warning "'$deplib' seems to be moved"
 
-                 path="-L$absdir"
+                 path=-L$absdir
                fi
                ;;
              esac
@@ -7095,23 +8538,23 @@ func_mode_link ()
          fi # link_all_deplibs != no
        fi # linkmode = lib
       done # for deplib in $libs
-      if test "$pass" = link; then
-       if test "$linkmode" = "prog"; then
+      if test link = "$pass"; then
+       if test prog = "$linkmode"; then
          compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
          finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
        else
          compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
        fi
       fi
-      dependency_libs="$newdependency_libs"
-      if test "$pass" = dlpreopen; then
+      dependency_libs=$newdependency_libs
+      if test dlpreopen = "$pass"; then
        # Link the dlpreopened libraries before other libraries
        for deplib in $save_deplibs; do
          deplibs="$deplib $deplibs"
        done
       fi
-      if test "$pass" != dlopen; then
-       if test "$pass" != conv; then
+      if test dlopen != "$pass"; then
+       test conv = "$pass" || {
          # Make sure lib_search_path contains only unique directories.
          lib_search_path=
          for dir in $newlib_search_path; do
@@ -7121,12 +8564,12 @@ func_mode_link ()
            esac
          done
          newlib_search_path=
-       fi
+       }
 
-       if test "$linkmode,$pass" != "prog,link"; then
-         vars="deplibs"
-       else
+       if test prog,link = "$linkmode,$pass"; then
          vars="compile_deplibs finalize_deplibs"
+       else
+         vars=deplibs
        fi
        for var in $vars dependency_libs; do
          # Add libraries to $var in reverse order
@@ -7184,62 +8627,93 @@ func_mode_link ()
          eval $var=\"$tmp_libs\"
        done # for var
       fi
+
+      # Add Sun CC postdeps if required:
+      test CXX = "$tagname" && {
+        case $host_os in
+        linux*)
+          case `$CC -V 2>&1 | sed 5q` in
+          *Sun\ C*) # Sun C++ 5.9
+            func_suncc_cstd_abi
+
+            if test no != "$suncc_use_cstd_abi"; then
+              func_append postdeps ' -library=Cstd -library=Crun'
+            fi
+            ;;
+          esac
+          ;;
+
+        solaris*)
+          func_cc_basename "$CC"
+          case $func_cc_basename_result in
+          CC* | sunCC*)
+            func_suncc_cstd_abi
+
+            if test no != "$suncc_use_cstd_abi"; then
+              func_append postdeps ' -library=Cstd -library=Crun'
+            fi
+            ;;
+          esac
+          ;;
+        esac
+      }
+
       # Last step: remove runtime libs from dependency_libs
       # (they stay in deplibs)
       tmp_libs=
-      for i in $dependency_libs ; do
+      for i in $dependency_libs; do
        case " $predeps $postdeps $compiler_lib_search_path " in
        *" $i "*)
-         i=""
+         i=
          ;;
        esac
-       if test -n "$i" ; then
+       if test -n "$i"; then
          func_append tmp_libs " $i"
        fi
       done
       dependency_libs=$tmp_libs
     done # for pass
-    if test "$linkmode" = prog; then
-      dlfiles="$newdlfiles"
+    if test prog = "$linkmode"; then
+      dlfiles=$newdlfiles
     fi
-    if test "$linkmode" = prog || test "$linkmode" = lib; then
-      dlprefiles="$newdlprefiles"
+    if test prog = "$linkmode" || test lib = "$linkmode"; then
+      dlprefiles=$newdlprefiles
     fi
 
     case $linkmode in
     oldlib)
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-       func_warning "\`-dlopen' is ignored for archives"
+      if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+       func_warning "'-dlopen' is ignored for archives"
       fi
 
       case " $deplibs" in
       *\ -l* | *\ -L*)
-       func_warning "\`-l' and \`-L' are ignored for archives" ;;
+       func_warning "'-l' and '-L' are ignored for archives" ;;
       esac
 
       test -n "$rpath" && \
-       func_warning "\`-rpath' is ignored for archives"
+       func_warning "'-rpath' is ignored for archives"
 
       test -n "$xrpath" && \
-       func_warning "\`-R' is ignored for archives"
+       func_warning "'-R' is ignored for archives"
 
       test -n "$vinfo" && \
-       func_warning "\`-version-info/-version-number' is ignored for archives"
+       func_warning "'-version-info/-version-number' is ignored for archives"
 
       test -n "$release" && \
-       func_warning "\`-release' is ignored for archives"
+       func_warning "'-release' is ignored for archives"
 
       test -n "$export_symbols$export_symbols_regex" && \
-       func_warning "\`-export-symbols' is ignored for archives"
+       func_warning "'-export-symbols' is ignored for archives"
 
       # Now set the variables for building old libraries.
       build_libtool_libs=no
-      oldlibs="$output"
+      oldlibs=$output
       func_append objs "$old_deplibs"
       ;;
 
     lib)
-      # Make sure we only generate libraries of the form `libNAME.la'.
+      # Make sure we only generate libraries of the form 'libNAME.la'.
       case $outputname in
       lib*)
        func_stripname 'lib' '.la' "$outputname"
@@ -7248,10 +8722,10 @@ func_mode_link ()
        eval libname=\"$libname_spec\"
        ;;
       *)
-       test "$module" = no && \
-         func_fatal_help "libtool library \`$output' must begin with \`lib'"
+       test no = "$module" \
+         && func_fatal_help "libtool library '$output' must begin with 'lib'"
 
-       if test "$need_lib_prefix" != no; then
+       if test no != "$need_lib_prefix"; then
          # Add the "lib" prefix for modules if required
          func_stripname '' '.la' "$outputname"
          name=$func_stripname_result
@@ -7265,8 +8739,8 @@ func_mode_link ()
       esac
 
       if test -n "$objs"; then
-       if test "$deplibs_check_method" != pass_all; then
-         func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
+       if test pass_all != "$deplibs_check_method"; then
+         func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs"
        else
          echo
          $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
@@ -7275,21 +8749,21 @@ func_mode_link ()
        fi
       fi
 
-      test "$dlself" != no && \
-       func_warning "\`-dlopen self' is ignored for libtool libraries"
+      test no = "$dlself" \
+       || func_warning "'-dlopen self' is ignored for libtool libraries"
 
       set dummy $rpath
       shift
-      test "$#" -gt 1 && \
-       func_warning "ignoring multiple \`-rpath's for a libtool library"
+      test 1 -lt "$#" \
+       && func_warning "ignoring multiple '-rpath's for a libtool library"
 
-      install_libdir="$1"
+      install_libdir=$1
 
       oldlibs=
       if test -z "$rpath"; then
-       if test "$build_libtool_libs" = yes; then
+       if test yes = "$build_libtool_libs"; then
          # Building a libtool convenience library.
-         # Some compilers have problems with a `.al' extension so
+         # Some compilers have problems with a '.al' extension so
          # convenience libraries should have the same extension an
          # archive normally would.
          oldlibs="$output_objdir/$libname.$libext $oldlibs"
@@ -7298,20 +8772,20 @@ func_mode_link ()
        fi
 
        test -n "$vinfo" && \
-         func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
+         func_warning "'-version-info/-version-number' is ignored for convenience libraries"
 
        test -n "$release" && \
-         func_warning "\`-release' is ignored for convenience libraries"
+         func_warning "'-release' is ignored for convenience libraries"
       else
 
        # Parse the version information argument.
-       save_ifs="$IFS"; IFS=':'
+       save_ifs=$IFS; IFS=:
        set dummy $vinfo 0 0 0
        shift
-       IFS="$save_ifs"
+       IFS=$save_ifs
 
        test -n "$7" && \
-         func_fatal_help "too many parameters to \`-version-info'"
+         func_fatal_help "too many parameters to '-version-info'"
 
        # convert absolute version numbers to libtool ages
        # this retains compatibility with .la files and attempts
@@ -7319,42 +8793,42 @@ func_mode_link ()
 
        case $vinfo_number in
        yes)
-         number_major="$1"
-         number_minor="$2"
-         number_revision="$3"
+         number_major=$1
+         number_minor=$2
+         number_revision=$3
          #
          # There are really only two kinds -- those that
          # use the current revision as the major version
          # and those that subtract age and use age as
          # a minor version.  But, then there is irix
-         # which has an extra 1 added just for fun
+         # that has an extra 1 added just for fun
          #
          case $version_type in
          # correct linux to gnu/linux during the next big refactor
-         darwin|linux|osf|windows|none)
+         darwin|freebsd-elf|linux|osf|windows|none)
            func_arith $number_major + $number_minor
            current=$func_arith_result
-           age="$number_minor"
-           revision="$number_revision"
+           age=$number_minor
+           revision=$number_revision
            ;;
-         freebsd-aout|freebsd-elf|qnx|sunos)
-           current="$number_major"
-           revision="$number_minor"
-           age="0"
+         freebsd-aout|qnx|sunos)
+           current=$number_major
+           revision=$number_minor
+           age=0
            ;;
          irix|nonstopux)
            func_arith $number_major + $number_minor
            current=$func_arith_result
-           age="$number_minor"
-           revision="$number_minor"
+           age=$number_minor
+           revision=$number_minor
            lt_irix_increment=no
            ;;
          esac
          ;;
        no)
-         current="$1"
-         revision="$2"
-         age="$3"
+         current=$1
+         revision=$2
+         age=$3
          ;;
        esac
 
@@ -7362,30 +8836,30 @@ func_mode_link ()
        case $current in
        0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
        *)
-         func_error "CURRENT \`$current' must be a nonnegative integer"
-         func_fatal_error "\`$vinfo' is not valid version information"
+         func_error "CURRENT '$current' must be a nonnegative integer"
+         func_fatal_error "'$vinfo' is not valid version information"
          ;;
        esac
 
        case $revision in
        0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
        *)
-         func_error "REVISION \`$revision' must be a nonnegative integer"
-         func_fatal_error "\`$vinfo' is not valid version information"
+         func_error "REVISION '$revision' must be a nonnegative integer"
+         func_fatal_error "'$vinfo' is not valid version information"
          ;;
        esac
 
        case $age in
        0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
        *)
-         func_error "AGE \`$age' must be a nonnegative integer"
-         func_fatal_error "\`$vinfo' is not valid version information"
+         func_error "AGE '$age' must be a nonnegative integer"
+         func_fatal_error "'$vinfo' is not valid version information"
          ;;
        esac
 
        if test "$age" -gt "$current"; then
-         func_error "AGE \`$age' is greater than the current interface number \`$current'"
-         func_fatal_error "\`$vinfo' is not valid version information"
+         func_error "AGE '$age' is greater than the current interface number '$current'"
+         func_fatal_error "'$vinfo' is not valid version information"
        fi
 
        # Calculate the version variables.
@@ -7400,26 +8874,36 @@ func_mode_link ()
          # verstring for coding it into the library header
          func_arith $current - $age
          major=.$func_arith_result
-         versuffix="$major.$age.$revision"
+         versuffix=$major.$age.$revision
          # Darwin ld doesn't like 0 for these options...
          func_arith $current + 1
          minor_current=$func_arith_result
-         xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+         xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
          verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+          # On Darwin other compilers
+          case $CC in
+              nagfor*)
+                  verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
+                  ;;
+              *)
+                  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+                  ;;
+          esac
          ;;
 
        freebsd-aout)
-         major=".$current"
-         versuffix=".$current.$revision";
+         major=.$current
+         versuffix=.$current.$revision
          ;;
 
        freebsd-elf)
-         major=".$current"
-         versuffix=".$current"
+         func_arith $current - $age
+         major=.$func_arith_result
+         versuffix=$major.$age.$revision
          ;;
 
        irix | nonstopux)
-         if test "X$lt_irix_increment" = "Xno"; then
+         if test no = "$lt_irix_increment"; then
            func_arith $current - $age
          else
            func_arith $current - $age + 1
@@ -7430,69 +8914,74 @@ func_mode_link ()
            nonstopux) verstring_prefix=nonstopux ;;
            *)         verstring_prefix=sgi ;;
          esac
-         verstring="$verstring_prefix$major.$revision"
+         verstring=$verstring_prefix$major.$revision
 
          # Add in all the interfaces that we are compatible with.
          loop=$revision
-         while test "$loop" -ne 0; do
+         while test 0 -ne "$loop"; do
            func_arith $revision - $loop
            iface=$func_arith_result
            func_arith $loop - 1
            loop=$func_arith_result
-           verstring="$verstring_prefix$major.$iface:$verstring"
+           verstring=$verstring_prefix$major.$iface:$verstring
          done
 
-         # Before this point, $major must not contain `.'.
+         # Before this point, $major must not contain '.'.
          major=.$major
-         versuffix="$major.$revision"
+         versuffix=$major.$revision
          ;;
 
        linux) # correct to gnu/linux during the next big refactor
          func_arith $current - $age
          major=.$func_arith_result
-         versuffix="$major.$age.$revision"
+         versuffix=$major.$age.$revision
          ;;
 
        osf)
          func_arith $current - $age
          major=.$func_arith_result
-         versuffix=".$current.$age.$revision"
-         verstring="$current.$age.$revision"
+         versuffix=.$current.$age.$revision
+         verstring=$current.$age.$revision
 
          # Add in all the interfaces that we are compatible with.
          loop=$age
-         while test "$loop" -ne 0; do
+         while test 0 -ne "$loop"; do
            func_arith $current - $loop
            iface=$func_arith_result
            func_arith $loop - 1
            loop=$func_arith_result
-           verstring="$verstring:${iface}.0"
+           verstring=$verstring:$iface.0
          done
 
          # Make executables depend on our current version.
-         func_append verstring ":${current}.0"
+         func_append verstring ":$current.0"
          ;;
 
        qnx)
-         major=".$current"
-         versuffix=".$current"
+         major=.$current
+         versuffix=.$current
+         ;;
+
+       sco)
+         major=.$current
+         versuffix=.$current
          ;;
 
        sunos)
-         major=".$current"
-         versuffix=".$current.$revision"
+         major=.$current
+         versuffix=.$current.$revision
          ;;
 
        windows)
          # Use '-' rather than '.', since we only want one
-         # extension on DOS 8.3 filesystems.
+         # extension on DOS 8.3 file systems.
          func_arith $current - $age
          major=$func_arith_result
-         versuffix="-$major"
+         versuffix=-$major
          ;;
 
        *)
-         func_fatal_configuration "unknown library version type \`$version_type'"
+         func_fatal_configuration "unknown library version type '$version_type'"
          ;;
        esac
 
@@ -7506,42 +8995,45 @@ func_mode_link ()
            verstring=
            ;;
          *)
-           verstring="0.0"
+           verstring=0.0
            ;;
          esac
-         if test "$need_version" = no; then
+         if test no = "$need_version"; then
            versuffix=
          else
-           versuffix=".0.0"
+           versuffix=.0.0
          fi
        fi
 
        # Remove version info from name if versioning should be avoided
-       if test "$avoid_version" = yes && test "$need_version" = no; then
+       if test yes,no = "$avoid_version,$need_version"; then
          major=
          versuffix=
-         verstring=""
+         verstring=
        fi
 
        # Check to see if the archive will have undefined symbols.
-       if test "$allow_undefined" = yes; then
-         if test "$allow_undefined_flag" = unsupported; then
-           func_warning "undefined symbols not allowed in $host shared libraries"
-           build_libtool_libs=no
-           build_old_libs=yes
+       if test yes = "$allow_undefined"; then
+         if test unsupported = "$allow_undefined_flag"; then
+           if test yes = "$build_old_libs"; then
+             func_warning "undefined symbols not allowed in $host shared libraries; building static only"
+             build_libtool_libs=no
+           else
+             func_fatal_error "can't build $host shared library unless -no-undefined is specified"
+           fi
          fi
        else
          # Don't allow undefined symbols.
-         allow_undefined_flag="$no_undefined_flag"
+         allow_undefined_flag=$no_undefined_flag
        fi
 
       fi
 
-      func_generate_dlsyms "$libname" "$libname" "yes"
+      func_generate_dlsyms "$libname" "$libname" :
       func_append libobjs " $symfileobj"
-      test "X$libobjs" = "X " && libobjs=
+      test " " = "$libobjs" && libobjs=
 
-      if test "$opt_mode" != relink; then
+      if test relink != "$opt_mode"; then
        # Remove our outputs, but don't remove object files since they
        # may have been created when compiling PIC objects.
        removelist=
@@ -7550,8 +9042,8 @@ func_mode_link ()
          case $p in
            *.$objext | *.gcno)
               ;;
-           $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
-              if test "X$precious_files_regex" != "X"; then
+           $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*)
+              if test -n "$precious_files_regex"; then
                 if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
                 then
                   continue
@@ -7567,11 +9059,11 @@ func_mode_link ()
       fi
 
       # Now set the variables for building old libraries.
-      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+      if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then
        func_append oldlibs " $output_objdir/$libname.$libext"
 
        # Transform .lo files to .o files.
-       oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
+       oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP`
       fi
 
       # Eliminate all temporary directories.
@@ -7592,13 +9084,13 @@ func_mode_link ()
          *) func_append finalize_rpath " $libdir" ;;
          esac
        done
-       if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+       if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then
          dependency_libs="$temp_xrpath $dependency_libs"
        fi
       fi
 
       # Make sure dlfiles contains only unique files that won't be dlpreopened
-      old_dlfiles="$dlfiles"
+      old_dlfiles=$dlfiles
       dlfiles=
       for lib in $old_dlfiles; do
        case " $dlprefiles $dlfiles " in
@@ -7608,7 +9100,7 @@ func_mode_link ()
       done
 
       # Make sure dlprefiles contains only unique files
-      old_dlprefiles="$dlprefiles"
+      old_dlprefiles=$dlprefiles
       dlprefiles=
       for lib in $old_dlprefiles; do
        case "$dlprefiles " in
@@ -7617,7 +9109,7 @@ func_mode_link ()
        esac
       done
 
-      if test "$build_libtool_libs" = yes; then
+      if test yes = "$build_libtool_libs"; then
        if test -n "$rpath"; then
          case $host in
          *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
@@ -7641,7 +9133,7 @@ func_mode_link ()
            ;;
          *)
            # Add libc to deplibs on all other systems if necessary.
-           if test "$build_libtool_need_lc" = "yes"; then
+           if test yes = "$build_libtool_need_lc"; then
              func_append deplibs " -lc"
            fi
            ;;
@@ -7657,9 +9149,9 @@ func_mode_link ()
        # I'm not sure if I'm treating the release correctly.  I think
        # release should show up in the -l (ie -lgmp5) so we don't want to
        # add it in twice.  Is that correct?
-       release=""
-       versuffix=""
-       major=""
+       release=
+       versuffix=
+       major=
        newdeplibs=
        droppeddeps=no
        case $deplibs_check_method in
@@ -7688,20 +9180,20 @@ EOF
              -l*)
                func_stripname -l '' "$i"
                name=$func_stripname_result
-               if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+               if test yes = "$allow_libtool_libs_with_static_runtimes"; then
                  case " $predeps $postdeps " in
                  *" $i "*)
                    func_append newdeplibs " $i"
-                   i=""
+                   i=
                    ;;
                  esac
                fi
-               if test -n "$i" ; then
+               if test -n "$i"; then
                  libname=`eval "\\$ECHO \"$libname_spec\""`
                  deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
                  set dummy $deplib_matches; shift
                  deplib_match=$1
-                 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+                 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
                    func_append newdeplibs " $i"
                  else
                    droppeddeps=yes
@@ -7731,20 +9223,20 @@ EOF
                $opt_dry_run || $RM conftest
                if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
                  ldd_output=`ldd conftest`
-                 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+                 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
                    case " $predeps $postdeps " in
                    *" $i "*)
                      func_append newdeplibs " $i"
-                     i=""
+                     i=
                      ;;
                    esac
                  fi
-                 if test -n "$i" ; then
+                 if test -n "$i"; then
                    libname=`eval "\\$ECHO \"$libname_spec\""`
                    deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
                    set dummy $deplib_matches; shift
                    deplib_match=$1
-                   if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+                   if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
                      func_append newdeplibs " $i"
                    else
                      droppeddeps=yes
@@ -7781,24 +9273,24 @@ EOF
            -l*)
              func_stripname -l '' "$a_deplib"
              name=$func_stripname_result
-             if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+             if test yes = "$allow_libtool_libs_with_static_runtimes"; then
                case " $predeps $postdeps " in
                *" $a_deplib "*)
                  func_append newdeplibs " $a_deplib"
-                 a_deplib=""
+                 a_deplib=
                  ;;
                esac
              fi
-             if test -n "$a_deplib" ; then
+             if test -n "$a_deplib"; then
                libname=`eval "\\$ECHO \"$libname_spec\""`
                if test -n "$file_magic_glob"; then
                  libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
                else
                  libnameglob=$libname
                fi
-               test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
+               test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob`
                for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
-                 if test "$want_nocaseglob" = yes; then
+                 if test yes = "$want_nocaseglob"; then
                    shopt -s nocaseglob
                    potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
                    $nocaseglob
@@ -7816,25 +9308,25 @@ EOF
                      # We might still enter an endless loop, since a link
                      # loop can be closed while we follow links,
                      # but so what?
-                     potlib="$potent_lib"
+                     potlib=$potent_lib
                      while test -h "$potlib" 2>/dev/null; do
-                       potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+                       potliblink=`ls -ld $potlib | $SED 's/.* -> //'`
                        case $potliblink in
-                       [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
-                       *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
+                       [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;;
+                       *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";;
                        esac
                      done
                      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
                         $SED -e 10q |
                         $EGREP "$file_magic_regex" > /dev/null; then
                        func_append newdeplibs " $a_deplib"
-                       a_deplib=""
+                       a_deplib=
                        break 2
                      fi
                  done
                done
              fi
-             if test -n "$a_deplib" ; then
+             if test -n "$a_deplib"; then
                droppeddeps=yes
                echo
                $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
@@ -7842,7 +9334,7 @@ EOF
                echo "*** you link to this library.  But I can only do this if you have a"
                echo "*** shared version of the library, which you do not appear to have"
                echo "*** because I did check the linker path looking for a file starting"
-               if test -z "$potlib" ; then
+               if test -z "$potlib"; then
                  $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
                else
                  $ECHO "*** with $libname and none of the candidates passed a file format test"
@@ -7865,30 +9357,30 @@ EOF
            -l*)
              func_stripname -l '' "$a_deplib"
              name=$func_stripname_result
-             if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+             if test yes = "$allow_libtool_libs_with_static_runtimes"; then
                case " $predeps $postdeps " in
                *" $a_deplib "*)
                  func_append newdeplibs " $a_deplib"
-                 a_deplib=""
+                 a_deplib=
                  ;;
                esac
              fi
-             if test -n "$a_deplib" ; then
+             if test -n "$a_deplib"; then
                libname=`eval "\\$ECHO \"$libname_spec\""`
                for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
                  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
                  for potent_lib in $potential_libs; do
-                   potlib="$potent_lib" # see symlink-check above in file_magic test
+                   potlib=$potent_lib # see symlink-check above in file_magic test
                    if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
                       $EGREP "$match_pattern_regex" > /dev/null; then
                      func_append newdeplibs " $a_deplib"
-                     a_deplib=""
+                     a_deplib=
                      break 2
                    fi
                  done
                done
              fi
-             if test -n "$a_deplib" ; then
+             if test -n "$a_deplib"; then
                droppeddeps=yes
                echo
                $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
@@ -7896,7 +9388,7 @@ EOF
                echo "*** you link to this library.  But I can only do this if you have a"
                echo "*** shared version of the library, which you do not appear to have"
                echo "*** because I did check the linker path looking for a file starting"
-               if test -z "$potlib" ; then
+               if test -z "$potlib"; then
                  $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
                else
                  $ECHO "*** with $libname and none of the candidates passed a file format test"
@@ -7912,18 +9404,18 @@ EOF
          done # Gone through all deplibs.
          ;;
        none | unknown | *)
-         newdeplibs=""
+         newdeplibs=
          tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
-         if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-           for i in $predeps $postdeps ; do
+         if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+           for i in $predeps $postdeps; do
              # can't use Xsed below, because $i might contain '/'
-             tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
+             tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"`
            done
          fi
          case $tmp_deplibs in
          *[!\  \ ]*)
            echo
-           if test "X$deplibs_check_method" = "Xnone"; then
+           if test none = "$deplibs_check_method"; then
              echo "*** Warning: inter-library dependencies are not supported in this platform."
            else
              echo "*** Warning: inter-library dependencies are not known to be supported."
@@ -7947,8 +9439,8 @@ EOF
          ;;
        esac
 
-       if test "$droppeddeps" = yes; then
-         if test "$module" = yes; then
+       if test yes = "$droppeddeps"; then
+         if test yes = "$module"; then
            echo
            echo "*** Warning: libtool could not satisfy all declared inter-library"
            $ECHO "*** dependencies of module $libname.  Therefore, libtool will create"
@@ -7957,12 +9449,12 @@ EOF
            if test -z "$global_symbol_pipe"; then
              echo
              echo "*** However, this would only work if libtool was able to extract symbol"
-             echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+             echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
              echo "*** not find such a program.  So, this module is probably useless."
-             echo "*** \`nm' from GNU binutils and a full rebuild may help."
+             echo "*** 'nm' from GNU binutils and a full rebuild may help."
            fi
-           if test "$build_old_libs" = no; then
-             oldlibs="$output_objdir/$libname.$libext"
+           if test no = "$build_old_libs"; then
+             oldlibs=$output_objdir/$libname.$libext
              build_libtool_libs=module
              build_old_libs=yes
            else
@@ -7973,14 +9465,14 @@ EOF
            echo "*** automatically added whenever a program is linked with this library"
            echo "*** or is declared to -dlopen it."
 
-           if test "$allow_undefined" = no; then
+           if test no = "$allow_undefined"; then
              echo
              echo "*** Since this library must not contain undefined symbols,"
              echo "*** because either the platform does not support them or"
              echo "*** it was explicitly requested with -no-undefined,"
              echo "*** libtool will only create a static version of it."
-             if test "$build_old_libs" = no; then
-               oldlibs="$output_objdir/$libname.$libext"
+             if test no = "$build_old_libs"; then
+               oldlibs=$output_objdir/$libname.$libext
                build_libtool_libs=module
                build_old_libs=yes
              else
@@ -8026,7 +9518,7 @@ EOF
        *) func_append new_libs " $deplib" ;;
        esac
       done
-      deplibs="$new_libs"
+      deplibs=$new_libs
 
       # All the library-specific variables (install_libdir is set above).
       library_names=
@@ -8034,25 +9526,25 @@ EOF
       dlname=
 
       # Test again, we may have decided not to build it any more
-      if test "$build_libtool_libs" = yes; then
-       # Remove ${wl} instances when linking with ld.
+      if test yes = "$build_libtool_libs"; then
+       # Remove $wl instances when linking with ld.
        # FIXME: should test the right _cmds variable.
        case $archive_cmds in
          *\$LD\ *) wl= ;;
         esac
-       if test "$hardcode_into_libs" = yes; then
+       if test yes = "$hardcode_into_libs"; then
          # Hardcode the library paths
          hardcode_libdirs=
          dep_rpath=
-         rpath="$finalize_rpath"
-         test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
+         rpath=$finalize_rpath
+         test relink = "$opt_mode" || rpath=$compile_rpath$rpath
          for libdir in $rpath; do
            if test -n "$hardcode_libdir_flag_spec"; then
              if test -n "$hardcode_libdir_separator"; then
                func_replace_sysroot "$libdir"
                libdir=$func_replace_sysroot_result
                if test -z "$hardcode_libdirs"; then
-                 hardcode_libdirs="$libdir"
+                 hardcode_libdirs=$libdir
                else
                  # Just accumulate the unique libdirs.
                  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
@@ -8077,7 +9569,7 @@ EOF
          # Substitute the hardcoded libdirs into the rpath.
          if test -n "$hardcode_libdir_separator" &&
             test -n "$hardcode_libdirs"; then
-           libdir="$hardcode_libdirs"
+           libdir=$hardcode_libdirs
            eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
          fi
          if test -n "$runpath_var" && test -n "$perm_rpath"; then
@@ -8091,8 +9583,8 @@ EOF
          test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
        fi
 
-       shlibpath="$finalize_shlibpath"
-       test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+       shlibpath=$finalize_shlibpath
+       test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath
        if test -n "$shlibpath"; then
          eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
        fi
@@ -8102,19 +9594,19 @@ EOF
        eval library_names=\"$library_names_spec\"
        set dummy $library_names
        shift
-       realname="$1"
+       realname=$1
        shift
 
        if test -n "$soname_spec"; then
          eval soname=\"$soname_spec\"
        else
-         soname="$realname"
+         soname=$realname
        fi
        if test -z "$dlname"; then
          dlname=$soname
        fi
 
-       lib="$output_objdir/$realname"
+       lib=$output_objdir/$realname
        linknames=
        for link
        do
@@ -8128,7 +9620,7 @@ EOF
        delfiles=
        if test -n "$export_symbols" && test -n "$include_expsyms"; then
          $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
-         export_symbols="$output_objdir/$libname.uexp"
+         export_symbols=$output_objdir/$libname.uexp
          func_append delfiles " $export_symbols"
        fi
 
@@ -8137,31 +9629,31 @@ EOF
        cygwin* | mingw* | cegcc*)
          if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
            # exporting using user supplied symfile
-           if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+           func_dll_def_p "$export_symbols" || {
              # and it's NOT already a .def file. Must figure out
              # which of the given symbols are data symbols and tag
              # them as such. So, trigger use of export_symbols_cmds.
              # export_symbols gets reassigned inside the "prepare
              # the list of exported symbols" if statement, so the
              # include_expsyms logic still works.
-             orig_export_symbols="$export_symbols"
+             orig_export_symbols=$export_symbols
              export_symbols=
              always_export_symbols=yes
-           fi
+           }
          fi
          ;;
        esac
 
        # Prepare the list of exported symbols
        if test -z "$export_symbols"; then
-         if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
-           func_verbose "generating symbol list for \`$libname.la'"
-           export_symbols="$output_objdir/$libname.exp"
+         if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then
+           func_verbose "generating symbol list for '$libname.la'"
+           export_symbols=$output_objdir/$libname.exp
            $opt_dry_run || $RM $export_symbols
            cmds=$export_symbols_cmds
-           save_ifs="$IFS"; IFS='~'
+           save_ifs=$IFS; IFS='~'
            for cmd1 in $cmds; do
-             IFS="$save_ifs"
+             IFS=$save_ifs
              # Take the normal branch if the nm_file_list_spec branch
              # doesn't work or if tool conversion is not needed.
              case $nm_file_list_spec~$to_tool_file_cmd in
@@ -8175,7 +9667,7 @@ EOF
                  try_normal_branch=no
                  ;;
              esac
-             if test "$try_normal_branch" = yes \
+             if test yes = "$try_normal_branch" \
                 && { test "$len" -lt "$max_cmd_len" \
                      || test "$max_cmd_len" -le -1; }
              then
@@ -8186,7 +9678,7 @@ EOF
                output_la=$func_basename_result
                save_libobjs=$libobjs
                save_output=$output
-               output=${output_objdir}/${output_la}.nm
+               output=$output_objdir/$output_la.nm
                func_to_tool_file "$output"
                libobjs=$nm_file_list_spec$func_to_tool_file_result
                func_append delfiles " $output"
@@ -8209,8 +9701,8 @@ EOF
                break
              fi
            done
-           IFS="$save_ifs"
-           if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
+           IFS=$save_ifs
+           if test -n "$export_symbols_regex" && test : != "$skipped_export"; then
              func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
              func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
            fi
@@ -8218,16 +9710,16 @@ EOF
        fi
 
        if test -n "$export_symbols" && test -n "$include_expsyms"; then
-         tmp_export_symbols="$export_symbols"
-         test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+         tmp_export_symbols=$export_symbols
+         test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
          $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
        fi
 
-       if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
+       if test : != "$skipped_export" && test -n "$orig_export_symbols"; then
          # The given exports_symbols file has to be filtered, so filter it.
-         func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+         func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
          # FIXME: $output_objdir/$libname.filter potentially contains lots of
-         # 's' commands which not all seds can handle. GNU sed should be fine
+         # 's' commands, which not all seds can handle. GNU sed should be fine
          # though. Also, the filter scales superlinearly with the number of
          # global variables. join(1) would be nice here, but unfortunately
          # isn't a blessed tool.
@@ -8246,11 +9738,11 @@ EOF
            ;;
          esac
        done
-       deplibs="$tmp_deplibs"
+       deplibs=$tmp_deplibs
 
        if test -n "$convenience"; then
          if test -n "$whole_archive_flag_spec" &&
-           test "$compiler_needs_object" = yes &&
+           test yes = "$compiler_needs_object" &&
            test -z "$libobjs"; then
            # extract the archives, so we have objects to list.
            # TODO: could optimize this to just extract one archive.
@@ -8261,7 +9753,7 @@ EOF
            eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
            test "X$libobjs" = "X " && libobjs=
          else
-           gentop="$output_objdir/${outputname}x"
+           gentop=$output_objdir/${outputname}x
            func_append generated " $gentop"
 
            func_extract_archives $gentop $convenience
@@ -8270,18 +9762,18 @@ EOF
          fi
        fi
 
-       if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+       if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then
          eval flag=\"$thread_safe_flag_spec\"
          func_append linker_flags " $flag"
        fi
 
        # Make a backup of the uninstalled library when relinking
-       if test "$opt_mode" = relink; then
+       if test relink = "$opt_mode"; then
          $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
        fi
 
        # Do each of the archive commands.
-       if test "$module" = yes && test -n "$module_cmds" ; then
+       if test yes = "$module" && test -n "$module_cmds"; then
          if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
            eval test_cmds=\"$module_expsym_cmds\"
            cmds=$module_expsym_cmds
@@ -8299,7 +9791,7 @@ EOF
          fi
        fi
 
-       if test "X$skipped_export" != "X:" &&
+       if test : != "$skipped_export" &&
           func_len " $test_cmds" &&
           len=$func_len_result &&
           test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
@@ -8332,8 +9824,8 @@ EOF
          last_robj=
          k=1
 
-         if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
-           output=${output_objdir}/${output_la}.lnkscript
+         if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
+           output=$output_objdir/$output_la.lnkscript
            func_verbose "creating GNU ld script: $output"
            echo 'INPUT (' > $output
            for obj in $save_libobjs
@@ -8345,14 +9837,14 @@ EOF
            func_append delfiles " $output"
            func_to_tool_file "$output"
            output=$func_to_tool_file_result
-         elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
-           output=${output_objdir}/${output_la}.lnk
+         elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
+           output=$output_objdir/$output_la.lnk
            func_verbose "creating linker input file list: $output"
            : > $output
            set x $save_libobjs
            shift
            firstobj=
-           if test "$compiler_needs_object" = yes; then
+           if test yes = "$compiler_needs_object"; then
              firstobj="$1 "
              shift
            fi
@@ -8367,7 +9859,7 @@ EOF
          else
            if test -n "$save_libobjs"; then
              func_verbose "creating reloadable object files..."
-             output=$output_objdir/$output_la-${k}.$objext
+             output=$output_objdir/$output_la-$k.$objext
              eval test_cmds=\"$reload_cmds\"
              func_len " $test_cmds"
              len0=$func_len_result
@@ -8379,13 +9871,13 @@ EOF
                func_len " $obj"
                func_arith $len + $func_len_result
                len=$func_arith_result
-               if test "X$objlist" = X ||
+               if test -z "$objlist" ||
                   test "$len" -lt "$max_cmd_len"; then
                  func_append objlist " $obj"
                else
                  # The command $test_cmds is almost too long, add a
                  # command to the queue.
-                 if test "$k" -eq 1 ; then
+                 if test 1 -eq "$k"; then
                    # The first file doesn't have a previous command to add.
                    reload_objs=$objlist
                    eval concat_cmds=\"$reload_cmds\"
@@ -8395,10 +9887,10 @@ EOF
                    reload_objs="$objlist $last_robj"
                    eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
                  fi
-                 last_robj=$output_objdir/$output_la-${k}.$objext
+                 last_robj=$output_objdir/$output_la-$k.$objext
                  func_arith $k + 1
                  k=$func_arith_result
-                 output=$output_objdir/$output_la-${k}.$objext
+                 output=$output_objdir/$output_la-$k.$objext
                  objlist=" $obj"
                  func_len " $last_robj"
                  func_arith $len0 + $func_len_result
@@ -8410,9 +9902,9 @@ EOF
              # files will link in the last one created.
              test -z "$concat_cmds" || concat_cmds=$concat_cmds~
              reload_objs="$objlist $last_robj"
-             eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
+             eval concat_cmds=\"\$concat_cmds$reload_cmds\"
              if test -n "$last_robj"; then
-               eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
+               eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
              fi
              func_append delfiles " $output"
 
@@ -8420,9 +9912,9 @@ EOF
              output=
            fi
 
-           if ${skipped_export-false}; then
-             func_verbose "generating symbol list for \`$libname.la'"
-             export_symbols="$output_objdir/$libname.exp"
+           ${skipped_export-false} && {
+             func_verbose "generating symbol list for '$libname.la'"
+             export_symbols=$output_objdir/$libname.exp
              $opt_dry_run || $RM $export_symbols
              libobjs=$output
              # Append the command to create the export file.
@@ -8431,16 +9923,16 @@ EOF
              if test -n "$last_robj"; then
                eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
              fi
-           fi
+           }
 
            test -n "$save_libobjs" &&
              func_verbose "creating a temporary reloadable object file: $output"
 
            # Loop through the commands generated above and execute them.
-           save_ifs="$IFS"; IFS='~'
+           save_ifs=$IFS; IFS='~'
            for cmd in $concat_cmds; do
-             IFS="$save_ifs"
-             $opt_silent || {
+             IFS=$save_ifs
+             $opt_quiet || {
                  func_quote_for_expand "$cmd"
                  eval "func_echo $func_quote_for_expand_result"
              }
@@ -8448,7 +9940,7 @@ EOF
                lt_exit=$?
 
                # Restore the uninstalled library and exit
-               if test "$opt_mode" = relink; then
+               if test relink = "$opt_mode"; then
                  ( cd "$output_objdir" && \
                    $RM "${realname}T" && \
                    $MV "${realname}U" "$realname" )
@@ -8457,7 +9949,7 @@ EOF
                exit $lt_exit
              }
            done
-           IFS="$save_ifs"
+           IFS=$save_ifs
 
            if test -n "$export_symbols_regex" && ${skipped_export-false}; then
              func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
@@ -8465,18 +9957,18 @@ EOF
            fi
          fi
 
-          if ${skipped_export-false}; then
+          ${skipped_export-false} && {
            if test -n "$export_symbols" && test -n "$include_expsyms"; then
-             tmp_export_symbols="$export_symbols"
-             test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+             tmp_export_symbols=$export_symbols
+             test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
              $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
            fi
 
            if test -n "$orig_export_symbols"; then
              # The given exports_symbols file has to be filtered, so filter it.
-             func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+             func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
              # FIXME: $output_objdir/$libname.filter potentially contains lots of
-             # 's' commands which not all seds can handle. GNU sed should be fine
+             # 's' commands, which not all seds can handle. GNU sed should be fine
              # though. Also, the filter scales superlinearly with the number of
              # global variables. join(1) would be nice here, but unfortunately
              # isn't a blessed tool.
@@ -8485,7 +9977,7 @@ EOF
              export_symbols=$output_objdir/$libname.def
              $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
            fi
-         fi
+         }
 
          libobjs=$output
          # Restore the value of output.
@@ -8499,7 +9991,7 @@ EOF
          # value of $libobjs for piecewise linking.
 
          # Do each of the archive commands.
-         if test "$module" = yes && test -n "$module_cmds" ; then
+         if test yes = "$module" && test -n "$module_cmds"; then
            if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
              cmds=$module_expsym_cmds
            else
@@ -8521,7 +10013,7 @@ EOF
 
        # Add any objects from preloaded convenience libraries
        if test -n "$dlprefiles"; then
-         gentop="$output_objdir/${outputname}x"
+         gentop=$output_objdir/${outputname}x
          func_append generated " $gentop"
 
          func_extract_archives $gentop $dlprefiles
@@ -8529,11 +10021,12 @@ EOF
          test "X$libobjs" = "X " && libobjs=
        fi
 
-       save_ifs="$IFS"; IFS='~'
+       save_ifs=$IFS; IFS='~'
        for cmd in $cmds; do
-         IFS="$save_ifs"
+         IFS=$sp$nl
          eval cmd=\"$cmd\"
-         $opt_silent || {
+         IFS=$save_ifs
+         $opt_quiet || {
            func_quote_for_expand "$cmd"
            eval "func_echo $func_quote_for_expand_result"
          }
@@ -8541,7 +10034,7 @@ EOF
            lt_exit=$?
 
            # Restore the uninstalled library and exit
-           if test "$opt_mode" = relink; then
+           if test relink = "$opt_mode"; then
              ( cd "$output_objdir" && \
                $RM "${realname}T" && \
                $MV "${realname}U" "$realname" )
@@ -8550,10 +10043,10 @@ EOF
            exit $lt_exit
          }
        done
-       IFS="$save_ifs"
+       IFS=$save_ifs
 
        # Restore the uninstalled library and exit
-       if test "$opt_mode" = relink; then
+       if test relink = "$opt_mode"; then
          $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
 
          if test -n "$convenience"; then
@@ -8573,39 +10066,39 @@ EOF
        done
 
        # If -module or -export-dynamic was specified, set the dlname.
-       if test "$module" = yes || test "$export_dynamic" = yes; then
+       if test yes = "$module" || test yes = "$export_dynamic"; then
          # On all known operating systems, these are identical.
-         dlname="$soname"
+         dlname=$soname
        fi
       fi
       ;;
 
     obj)
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-       func_warning "\`-dlopen' is ignored for objects"
+      if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+       func_warning "'-dlopen' is ignored for objects"
       fi
 
       case " $deplibs" in
       *\ -l* | *\ -L*)
-       func_warning "\`-l' and \`-L' are ignored for objects" ;;
+       func_warning "'-l' and '-L' are ignored for objects" ;;
       esac
 
       test -n "$rpath" && \
-       func_warning "\`-rpath' is ignored for objects"
+       func_warning "'-rpath' is ignored for objects"
 
       test -n "$xrpath" && \
-       func_warning "\`-R' is ignored for objects"
+       func_warning "'-R' is ignored for objects"
 
       test -n "$vinfo" && \
-       func_warning "\`-version-info' is ignored for objects"
+       func_warning "'-version-info' is ignored for objects"
 
       test -n "$release" && \
-       func_warning "\`-release' is ignored for objects"
+       func_warning "'-release' is ignored for objects"
 
       case $output in
       *.lo)
        test -n "$objs$old_deplibs" && \
-         func_fatal_error "cannot build library object \`$output' from non-libtool objects"
+         func_fatal_error "cannot build library object '$output' from non-libtool objects"
 
        libobj=$output
        func_lo2o "$libobj"
@@ -8613,7 +10106,7 @@ EOF
        ;;
       *)
        libobj=
-       obj="$output"
+       obj=$output
        ;;
       esac
 
@@ -8626,17 +10119,19 @@ EOF
       # the extraction.
       reload_conv_objs=
       gentop=
-      # reload_cmds runs $LD directly, so let us get rid of
-      # -Wl from whole_archive_flag_spec and hope we can get by with
-      # turning comma into space..
-      wl=
-
+      # if reload_cmds runs $LD directly, get rid of -Wl from
+      # whole_archive_flag_spec and hope we can get by with turning comma
+      # into space.
+      case $reload_cmds in
+        *\$LD[\ \$]*) wl= ;;
+      esac
       if test -n "$convenience"; then
        if test -n "$whole_archive_flag_spec"; then
          eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
-         reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
+         test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
+         reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags
        else
-         gentop="$output_objdir/${obj}x"
+         gentop=$output_objdir/${obj}x
          func_append generated " $gentop"
 
          func_extract_archives $gentop $convenience
@@ -8645,12 +10140,12 @@ EOF
       fi
 
       # If we're not building shared, we need to use non_pic_objs
-      test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
+      test yes = "$build_libtool_libs" || libobjs=$non_pic_objects
 
       # Create the old-style object.
-      reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+      reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs
 
-      output="$obj"
+      output=$obj
       func_execute_cmds "$reload_cmds" 'exit $?'
 
       # Exit if we aren't doing a library object file.
@@ -8662,7 +10157,7 @@ EOF
        exit $EXIT_SUCCESS
       fi
 
-      if test "$build_libtool_libs" != yes; then
+      test yes = "$build_libtool_libs" || {
        if test -n "$gentop"; then
          func_show_eval '${RM}r "$gentop"'
        fi
@@ -8672,12 +10167,12 @@ EOF
        # $show "echo timestamp > $libobj"
        # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
        exit $EXIT_SUCCESS
-      fi
+      }
 
-      if test -n "$pic_flag" || test "$pic_mode" != default; then
+      if test -n "$pic_flag" || test default != "$pic_mode"; then
        # Only do commands if we really have different PIC objects.
        reload_objs="$libobjs $reload_conv_objs"
-       output="$libobj"
+       output=$libobj
        func_execute_cmds "$reload_cmds" 'exit $?'
       fi
 
@@ -8694,16 +10189,14 @@ EOF
                  output=$func_stripname_result.exe;;
       esac
       test -n "$vinfo" && \
-       func_warning "\`-version-info' is ignored for programs"
+       func_warning "'-version-info' is ignored for programs"
 
       test -n "$release" && \
-       func_warning "\`-release' is ignored for programs"
+       func_warning "'-release' is ignored for programs"
 
-      test "$preload" = yes \
-        && test "$dlopen_support" = unknown \
-       && test "$dlopen_self" = unknown \
-       && test "$dlopen_self_static" = unknown && \
-         func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
+      $preload \
+       && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \
+       && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support."
 
       case $host in
       *-*-rhapsody* | *-*-darwin1.[012])
@@ -8717,11 +10210,11 @@ EOF
       *-*-darwin*)
        # Don't allow lazy linking, it breaks C++ global constructors
        # But is supposedly fixed on 10.4 or later (yay!).
-       if test "$tagname" = CXX ; then
+       if test CXX = "$tagname"; then
          case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
            10.[0123])
-             func_append compile_command " ${wl}-bind_at_load"
-             func_append finalize_command " ${wl}-bind_at_load"
+             func_append compile_command " $wl-bind_at_load"
+             func_append finalize_command " $wl-bind_at_load"
            ;;
          esac
        fi
@@ -8757,7 +10250,7 @@ EOF
        *) func_append new_libs " $deplib" ;;
        esac
       done
-      compile_deplibs="$new_libs"
+      compile_deplibs=$new_libs
 
 
       func_append compile_command " $compile_deplibs"
@@ -8781,7 +10274,7 @@ EOF
        if test -n "$hardcode_libdir_flag_spec"; then
          if test -n "$hardcode_libdir_separator"; then
            if test -z "$hardcode_libdirs"; then
-             hardcode_libdirs="$libdir"
+             hardcode_libdirs=$libdir
            else
              # Just accumulate the unique libdirs.
              case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
@@ -8804,7 +10297,7 @@ EOF
        fi
        case $host in
        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
-         testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
+         testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
          case :$dllsearchpath: in
          *":$libdir:"*) ;;
          ::) dllsearchpath=$libdir;;
@@ -8821,10 +10314,10 @@ EOF
       # Substitute the hardcoded libdirs into the rpath.
       if test -n "$hardcode_libdir_separator" &&
         test -n "$hardcode_libdirs"; then
-       libdir="$hardcode_libdirs"
+       libdir=$hardcode_libdirs
        eval rpath=\" $hardcode_libdir_flag_spec\"
       fi
-      compile_rpath="$rpath"
+      compile_rpath=$rpath
 
       rpath=
       hardcode_libdirs=
@@ -8832,7 +10325,7 @@ EOF
        if test -n "$hardcode_libdir_flag_spec"; then
          if test -n "$hardcode_libdir_separator"; then
            if test -z "$hardcode_libdirs"; then
-             hardcode_libdirs="$libdir"
+             hardcode_libdirs=$libdir
            else
              # Just accumulate the unique libdirs.
              case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
@@ -8857,45 +10350,43 @@ EOF
       # Substitute the hardcoded libdirs into the rpath.
       if test -n "$hardcode_libdir_separator" &&
         test -n "$hardcode_libdirs"; then
-       libdir="$hardcode_libdirs"
+       libdir=$hardcode_libdirs
        eval rpath=\" $hardcode_libdir_flag_spec\"
       fi
-      finalize_rpath="$rpath"
+      finalize_rpath=$rpath
 
-      if test -n "$libobjs" && test "$build_old_libs" = yes; then
+      if test -n "$libobjs" && test yes = "$build_old_libs"; then
        # Transform all the library objects into standard objects.
        compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
        finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
       fi
 
-      func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
+      func_generate_dlsyms "$outputname" "@PROGRAM@" false
 
       # template prelinking step
       if test -n "$prelink_cmds"; then
        func_execute_cmds "$prelink_cmds" 'exit $?'
       fi
 
-      wrappers_required=yes
+      wrappers_required=:
       case $host in
       *cegcc* | *mingw32ce*)
         # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
-        wrappers_required=no
+        wrappers_required=false
         ;;
       *cygwin* | *mingw* )
-        if test "$build_libtool_libs" != yes; then
-          wrappers_required=no
-        fi
+        test yes = "$build_libtool_libs" || wrappers_required=false
         ;;
       *)
-        if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
-          wrappers_required=no
+        if test no = "$need_relink" || test yes != "$build_libtool_libs"; then
+          wrappers_required=false
         fi
         ;;
       esac
-      if test "$wrappers_required" = no; then
+      $wrappers_required || {
        # Replace the output file specification.
        compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
-       link_command="$compile_command$compile_rpath"
+       link_command=$compile_command$compile_rpath
 
        # We have no uninstalled library dependencies, so finalize right now.
        exit_status=0
@@ -8908,12 +10399,12 @@ EOF
        fi
 
        # Delete the generated files.
-       if test -f "$output_objdir/${outputname}S.${objext}"; then
-         func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
+       if test -f "$output_objdir/${outputname}S.$objext"; then
+         func_show_eval '$RM "$output_objdir/${outputname}S.$objext"'
        fi
 
        exit $exit_status
-      fi
+      }
 
       if test -n "$compile_shlibpath$finalize_shlibpath"; then
        compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
@@ -8943,9 +10434,9 @@ EOF
        fi
       fi
 
-      if test "$no_install" = yes; then
+      if test yes = "$no_install"; then
        # We don't need to create a wrapper script.
-       link_command="$compile_var$compile_command$compile_rpath"
+       link_command=$compile_var$compile_command$compile_rpath
        # Replace the output file specification.
        link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
        # Delete the old output file.
@@ -8962,27 +10453,28 @@ EOF
        exit $EXIT_SUCCESS
       fi
 
-      if test "$hardcode_action" = relink; then
-       # Fast installation is not supported
-       link_command="$compile_var$compile_command$compile_rpath"
-       relink_command="$finalize_var$finalize_command$finalize_rpath"
+      case $hardcode_action,$fast_install in
+        relink,*)
+         # Fast installation is not supported
+         link_command=$compile_var$compile_command$compile_rpath
+         relink_command=$finalize_var$finalize_command$finalize_rpath
 
-       func_warning "this platform does not like uninstalled shared libraries"
-       func_warning "\`$output' will be relinked during installation"
-      else
-       if test "$fast_install" != no; then
-         link_command="$finalize_var$compile_command$finalize_rpath"
-         if test "$fast_install" = yes; then
-           relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
-         else
-           # fast_install is set to needless
-           relink_command=
-         fi
-       else
-         link_command="$compile_var$compile_command$compile_rpath"
-         relink_command="$finalize_var$finalize_command$finalize_rpath"
-       fi
-      fi
+         func_warning "this platform does not like uninstalled shared libraries"
+         func_warning "'$output' will be relinked during installation"
+         ;;
+        *,yes)
+         link_command=$finalize_var$compile_command$finalize_rpath
+         relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
+          ;;
+       *,no)
+         link_command=$compile_var$compile_command$compile_rpath
+         relink_command=$finalize_var$finalize_command$finalize_rpath
+          ;;
+       *,needless)
+         link_command=$finalize_var$compile_command$finalize_rpath
+         relink_command=
+          ;;
+      esac
 
       # Replace the output file specification.
       link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
@@ -9039,8 +10531,8 @@ EOF
            func_dirname_and_basename "$output" "" "."
            output_name=$func_basename_result
            output_path=$func_dirname_result
-           cwrappersource="$output_path/$objdir/lt-$output_name.c"
-           cwrapper="$output_path/$output_name.exe"
+           cwrappersource=$output_path/$objdir/lt-$output_name.c
+           cwrapper=$output_path/$output_name.exe
            $RM $cwrappersource $cwrapper
            trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
 
@@ -9061,7 +10553,7 @@ EOF
            trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
            $opt_dry_run || {
              # note: this script will not be executed, so do not chmod.
-             if test "x$build" = "x$host" ; then
+             if test "x$build" = "x$host"; then
                $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
              else
                func_emit_wrapper no > $func_ltwrapper_scriptname_result
@@ -9084,25 +10576,27 @@ EOF
     # See if we need to build an old-fashioned archive.
     for oldlib in $oldlibs; do
 
-      if test "$build_libtool_libs" = convenience; then
-       oldobjs="$libobjs_save $symfileobj"
-       addlibs="$convenience"
-       build_libtool_libs=no
-      else
-       if test "$build_libtool_libs" = module; then
-         oldobjs="$libobjs_save"
+      case $build_libtool_libs in
+        convenience)
+         oldobjs="$libobjs_save $symfileobj"
+         addlibs=$convenience
          build_libtool_libs=no
-       else
+         ;;
+       module)
+         oldobjs=$libobjs_save
+         addlibs=$old_convenience
+         build_libtool_libs=no
+          ;;
+       *)
          oldobjs="$old_deplibs $non_pic_objects"
-         if test "$preload" = yes && test -f "$symfileobj"; then
-           func_append oldobjs " $symfileobj"
-         fi
-       fi
-       addlibs="$old_convenience"
-      fi
+         $preload && test -f "$symfileobj" \
+           && func_append oldobjs " $symfileobj"
+         addlibs=$old_convenience
+         ;;
+      esac
 
       if test -n "$addlibs"; then
-       gentop="$output_objdir/${outputname}x"
+       gentop=$output_objdir/${outputname}x
        func_append generated " $gentop"
 
        func_extract_archives $gentop $addlibs
@@ -9110,13 +10604,13 @@ EOF
       fi
 
       # Do each command in the archive commands.
-      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+      if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then
        cmds=$old_archive_from_new_cmds
       else
 
        # Add any objects from preloaded convenience libraries
        if test -n "$dlprefiles"; then
-         gentop="$output_objdir/${outputname}x"
+         gentop=$output_objdir/${outputname}x
          func_append generated " $gentop"
 
          func_extract_archives $gentop $dlprefiles
@@ -9137,7 +10631,7 @@ EOF
          :
        else
          echo "copying selected object files to avoid basename conflicts..."
-         gentop="$output_objdir/${outputname}x"
+         gentop=$output_objdir/${outputname}x
          func_append generated " $gentop"
          func_mkdir_p "$gentop"
          save_oldobjs=$oldobjs
@@ -9146,7 +10640,7 @@ EOF
          for obj in $save_oldobjs
          do
            func_basename "$obj"
-           objbase="$func_basename_result"
+           objbase=$func_basename_result
            case " $oldobjs " in
            " ") oldobjs=$obj ;;
            *[\ /]"$objbase "*)
@@ -9215,18 +10709,18 @@ EOF
            else
              # the above command should be used before it gets too long
              oldobjs=$objlist
-             if test "$obj" = "$last_oldobj" ; then
+             if test "$obj" = "$last_oldobj"; then
                RANLIB=$save_RANLIB
              fi
              test -z "$concat_cmds" || concat_cmds=$concat_cmds~
-             eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+             eval concat_cmds=\"\$concat_cmds$old_archive_cmds\"
              objlist=
              len=$len0
            fi
          done
          RANLIB=$save_RANLIB
          oldobjs=$objlist
-         if test "X$oldobjs" = "X" ; then
+         if test -z "$oldobjs"; then
            eval cmds=\"\$concat_cmds\"
          else
            eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
@@ -9243,7 +10737,7 @@ EOF
     case $output in
     *.la)
       old_library=
-      test "$build_old_libs" = yes && old_library="$libname.$libext"
+      test yes = "$build_old_libs" && old_library=$libname.$libext
       func_verbose "creating $output"
 
       # Preserve any variables that may affect compiler behavior
@@ -9258,31 +10752,31 @@ EOF
        fi
       done
       # Quote the link command for shipping.
-      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+      relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
       relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
-      if test "$hardcode_automatic" = yes ; then
+      if test yes = "$hardcode_automatic"; then
        relink_command=
       fi
 
       # Only create the output if not a dry run.
       $opt_dry_run || {
        for installed in no yes; do
-         if test "$installed" = yes; then
+         if test yes = "$installed"; then
            if test -z "$install_libdir"; then
              break
            fi
-           output="$output_objdir/$outputname"i
+           output=$output_objdir/${outputname}i
            # Replace all uninstalled libtool libraries with the installed ones
            newdependency_libs=
            for deplib in $dependency_libs; do
              case $deplib in
              *.la)
                func_basename "$deplib"
-               name="$func_basename_result"
+               name=$func_basename_result
                func_resolve_sysroot "$deplib"
-               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
+               eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
                test -z "$libdir" && \
-                 func_fatal_error "\`$deplib' is not a valid libtool archive"
+                 func_fatal_error "'$deplib' is not a valid libtool archive"
                func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
                ;;
              -L*)
@@ -9298,23 +10792,23 @@ EOF
              *) func_append newdependency_libs " $deplib" ;;
              esac
            done
-           dependency_libs="$newdependency_libs"
+           dependency_libs=$newdependency_libs
            newdlfiles=
 
            for lib in $dlfiles; do
              case $lib in
              *.la)
                func_basename "$lib"
-               name="$func_basename_result"
-               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+               name=$func_basename_result
+               eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
                test -z "$libdir" && \
-                 func_fatal_error "\`$lib' is not a valid libtool archive"
+                 func_fatal_error "'$lib' is not a valid libtool archive"
                func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
                ;;
              *) func_append newdlfiles " $lib" ;;
              esac
            done
-           dlfiles="$newdlfiles"
+           dlfiles=$newdlfiles
            newdlprefiles=
            for lib in $dlprefiles; do
              case $lib in
@@ -9324,34 +10818,34 @@ EOF
                # didn't already link the preopened objects directly into
                # the library:
                func_basename "$lib"
-               name="$func_basename_result"
-               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+               name=$func_basename_result
+               eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
                test -z "$libdir" && \
-                 func_fatal_error "\`$lib' is not a valid libtool archive"
+                 func_fatal_error "'$lib' is not a valid libtool archive"
                func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
                ;;
              esac
            done
-           dlprefiles="$newdlprefiles"
+           dlprefiles=$newdlprefiles
          else
            newdlfiles=
            for lib in $dlfiles; do
              case $lib in
-               [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+               [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
                *) abs=`pwd`"/$lib" ;;
              esac
              func_append newdlfiles " $abs"
            done
-           dlfiles="$newdlfiles"
+           dlfiles=$newdlfiles
            newdlprefiles=
            for lib in $dlprefiles; do
              case $lib in
-               [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+               [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
                *) abs=`pwd`"/$lib" ;;
              esac
              func_append newdlprefiles " $abs"
            done
-           dlprefiles="$newdlprefiles"
+           dlprefiles=$newdlprefiles
          fi
          $RM $output
          # place dlname in correct position for cygwin
@@ -9367,10 +10861,9 @@ EOF
          case $host,$output,$installed,$module,$dlname in
            *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
              # If a -bindir argument was supplied, place the dll there.
-             if test "x$bindir" != x ;
-             then
+             if test -n "$bindir"; then
                func_relative_path "$install_libdir" "$bindir"
-               tdlname=$func_relative_path_result$dlname
+               tdlname=$func_relative_path_result/$dlname
              else
                # Otherwise fall back on heuristic.
                tdlname=../bin/$dlname
@@ -9379,7 +10872,7 @@ EOF
          esac
          $ECHO > $output "\
 # $outputname - a libtool library file
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
 #
 # Please DO NOT delete this file!
 # It is necessary for linking the library.
@@ -9393,7 +10886,7 @@ library_names='$library_names'
 # The name of the static archive.
 old_library='$old_library'
 
-# Linker flags that can not go in dependency_libs.
+# Linker flags that cannot go in dependency_libs.
 inherited_linker_flags='$new_inherited_linker_flags'
 
 # Libraries that this one depends upon.
@@ -9419,7 +10912,7 @@ dlpreopen='$dlprefiles'
 
 # Directory that this library needs to be installed in:
 libdir='$install_libdir'"
-         if test "$installed" = no && test "$need_relink" = yes; then
+         if test no,yes = "$installed,$need_relink"; then
            $ECHO >> $output "\
 relink_command=\"$relink_command\""
          fi
@@ -9434,27 +10927,29 @@ relink_command=\"$relink_command\""
     exit $EXIT_SUCCESS
 }
 
-{ test "$opt_mode" = link || test "$opt_mode" = relink; } &&
-    func_mode_link ${1+"$@"}
+if test link = "$opt_mode" || test relink = "$opt_mode"; then
+  func_mode_link ${1+"$@"}
+fi
 
 
 # func_mode_uninstall arg...
 func_mode_uninstall ()
 {
-    $opt_debug
-    RM="$nonopt"
+    $debug_cmd
+
+    RM=$nonopt
     files=
-    rmforce=
+    rmforce=false
     exit_status=0
 
     # This variable tells wrapper scripts just to set variables rather
     # than running their programs.
-    libtool_install_magic="$magic"
+    libtool_install_magic=$magic
 
     for arg
     do
       case $arg in
-      -f) func_append RM " $arg"; rmforce=yes ;;
+      -f) func_append RM " $arg"; rmforce=: ;;
       -*) func_append RM " $arg" ;;
       *) func_append files " $arg" ;;
       esac
@@ -9467,18 +10962,18 @@ func_mode_uninstall ()
 
     for file in $files; do
       func_dirname "$file" "" "."
-      dir="$func_dirname_result"
-      if test "X$dir" = X.; then
-       odir="$objdir"
+      dir=$func_dirname_result
+      if test . = "$dir"; then
+       odir=$objdir
       else
-       odir="$dir/$objdir"
+       odir=$dir/$objdir
       fi
       func_basename "$file"
-      name="$func_basename_result"
-      test "$opt_mode" = uninstall && odir="$dir"
+      name=$func_basename_result
+      test uninstall = "$opt_mode" && odir=$dir
 
       # Remember odir for removal later, being careful to avoid duplicates
-      if test "$opt_mode" = clean; then
+      if test clean = "$opt_mode"; then
        case " $rmdirs " in
          *" $odir "*) ;;
          *) func_append rmdirs " $odir" ;;
@@ -9493,11 +10988,11 @@ func_mode_uninstall ()
       elif test -d "$file"; then
        exit_status=1
        continue
-      elif test "$rmforce" = yes; then
+      elif $rmforce; then
        continue
       fi
 
-      rmfiles="$file"
+      rmfiles=$file
 
       case $name in
       *.la)
@@ -9511,7 +11006,7 @@ func_mode_uninstall ()
          done
          test -n "$old_library" && func_append rmfiles " $odir/$old_library"
 
-         case "$opt_mode" in
+         case $opt_mode in
          clean)
            case " $library_names " in
            *" $dlname "*) ;;
@@ -9522,12 +11017,12 @@ func_mode_uninstall ()
          uninstall)
            if test -n "$library_names"; then
              # Do each command in the postuninstall commands.
-             func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+             func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1'
            fi
 
            if test -n "$old_library"; then
              # Do each command in the old_postuninstall commands.
-             func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+             func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1'
            fi
            # FIXME: should reinstall the best remaining shared library.
            ;;
@@ -9543,21 +11038,19 @@ func_mode_uninstall ()
          func_source $dir/$name
 
          # Add PIC object to the list of files to remove.
-         if test -n "$pic_object" &&
-            test "$pic_object" != none; then
+         if test -n "$pic_object" && test none != "$pic_object"; then
            func_append rmfiles " $dir/$pic_object"
          fi
 
          # Add non-PIC object to the list of files to remove.
-         if test -n "$non_pic_object" &&
-            test "$non_pic_object" != none; then
+         if test -n "$non_pic_object" && test none != "$non_pic_object"; then
            func_append rmfiles " $dir/$non_pic_object"
          fi
        fi
        ;;
 
       *)
-       if test "$opt_mode" = clean ; then
+       if test clean = "$opt_mode"; then
          noexename=$name
          case $file in
          *.exe)
@@ -9584,12 +11077,12 @@ func_mode_uninstall ()
 
            # note $name still contains .exe if it was in $file originally
            # as does the version of $file that was added into $rmfiles
-           func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
-           if test "$fast_install" = yes && test -n "$relink_command"; then
+           func_append rmfiles " $odir/$name $odir/${name}S.$objext"
+           if test yes = "$fast_install" && test -n "$relink_command"; then
              func_append rmfiles " $odir/lt-$name"
            fi
-           if test "X$noexename" != "X$name" ; then
-             func_append rmfiles " $odir/lt-${noexename}.c"
+           if test "X$noexename" != "X$name"; then
+             func_append rmfiles " $odir/lt-$noexename.c"
            fi
          fi
        fi
@@ -9598,7 +11091,7 @@ func_mode_uninstall ()
       func_show_eval "$RM $rmfiles" 'exit_status=1'
     done
 
-    # Try to remove the ${objdir}s in the directories where we deleted files
+    # Try to remove the $objdir's in the directories where we deleted files
     for dir in $rmdirs; do
       if test -d "$dir"; then
        func_show_eval "rmdir $dir >/dev/null 2>&1"
@@ -9608,16 +11101,17 @@ func_mode_uninstall ()
     exit $exit_status
 }
 
-{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
-    func_mode_uninstall ${1+"$@"}
+if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then
+  func_mode_uninstall ${1+"$@"}
+fi
 
 test -z "$opt_mode" && {
-  help="$generic_help"
+  help=$generic_help
   func_fatal_help "you must specify a MODE"
 }
 
 test -z "$exec_cmd" && \
-  func_fatal_help "invalid operation mode \`$opt_mode'"
+  func_fatal_help "invalid operation mode '$opt_mode'"
 
 if test -n "$exec_cmd"; then
   eval exec "$exec_cmd"
@@ -9628,7 +11122,7 @@ exit $exit_status
 
 
 # The TAGs below are defined such that we never get into a situation
-# in which we disable both kinds of libraries.  Given conflicting
+# where we disable both kinds of libraries.  Given conflicting
 # choices, we go for a static library, that is the most portable,
 # since we can't tell whether shared libraries were disabled because
 # the user asked for that or because the platform doesn't support
@@ -9651,5 +11145,3 @@ build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
 # mode:shell-script
 # sh-indentation:2
 # End:
-# vi:sw=2
-
index f12cfdf..a644432 100644 (file)
@@ -1,8 +1,6 @@
 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 #
-#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-#                 Foundation, Inc.
+#   Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 # This file is free software; the Free Software Foundation gives
 # modifications, as long as this notice is preserved.
 
 m4_define([_LT_COPYING], [dnl
-#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-#                 Foundation, Inc.
-#   Written by Gordon Matzigkeit, 1996
-#
-#   This file is part of GNU Libtool.
-#
-# GNU Libtool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
+# Copyright (C) 2014 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions.  There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of of the License, or
+# (at your option) any later version.
 #
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program or library that is built
+# using GNU Libtool, you may include this file under the  same
+# distribution terms that you use for the rest of that program.
 #
-# GNU Libtool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING.  If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ])
 
-# serial 57 LT_INIT
+# serial 58 LT_INIT
 
 
 # LT_PREREQ(VERSION)
@@ -67,7 +59,7 @@ esac
 # LT_INIT([OPTIONS])
 # ------------------
 AC_DEFUN([LT_INIT],
-[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
 AC_BEFORE([$0], [LT_LANG])dnl
 AC_BEFORE([$0], [LT_OUTPUT])dnl
@@ -91,7 +83,7 @@ dnl Parse OPTIONS
 _LT_SET_OPTIONS([$0], [$1])
 
 # This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
+LIBTOOL_DEPS=$ltmain
 
 # Always use our own libtool.
 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
@@ -111,26 +103,43 @@ dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
 
 
+# _LT_PREPARE_CC_BASENAME
+# -----------------------
+m4_defun([_LT_PREPARE_CC_BASENAME], [
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+    for cc_temp in @S|@*""; do
+      case $cc_temp in
+        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+        \-*) ;;
+        *) break;;
+      esac
+    done
+    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+])# _LT_PREPARE_CC_BASENAME
+
+
 # _LT_CC_BASENAME(CC)
 # -------------------
-# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
+# but that macro is also expanded into generated libtool script, which
+# arranges for $SED and $ECHO to be set by different means.
 m4_defun([_LT_CC_BASENAME],
-[for cc_temp in $1""; do
-  case $cc_temp in
-    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
-    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+[m4_require([_LT_PREPARE_CC_BASENAME])dnl
+AC_REQUIRE([_LT_DECL_SED])dnl
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
+func_cc_basename $1
+cc_basename=$func_cc_basename_result
 ])
 
 
 # _LT_FILEUTILS_DEFAULTS
 # ----------------------
 # It is okay to use these file commands and assume they have been set
-# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
+# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
 m4_defun([_LT_FILEUTILS_DEFAULTS],
 [: ${CP="cp -f"}
 : ${MV="mv -f"}
@@ -177,15 +186,16 @@ m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
 m4_require([_LT_WITH_SYSROOT])dnl
+m4_require([_LT_CMD_TRUNCATE])dnl
 
 _LT_CONFIG_LIBTOOL_INIT([
-# See if we are running on zsh, and set the options which allow our
+# See if we are running on zsh, and set the options that allow our
 # commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
+if test -n "\${ZSH_VERSION+set}"; then
    setopt NO_GLOB_SUBST
 fi
 ])
-if test -n "${ZSH_VERSION+set}" ; then
+if test -n "${ZSH_VERSION+set}"; then
    setopt NO_GLOB_SUBST
 fi
 
@@ -198,7 +208,7 @@ aix3*)
   # AIX sometimes has problems with the GCC collect2 program.  For some
   # reason, if we set the COLLECT_NAMES environment variable, the problems
   # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
+  if test set != "${COLLECT_NAMES+set}"; then
     COLLECT_NAMES=
     export COLLECT_NAMES
   fi
@@ -209,14 +219,14 @@ esac
 ofile=libtool
 can_build_shared=yes
 
-# All known linkers require a `.a' archive for static linking (except MSVC,
+# All known linkers require a '.a' archive for static linking (except MSVC,
 # which needs '.lib').
 libext=a
 
-with_gnu_ld="$lt_cv_prog_gnu_ld"
+with_gnu_ld=$lt_cv_prog_gnu_ld
 
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
+old_CC=$CC
+old_CFLAGS=$CFLAGS
 
 # Set sane defaults for various variables
 test -z "$CC" && CC=cc
@@ -269,14 +279,14 @@ no_glob_subst='s/\*/\\\*/g'
 
 # _LT_PROG_LTMAIN
 # ---------------
-# Note that this code is called both from `configure', and `config.status'
+# Note that this code is called both from 'configure', and 'config.status'
 # now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
-# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# 'config.status' has no value for ac_aux_dir unless we are using Automake,
 # so we pass a copy along to make sure it has a sensible value anyway.
 m4_defun([_LT_PROG_LTMAIN],
 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
-ltmain="$ac_aux_dir/ltmain.sh"
+ltmain=$ac_aux_dir/ltmain.sh
 ])# _LT_PROG_LTMAIN
 
 
@@ -286,7 +296,7 @@ ltmain="$ac_aux_dir/ltmain.sh"
 
 # So that we can recreate a full libtool script including additional
 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
-# in macros and then make a single call at the end using the `libtool'
+# in macros and then make a single call at the end using the 'libtool'
 # label.
 
 
@@ -421,8 +431,8 @@ m4_define([_lt_decl_all_varnames],
 
 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
 # ------------------------------------
-# Quote a variable value, and forward it to `config.status' so that its
-# declaration there will have the same value as in `configure'.  VARNAME
+# Quote a variable value, and forward it to 'config.status' so that its
+# declaration there will have the same value as in 'configure'.  VARNAME
 # must have a single quote delimited value for this to work.
 m4_define([_LT_CONFIG_STATUS_DECLARE],
 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
@@ -446,7 +456,7 @@ m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
 # Output comment and list of tags supported by the script
 m4_defun([_LT_LIBTOOL_TAGS],
 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
-available_tags="_LT_TAGS"dnl
+available_tags='_LT_TAGS'dnl
 ])
 
 
@@ -474,7 +484,7 @@ m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
 # _LT_LIBTOOL_CONFIG_VARS
 # -----------------------
 # Produce commented declarations of non-tagged libtool config variables
-# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
 # script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
 # section) are produced by _LT_LIBTOOL_TAG_VARS.
 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
@@ -500,8 +510,8 @@ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
 # Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
 # variables for single and double quote escaping we saved from calls
 # to _LT_DECL, we can put quote escaped variables declarations
-# into `config.status', and then the shell code to quote escape them in
-# for loops in `config.status'.  Finally, any additional code accumulated
+# into 'config.status', and then the shell code to quote escape them in
+# for loops in 'config.status'.  Finally, any additional code accumulated
 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
 m4_defun([_LT_CONFIG_COMMANDS],
 [AC_PROVIDE_IFELSE([LT_OUTPUT],
@@ -547,7 +557,7 @@ for var in lt_decl_all_varnames([[ \
 ]], lt_decl_quote_varnames); do
     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -560,7 +570,7 @@ for var in lt_decl_all_varnames([[ \
 ]], lt_decl_dquote_varnames); do
     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -576,7 +586,7 @@ _LT_OUTPUT_LIBTOOL_INIT
 # Generate a child script FILE with all initialization necessary to
 # reuse the environment learned by the parent script, and make the
 # file executable.  If COMMENT is supplied, it is inserted after the
-# `#!' sequence but before initialization text begins.  After this
+# '#!' sequence but before initialization text begins.  After this
 # macro, additional text can be appended to FILE to form the body of
 # the child script.  The macro ends with non-zero status if the
 # file could not be fully written (such as if the disk is full).
@@ -598,7 +608,7 @@ AS_SHELL_SANITIZE
 _AS_PREPARE
 exec AS_MESSAGE_FD>&1
 _ASEOF
-test $lt_write_fail = 0 && chmod +x $1[]dnl
+test 0 = "$lt_write_fail" && chmod +x $1[]dnl
 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
 
 # LT_OUTPUT
@@ -621,7 +631,7 @@ exec AS_MESSAGE_LOG_FD>>config.log
 } >&AS_MESSAGE_LOG_FD
 
 lt_cl_help="\
-\`$as_me' creates a local libtool stub from the current configuration,
+'$as_me' creates a local libtool stub from the current configuration,
 for use in further configure time tests before the real libtool is
 generated.
 
@@ -643,7 +653,7 @@ Copyright (C) 2011 Free Software Foundation, Inc.
 This config.lt script is free software; the Free Software Foundation
 gives unlimited permision to copy, distribute and modify it."
 
-while test $[#] != 0
+while test 0 != $[#]
 do
   case $[1] in
     --version | --v* | -V )
@@ -656,10 +666,10 @@ do
       lt_cl_silent=: ;;
 
     -*) AC_MSG_ERROR([unrecognized option: $[1]
-Try \`$[0] --help' for more information.]) ;;
+Try '$[0] --help' for more information.]) ;;
 
     *) AC_MSG_ERROR([unrecognized argument: $[1]
-Try \`$[0] --help' for more information.]) ;;
+Try '$[0] --help' for more information.]) ;;
   esac
   shift
 done
@@ -685,7 +695,7 @@ chmod +x "$CONFIG_LT"
 # open by configure.  Here we exec the FD to /dev/null, effectively closing
 # config.log, so it can be properly (re)opened and appended to by config.lt.
 lt_cl_success=:
-test "$silent" = yes &&
+test yes = "$silent" &&
   lt_config_lt_args="$lt_config_lt_args --quiet"
 exec AS_MESSAGE_LOG_FD>/dev/null
 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
@@ -705,27 +715,31 @@ m4_defun([_LT_CONFIG],
 _LT_CONFIG_SAVE_COMMANDS([
   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
   m4_if(_LT_TAG, [C], [
-    # See if we are running on zsh, and set the options which allow our
+    # See if we are running on zsh, and set the options that allow our
     # commands through without removal of \ escapes.
-    if test -n "${ZSH_VERSION+set}" ; then
+    if test -n "${ZSH_VERSION+set}"; then
       setopt NO_GLOB_SUBST
     fi
 
-    cfgfile="${ofile}T"
+    cfgfile=${ofile}T
     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
     $RM "$cfgfile"
 
     cat <<_LT_EOF >> "$cfgfile"
 #! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Generated automatically by $as_me ($PACKAGE) $VERSION
 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
+
+# Provide generalized library-building support services.
+# Written by Gordon Matzigkeit, 1996
+
 _LT_COPYING
 _LT_LIBTOOL_TAGS
 
+# Configured defaults for sys_lib_dlsearch_path munging.
+: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
+
 # ### BEGIN LIBTOOL CONFIG
 _LT_LIBTOOL_CONFIG_VARS
 _LT_LIBTOOL_TAG_VARS
@@ -733,13 +747,24 @@ _LT_LIBTOOL_TAG_VARS
 
 _LT_EOF
 
+    cat <<'_LT_EOF' >> "$cfgfile"
+
+# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
+
+_LT_PREPARE_MUNGE_PATH_LIST
+_LT_PREPARE_CC_BASENAME
+
+# ### END FUNCTIONS SHARED WITH CONFIGURE
+
+_LT_EOF
+
   case $host_os in
   aix3*)
     cat <<\_LT_EOF >> "$cfgfile"
 # AIX sometimes has problems with the GCC collect2 program.  For some
 # reason, if we set the COLLECT_NAMES environment variable, the problems
 # vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
+if test set != "${COLLECT_NAMES+set}"; then
   COLLECT_NAMES=
   export COLLECT_NAMES
 fi
@@ -756,8 +781,6 @@ _LT_EOF
   sed '$q' "$ltmain" >> "$cfgfile" \
      || (rm -f "$cfgfile"; exit 1)
 
-  _LT_PROG_REPLACE_SHELLFNS
-
    mv -f "$cfgfile" "$ofile" ||
     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
   chmod +x "$ofile"
@@ -775,7 +798,6 @@ _LT_EOF
 [m4_if([$1], [], [
     PACKAGE='$PACKAGE'
     VERSION='$VERSION'
-    TIMESTAMP='$TIMESTAMP'
     RM='$RM'
     ofile='$ofile'], [])
 ])dnl /_LT_CONFIG_SAVE_COMMANDS
@@ -974,7 +996,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 
     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
       [lt_cv_apple_cc_single_mod=no
-      if test -z "${LT_MULTI_MODULE}"; then
+      if test -z "$LT_MULTI_MODULE"; then
        # By default we will add the -single_module flag. You can override
        # by either setting the environment variable LT_MULTI_MODULE
        # non-empty at configure time, or by adding -multi_module to the
@@ -992,7 +1014,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
          cat conftest.err >&AS_MESSAGE_LOG_FD
        # Otherwise, if the output was created with a 0 exit code from
        # the compiler, it worked.
-       elif test -f libconftest.dylib && test $_lt_result -eq 0; then
+       elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
          lt_cv_apple_cc_single_mod=yes
        else
          cat conftest.err >&AS_MESSAGE_LOG_FD
@@ -1010,7 +1032,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
        [lt_cv_ld_exported_symbols_list=yes],
        [lt_cv_ld_exported_symbols_list=no])
-       LDFLAGS="$save_LDFLAGS"
+       LDFLAGS=$save_LDFLAGS
     ])
 
     AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
@@ -1032,7 +1054,7 @@ _LT_EOF
       _lt_result=$?
       if test -s conftest.err && $GREP force_load conftest.err; then
        cat conftest.err >&AS_MESSAGE_LOG_FD
-      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
+      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
        lt_cv_ld_force_load=yes
       else
        cat conftest.err >&AS_MESSAGE_LOG_FD
@@ -1042,32 +1064,32 @@ _LT_EOF
     ])
     case $host_os in
     rhapsody* | darwin1.[[012]])
-      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
     darwin1.*)
-      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
     darwin*) # darwin 5.x on
       # if running on 10.5 or later, the deployment target defaults
       # to the OS version, if on x86, and 10.4, the deployment
       # target defaults to 10.4. Don't you love it?
       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
        10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
-         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-       10.[[012]]*)
-         _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+         _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+       10.[[012]][[,.]]*)
+         _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
        10.*)
-         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+         _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
       esac
     ;;
   esac
-    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+    if test yes = "$lt_cv_apple_cc_single_mod"; then
       _lt_dar_single_mod='$single_module'
     fi
-    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
-      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+    if test yes = "$lt_cv_ld_exported_symbols_list"; then
+      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
     else
-      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
     fi
-    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
+    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
       _lt_dsymutil='~$DSYMUTIL $lib || :'
     else
       _lt_dsymutil=
@@ -1087,29 +1109,29 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
   _LT_TAGVAR(hardcode_direct, $1)=no
   _LT_TAGVAR(hardcode_automatic, $1)=yes
   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-  if test "$lt_cv_ld_force_load" = "yes"; then
-    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+  if test yes = "$lt_cv_ld_force_load"; then
+    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
     m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
                   [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
   else
     _LT_TAGVAR(whole_archive_flag_spec, $1)=''
   fi
   _LT_TAGVAR(link_all_deplibs, $1)=yes
-  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
   case $cc_basename in
-     ifort*) _lt_dar_can_shared=yes ;;
+     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
      *) _lt_dar_can_shared=$GCC ;;
   esac
-  if test "$_lt_dar_can_shared" = "yes"; then
+  if test yes = "$_lt_dar_can_shared"; then
     output_verbose_link_cmd=func_echo_all
-    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
-    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
-    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
     m4_if([$1], [CXX],
-[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
-      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
-      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+[   if test yes != "$lt_cv_apple_cc_single_mod"; then
+      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
+      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
     fi
 ],[])
   else
@@ -1129,7 +1151,7 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
 # Allow to override them for all tags through lt_cv_aix_libpath.
 m4_defun([_LT_SYS_MODULE_PATH_AIX],
 [m4_require([_LT_DECL_SED])dnl
-if test "${lt_cv_aix_libpath+set}" = set; then
+if test set = "${lt_cv_aix_libpath+set}"; then
   aix_libpath=$lt_cv_aix_libpath
 else
   AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
@@ -1147,7 +1169,7 @@ else
     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
   fi],[])
   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
-    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
+    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
   fi
   ])
   aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
@@ -1167,8 +1189,8 @@ m4_define([_LT_SHELL_INIT],
 # -----------------------
 # Find how we can fake an echo command that does not interpret backslash.
 # In particular, with Autoconf 2.60 or later we add some code to the start
-# of the generated configure script which will find a shell with a builtin
-# printf (which we can use as an echo command).
+# of the generated configure script that will find a shell with a builtin
+# printf (that we can use as an echo command).
 m4_defun([_LT_PROG_ECHO_BACKSLASH],
 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
@@ -1196,10 +1218,10 @@ fi
 # Invoke $ECHO with all args, space-separated.
 func_echo_all ()
 {
-    $ECHO "$*" 
+    $ECHO "$*"
 }
 
-case "$ECHO" in
+case $ECHO in
   printf*) AC_MSG_RESULT([printf]) ;;
   print*) AC_MSG_RESULT([print -r]) ;;
   *) AC_MSG_RESULT([cat]) ;;
@@ -1225,16 +1247,17 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
 AC_DEFUN([_LT_WITH_SYSROOT],
 [AC_MSG_CHECKING([for sysroot])
 AC_ARG_WITH([sysroot],
-[  --with-sysroot[=DIR] Search for dependent libraries within DIR
-                        (or the compiler's sysroot if not specified).],
+[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
+  [Search for dependent libraries within DIR (or the compiler's sysroot
+   if not specified).])],
 [], [with_sysroot=no])
 
 dnl lt_sysroot will always be passed unquoted.  We quote it here
 dnl in case the user passed a directory name.
 lt_sysroot=
-case ${with_sysroot} in #(
+case $with_sysroot in #(
  yes)
-   if test "$GCC" = yes; then
+   if test yes = "$GCC"; then
      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
    fi
    ;; #(
@@ -1244,14 +1267,14 @@ case ${with_sysroot} in #(
  no|'')
    ;; #(
  *)
-   AC_MSG_RESULT([${with_sysroot}])
+   AC_MSG_RESULT([$with_sysroot])
    AC_MSG_ERROR([The sysroot must be an absolute path.])
    ;;
 esac
 
  AC_MSG_RESULT([${lt_sysroot:-no}])
 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
-[dependent libraries, and in which our libraries should be installed.])])
+[dependent libraries, and where our libraries should be installed.])])
 
 # _LT_ENABLE_LOCK
 # ---------------
@@ -1259,31 +1282,33 @@ m4_defun([_LT_ENABLE_LOCK],
 [AC_ARG_ENABLE([libtool-lock],
   [AS_HELP_STRING([--disable-libtool-lock],
     [avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+test no = "$enable_libtool_lock" || enable_libtool_lock=yes
 
 # Some flags need to be propagated to the compiler or linker for good
 # libtool support.
 case $host in
 ia64-*-hpux*)
-  # Find out which ABI we are using.
+  # Find out what ABI is being produced by ac_compile, and set mode
+  # options accordingly.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     case `/usr/bin/file conftest.$ac_objext` in
       *ELF-32*)
-       HPUX_IA64_MODE="32"
+       HPUX_IA64_MODE=32
        ;;
       *ELF-64*)
-       HPUX_IA64_MODE="64"
+       HPUX_IA64_MODE=64
        ;;
     esac
   fi
   rm -rf conftest*
   ;;
 *-*-irix6*)
-  # Find out which ABI we are using.
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.
   echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
-    if test "$lt_cv_prog_gnu_ld" = yes; then
+    if test yes = "$lt_cv_prog_gnu_ld"; then
       case `/usr/bin/file conftest.$ac_objext` in
        *32-bit*)
          LD="${LD-ld} -melf32bsmip"
@@ -1312,9 +1337,46 @@ ia64-*-hpux*)
   rm -rf conftest*
   ;;
 
+mips64*-*linux*)
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.
+  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    emul=elf
+    case `/usr/bin/file conftest.$ac_objext` in
+      *32-bit*)
+       emul="${emul}32"
+       ;;
+      *64-bit*)
+       emul="${emul}64"
+       ;;
+    esac
+    case `/usr/bin/file conftest.$ac_objext` in
+      *MSB*)
+       emul="${emul}btsmip"
+       ;;
+      *LSB*)
+       emul="${emul}ltsmip"
+       ;;
+    esac
+    case `/usr/bin/file conftest.$ac_objext` in
+      *N32*)
+       emul="${emul}n32"
+       ;;
+    esac
+    LD="${LD-ld} -m $emul"
+  fi
+  rm -rf conftest*
+  ;;
+
 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
-  # Find out which ABI we are using.
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.  Note that the listed cases only cover the
+  # situations where additional linker options are needed (such as when
+  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
+  # vice versa); the common cases where no linker options are needed do
+  # not appear in the list.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     case `/usr/bin/file conftest.o` in
@@ -1324,7 +1386,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
            LD="${LD-ld} -m elf_i386_fbsd"
            ;;
          x86_64-*linux*)
-           LD="${LD-ld} -m elf_i386"
+           case `/usr/bin/file conftest.o` in
+             *x86-64*)
+               LD="${LD-ld} -m elf32_x86_64"
+               ;;
+             *)
+               LD="${LD-ld} -m elf_i386"
+               ;;
+           esac
            ;;
          powerpc64le-*linux*)
            LD="${LD-ld} -m elf32lppclinux"
@@ -1369,19 +1438,20 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 
 *-*-sco3.2v5*)
   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  SAVE_CFLAGS="$CFLAGS"
+  SAVE_CFLAGS=$CFLAGS
   CFLAGS="$CFLAGS -belf"
   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
     [AC_LANG_PUSH(C)
      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
      AC_LANG_POP])
-  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+  if test yes != "$lt_cv_cc_needs_belf"; then
     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS="$SAVE_CFLAGS"
+    CFLAGS=$SAVE_CFLAGS
   fi
   ;;
 *-*solaris*)
-  # Find out which ABI we are using.
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     case `/usr/bin/file conftest.o` in
@@ -1389,7 +1459,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
       case $lt_cv_prog_gnu_ld in
       yes*)
         case $host in
-        i?86-*-solaris*)
+        i?86-*-solaris*|x86_64-*-solaris*)
           LD="${LD-ld} -m elf_x86_64"
           ;;
         sparc*-*-solaris*)
@@ -1398,7 +1468,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
         esac
         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
-          LD="${LD-ld}_sol2"
+          LD=${LD-ld}_sol2
         fi
         ;;
       *)
@@ -1414,7 +1484,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
   ;;
 esac
 
-need_locks="$enable_libtool_lock"
+need_locks=$enable_libtool_lock
 ])# _LT_ENABLE_LOCK
 
 
@@ -1433,11 +1503,11 @@ AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
      [echo conftest.$ac_objext > conftest.lst
       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
       AC_TRY_EVAL([lt_ar_try])
-      if test "$ac_status" -eq 0; then
+      if test 0 -eq "$ac_status"; then
        # Ensure the archiver fails upon bogus file names.
        rm -f conftest.$ac_objext libconftest.a
        AC_TRY_EVAL([lt_ar_try])
-       if test "$ac_status" -ne 0; then
+       if test 0 -ne "$ac_status"; then
           lt_cv_ar_at_file=@
         fi
       fi
@@ -1445,7 +1515,7 @@ AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
      ])
   ])
 
-if test "x$lt_cv_ar_at_file" = xno; then
+if test no = "$lt_cv_ar_at_file"; then
   archiver_list_spec=
 else
   archiver_list_spec=$lt_cv_ar_at_file
@@ -1476,7 +1546,7 @@ old_postuninstall_cmds=
 
 if test -n "$RANLIB"; then
   case $host_os in
-  openbsd*)
+  bitrig* | openbsd*)
     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
     ;;
   *)
@@ -1512,7 +1582,7 @@ AC_CACHE_CHECK([$1], [$2],
   [$2=no
    m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$3"
+   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
    # Insert the option either (1) after the last *FLAGS variable, or
    # (2) before a word containing "conftest.", or (3) at the end.
    # Note that $ac_compile itself does not contain backslashes and begins
@@ -1539,7 +1609,7 @@ AC_CACHE_CHECK([$1], [$2],
    $RM conftest*
 ])
 
-if test x"[$]$2" = xyes; then
+if test yes = "[$]$2"; then
     m4_if([$5], , :, [$5])
 else
     m4_if([$6], , :, [$6])
@@ -1561,7 +1631,7 @@ AC_DEFUN([_LT_LINKER_OPTION],
 m4_require([_LT_DECL_SED])dnl
 AC_CACHE_CHECK([$1], [$2],
   [$2=no
-   save_LDFLAGS="$LDFLAGS"
+   save_LDFLAGS=$LDFLAGS
    LDFLAGS="$LDFLAGS $3"
    echo "$lt_simple_link_test_code" > conftest.$ac_ext
    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -1580,10 +1650,10 @@ AC_CACHE_CHECK([$1], [$2],
      fi
    fi
    $RM -r conftest*
-   LDFLAGS="$save_LDFLAGS"
+   LDFLAGS=$save_LDFLAGS
 ])
 
-if test x"[$]$2" = xyes; then
+if test yes = "[$]$2"; then
     m4_if([$4], , :, [$4])
 else
     m4_if([$5], , :, [$5])
@@ -1604,7 +1674,7 @@ AC_DEFUN([LT_CMD_MAX_LEN],
 AC_MSG_CHECKING([the maximum length of command line arguments])
 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
   i=0
-  teststring="ABCD"
+  teststring=ABCD
 
   case $build_os in
   msdosdjgpp*)
@@ -1644,7 +1714,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
-  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
     # This has been around since 386BSD, at least.  Likely further.
     if test -x /sbin/sysctl; then
       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -1694,22 +1764,23 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     ;;
   *)
     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
-    if test -n "$lt_cv_sys_max_cmd_len"; then
+    if test -n "$lt_cv_sys_max_cmd_len" && \
+       test undefined != "$lt_cv_sys_max_cmd_len"; then
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
     else
       # Make teststring a little bigger before we do anything with it.
       # a 1K string should be a reasonable start.
-      for i in 1 2 3 4 5 6 7 8 ; do
+      for i in 1 2 3 4 5 6 7 8; do
         teststring=$teststring$teststring
       done
       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
       # If test is not a shell built-in, we'll probably end up computing a
       # maximum length that is only half of the actual maximum length, but
       # we can't tell.
-      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
+      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
                 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
-             test $i != 17 # 1/2 MB should be enough
+             test 17 != "$i" # 1/2 MB should be enough
       do
         i=`expr $i + 1`
         teststring=$teststring$teststring
@@ -1725,7 +1796,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     ;;
   esac
 ])
-if test -n $lt_cv_sys_max_cmd_len ; then
+if test -n "$lt_cv_sys_max_cmd_len"; then
   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
 else
   AC_MSG_RESULT(none)
@@ -1753,7 +1824,7 @@ m4_defun([_LT_HEADER_DLFCN],
 # ----------------------------------------------------------------
 m4_defun([_LT_TRY_DLOPEN_SELF],
 [m4_require([_LT_HEADER_DLFCN])dnl
-if test "$cross_compiling" = yes; then :
+if test yes = "$cross_compiling"; then :
   [$4]
 else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
@@ -1800,9 +1871,9 @@ else
 #  endif
 #endif
 
-/* When -fvisbility=hidden is used, assume the code has been annotated
+/* When -fvisibility=hidden is used, assume the code has been annotated
    correspondingly for the symbols needed.  */
-#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
 int fnord () __attribute__((visibility("default")));
 #endif
 
@@ -1828,7 +1899,7 @@ int main ()
   return status;
 }]
 _LT_EOF
-  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
     lt_status=$?
     case x$lt_status in
@@ -1849,7 +1920,7 @@ rm -fr conftest*
 # ------------------
 AC_DEFUN([LT_SYS_DLOPEN_SELF],
 [m4_require([_LT_HEADER_DLFCN])dnl
-if test "x$enable_dlopen" != xyes; then
+if test yes != "$enable_dlopen"; then
   enable_dlopen=unknown
   enable_dlopen_self=unknown
   enable_dlopen_self_static=unknown
@@ -1859,44 +1930,52 @@ else
 
   case $host_os in
   beos*)
-    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen=load_add_on
     lt_cv_dlopen_libs=
     lt_cv_dlopen_self=yes
     ;;
 
   mingw* | pw32* | cegcc*)
-    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen=LoadLibrary
     lt_cv_dlopen_libs=
     ;;
 
   cygwin*)
-    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen=dlopen
     lt_cv_dlopen_libs=
     ;;
 
   darwin*)
-  # if libdl is installed we need to link against it
+    # if libdl is installed we need to link against it
     AC_CHECK_LIB([dl], [dlopen],
-               [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
-    lt_cv_dlopen="dyld"
+               [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
+    lt_cv_dlopen=dyld
     lt_cv_dlopen_libs=
     lt_cv_dlopen_self=yes
     ])
     ;;
 
+  tpf*)
+    # Don't try to run any link tests for TPF.  We know it's impossible
+    # because TPF is a cross-compiler, and we know how we open DSOs.
+    lt_cv_dlopen=dlopen
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=no
+    ;;
+
   *)
     AC_CHECK_FUNC([shl_load],
-         [lt_cv_dlopen="shl_load"],
+         [lt_cv_dlopen=shl_load],
       [AC_CHECK_LIB([dld], [shl_load],
-           [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
+           [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
        [AC_CHECK_FUNC([dlopen],
-             [lt_cv_dlopen="dlopen"],
+             [lt_cv_dlopen=dlopen],
          [AC_CHECK_LIB([dl], [dlopen],
-               [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+               [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
            [AC_CHECK_LIB([svld], [dlopen],
-                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+                 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
              [AC_CHECK_LIB([dld], [dld_link],
-                   [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
+                   [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
              ])
            ])
          ])
@@ -1905,21 +1984,21 @@ else
     ;;
   esac
 
-  if test "x$lt_cv_dlopen" != xno; then
-    enable_dlopen=yes
-  else
+  if test no = "$lt_cv_dlopen"; then
     enable_dlopen=no
+  else
+    enable_dlopen=yes
   fi
 
   case $lt_cv_dlopen in
   dlopen)
-    save_CPPFLAGS="$CPPFLAGS"
-    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+    save_CPPFLAGS=$CPPFLAGS
+    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
-    save_LDFLAGS="$LDFLAGS"
+    save_LDFLAGS=$LDFLAGS
     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
-    save_LIBS="$LIBS"
+    save_LIBS=$LIBS
     LIBS="$lt_cv_dlopen_libs $LIBS"
 
     AC_CACHE_CHECK([whether a program can dlopen itself],
@@ -1929,7 +2008,7 @@ else
            lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
     ])
 
-    if test "x$lt_cv_dlopen_self" = xyes; then
+    if test yes = "$lt_cv_dlopen_self"; then
       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
          lt_cv_dlopen_self_static, [dnl
@@ -1939,9 +2018,9 @@ else
       ])
     fi
 
-    CPPFLAGS="$save_CPPFLAGS"
-    LDFLAGS="$save_LDFLAGS"
-    LIBS="$save_LIBS"
+    CPPFLAGS=$save_CPPFLAGS
+    LDFLAGS=$save_LDFLAGS
+    LIBS=$save_LIBS
     ;;
   esac
 
@@ -2033,8 +2112,8 @@ m4_defun([_LT_COMPILER_FILE_LOCKS],
 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 _LT_COMPILER_C_O([$1])
 
-hard_links="nottested"
-if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+hard_links=nottested
+if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
   # do not overwrite the value of need_locks provided by the user
   AC_MSG_CHECKING([if we can lock with hard links])
   hard_links=yes
@@ -2044,8 +2123,8 @@ if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" !=
   ln conftest.a conftest.b 2>&5 || hard_links=no
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
   AC_MSG_RESULT([$hard_links])
-  if test "$hard_links" = no; then
-    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+  if test no = "$hard_links"; then
+    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
     need_locks=warn
   fi
 else
@@ -2072,8 +2151,8 @@ objdir=$lt_cv_objdir
 _LT_DECL([], [objdir], [0],
          [The name of the directory that contains temporary libtool files])dnl
 m4_pattern_allow([LT_OBJDIR])dnl
-AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
-  [Define to the sub-directory in which libtool stores uninstalled libraries.])
+AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
+  [Define to the sub-directory where libtool stores uninstalled libraries.])
 ])# _LT_CHECK_OBJDIR
 
 
@@ -2085,15 +2164,15 @@ m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
 _LT_TAGVAR(hardcode_action, $1)=
 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
    test -n "$_LT_TAGVAR(runpath_var, $1)" ||
-   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
 
   # We can hardcode non-existent directories.
-  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
+  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
      # If the only mechanism to avoid hardcoding is shlibpath_var, we
      # have to relink, otherwise we might link with an installed library
      # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
-     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
+     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
+     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
     # Linking always hardcodes the temporary library directory.
     _LT_TAGVAR(hardcode_action, $1)=relink
   else
@@ -2107,12 +2186,12 @@ else
 fi
 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
 
-if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
-   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
+if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
+   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
   # Fast installation is not supported
   enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
+elif test yes = "$shlibpath_overrides_runpath" ||
+     test no = "$enable_shared"; then
   # Fast installation is not necessary
   enable_fast_install=needless
 fi
@@ -2136,7 +2215,7 @@ else
 # FIXME - insert some real tests, host_os isn't really good enough
   case $host_os in
   darwin*)
-    if test -n "$STRIP" ; then
+    if test -n "$STRIP"; then
       striplib="$STRIP -x"
       old_striplib="$STRIP -S"
       AC_MSG_RESULT([yes])
@@ -2154,6 +2233,47 @@ _LT_DECL([], [striplib], [1])
 ])# _LT_CMD_STRIPLIB
 
 
+# _LT_PREPARE_MUNGE_PATH_LIST
+# ---------------------------
+# Make sure func_munge_path_list() is defined correctly.
+m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
+[[# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+#       string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+#       string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+#       "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+#       VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+    case x@S|@2 in
+    x)
+        ;;
+    *:)
+        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
+        ;;
+    x:*)
+        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
+        ;;
+    *::*)
+        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
+        ;;
+    *)
+        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
+        ;;
+    esac
+}
+]])# _LT_PREPARE_PATH_LIST
+
+
 # _LT_SYS_DYNAMIC_LINKER([TAG])
 # -----------------------------
 # PORTME Fill in your ld.so characteristics
@@ -2164,17 +2284,18 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_DECL_OBJDUMP])dnl
 m4_require([_LT_DECL_SED])dnl
 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
 AC_MSG_CHECKING([dynamic linker characteristics])
 m4_if([$1],
        [], [
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   case $host_os in
-    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
-    *) lt_awk_arg="/^libraries:/" ;;
+    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
+    *) lt_awk_arg='/^libraries:/' ;;
   esac
   case $host_os in
-    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
-    *) lt_sed_strip_eq="s,=/,/,g" ;;
+    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
+    *) lt_sed_strip_eq='s|=/|/|g' ;;
   esac
   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
   case $lt_search_path_spec in
@@ -2190,28 +2311,35 @@ if test "$GCC" = yes; then
     ;;
   esac
   # Ok, now we have the path, separated by spaces, we can step through it
-  # and add multilib dir if necessary.
+  # and add multilib dir if necessary...
   lt_tmp_lt_search_path_spec=
-  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  # ...but if some path component already ends with the multilib dir we assume
+  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
+  case "$lt_multi_os_dir; $lt_search_path_spec " in
+  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
+    lt_multi_os_dir=
+    ;;
+  esac
   for lt_sys_path in $lt_search_path_spec; do
-    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
-      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
-    else
+    if test -d "$lt_sys_path$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
+    elif test -n "$lt_multi_os_dir"; then
       test -d "$lt_sys_path" && \
        lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
     fi
   done
   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
-BEGIN {RS=" "; FS="/|\n";} {
-  lt_foo="";
-  lt_count=0;
+BEGIN {RS = " "; FS = "/|\n";} {
+  lt_foo = "";
+  lt_count = 0;
   for (lt_i = NF; lt_i > 0; lt_i--) {
     if ($lt_i != "" && $lt_i != ".") {
       if ($lt_i == "..") {
         lt_count++;
       } else {
         if (lt_count == 0) {
-          lt_foo="/" $lt_i lt_foo;
+          lt_foo = "/" $lt_i lt_foo;
         } else {
           lt_count--;
         }
@@ -2225,7 +2353,7 @@ BEGIN {RS=" "; FS="/|\n";} {
   # for these hosts.
   case $host_os in
     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
-      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
+      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
   esac
   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
 else
@@ -2234,7 +2362,7 @@ fi])
 library_names_spec=
 libname_spec='lib$name'
 soname_spec=
-shrext_cmds=".so"
+shrext_cmds=.so
 postinstall_cmds=
 postuninstall_cmds=
 finish_cmds=
@@ -2251,14 +2379,17 @@ hardcode_into_libs=no
 # flags to be left without arguments
 need_version=unknown
 
+AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
+[User-defined run-time library search path.])
+
 case $host_os in
 aix3*)
   version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
   # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
+  soname_spec='$libname$release$shared_ext$major'
   ;;
 
 aix[[4-9]]*)
@@ -2266,41 +2397,91 @@ aix[[4-9]]*)
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
+  if test ia64 = "$host_cpu"; then
     # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
     shlibpath_var=LD_LIBRARY_PATH
   else
     # With GCC up to 2.95.x, collect2 would create an import file
     # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
+    # the line '#! .'.  This would cause the generated library to
+    # depend on '.', always an invalid library.  This was fixed in
     # development snapshots of GCC prior to 3.0.
     case $host_os in
       aix4 | aix4.[[01]] | aix4.[[01]].*)
       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
           echo ' yes '
-          echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+          echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
        :
       else
        can_build_shared=no
       fi
       ;;
     esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # Using Import Files as archive members, it is possible to support
+    # filename-based versioning of shared library archives on AIX. While
+    # this would work for both with and without runtime linking, it will
+    # prevent static linking of such archives. So we do filename-based
+    # shared library versioning with .so extension only, which is used
+    # when both runtime linking and shared linking is enabled.
+    # Unfortunately, runtime linking may impact performance, so we do
+    # not want this to be the default eventually. Also, we use the
+    # versioned .so libs for executables only if there is the -brtl
+    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+    # To allow for filename-based versioning support, we need to create
+    # libNAME.so.V as an archive file, containing:
+    # *) an Import File, referring to the versioned filename of the
+    #    archive as well as the shared archive member, telling the
+    #    bitwidth (32 or 64) of that shared object, and providing the
+    #    list of exported symbols of that shared object, eventually
+    #    decorated with the 'weak' keyword
+    # *) the shared object with the F_LOADONLY flag set, to really avoid
+    #    it being seen by the linker.
+    # At run time we better use the real file rather than another symlink,
+    # but for link time we create the symlink libNAME.so -> libNAME.so.V
+
+    case $with_aix_soname,$aix_use_runtimelinking in
+    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
     # soname into executable. Probably we can add versioning support to
     # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
+    aix,yes) # traditional libtool
+      dynamic_linker='AIX unversionable lib.so'
       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
       # instead of lib<name>.a to let people know that these are not
       # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+      ;;
+    aix,no) # traditional AIX only
+      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
       # We preserve .a as extension for shared libraries through AIX4.2
       # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
+      library_names_spec='$libname$release.a $libname.a'
+      soname_spec='$libname$release$shared_ext$major'
+      ;;
+    svr4,*) # full svr4 only
+      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
+      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+      # We do not specify a path in Import Files, so LIBPATH fires.
+      shlibpath_overrides_runpath=yes
+      ;;
+    *,yes) # both, prefer svr4
+      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
+      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+      # unpreferred sharedlib libNAME.a needs extra handling
+      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
+      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
+      # We do not specify a path in Import Files, so LIBPATH fires.
+      shlibpath_overrides_runpath=yes
+      ;;
+    *,no) # both, prefer aix
+      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
+      library_names_spec='$libname$release.a $libname.a'
+      soname_spec='$libname$release$shared_ext$major'
+      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
+      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
+      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
+      ;;
+    esac
     shlibpath_var=LIBPATH
   fi
   ;;
@@ -2310,18 +2491,18 @@ amigaos*)
   powerpc)
     # Since July 2007 AmigaOS4 officially supports .so libraries.
     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
     ;;
   m68k)
     library_names_spec='$libname.ixlibrary $libname.a'
     # Create ${libname}_ixlibrary.a entries in /sys/libs.
-    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
     ;;
   esac
   ;;
 
 beos*)
-  library_names_spec='${libname}${shared_ext}'
+  library_names_spec='$libname$shared_ext'
   dynamic_linker="$host_os ld.so"
   shlibpath_var=LIBRARY_PATH
   ;;
@@ -2329,8 +2510,8 @@ beos*)
 bsdi[[45]]*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@@ -2342,7 +2523,7 @@ bsdi[[45]]*)
 
 cygwin* | mingw* | pw32* | cegcc*)
   version_type=windows
-  shrext_cmds=".dll"
+  shrext_cmds=.dll
   need_version=no
   need_lib_prefix=no
 
@@ -2351,8 +2532,8 @@ cygwin* | mingw* | pw32* | cegcc*)
     # gcc
     library_names_spec='$libname.dll.a'
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+    postinstall_cmds='base_file=`basename \$file`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
       $install_prog $dir/$dlname \$dldir/$dlname~
@@ -2368,17 +2549,17 @@ cygwin* | mingw* | pw32* | cegcc*)
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
 m4_if([$1], [],[
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
       ;;
     mingw* | cegcc*)
       # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
       ;;
     pw32*)
       # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
       ;;
     esac
     dynamic_linker='Win32 ld.exe'
@@ -2387,8 +2568,8 @@ m4_if([$1], [],[
   *,cl*)
     # Native MSVC
     libname_spec='$name'
-    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-    library_names_spec='${libname}.dll.lib'
+    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+    library_names_spec='$libname.dll.lib'
 
     case $build_os in
     mingw*)
@@ -2415,7 +2596,7 @@ m4_if([$1], [],[
       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
       ;;
     *)
-      sys_lib_search_path_spec="$LIB"
+      sys_lib_search_path_spec=$LIB
       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
         # It is most probably a Windows format PATH.
         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
@@ -2428,8 +2609,8 @@ m4_if([$1], [],[
     esac
 
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+    postinstall_cmds='base_file=`basename \$file`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
       $install_prog $dir/$dlname \$dldir/$dlname'
@@ -2442,7 +2623,7 @@ m4_if([$1], [],[
 
   *)
     # Assume MSVC wrapper
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
     dynamic_linker='Win32 ld.exe'
     ;;
   esac
@@ -2455,8 +2636,8 @@ darwin* | rhapsody*)
   version_type=darwin
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
+  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+  soname_spec='$libname$release$major$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
@@ -2469,8 +2650,8 @@ dgux*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -2488,12 +2669,13 @@ freebsd* | dragonfly*)
   version_type=freebsd-$objformat
   case $version_type in
     freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+      soname_spec='$libname$release$shared_ext$major'
       need_version=no
       need_lib_prefix=no
       ;;
     freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
       need_version=yes
       ;;
   esac
@@ -2518,26 +2700,15 @@ freebsd* | dragonfly*)
   esac
   ;;
 
-gnu*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
 haiku*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   dynamic_linker="$host_os runtime_loader"
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
+  shlibpath_overrides_runpath=no
   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
   hardcode_into_libs=yes
   ;;
@@ -2555,14 +2726,15 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.so"
     shlibpath_var=LD_LIBRARY_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
+    if test 32 = "$HPUX_IA64_MODE"; then
       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
     else
       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
     fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
   hppa*64*)
     shrext_cmds='.sl'
@@ -2570,8 +2742,8 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
@@ -2580,8 +2752,8 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=SHLIB_PATH
     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     ;;
   esac
   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
@@ -2594,8 +2766,8 @@ interix[[3-9]]*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
@@ -2606,7 +2778,7 @@ irix5* | irix6* | nonstopux*)
   case $host_os in
     nonstopux*) version_type=nonstopux ;;
     *)
-       if test "$lt_cv_prog_gnu_ld" = yes; then
+       if test yes = "$lt_cv_prog_gnu_ld"; then
                version_type=linux # correct to gnu/linux during the next big refactor
        else
                version_type=irix
@@ -2614,8 +2786,8 @@ irix5* | irix6* | nonstopux*)
   esac
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
   case $host_os in
   irix5* | nonstopux*)
     libsuff= shlibsuff=
@@ -2634,8 +2806,8 @@ irix5* | irix6* | nonstopux*)
   esac
   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
   shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
   hardcode_into_libs=yes
   ;;
 
@@ -2644,13 +2816,33 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
+linux*android*)
+  version_type=none # Android doesn't support versioned libraries.
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='$libname$release$shared_ext'
+  soname_spec='$libname$release$shared_ext'
+  finish_cmds=
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  dynamic_linker='Android linker'
+  # Don't embed -rpath directories since the linker doesn't support them.
+  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+  ;;
+
 # This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
@@ -2678,11 +2870,15 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
   # Add ABI-specific directories to the system library path.
   sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
 
-  # Append ld.so.conf contents to the search path
+  # Ideally, we could use ldconfig to report *all* directores which are
+  # searched for libraries, however this is still not possible.  Aside from not
+  # being certain /sbin/ldconfig is available, command
+  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
+  # even though it is searched at run-time.  Try to do the best guess by
+  # appending ld.so.conf contents (and includes) to the search path.
   if test -f /etc/ld.so.conf; then
     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[  ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
     sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
-
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -2699,12 +2895,12 @@ netbsd*)
   need_lib_prefix=no
   need_version=no
   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
     dynamic_linker='NetBSD (a.out) ld.so'
   else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     dynamic_linker='NetBSD ld.elf_so'
   fi
   shlibpath_var=LD_LIBRARY_PATH
@@ -2714,7 +2910,7 @@ netbsd*)
 
 newsos6)
   version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   ;;
@@ -2723,58 +2919,68 @@ newsos6)
   version_type=qnx
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
   dynamic_linker='ldqnx.so'
   ;;
 
-openbsd*)
+openbsd* | bitrig*)
   version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
+  sys_lib_dlsearch_path_spec=/usr/lib
   need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
-    *)                         need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[[89]] | openbsd2.[[89]].*)
-       shlibpath_overrides_runpath=no
-       ;;
-      *)
-       shlibpath_overrides_runpath=yes
-       ;;
-      esac
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+    need_version=no
   else
-    shlibpath_overrides_runpath=yes
+    need_version=yes
   fi
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
   ;;
 
 os2*)
   libname_spec='$name'
-  shrext_cmds=".dll"
+  version_type=windows
+  shrext_cmds=.dll
+  need_version=no
   need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
+  # OS/2 can only load a DLL with a base name of 8 characters or less.
+  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+    v=$($ECHO $release$versuffix | tr -d .-);
+    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+    $ECHO $n$v`$shared_ext'
+  library_names_spec='${libname}_dll.$libext'
   dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
+  shlibpath_var=BEGINLIBPATH
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+  postinstall_cmds='base_file=`basename \$file`~
+    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
+    dldir=$destdir/`dirname \$dlpath`~
+    test -d \$dldir || mkdir -p \$dldir~
+    $install_prog $dir/$dlname \$dldir/$dlname~
+    chmod a+x \$dldir/$dlname~
+    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+    fi'
+  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
+    dlpath=$dir/\$dldll~
+    $RM \$dlpath'
   ;;
 
 osf3* | osf4* | osf5*)
   version_type=osf
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
   ;;
 
 rdos*)
@@ -2785,8 +2991,8 @@ solaris*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
@@ -2796,11 +3002,11 @@ solaris*)
 
 sunos4*)
   version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
+  if test yes = "$with_gnu_ld"; then
     need_lib_prefix=no
   fi
   need_version=yes
@@ -2808,8 +3014,8 @@ sunos4*)
 
 sysv4 | sysv4.3*)
   version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   case $host_vendor in
     sni)
@@ -2830,24 +3036,24 @@ sysv4 | sysv4.3*)
   ;;
 
 sysv4*MP*)
-  if test -d /usr/nec ;then
+  if test -d /usr/necthen
     version_type=linux # correct to gnu/linux during the next big refactor
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
+    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+    soname_spec='$libname$shared_ext.$major'
     shlibpath_var=LD_LIBRARY_PATH
   fi
   ;;
 
 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
+  version_type=sco
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
+  if test yes = "$with_gnu_ld"; then
     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
   else
     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
@@ -2865,7 +3071,7 @@ tpf*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
@@ -2873,8 +3079,8 @@ tpf*)
 
 uts4*)
   version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -2883,20 +3089,30 @@ uts4*)
   ;;
 esac
 AC_MSG_RESULT([$dynamic_linker])
-test "$dynamic_linker" = no && can_build_shared=no
+test no = "$dynamic_linker" && can_build_shared=no
 
 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 fi
 
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
-  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
 fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
-  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
 fi
 
+# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
+configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
+
+# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
+configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
+
 _LT_DECL([], [variables_saved_for_relink], [1],
     [Variables whose values should be saved in libtool wrapper scripts and
     restored at link time])
@@ -2929,39 +3145,41 @@ _LT_DECL([], [hardcode_into_libs], [0],
     [Whether we should hardcode library paths into libraries])
 _LT_DECL([], [sys_lib_search_path_spec], [2],
     [Compile-time system search path for libraries])
-_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
-    [Run-time system search path for libraries])
+_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
+    [Detected run-time system search path for libraries])
+_LT_DECL([], [configure_time_lt_sys_library_path], [2],
+    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
 ])# _LT_SYS_DYNAMIC_LINKER
 
 
 # _LT_PATH_TOOL_PREFIX(TOOL)
 # --------------------------
-# find a file program which can recognize shared library
+# find a file program that can recognize shared library
 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
 [m4_require([_LT_DECL_EGREP])dnl
 AC_MSG_CHECKING([for $1])
 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
 [case $MAGIC_CMD in
 [[\\/*] |  ?:[\\/]*])
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
   ;;
 *)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  lt_save_MAGIC_CMD=$MAGIC_CMD
+  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
 dnl $ac_dummy forces splitting on constant user-supplied paths.
 dnl POSIX.2 word splitting is done only on the output of word expansions,
 dnl not every word.  This closes a longstanding sh security hole.
   ac_dummy="m4_if([$2], , $PATH, [$2])"
   for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
     test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$1; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+    if test -f "$ac_dir/$1"; then
+      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
       if test -n "$file_magic_test_file"; then
        case $deplibs_check_method in
        "file_magic "*)
          file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+         MAGIC_CMD=$lt_cv_path_MAGIC_CMD
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
            $EGREP "$file_magic_regex" > /dev/null; then
            :
@@ -2984,11 +3202,11 @@ _LT_EOF
       break
     fi
   done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  IFS=$lt_save_ifs
+  MAGIC_CMD=$lt_save_MAGIC_CMD
   ;;
 esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
 if test -n "$MAGIC_CMD"; then
   AC_MSG_RESULT($MAGIC_CMD)
 else
@@ -3006,7 +3224,7 @@ dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
 
 # _LT_PATH_MAGIC
 # --------------
-# find a file program which can recognize a shared library
+# find a file program that can recognize a shared library
 m4_defun([_LT_PATH_MAGIC],
 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
 if test -z "$lt_cv_path_MAGIC_CMD"; then
@@ -3033,16 +3251,16 @@ m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
 AC_ARG_WITH([gnu-ld],
     [AS_HELP_STRING([--with-gnu-ld],
        [assume the C compiler uses GNU ld @<:@default=no@:>@])],
-    [test "$withval" = no || with_gnu_ld=yes],
+    [test no = "$withval" || with_gnu_ld=yes],
     [with_gnu_ld=no])dnl
 
 ac_prog=ld
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   # Check if gcc -print-prog-name=ld gives a path.
   AC_MSG_CHECKING([for ld used by $CC])
   case $host in
   *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
+    # gcc leaves a trailing carriage return, which upsets mingw
     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
   *)
     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
@@ -3056,7 +3274,7 @@ if test "$GCC" = yes; then
       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
        ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
       done
-      test -z "$LD" && LD="$ac_prog"
+      test -z "$LD" && LD=$ac_prog
       ;;
   "")
     # If it fails, then pretend we aren't using GCC.
@@ -3067,37 +3285,37 @@ if test "$GCC" = yes; then
     with_gnu_ld=unknown
     ;;
   esac
-elif test "$with_gnu_ld" = yes; then
+elif test yes = "$with_gnu_ld"; then
   AC_MSG_CHECKING([for GNU ld])
 else
   AC_MSG_CHECKING([for non-GNU ld])
 fi
 AC_CACHE_VAL(lt_cv_path_LD,
 [if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
   for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
     test -z "$ac_dir" && ac_dir=.
     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
+      lt_cv_path_LD=$ac_dir/$ac_prog
       # Check to see if the program is GNU ld.  I'd rather use --version,
       # but apparently some variants of GNU ld only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
       *GNU* | *'with BFD'*)
-       test "$with_gnu_ld" != no && break
+       test no != "$with_gnu_ld" && break
        ;;
       *)
-       test "$with_gnu_ld" != yes && break
+       test yes != "$with_gnu_ld" && break
        ;;
       esac
     fi
   done
-  IFS="$lt_save_ifs"
+  IFS=$lt_save_ifs
 else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+  lt_cv_path_LD=$LD # Let the user override the test with a path.
 fi])
-LD="$lt_cv_path_LD"
+LD=$lt_cv_path_LD
 if test -n "$LD"; then
   AC_MSG_RESULT($LD)
 else
@@ -3151,13 +3369,13 @@ esac
 reload_cmds='$LD$reload_flag -o $output$reload_objs'
 case $host_os in
   cygwin* | mingw* | pw32* | cegcc*)
-    if test "$GCC" != yes; then
+    if test yes != "$GCC"; then
       reload_cmds=false
     fi
     ;;
   darwin*)
-    if test "$GCC" = yes; then
-      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    if test yes = "$GCC"; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
     else
       reload_cmds='$LD$reload_flag -o $output$reload_objs'
     fi
@@ -3168,6 +3386,43 @@ _LT_TAGDECL([], [reload_cmds], [2])dnl
 ])# _LT_CMD_RELOAD
 
 
+# _LT_PATH_DD
+# -----------
+# find a working dd
+m4_defun([_LT_PATH_DD],
+[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
+[printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+: ${lt_DD:=$DD}
+AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
+[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+  cmp -s conftest.i conftest.out \
+  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
+fi])
+rm -f conftest.i conftest2.i conftest.out])
+])# _LT_PATH_DD
+
+
+# _LT_CMD_TRUNCATE
+# ----------------
+# find command to truncate a binary pipe
+m4_defun([_LT_CMD_TRUNCATE],
+[m4_require([_LT_PATH_DD])
+AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
+[printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+lt_cv_truncate_bin=
+if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+  cmp -s conftest.i conftest.out \
+  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
+fi
+rm -f conftest.i conftest2.i conftest.out
+test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
+_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
+  [Command to truncate a binary pipe])
+])# _LT_CMD_TRUNCATE
+
+
 # _LT_CHECK_MAGIC_METHOD
 # ----------------------
 # how to check for library dependencies
@@ -3183,13 +3438,13 @@ lt_cv_deplibs_check_method='unknown'
 # Need to set the preceding variable on all platforms that support
 # interlibrary dependencies.
 # 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
+# 'unknown' -- same as none, but documents that we really don't know.
 # 'pass_all' -- all dependencies passed with no checks.
 # 'test_compile' -- check by making test program.
 # 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
+# that responds to the $file_magic_cmd with a given extended regex.
+# If you have 'file' or equivalent on your system and you're not sure
+# whether 'pass_all' will *always* work, you probably want this one.
 
 case $host_os in
 aix[[4-9]]*)
@@ -3216,8 +3471,7 @@ mingw* | pw32*)
   # Base MSYS/MinGW do not provide the 'file' command needed by
   # func_win32_libid shell function, so use a weaker test based on 'objdump',
   # unless we find 'file', for example because we are cross-compiling.
-  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
-  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
+  if ( file / ) >/dev/null 2>&1; then
     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
     lt_cv_file_magic_cmd='func_win32_libid'
   else
@@ -3253,10 +3507,6 @@ freebsd* | dragonfly*)
   fi
   ;;
 
-gnu*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
 haiku*)
   lt_cv_deplibs_check_method=pass_all
   ;;
@@ -3295,7 +3545,7 @@ irix5* | irix6* | nonstopux*)
   ;;
 
 # This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -3317,8 +3567,8 @@ newos6*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-openbsd*)
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+openbsd* | bitrig*)
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
   else
     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
@@ -3371,6 +3621,9 @@ sysv4 | sysv4.3*)
 tpf*)
   lt_cv_deplibs_check_method=pass_all
   ;;
+os2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 esac
 ])
 
@@ -3411,33 +3664,38 @@ AC_DEFUN([LT_PATH_NM],
 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
 [if test -n "$NM"; then
   # Let the user override the test.
-  lt_cv_path_NM="$NM"
+  lt_cv_path_NM=$NM
 else
-  lt_nm_to_check="${ac_tool_prefix}nm"
+  lt_nm_to_check=${ac_tool_prefix}nm
   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
     lt_nm_to_check="$lt_nm_to_check nm"
   fi
   for lt_tmp_nm in $lt_nm_to_check; do
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       test -z "$ac_dir" && ac_dir=.
-      tmp_nm="$ac_dir/$lt_tmp_nm"
-      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+      tmp_nm=$ac_dir/$lt_tmp_nm
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
        # Check to see if the nm accepts a BSD-compat flag.
-       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+       # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
        #   nm: unknown option "B" ignored
        # Tru64's nm complains that /dev/null is an invalid object file
-       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
-       */dev/null* | *'Invalid file or object type'*)
+       # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
+       case $build_os in
+       mingw*) lt_bad_file=conftest.nm/nofile ;;
+       *) lt_bad_file=/dev/null ;;
+       esac
+       case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+       *$lt_bad_file* | *'Invalid file or object type'*)
          lt_cv_path_NM="$tmp_nm -B"
-         break
+         break 2
          ;;
        *)
          case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
          */dev/null*)
            lt_cv_path_NM="$tmp_nm -p"
-           break
+           break 2
            ;;
          *)
            lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
@@ -3448,21 +3706,21 @@ else
        esac
       fi
     done
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
   done
   : ${lt_cv_path_NM=no}
 fi])
-if test "$lt_cv_path_NM" != "no"; then
-  NM="$lt_cv_path_NM"
+if test no != "$lt_cv_path_NM"; then
+  NM=$lt_cv_path_NM
 else
   # Didn't find any BSD compatible name lister, look for dumpbin.
   if test -n "$DUMPBIN"; then :
     # Let the user override the test.
   else
     AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
-    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
     *COFF*)
-      DUMPBIN="$DUMPBIN -symbols"
+      DUMPBIN="$DUMPBIN -symbols -headers"
       ;;
     *)
       DUMPBIN=:
@@ -3470,8 +3728,8 @@ else
     esac
   fi
   AC_SUBST([DUMPBIN])
-  if test "$DUMPBIN" != ":"; then
-    NM="$DUMPBIN"
+  if test : != "$DUMPBIN"; then
+    NM=$DUMPBIN
   fi
 fi
 test -z "$NM" && NM=nm
@@ -3517,8 +3775,8 @@ lt_cv_sharedlib_from_linklib_cmd,
 
 case $host_os in
 cygwin* | mingw* | pw32* | cegcc*)
-  # two different shell functions defined in ltmain.sh
-  # decide which to use based on capabilities of $DLLTOOL
+  # two different shell functions defined in ltmain.sh;
+  # decide which one to use based on capabilities of $DLLTOOL
   case `$DLLTOOL --help 2>&1` in
   *--identify-strict*)
     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
@@ -3530,7 +3788,7 @@ cygwin* | mingw* | pw32* | cegcc*)
   ;;
 *)
   # fallback: assume linklib IS sharedlib
-  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+  lt_cv_sharedlib_from_linklib_cmd=$ECHO
   ;;
 esac
 ])
@@ -3557,13 +3815,28 @@ AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool
     lt_cv_path_mainfest_tool=yes
   fi
   rm -f conftest*])
-if test "x$lt_cv_path_mainfest_tool" != xyes; then
+if test yes != "$lt_cv_path_mainfest_tool"; then
   MANIFEST_TOOL=:
 fi
 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
 ])# _LT_PATH_MANIFEST_TOOL
 
 
+# _LT_DLL_DEF_P([FILE])
+# ---------------------
+# True iff FILE is a Windows DLL '.def' file.
+# Keep in sync with func_dll_def_p in the libtool script
+AC_DEFUN([_LT_DLL_DEF_P],
+[dnl
+  test DEF = "`$SED -n dnl
+    -e '\''s/^[[        ]]*//'\'' dnl Strip leading whitespace
+    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
+    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[  ]].*\)*$/DEF/p'\'' dnl
+    -e q dnl                          Only consider the first "real" line
+    $1`" dnl
+])# _LT_DLL_DEF_P
+
+
 # LT_LIB_M
 # --------
 # check for math library
@@ -3575,11 +3848,11 @@ case $host in
   # These system don't have libm, or don't need it
   ;;
 *-ncr-sysv4.3*)
-  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
   ;;
 *)
-  AC_CHECK_LIB(m, cos, LIBM="-lm")
+  AC_CHECK_LIB(m, cos, LIBM=-lm)
   ;;
 esac
 AC_SUBST([LIBM])
@@ -3598,7 +3871,7 @@ m4_defun([_LT_COMPILER_NO_RTTI],
 
 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   case $cc_basename in
   nvcc*)
     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
@@ -3650,7 +3923,7 @@ cygwin* | mingw* | pw32* | cegcc*)
   symcode='[[ABCDGISTW]]'
   ;;
 hpux*)
-  if test "$host_cpu" = ia64; then
+  if test ia64 = "$host_cpu"; then
     symcode='[[ABCDEGRST]]'
   fi
   ;;
@@ -3683,14 +3956,44 @@ case `$NM -V 2>&1` in
   symcode='[[ABCDGIRSTW]]' ;;
 esac
 
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+  # Gets list of data symbols to import.
+  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+  # Adjust the below global symbol transforms to fixup imported variables.
+  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
+  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
+  lt_c_name_lib_hook="\
+  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
+  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
+else
+  # Disable hooks by default.
+  lt_cv_sys_global_symbol_to_import=
+  lt_cdecl_hook=
+  lt_c_name_hook=
+  lt_c_name_lib_hook=
+fi
+
 # Transform an extracted symbol line into a proper C declaration.
 # Some systems (esp. on ia64) link data and code symbols differently,
 # so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+$lt_cdecl_hook\
+" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
 
 # Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+$lt_c_name_hook\
+" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
+
+# Transform an extracted symbol line into symbol name with lib prefix and
+# symbol address.
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+$lt_c_name_lib_hook\
+" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
 
 # Handle CRLF in mingw tool chain
 opt_cr=
@@ -3708,21 +4011,24 @@ for ac_symprfx in "" "_"; do
 
   # Write the raw and C identifiers.
   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
-    # Fake it for dumpbin and say T for any non-static function
-    # and D for any global variable.
+    # Fake it for dumpbin and say T for any non-static function,
+    # D for any global variable and I for any imported variable.
     # Also find C++ and __fastcall symbols from MSVC++,
     # which start with @ or ?.
     lt_cv_sys_global_symbol_pipe="$AWK ['"\
 "     {last_section=section; section=\$ 3};"\
 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
+"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
+"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
 "     \$ 0!~/External *\|/{next};"\
 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
 "     {if(hide[section]) next};"\
-"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
-"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
+"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
+"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
+"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
 "     ' prfx=^$ac_symprfx]"
   else
     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[    ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
@@ -3762,11 +4068,11 @@ _LT_EOF
        if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
          cat <<_LT_EOF > conftest.$ac_ext
 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
-/* DATA imports from DLLs on WIN32 con't be const, because runtime
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
    relocations are performed -- see ld's documentation on pseudo-relocs.  */
 # define LT@&t@_DLSYM_CONST
-#elif defined(__osf__)
+#elif defined __osf__
 /* This system does not cope well with relocations in const data.  */
 # define LT@&t@_DLSYM_CONST
 #else
@@ -3792,7 +4098,7 @@ lt__PROGRAM__LTX_preloaded_symbols[[]] =
 {
   { "@PROGRAM@", (void *) 0 },
 _LT_EOF
-         $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+         $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
          cat <<\_LT_EOF >> conftest.$ac_ext
   {0, (void *) 0}
 };
@@ -3812,9 +4118,9 @@ _LT_EOF
          mv conftest.$ac_objext conftstm.$ac_objext
          lt_globsym_save_LIBS=$LIBS
          lt_globsym_save_CFLAGS=$CFLAGS
-         LIBS="conftstm.$ac_objext"
+         LIBS=conftstm.$ac_objext
          CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
-         if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+         if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
            pipe_works=yes
          fi
          LIBS=$lt_globsym_save_LIBS
@@ -3835,7 +4141,7 @@ _LT_EOF
   rm -rf conftest* conftst*
 
   # Do not use the global_symbol_pipe unless it works.
-  if test "$pipe_works" = yes; then
+  if test yes = "$pipe_works"; then
     break
   else
     lt_cv_sys_global_symbol_pipe=
@@ -3862,12 +4168,16 @@ _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
     [Take the output of nm and produce a listing of raw symbols and C names])
 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
     [Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
+    [Transform the output of nm into a list of symbols to manually relocate])
 _LT_DECL([global_symbol_to_c_name_address],
     [lt_cv_sys_global_symbol_to_c_name_address], [1],
     [Transform the output of nm in a C name address pair])
 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
     [Transform the output of nm in a C name address pair when lib prefix is needed])
+_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
+    [The name lister interface])
 _LT_DECL([], [nm_file_list_spec], [1],
     [Specify filename containing input files for $NM])
 ]) # _LT_CMD_GLOBAL_SYMBOLS
@@ -3883,17 +4193,18 @@ _LT_TAGVAR(lt_prog_compiler_static, $1)=
 
 m4_if([$1], [CXX], [
   # C++ specific cases for pic, static, wl, etc.
-  if test "$GXX" = yes; then
+  if test yes = "$GXX"; then
     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
     case $host_os in
     aix*)
       # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
        # AIX 5 now supports IA64 processor
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       fi
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
       ;;
 
     amigaos*)
@@ -3904,8 +4215,8 @@ m4_if([$1], [CXX], [
         ;;
       m68k)
             # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
+            # adding the '-m68020' flag to GCC prevents building anything better,
+            # like '-m68040'.
             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
         ;;
       esac
@@ -3921,6 +4232,11 @@ m4_if([$1], [CXX], [
       # (--disable-auto-import) libraries
       m4_if([$1], [GCJ], [],
        [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      case $host_os in
+      os2*)
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
+       ;;
+      esac
       ;;
     darwin* | rhapsody*)
       # PIC is the default on this platform
@@ -3970,7 +4286,7 @@ m4_if([$1], [CXX], [
     case $host_os in
       aix[[4-9]]*)
        # All AIX code is PIC.
-       if test "$host_cpu" = ia64; then
+       if test ia64 = "$host_cpu"; then
          # AIX 5 now supports IA64 processor
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
        else
@@ -4011,14 +4327,14 @@ m4_if([$1], [CXX], [
        case $cc_basename in
          CC*)
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-           if test "$host_cpu" != ia64; then
+           _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
+           if test ia64 != "$host_cpu"; then
              _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
            fi
            ;;
          aCC*)
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+           _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
            case $host_cpu in
            hppa*64*|ia64*)
              # +Z the default
@@ -4047,7 +4363,7 @@ m4_if([$1], [CXX], [
            ;;
        esac
        ;;
-      linux* | k*bsd*-gnu | kopensolaris*-gnu)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
        case $cc_basename in
          KCC*)
            # KAI C++ Compiler
@@ -4055,7 +4371,7 @@ m4_if([$1], [CXX], [
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
            ;;
          ecpc* )
-           # old Intel C++ for x86_64 which still supported -KPIC.
+           # old Intel C++ for x86_64, which still supported -KPIC.
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
@@ -4200,17 +4516,18 @@ m4_if([$1], [CXX], [
   fi
 ],
 [
-  if test "$GCC" = yes; then
+  if test yes = "$GCC"; then
     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
     case $host_os in
       aix*)
       # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
        # AIX 5 now supports IA64 processor
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       fi
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
       ;;
 
     amigaos*)
@@ -4221,8 +4538,8 @@ m4_if([$1], [CXX], [
         ;;
       m68k)
             # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
+            # adding the '-m68020' flag to GCC prevents building anything better,
+            # like '-m68040'.
             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
         ;;
       esac
@@ -4239,6 +4556,11 @@ m4_if([$1], [CXX], [
       # (--disable-auto-import) libraries
       m4_if([$1], [GCJ], [],
        [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      case $host_os in
+      os2*)
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
+       ;;
+      esac
       ;;
 
     darwin* | rhapsody*)
@@ -4309,7 +4631,7 @@ m4_if([$1], [CXX], [
     case $host_os in
     aix*)
       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
        # AIX 5 now supports IA64 processor
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       else
@@ -4317,11 +4639,30 @@ m4_if([$1], [CXX], [
       fi
       ;;
 
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      case $cc_basename in
+      nagfor*)
+        # NAG Fortran compiler
+        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
+        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+        ;;
+      esac
+      ;;
+
     mingw* | cygwin* | pw32* | os2* | cegcc*)
       # This hack is so that the source file can tell whether it is being
       # built for inclusion in a dll (and should export symbols for example).
       m4_if([$1], [GCJ], [],
        [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      case $host_os in
+      os2*)
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
+       ;;
+      esac
       ;;
 
     hpux9* | hpux10* | hpux11*)
@@ -4337,7 +4678,7 @@ m4_if([$1], [CXX], [
        ;;
       esac
       # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
       ;;
 
     irix5* | irix6* | nonstopux*)
@@ -4346,9 +4687,9 @@ m4_if([$1], [CXX], [
       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
       ;;
 
-    linux* | k*bsd*-gnu | kopensolaris*-gnu)
+    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
       case $cc_basename in
-      # old Intel for x86_64 which still supported -KPIC.
+      # old Intel for x86_64, which still supported -KPIC.
       ecc*)
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
@@ -4373,6 +4714,12 @@ m4_if([$1], [CXX], [
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
        ;;
+      tcc*)
+       # Fabrice Bellard et al's Tiny C Compiler
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+       ;;
       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
         # Portland Group compilers (*not* the Pentium gcc compiler,
        # which looks to be a dead project)
@@ -4470,7 +4817,7 @@ m4_if([$1], [CXX], [
       ;;
 
     sysv4*MP*)
-      if test -d /usr/nec ;then
+      if test -d /usr/necthen
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       fi
@@ -4499,7 +4846,7 @@ m4_if([$1], [CXX], [
   fi
 ])
 case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
+  # For platforms that do not support PIC, -DPIC is meaningless:
   *djgpp*)
     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
     ;;
@@ -4565,17 +4912,21 @@ m4_if([$1], [CXX], [
   case $host_os in
   aix[[4-9]]*)
     # If we're using GNU nm, then we don't want the "-C" option.
-    # -C means demangle to AIX nm, but means don't demangle with GNU nm
-    # Also, AIX nm treats weak defined symbols like other global defined
-    # symbols, whereas GNU nm marks them as "W".
+    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
+    # Without the "-l" option, or with the "-B" option, AIX nm treats
+    # weak defined symbols like other global defined symbols, whereas
+    # GNU nm marks them as "W".
+    # While the 'weak' keyword is ignored in the Export File, we need
+    # it in the Import File for the 'aix-soname' feature, so we have
+    # to replace the "-B" option with "-P" for AIX nm.
     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
     else
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+      _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
     fi
     ;;
   pw32*)
-    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
     ;;
   cygwin* | mingw* | cegcc*)
     case $cc_basename in
@@ -4621,9 +4972,9 @@ m4_if([$1], [CXX], [
   # included in the symbol list
   _LT_TAGVAR(include_expsyms, $1)=
   # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
+  # it will be wrapped by ' (' and ')$', so one must not match beginning or
+  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
+  # as well as any symbol that contains 'd'.
   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
   # platforms (ab)use it in PIC code, but their linkers get confused if
@@ -4639,7 +4990,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
     # FIXME: the MSVC++ port hasn't been tested in a loooong time
     # When not using gcc, we currently assume that we are using
     # Microsoft Visual C++.
-    if test "$GCC" != yes; then
+    if test yes != "$GCC"; then
       with_gnu_ld=no
     fi
     ;;
@@ -4647,7 +4998,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
     # we just hope/assume this is gcc and not c89 (= MSVC++)
     with_gnu_ld=yes
     ;;
-  openbsd*)
+  openbsd* | bitrig*)
     with_gnu_ld=no
     ;;
   esac
@@ -4657,7 +5008,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
   # On some targets, GNU ld is compatible enough with the native linker
   # that we're better off using the native interface for both.
   lt_use_gnu_ld_interface=no
-  if test "$with_gnu_ld" = yes; then
+  if test yes = "$with_gnu_ld"; then
     case $host_os in
       aix*)
        # The AIX port of GNU ld has always aspired to compatibility
@@ -4679,24 +5030,24 @@ dnl Note also adjust exclude_expsyms for C++ above.
     esac
   fi
 
-  if test "$lt_use_gnu_ld_interface" = yes; then
+  if test yes = "$lt_use_gnu_ld_interface"; then
     # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
+    wlarc='$wl'
 
     # Set some defaults for GNU ld with shared library support. These
     # are reset later if shared libraries are not supported. Putting them
     # here allows them to be overridden if necessary.
     runpath_var=LD_RUN_PATH
-    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
     # ancient GNU ld didn't support --whole-archive et. al.
     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
-      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
     else
       _LT_TAGVAR(whole_archive_flag_spec, $1)=
     fi
     supports_anon_versioning=no
-    case `$LD -v 2>&1` in
+    case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
       *GNU\ gold*) supports_anon_versioning=yes ;;
       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
@@ -4709,7 +5060,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
     case $host_os in
     aix[[3-9]]*)
       # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
+      if test ia64 != "$host_cpu"; then
        _LT_TAGVAR(ld_shlibs, $1)=no
        cat <<_LT_EOF 1>&2
 
@@ -4728,7 +5079,7 @@ _LT_EOF
       case $host_cpu in
       powerpc)
             # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
             _LT_TAGVAR(archive_expsym_cmds, $1)=''
         ;;
       m68k)
@@ -4744,7 +5095,7 @@ _LT_EOF
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
        # support --undefined.  This deserves some investigation.  FIXME
-       _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
       else
        _LT_TAGVAR(ld_shlibs, $1)=no
       fi
@@ -4754,7 +5105,7 @@ _LT_EOF
       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
       # as there is no search path for DLLs.
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
       _LT_TAGVAR(always_export_symbols, $1)=no
       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
@@ -4762,61 +5113,89 @@ _LT_EOF
       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
 
       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-       # If the export-symbols file already is a .def file (1st line
-       # is EXPORTS), use it as is; otherwise, prepend...
-       _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-         cp $export_symbols $output_objdir/$soname.def;
-       else
-         echo EXPORTS > $output_objdir/$soname.def;
-         cat $export_symbols >> $output_objdir/$soname.def;
-       fi~
-       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+       # If the export-symbols file already is a .def file, use it as
+       # is; otherwise, prepend EXPORTS...
+       _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+          cp $export_symbols $output_objdir/$soname.def;
+        else
+          echo EXPORTS > $output_objdir/$soname.def;
+          cat $export_symbols >> $output_objdir/$soname.def;
+        fi~
+        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
       else
        _LT_TAGVAR(ld_shlibs, $1)=no
       fi
       ;;
 
     haiku*)
-      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
       _LT_TAGVAR(link_all_deplibs, $1)=yes
       ;;
 
+    os2*)
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      shrext_cmds=.dll
+      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+       $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+       $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+       $ECHO EXPORTS >> $output_objdir/$libname.def~
+       emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+       $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+       emximp -o $lib $output_objdir/$libname.def'
+      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+       $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+       $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+       $ECHO EXPORTS >> $output_objdir/$libname.def~
+       prefix_cmds="$SED"~
+       if test EXPORTS = "`$SED 1q $export_symbols`"; then
+         prefix_cmds="$prefix_cmds -e 1d";
+       fi~
+       prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+       cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+       $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+       emximp -o $lib $output_objdir/$libname.def'
+      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      ;;
+
     interix[[3-9]]*)
       _LT_TAGVAR(hardcode_direct, $1)=no
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
       # Instead, shared libraries are loaded at an image base (0x10000000 by
       # default) and relocated if they conflict, which is a slow very memory
       # consuming and fragmenting process.  To avoid this, we pick a random,
       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
       ;;
 
     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
       tmp_diet=no
-      if test "$host_os" = linux-dietlibc; then
+      if test linux-dietlibc = "$host_os"; then
        case $cc_basename in
          diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
        esac
       fi
       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
-        && test "$tmp_diet" = no
+        && test no = "$tmp_diet"
       then
        tmp_addflag=' $pic_flag'
        tmp_sharedflag='-shared'
        case $cc_basename,$host_cpu in
         pgcc*)                         # Portland Group C compiler
-         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
          tmp_addflag=' $pic_flag'
          ;;
        pgf77* | pgf90* | pgf95* | pgfortran*)
                                        # Portland Group f77 and f90 compilers
-         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
          tmp_addflag=' $pic_flag -Mnomain' ;;
        ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
          tmp_addflag=' -i_dynamic' ;;
@@ -4827,42 +5206,47 @@ _LT_EOF
        lf95*)                          # Lahey Fortran 8.1
          _LT_TAGVAR(whole_archive_flag_spec, $1)=
          tmp_sharedflag='--shared' ;;
+        nagfor*)                        # NAGFOR 5.3
+          tmp_sharedflag='-Wl,-shared' ;;
        xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
          tmp_sharedflag='-qmkshrobj'
          tmp_addflag= ;;
        nvcc*)  # Cuda Compiler Driver 2.2
-         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
          _LT_TAGVAR(compiler_needs_object, $1)=yes
          ;;
        esac
        case `$CC -V 2>&1 | sed 5q` in
        *Sun\ C*)                       # Sun C 5.9
-         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
          _LT_TAGVAR(compiler_needs_object, $1)=yes
          tmp_sharedflag='-G' ;;
        *Sun\ F*)                       # Sun Fortran 8.3
          tmp_sharedflag='-G' ;;
        esac
-       _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
 
-        if test "x$supports_anon_versioning" = xyes; then
+        if test yes = "$supports_anon_versioning"; then
           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-           cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-           echo "local: *; };" >> $output_objdir/$libname.ver~
-           $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+            echo "local: *; };" >> $output_objdir/$libname.ver~
+            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
         fi
 
        case $cc_basename in
+       tcc*)
+         _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
+         ;;
        xlf* | bgf* | bgxlf* | mpixlf*)
          # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
          _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
-         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
          _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
-         if test "x$supports_anon_versioning" = xyes; then
+         if test yes = "$supports_anon_versioning"; then
            _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-             echo "local: *; };" >> $output_objdir/$libname.ver~
-             $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+              echo "local: *; };" >> $output_objdir/$libname.ver~
+              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
          fi
          ;;
        esac
@@ -4876,8 +5260,8 @@ _LT_EOF
        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
        wlarc=
       else
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       fi
       ;;
 
@@ -4895,8 +5279,8 @@ _LT_EOF
 
 _LT_EOF
       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       else
        _LT_TAGVAR(ld_shlibs, $1)=no
       fi
@@ -4908,7 +5292,7 @@ _LT_EOF
        _LT_TAGVAR(ld_shlibs, $1)=no
        cat <<_LT_EOF 1>&2
 
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
 *** reliably create shared libraries on SCO systems.  Therefore, libtool
 *** is disabling shared libraries support.  We urge you to upgrade GNU
 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
@@ -4923,9 +5307,9 @@ _LT_EOF
          # DT_RUNPATH tag from executables and libraries.  But doing so
          # requires that you compile everything twice, which is a pain.
          if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
          else
            _LT_TAGVAR(ld_shlibs, $1)=no
          fi
@@ -4942,15 +5326,15 @@ _LT_EOF
 
     *)
       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       else
        _LT_TAGVAR(ld_shlibs, $1)=no
       fi
       ;;
     esac
 
-    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
+    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
       runpath_var=
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
       _LT_TAGVAR(export_dynamic_flag_spec, $1)=
@@ -4966,7 +5350,7 @@ _LT_EOF
       # Note: this linker hardcodes the directories in LIBPATH if there
       # are no directories specified by -L.
       _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
        # Neither direct hardcoding nor static linking is supported with a
        # broken collect2.
        _LT_TAGVAR(hardcode_direct, $1)=unsupported
@@ -4974,34 +5358,57 @@ _LT_EOF
       ;;
 
     aix[[4-9]]*)
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
        # On IA64, the linker does run time linking by default, so we don't
        # have to do anything special.
        aix_use_runtimelinking=no
        exp_sym_flag='-Bexport'
-       no_entry_flag=""
+       no_entry_flag=
       else
        # If we're using GNU nm, then we don't want the "-C" option.
-       # -C means demangle to AIX nm, but means don't demangle with GNU nm
-       # Also, AIX nm treats weak defined symbols like other global
-       # defined symbols, whereas GNU nm marks them as "W".
+       # -C means demangle to GNU nm, but means don't demangle to AIX nm.
+       # Without the "-l" option, or with the "-B" option, AIX nm treats
+       # weak defined symbols like other global defined symbols, whereas
+       # GNU nm marks them as "W".
+       # While the 'weak' keyword is ignored in the Export File, we need
+       # it in the Import File for the 'aix-soname' feature, so we have
+       # to replace the "-B" option with "-P" for AIX nm.
        if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-         _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+         _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
        else
-         _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+         _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
        fi
        aix_use_runtimelinking=no
 
        # Test if we are trying to use run time linking or normal
        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-       # need to do runtime linking.
+       # have runtime linking enabled, and use it for executables.
+       # For shared libraries, we enable/disable runtime linking
+       # depending on the kind of the shared library created -
+       # when "with_aix_soname,aix_use_runtimelinking" is:
+       # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
+       # "aix,yes"  lib.so          shared, rtl:yes, for executables
+       #            lib.a           static archive
+       # "both,no"  lib.so.V(shr.o) shared, rtl:yes
+       #            lib.a(lib.so.V) shared, rtl:no,  for executables
+       # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+       #            lib.a(lib.so.V) shared, rtl:no
+       # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
+       #            lib.a           static archive
        case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
          for ld_flag in $LDFLAGS; do
-         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+         if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
            aix_use_runtimelinking=yes
            break
          fi
          done
+         if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+           # With aix-soname=svr4, we create the lib.so.V shared archives only,
+           # so we don't have lib.a shared libs to link our executables.
+           # We have to force runtime linking in this case.
+           aix_use_runtimelinking=yes
+           LDFLAGS="$LDFLAGS -Wl,-brtl"
+         fi
          ;;
        esac
 
@@ -5020,13 +5427,21 @@ _LT_EOF
       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
       _LT_TAGVAR(link_all_deplibs, $1)=yes
-      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
+      case $with_aix_soname,$aix_use_runtimelinking in
+      aix,*) ;; # traditional, no import file
+      svr4,* | *,yes) # use import file
+       # The Import File defines what to hardcode.
+       _LT_TAGVAR(hardcode_direct, $1)=no
+       _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+       ;;
+      esac
 
-      if test "$GCC" = yes; then
+      if test yes = "$GCC"; then
        case $host_os in aix4.[[012]]|aix4.[[012]].*)
        # We only want to do this on AIX 4.2 and lower, the check
        # below for broken collect2 doesn't work under 4.3+
-         collect2name=`${CC} -print-prog-name=collect2`
+         collect2name=`$CC -print-prog-name=collect2`
          if test -f "$collect2name" &&
           strings "$collect2name" | $GREP resolve_lib_name >/dev/null
          then
@@ -5045,61 +5460,80 @@ _LT_EOF
          ;;
        esac
        shared_flag='-shared'
-       if test "$aix_use_runtimelinking" = yes; then
-         shared_flag="$shared_flag "'${wl}-G'
+       if test yes = "$aix_use_runtimelinking"; then
+         shared_flag="$shared_flag "'$wl-G'
        fi
+       # Need to ensure runtime linking is disabled for the traditional
+       # shared library, or the linker may eventually find shared libraries
+       # /with/ Import File - we do not want to mix them.
+       shared_flag_aix='-shared'
+       shared_flag_svr4='-shared $wl-G'
       else
        # not using gcc
-       if test "$host_cpu" = ia64; then
+       if test ia64 = "$host_cpu"; then
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
        # chokes on -Wl,-G. The following line is correct:
          shared_flag='-G'
        else
-         if test "$aix_use_runtimelinking" = yes; then
-           shared_flag='${wl}-G'
+         if test yes = "$aix_use_runtimelinking"; then
+           shared_flag='$wl-G'
          else
-           shared_flag='${wl}-bM:SRE'
+           shared_flag='$wl-bM:SRE'
          fi
+         shared_flag_aix='$wl-bM:SRE'
+         shared_flag_svr4='$wl-G'
        fi
       fi
 
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
       # It seems that -bexpall does not export symbols beginning with
       # underscore (_), so it is better to generate a list of symbols to export.
       _LT_TAGVAR(always_export_symbols, $1)=yes
-      if test "$aix_use_runtimelinking" = yes; then
+      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
        # Warning - without using the other runtime loading flags (-brtl),
        # -berok will link without error, but may produce a broken library.
        _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
         # Determine the default libpath from the value encoded in an
         # empty executable.
         _LT_SYS_MODULE_PATH_AIX([$1])
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
       else
-       if test "$host_cpu" = ia64; then
-         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+       if test ia64 = "$host_cpu"; then
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
          _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-         _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+         _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
        else
         # Determine the default libpath from the value encoded in an
         # empty executable.
         _LT_SYS_MODULE_PATH_AIX([$1])
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
          # Warning - without using the other run time loading flags,
          # -berok will link without error, but may produce a broken library.
-         _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-         if test "$with_gnu_ld" = yes; then
+         _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
+         _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
+         if test yes = "$with_gnu_ld"; then
            # We only use this code for GNU lds that support --whole-archive.
-           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+           _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
          else
            # Exported symbols can be pulled into shared objects from archives
            _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
          fi
          _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-         # This is similar to how AIX traditionally builds its shared libraries.
-         _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+         _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+         # -brtl affects multiple linker settings, -berok does not and is overridden later
+         compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
+         if test svr4 != "$with_aix_soname"; then
+           # This is similar to how AIX traditionally builds its shared libraries.
+           _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+         fi
+         if test aix != "$with_aix_soname"; then
+           _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
+         else
+           # used by -dlpreopen to get the symbols
+           _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
+         fi
+         _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
        fi
       fi
       ;;
@@ -5108,7 +5542,7 @@ _LT_EOF
       case $host_cpu in
       powerpc)
             # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
             _LT_TAGVAR(archive_expsym_cmds, $1)=''
         ;;
       m68k)
@@ -5138,16 +5572,17 @@ _LT_EOF
        # Tell ltmain to make .lib files, not .a files.
        libext=lib
        # Tell ltmain to make .dll files, not .so files.
-       shrext_cmds=".dll"
+       shrext_cmds=.dll
        # FIXME: Setting linknames here is a bad hack.
-       _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
-       _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-           sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
-         else
-           sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
-         fi~
-         $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
-         linknames='
+       _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+       _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+            cp "$export_symbols" "$output_objdir/$soname.def";
+            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+          else
+            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+          fi~
+          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+          linknames='
        # The linker will not automatically build a static lib if we build a DLL.
        # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
@@ -5156,18 +5591,18 @@ _LT_EOF
        # Don't use ranlib
        _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
        _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
-         lt_tool_outputfile="@TOOL_OUTPUT@"~
-         case $lt_outputfile in
-           *.exe|*.EXE) ;;
-           *)
-             lt_outputfile="$lt_outputfile.exe"
-             lt_tool_outputfile="$lt_tool_outputfile.exe"
-             ;;
-         esac~
-         if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
-           $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
-           $RM "$lt_outputfile.manifest";
-         fi'
+          lt_tool_outputfile="@TOOL_OUTPUT@"~
+          case $lt_outputfile in
+            *.exe|*.EXE) ;;
+            *)
+              lt_outputfile=$lt_outputfile.exe
+              lt_tool_outputfile=$lt_tool_outputfile.exe
+              ;;
+          esac~
+          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+            $RM "$lt_outputfile.manifest";
+          fi'
        ;;
       *)
        # Assume MSVC wrapper
@@ -5176,7 +5611,7 @@ _LT_EOF
        # Tell ltmain to make .lib files, not .a files.
        libext=lib
        # Tell ltmain to make .dll files, not .so files.
-       shrext_cmds=".dll"
+       shrext_cmds=.dll
        # FIXME: Setting linknames here is a bad hack.
        _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
        # The linker will automatically build a .lib file if we build a DLL.
@@ -5226,33 +5661,33 @@ _LT_EOF
       ;;
 
     hpux9*)
-      if test "$GCC" = yes; then
-       _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      if test yes = "$GCC"; then
+       _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
       else
-       _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
       fi
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
       _LT_TAGVAR(hardcode_direct, $1)=yes
 
       # hardcode_minus_L: Not really in the search PATH,
       # but as the default location of the library.
       _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
       ;;
 
     hpux10*)
-      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes,no = "$GCC,$with_gnu_ld"; then
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
       else
        _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
       fi
-      if test "$with_gnu_ld" = no; then
-       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      if test no = "$with_gnu_ld"; then
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
        _LT_TAGVAR(hardcode_direct, $1)=yes
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+       _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
        # hardcode_minus_L: Not really in the search PATH,
        # but as the default location of the library.
        _LT_TAGVAR(hardcode_minus_L, $1)=yes
@@ -5260,25 +5695,25 @@ _LT_EOF
       ;;
 
     hpux11*)
-      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+      if test yes,no = "$GCC,$with_gnu_ld"; then
        case $host_cpu in
        hppa*64*)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        ia64*)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        *)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        esac
       else
        case $host_cpu in
        hppa*64*)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        ia64*)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        *)
        m4_if($1, [], [
@@ -5286,14 +5721,14 @@ _LT_EOF
          # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
          _LT_LINKER_OPTION([if $CC understands -b],
            _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
-           [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
+           [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
            [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
-         [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
+         [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
          ;;
        esac
       fi
-      if test "$with_gnu_ld" = no; then
-       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      if test no = "$with_gnu_ld"; then
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
        case $host_cpu in
@@ -5304,7 +5739,7 @@ _LT_EOF
        *)
          _LT_TAGVAR(hardcode_direct, $1)=yes
          _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+         _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
 
          # hardcode_minus_L: Not really in the search PATH,
          # but as the default location of the library.
@@ -5315,16 +5750,16 @@ _LT_EOF
       ;;
 
     irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      if test yes = "$GCC"; then
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
        # Try to use the -exported_symbol ld option, if it does not
        # work, assume that -exports_file does not work either and
        # implicitly export all symbols.
        # This should be the same for all languages, so no per-tag cache variable.
        AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
          [lt_cv_irix_exported_symbol],
-         [save_LDFLAGS="$LDFLAGS"
-          LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+         [save_LDFLAGS=$LDFLAGS
+          LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
           AC_LINK_IFELSE(
             [AC_LANG_SOURCE(
                [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
@@ -5337,21 +5772,31 @@ _LT_EOF
       end]])])],
              [lt_cv_irix_exported_symbol=yes],
              [lt_cv_irix_exported_symbol=no])
-           LDFLAGS="$save_LDFLAGS"])
-       if test "$lt_cv_irix_exported_symbol" = yes; then
-          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+           LDFLAGS=$save_LDFLAGS])
+       if test yes = "$lt_cv_irix_exported_symbol"; then
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
        fi
       else
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
       fi
       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
       _LT_TAGVAR(inherit_rpath, $1)=yes
       _LT_TAGVAR(link_all_deplibs, $1)=yes
       ;;
 
+    linux*)
+      case $cc_basename in
+      tcc*)
+       # Fabrice Bellard et al's Tiny C Compiler
+       _LT_TAGVAR(ld_shlibs, $1)=yes
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+       ;;
+      esac
+      ;;
+
     netbsd*)
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
@@ -5366,7 +5811,7 @@ _LT_EOF
     newsos6)
       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
       _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
@@ -5374,27 +5819,19 @@ _LT_EOF
     *nto* | *qnx*)
       ;;
 
-    openbsd*)
+    openbsd* | bitrig*)
       if test -f /usr/libexec/ld.so; then
        _LT_TAGVAR(hardcode_direct, $1)=yes
        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-       if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+       if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+         _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
        else
-         case $host_os in
-          openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
-            _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-            ;;
-          *)
-            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-            ;;
-         esac
+         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
        fi
       else
        _LT_TAGVAR(ld_shlibs, $1)=no
@@ -5405,33 +5842,53 @@ _LT_EOF
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
       _LT_TAGVAR(hardcode_minus_L, $1)=yes
       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      shrext_cmds=.dll
+      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+       $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+       $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+       $ECHO EXPORTS >> $output_objdir/$libname.def~
+       emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+       $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+       emximp -o $lib $output_objdir/$libname.def'
+      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+       $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+       $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+       $ECHO EXPORTS >> $output_objdir/$libname.def~
+       prefix_cmds="$SED"~
+       if test EXPORTS = "`$SED 1q $export_symbols`"; then
+         prefix_cmds="$prefix_cmds -e 1d";
+       fi~
+       prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+       cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+       $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+       emximp -o $lib $output_objdir/$libname.def'
+      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
       ;;
 
     osf3*)
-      if test "$GCC" = yes; then
-       _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      if test yes = "$GCC"; then
+       _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
       else
        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
       fi
       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
       ;;
 
     osf4* | osf5*)     # as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-       _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      if test yes = "$GCC"; then
+       _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
       else
        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
-       $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+          $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
 
        # Both c and cxx compiler support -rpath directly
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
@@ -5442,24 +5899,24 @@ _LT_EOF
 
     solaris*)
       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
-      if test "$GCC" = yes; then
-       wlarc='${wl}'
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+       wlarc='$wl'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-         $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+          $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
       else
        case `$CC -V 2>&1` in
        *"Compilers 5.0"*)
          wlarc=''
-         _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
          ;;
        *)
-         wlarc='${wl}'
-         _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+         wlarc='$wl'
+         _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-         $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
          ;;
        esac
       fi
@@ -5469,11 +5926,11 @@ _LT_EOF
       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
       *)
        # The compiler driver will combine and reorder linker options,
-       # but understands `-z linker_flag'.  GCC discards it without `$wl',
+       # but understands '-z linker_flag'.  GCC discards it without '$wl',
        # but is careful enough not to reorder.
        # Supported since Solaris 2.6 (maybe 2.5.1?)
-       if test "$GCC" = yes; then
-         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+       if test yes = "$GCC"; then
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
        else
          _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
        fi
@@ -5483,10 +5940,10 @@ _LT_EOF
       ;;
 
     sunos4*)
-      if test "x$host_vendor" = xsequent; then
+      if test sequent = "$host_vendor"; then
        # Use $CC to link under sequent, because it throws in some extra .o
        # files that make .init and .fini sections work.
-       _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
       else
        _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
       fi
@@ -5535,43 +5992,43 @@ _LT_EOF
       ;;
 
     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
-      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-       _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       fi
       ;;
 
     sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
+      # Note: We CANNOT use -z defs as we might desire, because we do not
       # link with -lc, and that would cause any symbols used from libc to
       # always be unresolved, which means just about no library would
       # ever link correctly.  If we're not using GNU ld we use -z text
       # though, which does catch some bad symbols but isn't as heavy-handed
       # as -z defs.
-      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
+      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
       _LT_TAGVAR(link_all_deplibs, $1)=yes
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
       runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-       _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       fi
       ;;
 
@@ -5586,17 +6043,17 @@ _LT_EOF
       ;;
     esac
 
-    if test x$host_vendor = xsni; then
+    if test sni = "$host_vendor"; then
       case $host in
       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
+       _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
        ;;
       esac
     fi
   fi
 ])
 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
 
 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
 
@@ -5613,7 +6070,7 @@ x|xyes)
   # Assume -lc should be added
   _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
+  if test yes,yes = "$GCC,$enable_shared"; then
     case $_LT_TAGVAR(archive_cmds, $1) in
     *'~'*)
       # FIXME: we may have to deal with multi-command sequences.
@@ -5693,12 +6150,12 @@ _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
     [Whether we need a single "-rpath" flag with a separated argument])
 _LT_TAGDECL([], [hardcode_direct], [0],
-    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
     DIR into the resulting binary])
 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
-    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
     DIR into the resulting binary and the resulting library dependency is
-    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
+    "absolute", i.e impossible to change by setting $shlibpath_var if the
     library is relocated])
 _LT_TAGDECL([], [hardcode_minus_L], [0],
     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
@@ -5739,10 +6196,10 @@ dnl    [Compiler flag to generate thread safe objects])
 # ------------------------
 # Ensure that the configuration variables for a C compiler are suitably
 # defined.  These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
+# the compiler configuration to 'libtool'.
 m4_defun([_LT_LANG_C_CONFIG],
 [m4_require([_LT_DECL_EGREP])dnl
-lt_save_CC="$CC"
+lt_save_CC=$CC
 AC_LANG_PUSH(C)
 
 # Source file extension for C test sources.
@@ -5782,18 +6239,18 @@ if test -n "$compiler"; then
   LT_SYS_DLOPEN_SELF
   _LT_CMD_STRIPLIB
 
-  # Report which library types will actually be built
+  # Report what library types will actually be built
   AC_MSG_CHECKING([if libtool supports shared libraries])
   AC_MSG_RESULT([$can_build_shared])
 
   AC_MSG_CHECKING([whether to build shared libraries])
-  test "$can_build_shared" = "no" && enable_shared=no
+  test no = "$can_build_shared" && enable_shared=no
 
   # On AIX, shared libraries and static libraries use the same namespace, and
   # are all built from PIC.
   case $host_os in
   aix3*)
-    test "$enable_shared" = yes && enable_static=no
+    test yes = "$enable_shared" && enable_static=no
     if test -n "$RANLIB"; then
       archive_cmds="$archive_cmds~\$RANLIB \$lib"
       postinstall_cmds='$RANLIB $lib'
@@ -5801,8 +6258,12 @@ if test -n "$compiler"; then
     ;;
 
   aix[[4-9]]*)
-    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-      test "$enable_shared" = yes && enable_static=no
+    if test ia64 != "$host_cpu"; then
+      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+      yes,aix,yes) ;;                  # shared object as lib.so file only
+      yes,svr4,*) ;;                   # shared object as lib.so archive member only
+      yes,*) enable_static=no ;;       # shared object in lib.a archive as well
+      esac
     fi
     ;;
   esac
@@ -5810,13 +6271,13 @@ if test -n "$compiler"; then
 
   AC_MSG_CHECKING([whether to build static libraries])
   # Make sure either enable_shared or enable_static is yes.
-  test "$enable_shared" = yes || enable_static=yes
+  test yes = "$enable_shared" || enable_static=yes
   AC_MSG_RESULT([$enable_static])
 
   _LT_CONFIG($1)
 fi
 AC_LANG_POP
-CC="$lt_save_CC"
+CC=$lt_save_CC
 ])# _LT_LANG_C_CONFIG
 
 
@@ -5824,14 +6285,14 @@ CC="$lt_save_CC"
 # --------------------------
 # Ensure that the configuration variables for a C++ compiler are suitably
 # defined.  These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
+# the compiler configuration to 'libtool'.
 m4_defun([_LT_LANG_CXX_CONFIG],
 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_DECL_EGREP])dnl
 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-    (test "X$CXX" != "Xg++"))) ; then
+if test -n "$CXX" && ( test no != "$CXX" &&
+    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
+    (test g++ != "$CXX"))); then
   AC_PROG_CXXCPP
 else
   _lt_caught_CXX_error=yes
@@ -5873,7 +6334,7 @@ _LT_TAGVAR(objext, $1)=$objext
 # the CXX compiler isn't working.  Some variables (like enable_shared)
 # are currently assumed to apply to all compilers on this platform,
 # and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_caught_CXX_error" != yes; then
+if test yes != "$_lt_caught_CXX_error"; then
   # Code to be used in simple compile tests
   lt_simple_compile_test_code="int some_variable = 0;"
 
@@ -5915,35 +6376,35 @@ if test "$_lt_caught_CXX_error" != yes; then
   if test -n "$compiler"; then
     # We don't want -fno-exception when compiling C++ code, so set the
     # no_builtin_flag separately
-    if test "$GXX" = yes; then
+    if test yes = "$GXX"; then
       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
     else
       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
     fi
 
-    if test "$GXX" = yes; then
+    if test yes = "$GXX"; then
       # Set up default GNU C++ configuration
 
       LT_PATH_LD
 
       # Check if GNU C++ uses GNU ld as the underlying linker, since the
       # archiving commands below assume that GNU ld is being used.
-      if test "$with_gnu_ld" = yes; then
-        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      if test yes = "$with_gnu_ld"; then
+        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
 
         # If archive_cmds runs LD, not CC, wlarc should be empty
         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
         #     investigate it a little bit more. (MM)
-        wlarc='${wl}'
+        wlarc='$wl'
 
         # ancient GNU ld didn't support --whole-archive et. al.
         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
          $GREP 'no-whole-archive' > /dev/null; then
-          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
         else
           _LT_TAGVAR(whole_archive_flag_spec, $1)=
         fi
@@ -5979,18 +6440,30 @@ if test "$_lt_caught_CXX_error" != yes; then
         _LT_TAGVAR(ld_shlibs, $1)=no
         ;;
       aix[[4-9]]*)
-        if test "$host_cpu" = ia64; then
+        if test ia64 = "$host_cpu"; then
           # On IA64, the linker does run time linking by default, so we don't
           # have to do anything special.
           aix_use_runtimelinking=no
           exp_sym_flag='-Bexport'
-          no_entry_flag=""
+          no_entry_flag=
         else
           aix_use_runtimelinking=no
 
           # Test if we are trying to use run time linking or normal
           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-          # need to do runtime linking.
+          # have runtime linking enabled, and use it for executables.
+          # For shared libraries, we enable/disable runtime linking
+          # depending on the kind of the shared library created -
+          # when "with_aix_soname,aix_use_runtimelinking" is:
+          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
+          # "aix,yes"  lib.so          shared, rtl:yes, for executables
+          #            lib.a           static archive
+          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
+          #            lib.a(lib.so.V) shared, rtl:no,  for executables
+          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+          #            lib.a(lib.so.V) shared, rtl:no
+          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
+          #            lib.a           static archive
           case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
            for ld_flag in $LDFLAGS; do
              case $ld_flag in
@@ -6000,6 +6473,13 @@ if test "$_lt_caught_CXX_error" != yes; then
                ;;
              esac
            done
+           if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+             # With aix-soname=svr4, we create the lib.so.V shared archives only,
+             # so we don't have lib.a shared libs to link our executables.
+             # We have to force runtime linking in this case.
+             aix_use_runtimelinking=yes
+             LDFLAGS="$LDFLAGS -Wl,-brtl"
+           fi
            ;;
           esac
 
@@ -6018,13 +6498,21 @@ if test "$_lt_caught_CXX_error" != yes; then
         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
         _LT_TAGVAR(link_all_deplibs, $1)=yes
-        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
+        case $with_aix_soname,$aix_use_runtimelinking in
+        aix,*) ;;      # no import file
+        svr4,* | *,yes) # use import file
+          # The Import File defines what to hardcode.
+          _LT_TAGVAR(hardcode_direct, $1)=no
+          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+          ;;
+        esac
 
-        if test "$GXX" = yes; then
+        if test yes = "$GXX"; then
           case $host_os in aix4.[[012]]|aix4.[[012]].*)
           # We only want to do this on AIX 4.2 and lower, the check
           # below for broken collect2 doesn't work under 4.3+
-         collect2name=`${CC} -print-prog-name=collect2`
+         collect2name=`$CC -print-prog-name=collect2`
          if test -f "$collect2name" &&
             strings "$collect2name" | $GREP resolve_lib_name >/dev/null
          then
@@ -6042,64 +6530,84 @@ if test "$_lt_caught_CXX_error" != yes; then
          fi
           esac
           shared_flag='-shared'
-         if test "$aix_use_runtimelinking" = yes; then
-           shared_flag="$shared_flag "'${wl}-G'
+         if test yes = "$aix_use_runtimelinking"; then
+           shared_flag=$shared_flag' $wl-G'
          fi
+         # Need to ensure runtime linking is disabled for the traditional
+         # shared library, or the linker may eventually find shared libraries
+         # /with/ Import File - we do not want to mix them.
+         shared_flag_aix='-shared'
+         shared_flag_svr4='-shared $wl-G'
         else
           # not using gcc
-          if test "$host_cpu" = ia64; then
+          if test ia64 = "$host_cpu"; then
          # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
          # chokes on -Wl,-G. The following line is correct:
          shared_flag='-G'
           else
-           if test "$aix_use_runtimelinking" = yes; then
-             shared_flag='${wl}-G'
+           if test yes = "$aix_use_runtimelinking"; then
+             shared_flag='$wl-G'
            else
-             shared_flag='${wl}-bM:SRE'
+             shared_flag='$wl-bM:SRE'
            fi
+           shared_flag_aix='$wl-bM:SRE'
+           shared_flag_svr4='$wl-G'
           fi
         fi
 
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
         # It seems that -bexpall does not export symbols beginning with
         # underscore (_), so it is better to generate a list of symbols to
        # export.
         _LT_TAGVAR(always_export_symbols, $1)=yes
-        if test "$aix_use_runtimelinking" = yes; then
+       if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
           # Warning - without using the other runtime loading flags (-brtl),
           # -berok will link without error, but may produce a broken library.
-          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+          # The "-G" linker flag allows undefined symbols.
+          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
           # Determine the default libpath from the value encoded in an empty
           # executable.
           _LT_SYS_MODULE_PATH_AIX([$1])
-          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
 
-          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
         else
-          if test "$host_cpu" = ia64; then
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+          if test ia64 = "$host_cpu"; then
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
            _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-           _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+           _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
           else
            # Determine the default libpath from the value encoded in an
            # empty executable.
            _LT_SYS_MODULE_PATH_AIX([$1])
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
            # Warning - without using the other run time loading flags,
            # -berok will link without error, but may produce a broken library.
-           _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-           _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-           if test "$with_gnu_ld" = yes; then
+           _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
+           _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
+           if test yes = "$with_gnu_ld"; then
              # We only use this code for GNU lds that support --whole-archive.
-             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+             _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
            else
              # Exported symbols can be pulled into shared objects from archives
              _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
            fi
            _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-           # This is similar to how AIX traditionally builds its shared
-           # libraries.
-           _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+           _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+           # -brtl affects multiple linker settings, -berok does not and is overridden later
+           compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
+           if test svr4 != "$with_aix_soname"; then
+             # This is similar to how AIX traditionally builds its shared
+             # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
+             _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+           fi
+           if test aix != "$with_aix_soname"; then
+             _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
+           else
+             # used by -dlpreopen to get the symbols
+             _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
+           fi
+           _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
           fi
         fi
         ;;
@@ -6109,7 +6617,7 @@ if test "$_lt_caught_CXX_error" != yes; then
          _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
          # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
          # support --undefined.  This deserves some investigation.  FIXME
-         _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+         _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
        else
          _LT_TAGVAR(ld_shlibs, $1)=no
        fi
@@ -6137,57 +6645,58 @@ if test "$_lt_caught_CXX_error" != yes; then
          # Tell ltmain to make .lib files, not .a files.
          libext=lib
          # Tell ltmain to make .dll files, not .so files.
-         shrext_cmds=".dll"
+         shrext_cmds=.dll
          # FIXME: Setting linknames here is a bad hack.
-         _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
-         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-             $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
-           else
-             $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
-           fi~
-           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
-           linknames='
+         _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+         _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+              cp "$export_symbols" "$output_objdir/$soname.def";
+              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+            else
+              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+            fi~
+            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+            linknames='
          # The linker will not automatically build a static lib if we build a DLL.
          # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
          _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
          # Don't use ranlib
          _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
          _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
-           lt_tool_outputfile="@TOOL_OUTPUT@"~
-           case $lt_outputfile in
-             *.exe|*.EXE) ;;
-             *)
-               lt_outputfile="$lt_outputfile.exe"
-               lt_tool_outputfile="$lt_tool_outputfile.exe"
-               ;;
-           esac~
-           func_to_tool_file "$lt_outputfile"~
-           if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
-             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
-             $RM "$lt_outputfile.manifest";
-           fi'
+            lt_tool_outputfile="@TOOL_OUTPUT@"~
+            case $lt_outputfile in
+              *.exe|*.EXE) ;;
+              *)
+                lt_outputfile=$lt_outputfile.exe
+                lt_tool_outputfile=$lt_tool_outputfile.exe
+                ;;
+            esac~
+            func_to_tool_file "$lt_outputfile"~
+            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+              $RM "$lt_outputfile.manifest";
+            fi'
          ;;
        *)
          # g++
          # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
          # as there is no search path for DLLs.
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
+         _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
          _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
          _LT_TAGVAR(always_export_symbols, $1)=no
          _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
          if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-           # If the export-symbols file already is a .def file (1st line
-           # is EXPORTS), use it as is; otherwise, prepend...
-           _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-             cp $export_symbols $output_objdir/$soname.def;
-           else
-             echo EXPORTS > $output_objdir/$soname.def;
-             cat $export_symbols >> $output_objdir/$soname.def;
-           fi~
-           $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+           # If the export-symbols file already is a .def file, use it as
+           # is; otherwise, prepend EXPORTS...
+           _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+              cp $export_symbols $output_objdir/$soname.def;
+            else
+              echo EXPORTS > $output_objdir/$soname.def;
+              cat $export_symbols >> $output_objdir/$soname.def;
+            fi~
+            $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
          else
            _LT_TAGVAR(ld_shlibs, $1)=no
          fi
@@ -6198,6 +6707,34 @@ if test "$_lt_caught_CXX_error" != yes; then
         _LT_DARWIN_LINKER_FEATURES($1)
        ;;
 
+      os2*)
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+       _LT_TAGVAR(hardcode_minus_L, $1)=yes
+       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+       shrext_cmds=.dll
+       _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+         $ECHO EXPORTS >> $output_objdir/$libname.def~
+         emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+         emximp -o $lib $output_objdir/$libname.def'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+         $ECHO EXPORTS >> $output_objdir/$libname.def~
+         prefix_cmds="$SED"~
+         if test EXPORTS = "`$SED 1q $export_symbols`"; then
+           prefix_cmds="$prefix_cmds -e 1d";
+         fi~
+         prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+         cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+         emximp -o $lib $output_objdir/$libname.def'
+       _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+       ;;
+
       dgux*)
         case $cc_basename in
           ec++*)
@@ -6232,18 +6769,15 @@ if test "$_lt_caught_CXX_error" != yes; then
         _LT_TAGVAR(ld_shlibs, $1)=yes
         ;;
 
-      gnu*)
-        ;;
-
       haiku*)
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
         _LT_TAGVAR(link_all_deplibs, $1)=yes
         ;;
 
       hpux9*)
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
         _LT_TAGVAR(hardcode_direct, $1)=yes
         _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
                                             # but as the default
@@ -6255,7 +6789,7 @@ if test "$_lt_caught_CXX_error" != yes; then
             _LT_TAGVAR(ld_shlibs, $1)=no
             ;;
           aCC*)
-            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
             # Commands to make compiler produce verbose output that lists
             # what "hidden" libraries, object files and flags are used when
             # linking a shared library.
@@ -6264,11 +6798,11 @@ if test "$_lt_caught_CXX_error" != yes; then
             # explicitly linking system object files so we need to strip them
             # from the output so that they don't get included in the library
             # dependencies.
-            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
             ;;
           *)
-            if test "$GXX" = yes; then
-              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            if test yes = "$GXX"; then
+              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
             else
               # FIXME: insert proper C++ library support
               _LT_TAGVAR(ld_shlibs, $1)=no
@@ -6278,15 +6812,15 @@ if test "$_lt_caught_CXX_error" != yes; then
         ;;
 
       hpux10*|hpux11*)
-        if test $with_gnu_ld = no; then
-         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+        if test no = "$with_gnu_ld"; then
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
          _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
           case $host_cpu in
             hppa*64*|ia64*)
               ;;
             *)
-             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+             _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
               ;;
           esac
         fi
@@ -6312,13 +6846,13 @@ if test "$_lt_caught_CXX_error" != yes; then
           aCC*)
            case $host_cpu in
              hppa*64*)
-               _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
                ;;
              ia64*)
-               _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
                ;;
              *)
-               _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
                ;;
            esac
            # Commands to make compiler produce verbose output that lists
@@ -6329,20 +6863,20 @@ if test "$_lt_caught_CXX_error" != yes; then
            # explicitly linking system object files so we need to strip them
            # from the output so that they don't get included in the library
            # dependencies.
-           output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+           output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
            ;;
           *)
-           if test "$GXX" = yes; then
-             if test $with_gnu_ld = no; then
+           if test yes = "$GXX"; then
+             if test no = "$with_gnu_ld"; then
                case $host_cpu in
                  hppa*64*)
-                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
                    ;;
                  ia64*)
-                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
                    ;;
                  *)
-                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
                    ;;
                esac
              fi
@@ -6357,22 +6891,22 @@ if test "$_lt_caught_CXX_error" != yes; then
       interix[[3-9]]*)
        _LT_TAGVAR(hardcode_direct, $1)=no
        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+       _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
        # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
        # Instead, shared libraries are loaded at an image base (0x10000000 by
        # default) and relocated if they conflict, which is a slow very memory
        # consuming and fragmenting process.  To avoid this, we pick a random,
        # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
        # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
        ;;
       irix5* | irix6*)
         case $cc_basename in
           CC*)
            # SGI C++
-           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
 
            # Archives containing C++ object files must be created using
            # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
@@ -6381,22 +6915,22 @@ if test "$_lt_caught_CXX_error" != yes; then
            _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
            ;;
           *)
-           if test "$GXX" = yes; then
-             if test "$with_gnu_ld" = no; then
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+           if test yes = "$GXX"; then
+             if test no = "$with_gnu_ld"; then
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
              else
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
              fi
            fi
            _LT_TAGVAR(link_all_deplibs, $1)=yes
            ;;
         esac
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
         _LT_TAGVAR(inherit_rpath, $1)=yes
         ;;
 
-      linux* | k*bsd*-gnu | kopensolaris*-gnu)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
         case $cc_basename in
           KCC*)
            # Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -6404,8 +6938,8 @@ if test "$_lt_caught_CXX_error" != yes; then
            # KCC will only create a shared library if the output file
            # ends with ".so" (or ".sl" for HP-UX), so rename the library
            # to its proper name (with version) after linking.
-           _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-           _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+           _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+           _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
            # Commands to make compiler produce verbose output that lists
            # what "hidden" libraries, object files and flags are used when
            # linking a shared library.
@@ -6414,10 +6948,10 @@ if test "$_lt_caught_CXX_error" != yes; then
            # explicitly linking system object files so we need to strip them
            # from the output so that they don't get included in the library
            # dependencies.
-           output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+           output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
 
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+           _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
 
            # Archives containing C++ object files must be created using
            # "CC -Bstatic", where "CC" is the KAI C++ compiler.
@@ -6431,59 +6965,59 @@ if test "$_lt_caught_CXX_error" != yes; then
            # earlier do not add the objects themselves.
            case `$CC -V 2>&1` in
              *"Version 7."*)
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-               _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+               _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
                ;;
              *)  # Version 8.0 or newer
                tmp_idyn=
                case $host_cpu in
                  ia64*) tmp_idyn=' -i_dynamic';;
                esac
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-               _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+               _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
                ;;
            esac
            _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+           _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+           _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
            ;;
           pgCC* | pgcpp*)
             # Portland Group C++ compiler
            case `$CC -V` in
            *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
              _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
-               rm -rf $tpldir~
-               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
-               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
+               rm -rf $tpldir~
+               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
              _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
-               rm -rf $tpldir~
-               $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
-               $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
-               $RANLIB $oldlib'
+                rm -rf $tpldir~
+                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+                $RANLIB $oldlib'
              _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
-               rm -rf $tpldir~
-               $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-               $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+                rm -rf $tpldir~
+                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
              _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
-               rm -rf $tpldir~
-               $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-               $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+                rm -rf $tpldir~
+                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
              ;;
            *) # Version 6 and above use weak symbols
-             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
              ;;
            esac
 
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
+           _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+           _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
             ;;
          cxx*)
            # Compaq C++
-           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname  -o $lib $wl-retain-symbols-file $wl$export_symbols'
 
            runpath_var=LD_RUN_PATH
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
@@ -6497,18 +7031,18 @@ if test "$_lt_caught_CXX_error" != yes; then
            # explicitly linking system object files so we need to strip them
            # from the output so that they don't get included in the library
            # dependencies.
-           output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
+           output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
            ;;
          xl* | mpixl* | bgxl*)
            # IBM XL 8.0 on PPC, with GNU ld
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-           _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-           if test "x$supports_anon_versioning" = xyes; then
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+           _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+           _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+           if test yes = "$supports_anon_versioning"; then
              _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-               echo "local: *; };" >> $output_objdir/$libname.ver~
-               $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+                echo "local: *; };" >> $output_objdir/$libname.ver~
+                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
            fi
            ;;
          *)
@@ -6516,10 +7050,10 @@ if test "$_lt_caught_CXX_error" != yes; then
            *Sun\ C*)
              # Sun C++ 5.9
              _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
-             _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+             _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+             _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
              _LT_TAGVAR(compiler_needs_object, $1)=yes
 
              # Not sure whether something based on
@@ -6577,22 +7111,17 @@ if test "$_lt_caught_CXX_error" != yes; then
         _LT_TAGVAR(ld_shlibs, $1)=yes
        ;;
 
-      openbsd2*)
-        # C++ shared libraries are fairly broken
-       _LT_TAGVAR(ld_shlibs, $1)=no
-       ;;
-
-      openbsd*)
+      openbsd* | bitrig*)
        if test -f /usr/libexec/ld.so; then
          _LT_TAGVAR(hardcode_direct, $1)=yes
          _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
          _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-         if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
-           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-           _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+         if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
+           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
+           _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+           _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
          fi
          output_verbose_link_cmd=func_echo_all
        else
@@ -6608,9 +7137,9 @@ if test "$_lt_caught_CXX_error" != yes; then
            # KCC will only create a shared library if the output file
            # ends with ".so" (or ".sl" for HP-UX), so rename the library
            # to its proper name (with version) after linking.
-           _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+           _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
            _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
            # Archives containing C++ object files must be created using
@@ -6628,17 +7157,17 @@ if test "$_lt_caught_CXX_error" != yes; then
           cxx*)
            case $host in
              osf3*)
-               _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
-               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+               _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
                ;;
              *)
                _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
                _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
-                 echo "-hidden">> $lib.exp~
-                 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
-                 $RM $lib.exp'
+                  echo "-hidden">> $lib.exp~
+                  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
+                  $RM $lib.exp'
                _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
                ;;
            esac
@@ -6653,21 +7182,21 @@ if test "$_lt_caught_CXX_error" != yes; then
            # explicitly linking system object files so we need to strip them
            # from the output so that they don't get included in the library
            # dependencies.
-           output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+           output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
            ;;
          *)
-           if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-             _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+           if test yes,no = "$GXX,$with_gnu_ld"; then
+             _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
              case $host in
                osf3*)
-                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
                  ;;
                *)
-                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
                  ;;
              esac
 
-             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
              _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
              # Commands to make compiler produce verbose output that lists
@@ -6713,9 +7242,9 @@ if test "$_lt_caught_CXX_error" != yes; then
            # Sun C++ 4.2, 5.x and Centerline C++
             _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
            _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
-           _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+           _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
            _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-             $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+              $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -6723,7 +7252,7 @@ if test "$_lt_caught_CXX_error" != yes; then
              solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
              *)
                # The compiler driver will combine and reorder linker options,
-               # but understands `-z linker_flag'.
+               # but understands '-z linker_flag'.
                # Supported since Solaris 2.6 (maybe 2.5.1?)
                _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
                ;;
@@ -6740,30 +7269,30 @@ if test "$_lt_caught_CXX_error" != yes; then
            ;;
           gcx*)
            # Green Hills C++ Compiler
-           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
 
            # The C++ compiler must be used to create the archive.
            _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
            ;;
           *)
            # GNU C++ compiler with Solaris linker
-           if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-             _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+           if test yes,no = "$GXX,$with_gnu_ld"; then
+             _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
              if $CC --version | $GREP -v '^2\.7' > /dev/null; then
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
                _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-                 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+                  $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
                # Commands to make compiler produce verbose output that lists
                # what "hidden" libraries, object files and flags are used when
                # linking a shared library.
                output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
              else
-               # g++ 2.7 appears to require `-G' NOT `-shared' on this
+               # g++ 2.7 appears to require '-G' NOT '-shared' on this
                # platform.
-               _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
                _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-                 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+                  $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
                # Commands to make compiler produce verbose output that lists
                # what "hidden" libraries, object files and flags are used when
@@ -6771,11 +7300,11 @@ if test "$_lt_caught_CXX_error" != yes; then
                output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
              fi
 
-             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
              case $host_os in
                solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
                *)
-                 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+                 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
                  ;;
              esac
            fi
@@ -6784,52 +7313,52 @@ if test "$_lt_caught_CXX_error" != yes; then
         ;;
 
     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
-      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       runpath_var='LD_RUN_PATH'
 
       case $cc_basename in
         CC*)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        *)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
          ;;
       esac
       ;;
 
       sysv5* | sco3.2v5* | sco5v6*)
-       # Note: We can NOT use -z defs as we might desire, because we do not
+       # Note: We CANNOT use -z defs as we might desire, because we do not
        # link with -lc, and that would cause any symbols used from libc to
        # always be unresolved, which means just about no library would
        # ever link correctly.  If we're not using GNU ld we use -z text
        # though, which does catch some bad symbols but isn't as heavy-handed
        # as -z defs.
-       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-       _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+       _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
+       _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
        _LT_TAGVAR(link_all_deplibs, $1)=yes
-       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+       _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
        runpath_var='LD_RUN_PATH'
 
        case $cc_basename in
           CC*)
-           _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+           _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
            _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
-             '"$_LT_TAGVAR(old_archive_cmds, $1)"
+              '"$_LT_TAGVAR(old_archive_cmds, $1)"
            _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
-             '"$_LT_TAGVAR(reload_cmds, $1)"
+              '"$_LT_TAGVAR(reload_cmds, $1)"
            ;;
          *)
-           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
            ;;
        esac
       ;;
@@ -6860,10 +7389,10 @@ if test "$_lt_caught_CXX_error" != yes; then
     esac
 
     AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
 
-    _LT_TAGVAR(GCC, $1)="$GXX"
-    _LT_TAGVAR(LD, $1)="$LD"
+    _LT_TAGVAR(GCC, $1)=$GXX
+    _LT_TAGVAR(LD, $1)=$LD
 
     ## CAVEAT EMPTOR:
     ## There is no encapsulation within the following macros, do not change
@@ -6890,7 +7419,7 @@ if test "$_lt_caught_CXX_error" != yes; then
   lt_cv_path_LD=$lt_save_path_LD
   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-fi # test "$_lt_caught_CXX_error" != yes
+fi # test yes != "$_lt_caught_CXX_error"
 
 AC_LANG_POP
 ])# _LT_LANG_CXX_CONFIG
@@ -6912,13 +7441,14 @@ AC_REQUIRE([_LT_DECL_SED])
 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
 func_stripname_cnf ()
 {
-  case ${2} in
-  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
-  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+  case @S|@2 in
+  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
+  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
   esac
 } # func_stripname_cnf
 ])# _LT_FUNC_STRIPNAME_CNF
 
+
 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
 # ---------------------------------
 # Figure out "hidden" library dependencies from verbose
@@ -7002,13 +7532,13 @@ if AC_TRY_EVAL(ac_compile); then
   pre_test_object_deps_done=no
 
   for p in `eval "$output_verbose_link_cmd"`; do
-    case ${prev}${p} in
+    case $prev$p in
 
     -L* | -R* | -l*)
        # Some compilers place space between "-{L,R}" and the path.
        # Remove the space.
-       if test $p = "-L" ||
-          test $p = "-R"; then
+       if test x-L = "$p" ||
+          test x-R = "$p"; then
         prev=$p
         continue
        fi
@@ -7024,16 +7554,16 @@ if AC_TRY_EVAL(ac_compile); then
        case $p in
        =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
        esac
-       if test "$pre_test_object_deps_done" = no; then
-        case ${prev} in
+       if test no = "$pre_test_object_deps_done"; then
+        case $prev in
         -L | -R)
           # Internal compiler library paths should come after those
           # provided the user.  The postdeps already come after the
           # user supplied libs so there is no need to process them.
           if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
-            _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+            _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
           else
-            _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+            _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
           fi
           ;;
         # The "-l" case would never come before the object being
@@ -7041,9 +7571,9 @@ if AC_TRY_EVAL(ac_compile); then
         esac
        else
         if test -z "$_LT_TAGVAR(postdeps, $1)"; then
-          _LT_TAGVAR(postdeps, $1)="${prev}${p}"
+          _LT_TAGVAR(postdeps, $1)=$prev$p
         else
-          _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
+          _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
         fi
        fi
        prev=
@@ -7058,15 +7588,15 @@ if AC_TRY_EVAL(ac_compile); then
         continue
        fi
 
-       if test "$pre_test_object_deps_done" = no; then
+       if test no = "$pre_test_object_deps_done"; then
         if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
-          _LT_TAGVAR(predep_objects, $1)="$p"
+          _LT_TAGVAR(predep_objects, $1)=$p
         else
           _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
         fi
        else
         if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
-          _LT_TAGVAR(postdep_objects, $1)="$p"
+          _LT_TAGVAR(postdep_objects, $1)=$p
         else
           _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
         fi
@@ -7097,51 +7627,6 @@ interix[[3-9]]*)
   _LT_TAGVAR(postdep_objects,$1)=
   _LT_TAGVAR(postdeps,$1)=
   ;;
-
-linux*)
-  case `$CC -V 2>&1 | sed 5q` in
-  *Sun\ C*)
-    # Sun C++ 5.9
-
-    # The more standards-conforming stlport4 library is
-    # incompatible with the Cstd library. Avoid specifying
-    # it if it's in CXXFLAGS. Ignore libCrun as
-    # -library=stlport4 depends on it.
-    case " $CXX $CXXFLAGS " in
-    *" -library=stlport4 "*)
-      solaris_use_stlport4=yes
-      ;;
-    esac
-
-    if test "$solaris_use_stlport4" != yes; then
-      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
-    fi
-    ;;
-  esac
-  ;;
-
-solaris*)
-  case $cc_basename in
-  CC* | sunCC*)
-    # The more standards-conforming stlport4 library is
-    # incompatible with the Cstd library. Avoid specifying
-    # it if it's in CXXFLAGS. Ignore libCrun as
-    # -library=stlport4 depends on it.
-    case " $CXX $CXXFLAGS " in
-    *" -library=stlport4 "*)
-      solaris_use_stlport4=yes
-      ;;
-    esac
-
-    # Adding this requires a known-good setup of shared libraries for
-    # Sun compiler versions before 5.6, else PIC objects from an old
-    # archive will be linked into the output, leading to subtle bugs.
-    if test "$solaris_use_stlport4" != yes; then
-      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
-    fi
-    ;;
-  esac
-  ;;
 esac
 ])
 
@@ -7150,7 +7635,7 @@ case " $_LT_TAGVAR(postdeps, $1) " in
 esac
  _LT_TAGVAR(compiler_lib_search_dirs, $1)=
 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
 fi
 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
     [The directories searched by this compiler when creating a shared library])
@@ -7170,10 +7655,10 @@ _LT_TAGDECL([], [compiler_lib_search_path], [1],
 # --------------------------
 # Ensure that the configuration variables for a Fortran 77 compiler are
 # suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
+# to write the compiler configuration to 'libtool'.
 m4_defun([_LT_LANG_F77_CONFIG],
 [AC_LANG_PUSH(Fortran 77)
-if test -z "$F77" || test "X$F77" = "Xno"; then
+if test -z "$F77" || test no = "$F77"; then
   _lt_disable_F77=yes
 fi
 
@@ -7210,7 +7695,7 @@ _LT_TAGVAR(objext, $1)=$objext
 # the F77 compiler isn't working.  Some variables (like enable_shared)
 # are currently assumed to apply to all compilers on this platform,
 # and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_F77" != yes; then
+if test yes != "$_lt_disable_F77"; then
   # Code to be used in simple compile tests
   lt_simple_compile_test_code="\
       subroutine t
@@ -7232,7 +7717,7 @@ if test "$_lt_disable_F77" != yes; then
   _LT_LINKER_BOILERPLATE
 
   # Allow CC to be a program name with arguments.
-  lt_save_CC="$CC"
+  lt_save_CC=$CC
   lt_save_GCC=$GCC
   lt_save_CFLAGS=$CFLAGS
   CC=${F77-"f77"}
@@ -7246,21 +7731,25 @@ if test "$_lt_disable_F77" != yes; then
     AC_MSG_RESULT([$can_build_shared])
 
     AC_MSG_CHECKING([whether to build shared libraries])
-    test "$can_build_shared" = "no" && enable_shared=no
+    test no = "$can_build_shared" && enable_shared=no
 
     # On AIX, shared libraries and static libraries use the same namespace, and
     # are all built from PIC.
     case $host_os in
       aix3*)
-        test "$enable_shared" = yes && enable_static=no
+        test yes = "$enable_shared" && enable_static=no
         if test -n "$RANLIB"; then
           archive_cmds="$archive_cmds~\$RANLIB \$lib"
           postinstall_cmds='$RANLIB $lib'
         fi
         ;;
       aix[[4-9]]*)
-       if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-         test "$enable_shared" = yes && enable_static=no
+       if test ia64 != "$host_cpu"; then
+         case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+         yes,aix,yes) ;;               # shared object as lib.so file only
+         yes,svr4,*) ;;                # shared object as lib.so archive member only
+         yes,*) enable_static=no ;;    # shared object in lib.a archive as well
+         esac
        fi
         ;;
     esac
@@ -7268,11 +7757,11 @@ if test "$_lt_disable_F77" != yes; then
 
     AC_MSG_CHECKING([whether to build static libraries])
     # Make sure either enable_shared or enable_static is yes.
-    test "$enable_shared" = yes || enable_static=yes
+    test yes = "$enable_shared" || enable_static=yes
     AC_MSG_RESULT([$enable_static])
 
-    _LT_TAGVAR(GCC, $1)="$G77"
-    _LT_TAGVAR(LD, $1)="$LD"
+    _LT_TAGVAR(GCC, $1)=$G77
+    _LT_TAGVAR(LD, $1)=$LD
 
     ## CAVEAT EMPTOR:
     ## There is no encapsulation within the following macros, do not change
@@ -7289,9 +7778,9 @@ if test "$_lt_disable_F77" != yes; then
   fi # test -n "$compiler"
 
   GCC=$lt_save_GCC
-  CC="$lt_save_CC"
-  CFLAGS="$lt_save_CFLAGS"
-fi # test "$_lt_disable_F77" != yes
+  CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
+fi # test yes != "$_lt_disable_F77"
 
 AC_LANG_POP
 ])# _LT_LANG_F77_CONFIG
@@ -7301,11 +7790,11 @@ AC_LANG_POP
 # -------------------------
 # Ensure that the configuration variables for a Fortran compiler are
 # suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
+# to write the compiler configuration to 'libtool'.
 m4_defun([_LT_LANG_FC_CONFIG],
 [AC_LANG_PUSH(Fortran)
 
-if test -z "$FC" || test "X$FC" = "Xno"; then
+if test -z "$FC" || test no = "$FC"; then
   _lt_disable_FC=yes
 fi
 
@@ -7342,7 +7831,7 @@ _LT_TAGVAR(objext, $1)=$objext
 # the FC compiler isn't working.  Some variables (like enable_shared)
 # are currently assumed to apply to all compilers on this platform,
 # and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_FC" != yes; then
+if test yes != "$_lt_disable_FC"; then
   # Code to be used in simple compile tests
   lt_simple_compile_test_code="\
       subroutine t
@@ -7364,7 +7853,7 @@ if test "$_lt_disable_FC" != yes; then
   _LT_LINKER_BOILERPLATE
 
   # Allow CC to be a program name with arguments.
-  lt_save_CC="$CC"
+  lt_save_CC=$CC
   lt_save_GCC=$GCC
   lt_save_CFLAGS=$CFLAGS
   CC=${FC-"f95"}
@@ -7380,21 +7869,25 @@ if test "$_lt_disable_FC" != yes; then
     AC_MSG_RESULT([$can_build_shared])
 
     AC_MSG_CHECKING([whether to build shared libraries])
-    test "$can_build_shared" = "no" && enable_shared=no
+    test no = "$can_build_shared" && enable_shared=no
 
     # On AIX, shared libraries and static libraries use the same namespace, and
     # are all built from PIC.
     case $host_os in
       aix3*)
-        test "$enable_shared" = yes && enable_static=no
+        test yes = "$enable_shared" && enable_static=no
         if test -n "$RANLIB"; then
           archive_cmds="$archive_cmds~\$RANLIB \$lib"
           postinstall_cmds='$RANLIB $lib'
         fi
         ;;
       aix[[4-9]]*)
-       if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-         test "$enable_shared" = yes && enable_static=no
+       if test ia64 != "$host_cpu"; then
+         case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+         yes,aix,yes) ;;               # shared object as lib.so file only
+         yes,svr4,*) ;;                # shared object as lib.so archive member only
+         yes,*) enable_static=no ;;    # shared object in lib.a archive as well
+         esac
        fi
         ;;
     esac
@@ -7402,11 +7895,11 @@ if test "$_lt_disable_FC" != yes; then
 
     AC_MSG_CHECKING([whether to build static libraries])
     # Make sure either enable_shared or enable_static is yes.
-    test "$enable_shared" = yes || enable_static=yes
+    test yes = "$enable_shared" || enable_static=yes
     AC_MSG_RESULT([$enable_static])
 
-    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
-    _LT_TAGVAR(LD, $1)="$LD"
+    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
+    _LT_TAGVAR(LD, $1)=$LD
 
     ## CAVEAT EMPTOR:
     ## There is no encapsulation within the following macros, do not change
@@ -7426,7 +7919,7 @@ if test "$_lt_disable_FC" != yes; then
   GCC=$lt_save_GCC
   CC=$lt_save_CC
   CFLAGS=$lt_save_CFLAGS
-fi # test "$_lt_disable_FC" != yes
+fi # test yes != "$_lt_disable_FC"
 
 AC_LANG_POP
 ])# _LT_LANG_FC_CONFIG
@@ -7436,7 +7929,7 @@ AC_LANG_POP
 # --------------------------
 # Ensure that the configuration variables for the GNU Java Compiler compiler
 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
+# to write the compiler configuration to 'libtool'.
 m4_defun([_LT_LANG_GCJ_CONFIG],
 [AC_REQUIRE([LT_PROG_GCJ])dnl
 AC_LANG_SAVE
@@ -7470,7 +7963,7 @@ CC=${GCJ-"gcj"}
 CFLAGS=$GCJFLAGS
 compiler=$CC
 _LT_TAGVAR(compiler, $1)=$CC
-_LT_TAGVAR(LD, $1)="$LD"
+_LT_TAGVAR(LD, $1)=$LD
 _LT_CC_BASENAME([$compiler])
 
 # GCJ did not exist at the time GCC didn't implicitly link libc in.
@@ -7507,7 +8000,7 @@ CFLAGS=$lt_save_CFLAGS
 # --------------------------
 # Ensure that the configuration variables for the GNU Go compiler
 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
+# to write the compiler configuration to 'libtool'.
 m4_defun([_LT_LANG_GO_CONFIG],
 [AC_REQUIRE([LT_PROG_GO])dnl
 AC_LANG_SAVE
@@ -7541,7 +8034,7 @@ CC=${GOC-"gccgo"}
 CFLAGS=$GOFLAGS
 compiler=$CC
 _LT_TAGVAR(compiler, $1)=$CC
-_LT_TAGVAR(LD, $1)="$LD"
+_LT_TAGVAR(LD, $1)=$LD
 _LT_CC_BASENAME([$compiler])
 
 # Go did not exist at the time GCC didn't implicitly link libc in.
@@ -7578,7 +8071,7 @@ CFLAGS=$lt_save_CFLAGS
 # -------------------------
 # Ensure that the configuration variables for the Windows resource compiler
 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
+# to write the compiler configuration to 'libtool'.
 m4_defun([_LT_LANG_RC_CONFIG],
 [AC_REQUIRE([LT_PROG_RC])dnl
 AC_LANG_SAVE
@@ -7594,7 +8087,7 @@ _LT_TAGVAR(objext, $1)=$objext
 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
 
 # Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
+lt_simple_link_test_code=$lt_simple_compile_test_code
 
 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
 _LT_TAG_COMPILER
@@ -7604,7 +8097,7 @@ _LT_COMPILER_BOILERPLATE
 _LT_LINKER_BOILERPLATE
 
 # Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
+lt_save_CC=$CC
 lt_save_CFLAGS=$CFLAGS
 lt_save_GCC=$GCC
 GCC=
@@ -7633,7 +8126,7 @@ AC_DEFUN([LT_PROG_GCJ],
 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
   [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
     [AC_CHECK_TOOL(GCJ, gcj,)
-      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
       AC_SUBST(GCJFLAGS)])])[]dnl
 ])
 
@@ -7744,7 +8237,7 @@ lt_ac_count=0
 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
 # along with /bin/sed that truncates output.
 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
-  test ! -f $lt_ac_sed && continue
+  test ! -f "$lt_ac_sed" && continue
   cat /dev/null > conftest.in
   lt_ac_count=0
   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
@@ -7761,9 +8254,9 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
     cmp -s conftest.out conftest.nl || break
     # 10000 chars as input seems more than enough
-    test $lt_ac_count -gt 10 && break
+    test 10 -lt "$lt_ac_count" && break
     lt_ac_count=`expr $lt_ac_count + 1`
-    if test $lt_ac_count -gt $lt_ac_max; then
+    if test "$lt_ac_count" -gt "$lt_ac_max"; then
       lt_ac_max=$lt_ac_count
       lt_cv_path_SED=$lt_ac_sed
     fi
@@ -7787,27 +8280,7 @@ dnl AC_DEFUN([LT_AC_PROG_SED], [])
 # Find out whether the shell is Bourne or XSI compatible,
 # or has some other useful features.
 m4_defun([_LT_CHECK_SHELL_FEATURES],
-[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
-  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
-      = c,a/b,b/c, \
-    && eval 'test $(( 1 + 1 )) -eq 2 \
-    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
-  && xsi_shell=yes
-AC_MSG_RESULT([$xsi_shell])
-_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
-
-AC_MSG_CHECKING([whether the shell understands "+="])
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
-    >/dev/null 2>&1 \
-  && lt_shell_append=yes
-AC_MSG_RESULT([$lt_shell_append])
-_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
-
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
   lt_unset=unset
 else
   lt_unset=false
@@ -7831,102 +8304,9 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
 ])# _LT_CHECK_SHELL_FEATURES
 
 
-# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
-# ------------------------------------------------------
-# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
-# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
-m4_defun([_LT_PROG_FUNCTION_REPLACE],
-[dnl {
-sed -e '/^$1 ()$/,/^} # $1 /c\
-$1 ()\
-{\
-m4_bpatsubsts([$2], [$], [\\], [^\([    ]\)], [\\\1])
-} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-])
-
-
-# _LT_PROG_REPLACE_SHELLFNS
-# -------------------------
-# Replace existing portable implementations of several shell functions with
-# equivalent extended shell implementations where those features are available..
-m4_defun([_LT_PROG_REPLACE_SHELLFNS],
-[if test x"$xsi_shell" = xyes; then
-  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
-    case ${1} in
-      */*) func_dirname_result="${1%/*}${2}" ;;
-      *  ) func_dirname_result="${3}" ;;
-    esac])
-
-  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
-    func_basename_result="${1##*/}"])
-
-  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
-    case ${1} in
-      */*) func_dirname_result="${1%/*}${2}" ;;
-      *  ) func_dirname_result="${3}" ;;
-    esac
-    func_basename_result="${1##*/}"])
-
-  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
-    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
-    # positional parameters, so assign one to ordinary parameter first.
-    func_stripname_result=${3}
-    func_stripname_result=${func_stripname_result#"${1}"}
-    func_stripname_result=${func_stripname_result%"${2}"}])
-
-  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
-    func_split_long_opt_name=${1%%=*}
-    func_split_long_opt_arg=${1#*=}])
-
-  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
-    func_split_short_opt_arg=${1#??}
-    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
-
-  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
-    case ${1} in
-      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
-      *)    func_lo2o_result=${1} ;;
-    esac])
-
-  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
-
-  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
-
-  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
-fi
-
-if test x"$lt_shell_append" = xyes; then
-  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
-
-  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
-    func_quote_for_eval "${2}"
-dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
-    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
-
-  # Save a `func_append' function call where possible by direct use of '+='
-  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
-    && mv -f "$cfgfile.tmp" "$cfgfile" \
-      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-  test 0 -eq $? || _lt_function_replace_fail=:
-else
-  # Save a `func_append' function call even when '+=' is not available
-  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
-    && mv -f "$cfgfile.tmp" "$cfgfile" \
-      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-  test 0 -eq $? || _lt_function_replace_fail=:
-fi
-
-if test x"$_lt_function_replace_fail" = x":"; then
-  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
-fi
-])
-
 # _LT_PATH_CONVERSION_FUNCTIONS
 # -----------------------------
-# Determine which file name conversion functions should be used by
+# Determine what file name conversion functions should be used by
 # func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
 # for certain cross-compile configurations and native mingw.
 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
index 5d9acd8..94b0829 100644 (file)
@@ -1,14 +1,14 @@
 # Helper functions for option handling.                    -*- Autoconf -*-
 #
-#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
-#   Inc.
+#   Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
+#   Foundation, Inc.
 #   Written by Gary V. Vaughan, 2004
 #
 # This file is free software; the Free Software Foundation gives
 # unlimited permission to copy and/or distribute it, with or without
 # modifications, as long as this notice is preserved.
 
-# serial 7 ltoptions.m4
+# serial 8 ltoptions.m4
 
 # This is to help aclocal find these macros, as it can't see m4_define.
 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
@@ -29,7 +29,7 @@ m4_define([_LT_SET_OPTION],
 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
         _LT_MANGLE_DEFUN([$1], [$2]),
-    [m4_warning([Unknown $1 option `$2'])])[]dnl
+    [m4_warning([Unknown $1 option '$2'])])[]dnl
 ])
 
 
@@ -75,13 +75,15 @@ m4_if([$1],[LT_INIT],[
   dnl
   dnl If no reference was made to various pairs of opposing options, then
   dnl we run the default mode handler for the pair.  For example, if neither
-  dnl `shared' nor `disable-shared' was passed, we enable building of shared
+  dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
   dnl archives by default:
   _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
   _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
   _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
   _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
-                  [_LT_ENABLE_FAST_INSTALL])
+                  [_LT_ENABLE_FAST_INSTALL])
+  _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
+                  [_LT_WITH_AIX_SONAME([aix])])
   ])
 ])# _LT_SET_OPTIONS
 
@@ -112,7 +114,7 @@ AU_DEFUN([AC_LIBTOOL_DLOPEN],
 [_LT_SET_OPTION([LT_INIT], [dlopen])
 AC_DIAGNOSE([obsolete],
 [$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `dlopen' option into LT_INIT's first parameter.])
+put the 'dlopen' option into LT_INIT's first parameter.])
 ])
 
 dnl aclocal-1.4 backwards compatibility:
@@ -148,7 +150,7 @@ AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
 _LT_SET_OPTION([LT_INIT], [win32-dll])
 AC_DIAGNOSE([obsolete],
 [$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `win32-dll' option into LT_INIT's first parameter.])
+put the 'win32-dll' option into LT_INIT's first parameter.])
 ])
 
 dnl aclocal-1.4 backwards compatibility:
@@ -157,9 +159,9 @@ dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
 
 # _LT_ENABLE_SHARED([DEFAULT])
 # ----------------------------
-# implement the --enable-shared flag, and supports the `shared' and
-# `disable-shared' LT_INIT options.
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+# implement the --enable-shared flag, and supports the 'shared' and
+# 'disable-shared' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
 m4_define([_LT_ENABLE_SHARED],
 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
 AC_ARG_ENABLE([shared],
@@ -172,14 +174,14 @@ AC_ARG_ENABLE([shared],
     *)
       enable_shared=no
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
       for pkg in $enableval; do
-       IFS="$lt_save_ifs"
+       IFS=$lt_save_ifs
        if test "X$pkg" = "X$p"; then
          enable_shared=yes
        fi
       done
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       ;;
     esac],
     [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
@@ -211,9 +213,9 @@ dnl AC_DEFUN([AM_DISABLE_SHARED], [])
 
 # _LT_ENABLE_STATIC([DEFAULT])
 # ----------------------------
-# implement the --enable-static flag, and support the `static' and
-# `disable-static' LT_INIT options.
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+# implement the --enable-static flag, and support the 'static' and
+# 'disable-static' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
 m4_define([_LT_ENABLE_STATIC],
 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
 AC_ARG_ENABLE([static],
@@ -226,14 +228,14 @@ AC_ARG_ENABLE([static],
     *)
      enable_static=no
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
       for pkg in $enableval; do
-       IFS="$lt_save_ifs"
+       IFS=$lt_save_ifs
        if test "X$pkg" = "X$p"; then
          enable_static=yes
        fi
       done
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       ;;
     esac],
     [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
@@ -265,9 +267,9 @@ dnl AC_DEFUN([AM_DISABLE_STATIC], [])
 
 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
 # ----------------------------------
-# implement the --enable-fast-install flag, and support the `fast-install'
-# and `disable-fast-install' LT_INIT options.
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+# implement the --enable-fast-install flag, and support the 'fast-install'
+# and 'disable-fast-install' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
 m4_define([_LT_ENABLE_FAST_INSTALL],
 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
 AC_ARG_ENABLE([fast-install],
@@ -280,14 +282,14 @@ AC_ARG_ENABLE([fast-install],
     *)
       enable_fast_install=no
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
       for pkg in $enableval; do
-       IFS="$lt_save_ifs"
+       IFS=$lt_save_ifs
        if test "X$pkg" = "X$p"; then
          enable_fast_install=yes
        fi
       done
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       ;;
     esac],
     [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
@@ -304,14 +306,14 @@ AU_DEFUN([AC_ENABLE_FAST_INSTALL],
 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
 AC_DIAGNOSE([obsolete],
 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `fast-install' option into LT_INIT's first parameter.])
+the 'fast-install' option into LT_INIT's first parameter.])
 ])
 
 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
 AC_DIAGNOSE([obsolete],
 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `disable-fast-install' option into LT_INIT's first parameter.])
+the 'disable-fast-install' option into LT_INIT's first parameter.])
 ])
 
 dnl aclocal-1.4 backwards compatibility:
@@ -319,11 +321,64 @@ dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
 
 
+# _LT_WITH_AIX_SONAME([DEFAULT])
+# ----------------------------------
+# implement the --with-aix-soname flag, and support the `aix-soname=aix'
+# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
+# is either `aix', `both' or `svr4'.  If omitted, it defaults to `aix'.
+m4_define([_LT_WITH_AIX_SONAME],
+[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
+shared_archive_member_spec=
+case $host,$enable_shared in
+power*-*-aix[[5-9]]*,yes)
+  AC_MSG_CHECKING([which variant of shared library versioning to provide])
+  AC_ARG_WITH([aix-soname],
+    [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
+      [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
+    [case $withval in
+    aix|svr4|both)
+      ;;
+    *)
+      AC_MSG_ERROR([Unknown argument to --with-aix-soname])
+      ;;
+    esac
+    lt_cv_with_aix_soname=$with_aix_soname],
+    [AC_CACHE_VAL([lt_cv_with_aix_soname],
+      [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
+    with_aix_soname=$lt_cv_with_aix_soname])
+  AC_MSG_RESULT([$with_aix_soname])
+  if test aix != "$with_aix_soname"; then
+    # For the AIX way of multilib, we name the shared archive member
+    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
+    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
+    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
+    # the AIX toolchain works better with OBJECT_MODE set (default 32).
+    if test 64 = "${OBJECT_MODE-32}"; then
+      shared_archive_member_spec=shr_64
+    else
+      shared_archive_member_spec=shr
+    fi
+  fi
+  ;;
+*)
+  with_aix_soname=aix
+  ;;
+esac
+
+_LT_DECL([], [shared_archive_member_spec], [0],
+    [Shared archive member basename, for filename based shared library versioning on AIX])dnl
+])# _LT_WITH_AIX_SONAME
+
+LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
+LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
+LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
+
+
 # _LT_WITH_PIC([MODE])
 # --------------------
-# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
 # LT_INIT options.
-# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
+# MODE is either 'yes' or 'no'.  If omitted, it defaults to 'both'.
 m4_define([_LT_WITH_PIC],
 [AC_ARG_WITH([pic],
     [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
@@ -334,19 +389,17 @@ m4_define([_LT_WITH_PIC],
     *)
       pic_mode=default
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
       for lt_pkg in $withval; do
-       IFS="$lt_save_ifs"
+       IFS=$lt_save_ifs
        if test "X$lt_pkg" = "X$lt_p"; then
          pic_mode=yes
        fi
       done
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       ;;
     esac],
-    [pic_mode=default])
-
-test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
+    [pic_mode=m4_default([$1], [default])])
 
 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
 ])# _LT_WITH_PIC
@@ -359,7 +412,7 @@ AU_DEFUN([AC_LIBTOOL_PICMODE],
 [_LT_SET_OPTION([LT_INIT], [pic-only])
 AC_DIAGNOSE([obsolete],
 [$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `pic-only' option into LT_INIT's first parameter.])
+put the 'pic-only' option into LT_INIT's first parameter.])
 ])
 
 dnl aclocal-1.4 backwards compatibility:
index 9000a05..48bc934 100644 (file)
@@ -1,6 +1,7 @@
 # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
 #
-# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
+# Foundation, Inc.
 # Written by Gary V. Vaughan, 2004
 #
 # This file is free software; the Free Software Foundation gives
@@ -33,7 +34,7 @@ m4_define([_lt_join],
 # ------------
 # Manipulate m4 lists.
 # These macros are necessary as long as will still need to support
-# Autoconf-2.59 which quotes differently.
+# Autoconf-2.59, which quotes differently.
 m4_define([lt_car], [[$1]])
 m4_define([lt_cdr],
 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
@@ -44,7 +45,7 @@ m4_define([lt_unquote], $1)
 
 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
 # ------------------------------------------
-# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
+# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
 # Note that neither SEPARATOR nor STRING are expanded; they are appended
 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
index 07a8602..fa04b52 100644 (file)
@@ -1,6 +1,6 @@
 # ltversion.m4 -- version numbers                      -*- Autoconf -*-
 #
-#   Copyright (C) 2004 Free Software Foundation, Inc.
+#   Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
 #   Written by Scott James Remnant, 2004
 #
 # This file is free software; the Free Software Foundation gives
@@ -9,15 +9,15 @@
 
 # @configure_input@
 
-# serial 3337 ltversion.m4
+# serial 4179 ltversion.m4
 # This file is part of GNU Libtool
 
-m4_define([LT_PACKAGE_VERSION], [2.4.2])
-m4_define([LT_PACKAGE_REVISION], [1.3337])
+m4_define([LT_PACKAGE_VERSION], [2.4.6])
+m4_define([LT_PACKAGE_REVISION], [2.4.6])
 
 AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.4.2'
-macro_revision='1.3337'
+[macro_version='2.4.6'
+macro_revision='2.4.6'
 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
 _LT_DECL(, macro_revision, 0)
 ])
index c573da9..c6b26f8 100644 (file)
@@ -1,6 +1,7 @@
 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
 #
-#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+#   Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
+#   Foundation, Inc.
 #   Written by Scott James Remnant, 2004.
 #
 # This file is free software; the Free Software Foundation gives
@@ -11,7 +12,7 @@
 
 # These exist entirely to fool aclocal when bootstrapping libtool.
 #
-# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
 # which have later been changed to m4_define as they aren't part of the
 # exported API, or moved to Autoconf or Automake where they belong.
 #
@@ -25,7 +26,7 @@
 # included after everything else.  This provides aclocal with the
 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
 # because those macros already exist, or will be overwritten later.
-# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
 #
 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
 # Yes, that means every name once taken will need to remain here until
diff --git a/missing b/missing
index cdea514..f62bbae 100755 (executable)
--- a/missing
+++ b/missing
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Common wrapper for a few potentially missing GNU programs.
 
-scriptversion=2012-06-26.16; # UTC
+scriptversion=2013-10-28.13; # UTC
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -160,7 +160,7 @@ give_advice ()
       ;;
    autom4te*)
       echo "You might have modified some maintainer files that require"
-      echo "the 'automa4te' program to be rebuilt."
+      echo "the 'autom4te' program to be rebuilt."
       program_details 'autom4te'
       ;;
     bison*|yacc*)
index 6c16de9..fff923c 100644 (file)
@@ -185,15 +185,27 @@ const char *    xmlVasprintf(xmlDictPtr * dict,
                              va_list args);
 
 
+xmllint and xmlcatalog programs:
+
+  These programs are fully implemented at the qshell level, with standard
+command line options. Links to these are installed in sub-directory bin of
+the IFS installation directory.
+  CL command interfaces to these programs are also provided with limited
+support. In particular, interactive mode is not supported and argument count
+and lengths are limited by the CL command syntax.
+
 
 ILE/RPG binding:
 
   All standard types and procedures are provided. Since ILE/RPG does not
-support macros, they have not been ported, with the exceptions of the more
-useful ones and the global/threaded variables access macros. These variables
-can be read with function get_xxx(void), where xxxx is the name of the
-variable; they may be set by calling function set_xxxx(value), where value is
-of the same type as the variable.
+support macros, they have not been ported. However some of them are emulated
+as functions: these are the more useful ones (xmlXPathNodeSetGetLength,
+xmlXPathNodeSetItem, xmlXPathNodeSetIsEmpty, htmlDefaultSubelement,
+htmlElementAllowedHereDesc, htmlRequiredAttrs) and the global/threaded
+variables access macros. These variables can be read with function
+get_xxx(void), where xxxx is the name of the variable; they may be set by
+calling function set_xxxx(value), where value is of the same type as the
+variable.
 
   The C va_list is not implemented as such in ILE/RPG. Functions implementing
 va_list and associated methods are provided:
diff --git a/os400/config.h.in b/os400/config.h.in
new file mode 100644 (file)
index 0000000..0847b7b
--- /dev/null
@@ -0,0 +1,345 @@
+/* Define to 1 if you have the <ansidecl.h> header file. */
+#undef HAVE_ANSIDECL_H
+
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#define HAVE_ARPA_INET_H        1
+
+/* Define to 1 if you have the <arpa/nameser.h> header file. */
+#define HAVE_ARPA_NAMESER_H     1
+
+/* Whether struct sockaddr::__ss_family exists */
+#undef HAVE_BROKEN_SS_FAMILY
+
+/* Define to 1 if you have the `class' function. */
+#undef HAVE_CLASS
+
+/* Define to 1 if you have the <ctype.h> header file. */
+#define HAVE_CTYPE_H            1
+
+/* Define to 1 if you have the <dirent.h> header file. */
+#define HAVE_DIRENT_H           1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H            1       /* Locally emulated. */
+
+/* Have dlopen based dso */
+#define HAVE_DLOPEN             1       /* Locally emulated. */
+
+/* Define to 1 if you have the <dl.h> header file. */
+#undef HAVE_DL_H
+
+/* Define to 1 if you have the <errno.h> header file. */
+#define HAVE_ERRNO_H            1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H            1
+
+/* Define to 1 if you have the `finite' function. */
+#undef HAVE_FINITE
+
+/* Define to 1 if you have the <float.h> header file. */
+#define HAVE_FLOAT_H            1
+
+/* Define to 1 if you have the `fpclass' function. */
+#undef HAVE_FPCLASS
+
+/* Define to 1 if you have the `fprintf' function. */
+#undef HAVE_FPRINTF                     /* Use trio. */
+
+/* Define to 1 if you have the `fp_class' function. */
+#undef HAVE_FP_CLASS
+
+/* Define to 1 if you have the <fp_class.h> header file. */
+#undef HAVE_FP_CLASS_H
+
+/* Define to 1 if you have the `ftime' function. */
+#undef HAVE_FTIME
+
+/* Define if getaddrinfo is there */
+#define HAVE_GETADDRINFO        1
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define to 1 if you have the <ieeefp.h> header file. */
+#undef HAVE_IEEEFP_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H         1
+
+/* Define to 1 if you have the `isascii' function. */
+#define HAVE_ISASCII            1
+
+/* Define if isinf is there */
+#undef HAVE_ISINF
+
+/* Define if isnan is there */
+#undef HAVE_ISNAN
+
+/* Define to 1 if you have the `isnand' function. */
+#undef HAVE_ISNAND
+
+/* Define if history library is there (-lhistory) */
+#undef HAVE_LIBHISTORY
+
+/* Have compression library */
+#undef HAVE_LIBLZMA
+
+/* Define if pthread library is there (-lpthread) */
+#undef HAVE_LIBPTHREAD
+
+/* Define if readline library is there (-lreadline) */
+#undef HAVE_LIBREADLINE
+
+/* Have compression library */
+#undef HAVE_LIBZ
+
+/* Define to 1 if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H           1
+
+/* Define to 1 if you have the `localtime' function. */
+#define HAVE_LOCALTIME          1
+
+/* Define to 1 if you have the <lzma.h> header file. */
+#undef HAVE_LZMA_H
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define to 1 if you have the <math.h> header file. */
+#define HAVE_MATH_H             1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H           1
+
+/* Define to 1 if you have the `mmap' function. */
+#undef HAVE_MMAP
+
+/* Define to 1 if you have the `munmap' function. */
+#undef HAVE_MUNMAP
+
+/* mmap() is no good without munmap() */
+#if defined(HAVE_MMAP) && !defined(HAVE_MUNMAP)
+#  undef /**/ HAVE_MMAP
+#endif
+
+/* Define to 1 if you have the <nan.h> header file. */
+#undef HAVE_NAN_H
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+#undef HAVE_NDIR_H
+
+/* Define to 1 if you have the <netdb.h> header file. */
+#define HAVE_NETDB_H            1
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#define HAVE_NETINET_IN_H       1
+
+/* Define to 1 if you have the <poll.h> header file. */
+#undef HAVE_POLL_H
+
+/* Define to 1 if you have the `printf' function. */
+#undef HAVE_PRINTF                      /* Use trio. */
+
+/* Define to 1 if you have the `vprintf' function. */
+#undef HAVE_VPRINTF                     /* Use trio. */
+
+/* Define if <pthread.h> is there */
+#define HAVE_PTHREAD_H          1
+
+/* Define to 1 if you have the `putenv' function. */
+#define HAVE_PUTENV             1
+
+/* Define to 1 if you have the `rand' function. */
+#define HAVE_RAND               1
+
+/* Define to 1 if you have the `rand_r' function. */
+#define HAVE_RAND_R             1
+
+/* Define to 1 if you have the <resolv.h> header file. */
+#define HAVE_RESOLV_H           1
+
+/* Have shl_load based dso */
+#undef HAVE_SHLLOAD
+
+/* Define to 1 if you have the `signal' function. */
+#undef HAVE_SIGNAL
+
+/* Define to 1 if you have the <signal.h> header file. */
+#define HAVE_SIGNAL_H           1
+
+/* Define to 1 if you have the `snprintf' function. */
+#undef HAVE_SNPRINTF                    /* Use trio. */
+
+/* Define to 1 if you have the `sprintf' function. */
+#undef HAVE_SPRINTF                     /* Use trio. */
+
+/* Define to 1 if you have the `srand' function. */
+#define HAVE_SRAND              1
+
+/* Define to 1 if you have the `scanf' function. */
+#undef HAVE_SCANF                       /* Use trio. */
+
+/* Define to 1 if you have the `fscanf' function. */
+#undef HAVE_FSCANF                      /* Use trio. */
+
+/* Define to 1 if you have the `sscanf' function. */
+#undef HAVE_SSCANF                      /* Use trio. */
+
+/* Define to 1 if you have the `stat' function. */
+#define HAVE_STAT               1
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+#define HAVE_STDARG_H           1       /* Overloaded */
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H           1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H           1
+
+/* Define to 1 if you have the `strdup' function. */
+#define HAVE_STRDUP             1
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR           1
+
+/* Define to 1 if you have the `strftime' function. */
+#define HAVE_STRFTIME           1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H          1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H           1
+
+/* Define to 1 if you have the `strndup' function. */
+#undef HAVE_STRNDUP
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+   */
+#undef HAVE_SYS_DIR_H
+
+/* Define to 1 if you have the <sys/mman.h> header file. */
+#define HAVE_SYS_MMAN_H         1
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+   */
+#undef HAVE_SYS_NDIR_H
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#define HAVE_SYS_SOCKET_H       1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H         1
+
+/* Define to 1 if you have the <sys/timeb.h> header file. */
+#define HAVE_SYS_TIMEB_H        1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H        1
+
+/* Define to 1 if you have the `time' function. */
+#define HAVE_TIME               1
+
+/* Define to 1 if you have the <time.h> header file. */
+#define HAVE_TIME_H             1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H           1
+
+/* Whether va_copy() is available */
+#undef HAVE_VA_COPY
+
+/* Define to 1 if you have the `vfprintf' function. */
+#undef HAVE_VFPRINTF                    /* Use trio. */
+
+/* Define to 1 if you have the `vsnprintf' function. */
+#undef HAVE_VSNPRINTF                   /* Use trio. */
+
+/* Define to 1 if you have the `vsprintf' function. */
+#undef HAVE_VSPRINTF                    /* Use trio. */
+
+/* Define to 1 if you have the <zlib.h> header file. */
+/* Actually dependent on the compilation script. */
+#if @WITH_ZLIB@
+#define HAVE_ZLIB_H             1
+#else
+#undef HAVE_ZLIB_H
+#endif
+
+/* Define to 1 if you have the `_stat' function. */
+#undef HAVE__STAT
+
+/* Whether __va_copy() is available */
+#undef HAVE___VA_COPY
+
+/* Define as const if the declaration of iconv() needs const. */
+#define ICONV_CONST
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#undef LT_OBJDIR
+
+/* Name of package */
+#define PACKAGE                 "libxml2"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT       ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME            ""
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING          ""
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME         ""
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL             ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION         ""
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS            1
+
+/* Support for IPv6 */
+#define SUPPORT_IP6
+
+/* Version number of package */
+#define VERSION                 "@VERSION@"
+
+/* Determine what socket length (socklen_t) data type is */
+#define XML_SOCKLEN_T           socklen_t
+
+/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
+   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+   #define below would cause a syntax error. */
+#undef _UINT32_T
+
+/* Using the Win32 Socket implementation */
+#undef _WINSOCKAPI_
+
+/* ss_family is not defined here, use __ss_family instead */
+#undef ss_family
+
+/* Define to the type of an unsigned integer type of width exactly 32 bits if
+   such a type exists and the standard includes do not define it. */
+#undef uint32_t
+
+/* Type cast for the send() function 2nd arg */
+#define SEND_ARG2_CAST          (char *)
+
+/* Type cast for the gethostbyname() argument */
+#define GETHOSTBYNAME_ARG_CAST  (char *)
+
+/* Define if va_list is an array type */
+#define VA_LIST_IS_ARRAY        1
index 1488e12..77190b3 100644 (file)
@@ -375,7 +375,7 @@ dlmakepath(char * path, size_t pathlen, const char * tail, size_t taillen)
                         case 2:
                                 if (tail[1] != '.')
                                         break;
-                                        
+
                                 pathlen = dlparentpath(path, pathlen);
 
                         case 1:
index fb80507..cc52e45 100644 (file)
@@ -165,15 +165,38 @@ action_needed()
 }
 
 
-#       make_module module_name source_name [additional_definitions]
+#       make_module [option] module_name source_name
 #
 #       Compile source name into ASCII module if needed.
 #       As side effect, append the module name to variable MODULES.
 #       Set LINK to "YES" if the module has been compiled.
+#       Options are:
+#         --define <additional definitions>
+#         --ebcdic
+#         --sysiconv
 
 make_module()
 
 {
+        DEFN=
+        EBCDIC=
+        SYSICONV=
+        while true
+        do      case "${1}" in
+                --define)
+                        DEFN="${2}"
+                        shift
+                        ;;
+                --ebcdic)
+                        EBCDIC=yes
+                        ;;
+                --sysiconv)
+                        SYSICONV=yes
+                        ;;
+                *)      break
+                esac
+                shift
+        done
         MODULES="${MODULES} ${1}"
         MODIFSNAME="${LIBIFSNAME}/${1}.MODULE"
         action_needed "${MODIFSNAME}" "${2}" || return 0;
@@ -185,7 +208,7 @@ make_module()
         #               the source file and we compile that temporary file.
 
         rm -f __tmpsrcf.c
-        if [ "${4}" != 'ebcdic' ]
+        if [ -z "${EBCDIC}" ]
         then    echo "#line 1 \"${2}\"" >> __tmpsrcf.c
                 echo "#pragma convert(819)" >> __tmpsrcf.c
                 echo '#include "wrappers.h"' >> __tmpsrcf.c
@@ -197,8 +220,10 @@ make_module()
         CMD="${CMD} OPTION(*INCDIRFIRST)"
         CMD="${CMD} SYSIFCOPT(*IFS64IO) LANGLVL(*EXTENDED) LOCALETYPE(*LOCALE)"
         CMD="${CMD} INCDIR("
-        CMD="${CMD} '${TOPDIR}/os400/iconv'"
-        if [ "${4}" != 'ebcdic' ]
+        if [  -z "${SYSICONV}" ]
+        then    CMD="${CMD} '${TOPDIR}/os400/iconv'"
+        fi
+        if [ -z "${EBCDIC}" ]
         then    CMD="${CMD} '/qibm/proddata/qadrt/include'"
         fi
         CMD="${CMD} '${TOPDIR}/os400' '${TOPDIR}/os400/dlfcn'"
@@ -211,7 +236,7 @@ make_module()
         CMD="${CMD} OUTPUT(${OUTPUT})"
         CMD="${CMD} OPTIMIZE(${OPTIMIZE})"
         CMD="${CMD} DBGVIEW(${DEBUG})"
-        CMD="${CMD} DEFINE('_REENTRANT' 'TRIO_HAVE_CONFIG_H' 'NDEBUG' ${3})"
+        CMD="${CMD} DEFINE('_REENTRANT' 'TRIO_HAVE_CONFIG_H' 'NDEBUG' ${DEFN})"
 
         system "${CMD}"
         rm -f __tmpsrcf.c
diff --git a/os400/libxmlmain.c b/os400/libxmlmain.c
new file mode 100644 (file)
index 0000000..91c848a
--- /dev/null
@@ -0,0 +1,102 @@
+/**
+***     QADRT/QADRTMAIN2 substitution program.
+***     This is needed because the IBM-provided QADRTMAIN2 does not
+***     properly translate arguments by default or if no locale is provided.
+***
+***     See Copyright for the status of this software.
+***
+***     Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+**/
+
+#include <stdlib.h>
+#include <string.h>
+#include <iconv.h>
+#include <errno.h>
+#include <locale.h>
+
+/* Do not use qadrt.h since it defines unneeded static procedures. */
+extern void     QadrtInit(void);
+extern int      QadrtFreeConversionTable(void);
+extern int      QadrtFreeEnviron(void);
+extern char *   setlocale_a(int, const char *);
+
+
+/* The ASCII main program. */
+extern int      main_a(int argc, char * * argv);
+
+/* Global values of original EBCDIC arguments. */
+int             ebcdic_argc;
+char * *        ebcdic_argv;
+
+
+int
+main(int argc, char * * argv)
+
+{
+        int i;
+        int j;
+        iconv_t cd;
+        size_t bytecount = 0;
+        char * inbuf;
+        char * outbuf;
+        size_t inbytesleft;
+        size_t outbytesleft;
+        char dummybuf[128];
+        char tocode[32];
+        char fromcode[32];
+
+        ebcdic_argc = argc;
+        ebcdic_argv = argv;
+
+        /* Build the encoding converter. */
+        strncpy(tocode, "IBMCCSID01208", sizeof tocode);
+        strncpy(fromcode, "IBMCCSID000000000010", sizeof fromcode);
+        cd = iconv_open(tocode, fromcode);
+
+        /* Measure the arguments. */
+        for (i = 0; i < argc; i++) {
+                inbuf = argv[i];
+                do {
+                        inbytesleft = 0;
+                        outbuf = dummybuf;
+                        outbytesleft = sizeof dummybuf;
+                        j = iconv(cd,
+                                  &inbuf, &inbytesleft, &outbuf, &outbytesleft);
+                        bytecount += outbuf - dummybuf;
+                } while (j == -1 && errno == E2BIG);
+                /* Reset the shift state. */
+                iconv(cd, NULL, &inbytesleft, &outbuf, &outbytesleft);
+                }
+
+        /* Allocate memory for the ASCII arguments and vector. */
+        argv = (char * *) malloc((argc + 1) * sizeof *argv + bytecount);
+
+        /* Build the vector and convert argument encoding. */
+        outbuf = (char *) (argv + argc + 1);
+        outbytesleft = bytecount;
+
+        for (i = 0; i < argc; i++) {
+                argv[i] = outbuf;
+                inbuf = ebcdic_argv[i];
+                inbytesleft = 0;
+                iconv(cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
+                iconv(cd, NULL, &inbytesleft, &outbuf, &outbytesleft);
+                }
+
+        iconv_close(cd);
+        argv[argc] = NULL;
+
+        /* Try setting the locale regardless of QADRT_ENV_LOCALE. */
+        setlocale_a(LC_ALL, "");
+
+        /* Call the program. */
+        i = main_a(argc, argv);
+
+        /* Clean-up allocated items. */
+        free((char *) argv);
+        QadrtFreeConversionTable();
+        QadrtFreeEnviron();
+
+        /* Terminate. */
+        return i;
+}
index bf5aaa2..08a6b8c 100644 (file)
@@ -13,6 +13,7 @@
 
       /if defined(LIBXML_DOCB_ENABLED)
 
+      /include "libxmlrpg/xmlTypesC"
       /include "libxmlrpg/parser"
       /include "libxmlrpg/parserInternals"
 
       * There is only few public functions.
 
      d docbEncodeEntities...
-     d                 pr            10i 0 extproc('docbEncodeEntities')
+     d                 pr                  extproc('docbEncodeEntities')
+     d                                     like(xmlCint)
      d  out                            *   value options(*string)               unsigned char *
      d  outlen                         *   value                                int *
      d  in                             *   value options(*string)               const unsigned char
      d                                                                          *
      d  inlen                          *   value                                int *
-     d  quoteChar                    10i 0 value
+     d  quoteChar                          value like(xmlCint)
 
      d docbSAXParseDoc...
      d                 pr                  extproc('docbSAXParseDoc')
      d  sax                                value like(docbSAXHandlerPtr)
      d  user_data                      *   value                                void *
      d  chunk                          *   value options(*string)               const char *
-     d  size                         10i 0 value
+     d  size                               value like(xmlCint)
      d  filename                       *   value options(*string)               const char *
      d  enc                                value like(xmlCharEncoding)
 
-     d docbParseChunk  pr            10i 0 extproc('docbParseChunk')
+     d docbParseChunk  pr                  extproc('docbParseChunk')
+     d                                     like(xmlCint)
      d  ctxt                               value like(docbParserCtxtPtr)
      d  chunk                          *   value options(*string)               const char *
-     d  size                         10i 0 value
-     d  terminate                    10i 0 value
+     d  size                               value like(xmlCint)
+     d  terminate                          value like(xmlCint)
 
      d docbCreateFileParserCtxt...
      d                 pr                  extproc('docbCreateFileParserCtxt')
      d  encoding                       *   value options(*string)               const char *
 
      d docbParseDocument...
-     d                 pr            10i 0 extproc('docbParseDocument')
+     d                 pr                  extproc('docbParseDocument')
+     d                                     like(xmlCint)
      d  ctxt                               value like(docbParserCtxtPtr)
 
       /endif                                                                    LIBXML_DOCB_ENABLED
index 7b4a626..c27d8e5 100644 (file)
       /define HTML_PARSER_H__
 
       /include "libxmlrpg/xmlversion"
-      /include "libxmlrpg/parser"
 
       /if defined(LIBXML_HTML_ENABLED)
 
+      /include "libxmlrpg/xmlTypesC"
+      /include "libxmlrpg/parser"
+
       * Most of the back-end structures from XML and HTML are shared.
 
      d htmlParserCtxtPtr...
      d htmlElemDesc    ds                  based(htmlElemDescPtr)
      d                                     align qualified
      d  name                           *                                        const char *
-     d  startTag                      3u 0                                      Start tag implied ?
-     d  endTag                        3u 0                                      End tag implied ?
-     d  saveEndTag                    3u 0                                      Save end tag ?
-     d  empty                         3u 0                                      Empty element ?
-     d  depr                          3u 0                                      Deprecated element ?
-     d  dtd                           3u 0                                      Loose DTD/Frameset
-     d  isinline                      3u 0                                      Block 0/inline elem?
+     d  startTag                           like(xmlCchar)                       Start tag implied ?
+     d  endTag                             like(xmlCchar)                       End tag implied ?
+     d  saveEndTag                         like(xmlCchar)                       Save end tag ?
+     d  empty                              like(xmlCchar)                       Empty element ?
+     d  depr                               like(xmlCchar)                       Deprecated element ?
+     d  dtd                                like(xmlCchar)                       Loose DTD/Frameset
+     d  isinline                           like(xmlCchar)                       Block 0/inline elem?
      d  desc                           *                                        const char *
       *
       * New fields encapsulating HTML structure
@@ -95,7 +97,7 @@
      d htmlEntityDesc...
      d                 ds                  based(htmlEntityDescPtr)
      d                                     align qualified
-     d  value                        10u 0                                      Unicode char value
+     d  value                              like(xmlCuint)
      d  name                           *                                        const char *
      d  desc                           *                                        const char *
 
      d htmlEntityValueLookup...
      d                 pr                  extproc('htmlEntityValueLookup')
      d                                     like(htmlEntityDescPtr)              const
-     d  value                        10u 0 value
+     d  value                              value like(xmlCuint)
 
      d htmlIsAutoClosed...
-     d                 pr            10i 0 extproc('htmlIsAutoClosed')
+     d                 pr                  extproc('htmlIsAutoClosed')
+     d                                     like(xmlCint)
      d  doc                                value like(htmlDocPtr)
      d  elem                               value like(htmlNodePtr)
 
      d htmlAutoCloseTag...
-     d                 pr            10i 0 extproc('htmlAutoCloseTag')
+     d                 pr                  extproc('htmlAutoCloseTag')
+     d                                     like(xmlCint)
      d  doc                                value like(htmlDocPtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  elem                               value like(htmlNodePtr)
      d  str                            *                                        const xmlChar *(*)
 
      d htmlParseCharRef...
-     d                 pr            10i 0 extproc('htmlParseCharRef')
+     d                 pr                  extproc('htmlParseCharRef')
+     d                                     like(xmlCint)
      d  ctxt                               value like(htmlParserCtxtPtr)
 
      d htmlParseElement...
      d                 pr                  extproc('htmlCreateMemoryParserCtxt')
      d                                     like(htmlParserCtxtPtr)
      d  buffer                         *   value options(*string)               const char *
-     d  size                         10i 0 value
+     d  size                               value like(xmlCint)
 
      d htmlParseDocument...
-     d                 pr            10i 0 extproc('htmlParseDocument')
+     d                 pr                  extproc('htmlParseDocument')
+     d                                     like(xmlCint)
      d  ctxt                               value like(htmlParserCtxtPtr)
 
      d htmlSAXParseDoc...
      d  filename                       *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
 
-     d UTF8ToHtml      pr            10i 0 extproc('UTF8ToHtml')
+     d UTF8ToHtml      pr                  extproc('UTF8ToHtml')
+     d                                     like(xmlCint)
      d  out                       65535    options(*varsize)                    unsigned char []
-     d  outlen                       10i 0
+     d  outlen                             like(xmlCint)
      d  in                             *   value options(*string)               const unsigned char*
-     d  inlen                        10i 0
+     d  inlen                              like(xmlCint)
 
      d htmlEncodeEntities...
-     d                 pr            10i 0 extproc('htmlEncodeEntities')
+     d                 pr                  extproc('htmlEncodeEntities')
+     d                                     like(xmlCint)
      d  out                       65535    options(*varsize)                    unsigned char []
-     d  outlen                       10i 0
+     d  outlen                             like(xmlCint)
      d  in                             *   value options(*string)               const unsigned char*
-     d  inlen                        10i 0
-     d  quoteChar                    10i 0 value
+     d  inlen                              like(xmlCint)
+     d  quoteChar                          value like(xmlCint)
 
      d htmlIsScriptAttribute...
-     d                 pr            10i 0 extproc('htmlIsScriptAttribute')
+     d                 pr                  extproc('htmlIsScriptAttribute')
+     d                                     like(xmlCint)
      d  name                           *   value options(*string)               const xmlChar *
 
      d htmlHandleOmittedElem...
-     d                 pr            10i 0 extproc('htmlHandleOmittedElem')
-     d  val                          10i 0 value
+     d                 pr                  extproc('htmlHandleOmittedElem')
+     d                                     like(xmlCint)
+     d  val                                value like(xmlCint)
 
       /if defined(LIBXML_PUSH_ENABLED)
 
      d  sax                                value like(htmlSAXHandlerPtr)
      d  user_data                      *   value                                void *
      d  chunk                          *   value options(*string)               const char *
-     d  size                         10i 0 value
+     d  size                               value like(xmlCint)
      d  filename                       *   value options(*string)               const char *
      d  enc                                value like(xmlCharEncoding)
 
-     d htmlParseChunk  pr            10i 0 extproc('htmlParseChunk')
+     d htmlParseChunk  pr                  extproc('htmlParseChunk')
+     d                                     like(xmlCint)
      d  ctxt                               value like(htmlParserCtxtPtr)
      d  chunk                          *   value options(*string)               const char *
-     d  size                         10i 0 value
-     d  terminate                    10i 0 value
+     d  size                               value like(xmlCint)
+     d  terminate                          value like(xmlCint)
       /endif                                                                    LIBXML_PUSH_ENABLED
 
      d htmlFreeParserCtxt...
       * to the xmlReadDoc() and similar calls.
 
      d htmlParserOption...
-     d                 s             10i 0 based(######typedef######)           enum
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  HTML_PARSE_RECOVER...                                                   Relaxed parsing
      d                 c                   X'00000001'
      d  HTML_PARSE_NODEFDTD...                                                  No default doctype
      d ctxt                                value like(htmlParserCtxtPtr)
 
      d htmlCtxtUseOptions...
-     d                 pr            10i 0 extproc('htmlCtxtUseOptions')
+     d                 pr                  extproc('htmlCtxtUseOptions')
+     d                                     like(xmlCint)
      d ctxt                                value like(htmlParserCtxtPtr)
-     d options                       10i 0 value
+     d options                             value like(xmlCint)
 
      d htmlReadDoc     pr                  extproc('htmlReadDoc')
      d                                     like(htmlDocPtr)
      d  cur                            *   value options(*string)               const xmlChar *
      d  URL                            *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d htmlReadFile    pr                  extproc('htmlReadFile')
      d                                     like(htmlDocPtr)
      d  URL                            *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d htmlReadMemory  pr                  extproc('htmlReadMemory')
      d                                     like(htmlDocPtr)
      d  buffer                         *   value options(*string)               const char *
-     d  size                         10i 0 value
+     d  size                               value like(xmlCint)
      d  URL                            *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d htmlReadFd      pr                  extproc('htmlReadFd')
      d                                     like(htmlDocPtr)
-     d  fd                           10i 0 value
+     d  fd                                 value like(xmlCint)
      d  URL                            *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d htmlReadIO      pr                  extproc('htmlReadIO')
      d                                     like(htmlDocPtr)
      d  ioctx                          *   value                                void *
      d  URL                            *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d htmlCtxtReadDoc...
      d                 pr                  extproc('htmlCtxtReadDoc')
      d  cur                            *   value options(*string)               const xmlChar *
      d  URL                            *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d htmlCtxtReadFile...
      d                 pr                  extproc('htmlCtxtReadFile')
      d  ctxt                               value like(xmlParserCtxtPtr)
      d  filename                       *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d htmlCtxtReadMemory...
      d                 pr                  extproc('htmlCtxtReadMemory')
      d                                     like(htmlDocPtr)
      d  ctxt                               value like(xmlParserCtxtPtr)
      d  buffer                         *   value options(*string)               const char *
-     d  size                         10i 0 value
+     d  size                               value like(xmlCint)
      d  URL                            *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d htmlCtxtReadFd  pr                  extproc('htmlCtxtReadFd')
      d                                     like(htmlDocPtr)
      d  ctxt                               value like(xmlParserCtxtPtr)
-     d  fd                           10i 0 value
+     d  fd                                 value like(xmlCint)
      d  URL                            *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d htmlCtxtReadIO  pr                  extproc('htmlCtxtReadIO')
      d                                     like(htmlDocPtr)
      d  ioctx                          *   value                                void *
      d  URL                            *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
       * Further knowledge of HTML structure
 
-     d htmlStatus      s             10i 0 based(######typedef######)           enum
+     d htmlStatus      s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  HTML_NA        c                   X'0000'                              No check at all
      d  HTML_INVALID   c                   X'0001'
      d  HTML_DEPRECATED...
      d                                     like(htmlStatus)
      d  #param1                            value like(htmlElemDescPtr)          const
      d  #param2                        *   value options(*string)               const xmlChar *
-     d  #param3                      10i 0 value
+     d  #param3                            value like(xmlCint)
 
      d htmlElementAllowedHere...
-     d                 pr            10i 0 extproc('htmlElementAllowedHere')
+     d                 pr                  extproc('htmlElementAllowedHere')
+     d                                     like(xmlCint)
      d  #param1                            value like(htmlElemDescPtr)          const
      d  #param2                        *   value options(*string)               const xmlChar *
 
      d htmlNodeStatus  pr                  extproc('htmlNodeStatus')
      d                                     like(htmlStatus)
      d  #param1                            value like(htmlNodePtr)
-     d  #param2                      10i 0 value
+     d  #param2                            value like(xmlCint)
 
       * C macros implemented as procedures for ILE/RPG support.
 
      d  elt                            *   value                                const htmlElemDesc *
 
      d htmlElementAllowedHereDesc...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     '__htmlElementAllowedHereDesc')
+     d                                     like(xmlCint)
      d  parent                         *   value                                const htmlElemDesc *
      d  elt                            *   value                                const htmlElemDesc *
 
index 82a11ca..99c38a0 100644 (file)
       /define HTML_TREE_H__
 
       /include "libxmlrpg/xmlversion"
-      /include "libxmlrpg/tree"
-      /include "libxmlrpg/HTMLparser"
 
       /if defined(LIBXML_HTML_ENABLED)
 
+      /include "libxmlrpg/xmlTypesC"
+      /include "libxmlrpg/tree"
+      /include "libxmlrpg/HTMLparser"
+
       * HTML_TEXT_NODE:
       *
       * Macro. A text node in a HTML document is really implemented
@@ -69,7 +71,8 @@
      d  doc                                value like(htmlDocPtr)
 
      d htmlSetMetaEncoding...
-     d                 pr            10i 0 extproc('htmlSetMetaEncoding')
+     d                 pr                  extproc('htmlSetMetaEncoding')
+     d                                     like(xmlCint)
      d  doc                                value like(htmlDocPtr)
      d  encoding                       *   value options(*string)               const xmlChar *
 
      d                 pr                  extproc('htmlDocDumpMemory')
      d  cur                                value like(xmlDocPtr)
      d  mem                            *   value                                xmlChar * *
-     d  size                         10i 0
+     d  size                               like(xmlCint)
 
      d htmlDocDumpMemoryFormat...
      d                 pr                  extproc('htmlDocDumpMemoryFormat')
      d  cur                                value like(xmlDocPtr)
      d  mem                            *   value                                xmlChar * *
-     d  size                         10i 0
-     d  format                       10i 0 value
+     d  size                               like(xmlCint)
+     d  format                             value like(xmlCint)
 
-     d htmlDocDump     pr            10i 0 extproc('htmlDocDump')
+     d htmlDocDump     pr                  extproc('htmlDocDump')
+     d                                     like(xmlCint)
      d  f                              *   value                                FILE *
      d  cur                                value like(xmlDocPtr)
 
-     d htmlSaveFile    pr            10i 0 extproc('htmlSaveFile')
+     d htmlSaveFile    pr                  extproc('htmlSaveFile')
+     d                                     like(xmlCint)
      d  filename                       *   value options(*string)               const char *
      d  cur                                value like(xmlDocPtr)
 
-     d htmlNodeDump    pr            10i 0 extproc('htmlNodeDump')
+     d htmlNodeDump    pr                  extproc('htmlNodeDump')
+     d                                     like(xmlCint)
      d  buf                                value like(xmlBufferPtr)
      d  doc                                value like(xmlDocPtr)
      d  cur                                value like(xmlNodePtr)
      d  cur                                value like(xmlNodePtr)
 
      d htmlNodeDumpFileFormat...
-     d                 pr            10i 0 extproc('htmlNodeDumpFileFormat')
+     d                 pr                  extproc('htmlNodeDumpFileFormat')
+     d                                     like(xmlCint)
      d  out                            *   value                                FILE *
      d  doc                                value like(xmlDocPtr)
      d  cur                                value like(xmlNodePtr)
      d  encoding                       *   value options(*string)               const char *
-     d  format                       10i 0 value
+     d  format                             value like(xmlCint)
 
      d htmlSaveFileEnc...
-     d                 pr            10i 0 extproc('htmlSaveFileEnc')
+     d                 pr                  extproc('htmlSaveFileEnc')
+     d                                     like(xmlCint)
      d  filename                       *   value options(*string)               const char *
      d  cur                                value like(xmlDocPtr)
      d  encoding                       *   value options(*string)               const char *
 
      d htmlSaveFileFormat...
-     d                 pr            10i 0 extproc('htmlSaveFileFormat')
+     d                 pr                  extproc('htmlSaveFileFormat')
+     d                                     like(xmlCint)
      d  filename                       *   value options(*string)               const char *
      d  cur                                value like(xmlDocPtr)
      d  encoding                       *   value options(*string)               const char *
-     d  format                       10i 0 value
+     d  format                             value like(xmlCint)
 
      d htmlNodeDumpFormatOutput...
      d                 pr                  extproc('htmlNodeDumpFormatOutput')
      d  doc                                value like(xmlDocPtr)
      d  cur                                value like(xmlNodePtr)
      d  encoding                       *   value options(*string)               const char *
-     d  format                       10i 0 value
+     d  format                             value like(xmlCint)
 
      d htmlDocContentDumpOutput...
      d                 pr                  extproc('htmlDocContentDumpOutput')
      d  buf                                value like(xmlOutputBufferPtr)
      d  cur                                value like(xmlDocPtr)
      d  encoding                       *   value options(*string)               const char *
-     d  format                       10i 0 value
+     d  format                             value like(xmlCint)
 
      d htmlNodeDumpOutput...
      d                 pr                  extproc('htmlNodeDumpOutput')
       /endif                                                                    LIBXML_OUTPUT_ENABLD
 
      d htmlIsBooleanAttr...
-     d                 pr            10i 0 extproc('htmlIsBooleanAttr')
+     d                 pr                  extproc('htmlIsBooleanAttr')
+     d                                     like(xmlCint)
      d  name                           *   value options(*string)               const xmlChar *
 
       /endif                                                                    LIBXML_HTML_ENABLED
index 18f851d..a22d49a 100644 (file)
      d  ctx                            *   value                                void *
      d  loc                                value like(xmlSAXLocatorPtr)
 
-     d getLineNumber   pr            10i 0 extproc('getLineNumber')
+     d getLineNumber   pr                  extproc('getLineNumber')
+     d                                     like(xmlCint)
      d  ctx                            *   value                                void *
 
      d getColumnNumber...
-     d                 pr            10i 0 extproc('getColumnNumber')
+     d                 pr                  extproc('getColumnNumber')
+     d                                     like(xmlCint)
      d  ctx                            *   value                                void *
 
-     d isStandalone    pr            10i 0 extproc('isStandalone')
+     d isStandalone    pr                  extproc('isStandalone')
+     d                                     like(xmlCint)
      d  ctx                            *   value                                void *
 
      d hasInternalSubset...
-     d                 pr            10i 0 extproc('hasInternalSubset')
+     d                 pr                  extproc('hasInternalSubset')
+     d                                     like(xmlCint)
      d  ctx                            *   value                                void *
 
      d hasExternalSubset...
-     d                 pr            10i 0 extproc('hasExternalSubset')
+     d                 pr                  extproc('hasExternalSubset')
+     d                                     like(xmlCint)
      d  ctx                            *   value                                void *
 
      d internalSubset  pr                  extproc('internalSubset')
@@ -76,7 +81,7 @@
      d entityDecl      pr                  extproc('entityDecl')
      d  ctx                            *   value                                void *
      d  name                           *   value options(*string)               const xmlChar *
-     d  type                         10i 0 value
+     d  type                               value like(xmlCint)
      d  publicId                       *   value options(*string)               const xmlChar *
      d  systemId                       *   value options(*string)               const xmlChar *
      d  content                        *   value options(*string)               xmlChar *
      d  ctx                            *   value                                void *
      d  elem                           *   value options(*string)               const xmlChar *
      d  fullname                       *   value options(*string)               const xmlChar *
-     d  type                         10i 0 value
-     d  def                          10i 0 value
+     d  type                               value like(xmlCint)
+     d  def                                value like(xmlCint)
      d  defaultValue                   *   value options(*string)               const xmlChar *
      d  tree                               value like(xmlEnumerationPtr)
 
      d elementDecl     pr                  extproc('elementDecl')
      d  ctx                            *   value                                void *
      d  name                           *   value options(*string)               const xmlChar *
-     d  type                         10i 0 value
+     d  type                               value like(xmlCint)
      d  content                            value like(xmlElementContentPtr)
 
      d notationDecl    pr                  extproc('notationDecl')
      d characters      pr                  extproc('characters')
      d  ctx                            *   value                                void *
      d  ch                             *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
      d ignorableWhitespace...
      d                 pr                  extproc('ignorableWhitespace')
      d  ctx                            *   value                                void *
      d  ch                             *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
      d processingInstruction...
      d                 pr                  extproc('processingInstruction')
      d                                     like(xmlNsPtr)
      d  ctx                            *   value                                void *
 
-     d checkNamespace  pr            10i 0 extproc('checkNamespace')
+     d checkNamespace  pr                  extproc('checkNamespace')
+     d                                     like(xmlCint)
      d  ctx                            *   value                                void *
      d  nameSpace                      *   value options(*string)               xmlChar *
 
      d cdataBlock      pr                  extproc('cdataBlock')
      d  ctx                            *   value                                void *
      d  value                          *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
       /if defined(LIBXML_SAX1_ENABLED)
      d initxmlDefaultSAXHandler...
      d                 pr                  extproc('initxmlDefaultSAXHandler')
-     d  hdlr                               like(xmlSAXHandlerV1)
-     d  warning                      10i 0 value
+     d  hdlr                               likeds(xmlSAXHandlerV1)
+     d  warning                            value like(xmlCint)
 
       /if defined(LIBXML_HTML_ENABLED)
      d inithtmlDefaultSAXHandler...
      d                 pr                  extproc('inithtmlDefaultSAXHandler')
-     d  hdlr                               like(xmlSAXHandlerV1)
+     d  hdlr                               likeds(xmlSAXHandlerV1)
       /endif
 
       /if defined(LIBXML_DOCB_ENABLED)
      d initdocbDefaultSAXHandler...
      d                 pr                  extproc('initdocbDefaultSAXHandler')
-     d  hdlr                               like(xmlSAXHandlerV1)
+     d  hdlr                               likeds(xmlSAXHandlerV1)
       /endif
       /endif                                                                    LIBXML_SAX1_ENABLED
 
index c9ab9d1..c72be25 100644 (file)
@@ -10,6 +10,7 @@
       /define XML_SAX2_H__
 
       /include "libxmlrpg/xmlversion"
+      /include "libxmlrpg/xmlTypesC"
       /include "libxmlrpg/parser"
       /include "libxmlrpg/xlink"
 
      d  loc                                value like(xmlSAXLocatorPtr)
 
      d xmlSAX2GetLineNumber...
-     d                 pr            10i 0 extproc('xmlSAX2GetLineNumber')
+     d                 pr                  extproc('xmlSAX2GetLineNumber')
+     d                                     like(xmlCint)
      d  ctx                            *   value                                void *
 
      d xmlSAX2GetColumnNumber...
-     d                 pr            10i 0 extproc('xmlSAX2GetColumnNumber')
+     d                 pr                  extproc('xmlSAX2GetColumnNumber')
+     d                                     like(xmlCint)
      d  ctx                            *   value                                void *
 
      d xmlSAX2IsStandalone...
-     d                 pr            10i 0 extproc('xmlSAX2IsStandalone')
+     d                 pr                  extproc('xmlSAX2IsStandalone')
+     d                                     like(xmlCint)
      d  ctx                            *   value                                void *
 
      d xmlSAX2HasInternalSubset...
-     d                 pr            10i 0 extproc('xmlSAX2HasInternalSubset')
+     d                 pr                  extproc('xmlSAX2HasInternalSubset')
+     d                                     like(xmlCint)
      d  ctx                            *   value                                void *
 
      d xmlSAX2HasExternalSubset...
-     d                 pr            10i 0 extproc('xmlSAX2HasExternalSubset')
+     d                 pr                  extproc('xmlSAX2HasExternalSubset')
+     d                                     like(xmlCint)
      d  ctx                            *   value                                void *
 
      d xmlSAX2InternalSubset...
@@ -83,7 +89,7 @@
      d                 pr                  extproc('xmlSAX2EntityDecl')
      d  ctx                            *   value                                void *
      d  name                           *   value options(*string)               const xmlChar *
-     d  type                         10i 0 value
+     d  type                               value like(xmlCint)
      d  publicId                       *   value options(*string)               const xmlChar *
      d  systemId                       *   value options(*string)               const xmlChar *
      d  content                        *   value options(*string)               xmlChar *
@@ -93,8 +99,8 @@
      d  ctx                            *   value                                void *
      d  elem                           *   value options(*string)               const xmlChar *
      d  fullname                       *   value options(*string)               const xmlChar *
-     d  type                         10i 0 value
-     d  def                          10i 0 value
+     d  type                               value like(xmlCint)
+     d  def                                value like(xmlCint)
      d  defaultValue                   *   value options(*string)               const xmlChar *
      d  tree                               value like(xmlEnumerationPtr)
 
      d                 pr                  extproc('xmlSAX2ElementDecl')
      d  ctx                            *   value                                void *
      d  name                           *   value options(*string)               const xmlChar *
-     d  type                         10i 0 value
+     d  type                               value like(xmlCint)
      d  content                            value like(xmlElementContentPtr)
 
      d xmlSAX2NotationDecl...
      d  localname                      *   value options(*string)               const xmlChar *
      d  prefix                         *   value options(*string)               const xmlChar *
      d  URI                            *   value options(*string)               const xmlChar *
-     d  nb_namespaces                10i 0 value
+     d  nb_namespaces                      value like(xmlCint)
      d  namespaces                     *   value                                const xmlChar *(*)
-     d  nb_attributes                10i 0 value
-     d  nb_defaulted                 10i 0 value
+     d  nb_attributes                      value like(xmlCint)
+     d  nb_defaulted                       value like(xmlCint)
      d  attributes                     *                                        const xmlChar *(*)
 
      d xmlSAX2EndElementNs...
      d                 pr                  extproc('xmlSAX2Characters')
      d  ctx                            *   value                                void *
      d  ch                             *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
      d xmlSAX2IgnorableWhitespace...
      d                 pr                  extproc('xmlSAX2IgnorableWhitespace')
      d  ctx                            *   value                                void *
      d  ch                             *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
      d xmlSAX2ProcessingInstruction...
      d                 pr                  extproc(
      d                 pr                  extproc('xmlSAX2CDataBlock')
      d  ctx                            *   value                                void *
      d  value                          *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
       /if defined(LIBXML_SAX1_ENABLED)
      d xmlSAXDefaultVersion...
-     d                 pr            10i 0 extproc('xmlSAXDefaultVersion')
-     d  version                      10i 0 value
+     d                 pr                  extproc('xmlSAXDefaultVersion')
+     d                                     like(xmlCint)
+     d  version                            value like(xmlCint)
       /endif                                                                    LIBXML_SAX1_ENABLED
 
-     d xmlSAXVersion   pr            10i 0 extproc('xmlSAXVersion')
-     d  hdlr                               like(xmlSAXHandler)
-     d  version                      10i 0 value
+     d xmlSAXVersion   pr                  extproc('xmlSAXVersion')
+     d                                     like(xmlCint)
+     d  hdlr                               likeds(xmlSAXHandler)
+     d  version                            value like(xmlCint)
 
      d xmlSAX2InitDefaultSAXHandler...
      d                 pr                  extproc(
      d                                      'xmlSAX2InitDefaultSAXHandler')
-     d  hdlr                               like(xmlSAXHandler)
-     d  warning                      10i 0 value
+     d  hdlr                               likeds(xmlSAXHandler)
+     d  warning                            value like(xmlCint)
 
       /if defined(LIBXML_HTML_ENABLED)
      d xmlSAX2InitHtmlDefaultSAXHandler...
      d                 pr                  extproc(
      d                                      'xmlSAX2InitHtmlDefaultSAXHandler')
-     d  hdlr                               like(xmlSAXHandler)
+     d  hdlr                               likeds(xmlSAXHandler)
 
      d htmlDefaultSAXHandlerInit...
      d                 pr                  extproc('htmlDefaultSAXHandlerInit')
      d xmlSAX2InitDocbDefaultSAXHandler...
      d                 pr                  extproc(
      d                                      'xmlSAX2InitDocbDefaultSAXHandler')
-     d  hdlr                               like(xmlSAXHandler)
+     d  hdlr                               likeds(xmlSAXHandler)
 
      d docbDefaultSAXHandlerInit...
      d                 pr                  extproc('docbDefaultSAXHandlerInit')
index b64efb2..963ed37 100644 (file)
@@ -21,6 +21,7 @@
       /if defined(LIBXML_C14N_ENABLED)
       /if defined(LIBXML_OUTPUT_ENABLED)
 
+      /include "libxmlrpg/xmlTypesC"
       /include "libxmlrpg/tree"
       /include "libxmlrpg/xpath"
 
       * Predefined values for C14N modes
 
      d xmlBufferAllocationScheme...
-     d xmlC14NMode     s             10i 0 based(######typedef######)           enum
+     d xmlC14NMode     s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_C14N_1_0   c                   0                                    Original C14N 1.0
      d  XML_C14N_EXCLUSIVE_1_0...                                               Exclusive C14N 1.0
      d                 c                   1
      d  XML_C14N_1_1   c                   2                                    C14N 1.1 spec
 
      d xmlC14NDocSaveTo...
-     d                 pr            10i 0 extproc('xmlC14NDocSaveTo')
+     d                 pr                  extproc('xmlC14NDocSaveTo')
+     d                                     like(xmlCint)
      d  doc                                value like(xmlDocPtr)
      d  nodes                              value like(xmlNodeSetPtr)
-     d  mode                         10i 0 value
+     d  mode                               value like(xmlCint)
      d  inclusive_ns_prefixes...
-     d                                 *                                        xmlChar *(*)
-     d  with_comments                10i 0 value
+     d                                 *   options(*omit)                       xmlChar *(*)
+     d  with_comments                      value like(xmlCint)
      d  buf                                value like(xmlOutputBufferPtr)
 
      d xmlC14NDocDumpMemory...
-     d                 pr            10i 0 extproc('xmlC14NDocDumpMemory')
+     d                 pr                  extproc('xmlC14NDocDumpMemory')
+     d                                     like(xmlCint)
      d  doc                                value like(xmlDocPtr)
      d  nodes                              value like(xmlNodeSetPtr)
-     d  mode                         10i 0 value
+     d  mode                               value like(xmlCint)
      d  inclusive_ns_prefixes...
-     d                                 *                                        xmlChar *(*)
-     d  with_comments                10i 0 value
+     d                                 *   options(*omit)                       xmlChar *(*)
+     d  with_comments                      value like(xmlCint)
      d  doc_txt_ptr                    *                                        xmlChar *(*)
 
-     d xmlC14NDocSave  pr            10i 0 extproc('xmlC14NDocSave')
+     d xmlC14NDocSave  pr                  extproc('xmlC14NDocSave')
+     d                                     like(xmlCint)
      d  doc                                value like(xmlDocPtr)
      d  nodes                              value like(xmlNodeSetPtr)
-     d  mode                         10i 0 value
+     d  mode                               value like(xmlCint)
      d  inclusive_ns_prefixes...
-     d                                 *                                        xmlChar *(*)
-     d  with_comments                10i 0 value
+     d                                 *   options(*omit)                       xmlChar *(*)
+     d  with_comments                      value like(xmlCint)
      d  filename                       *   value options(*string)               const char *
-     d  compression                  10i 0 value
+     d  compression                        value like(xmlCint)
 
       * This is the core C14N function
 
      d                 s               *   based(######typedef######)
      d                                     procptr
 
-     d xmlC14NExecute  pr            10i 0 extproc('xmlC14NExecute')
+     d xmlC14NExecute  pr                  extproc('xmlC14NExecute')
+     d                                     like(xmlCint)
      d  doc                                value like(xmlDocPtr)
      d  is_visible_callback...
      d                                     value like(xmlC14NIsVisibleCallback)
      d  user_data                      *   value                                void *
-     d  mode                         10i 0 value
+     d  mode                               value like(xmlCint)
      d  inclusive_ns_prefixes...
-     d                                 *                                        xmlChar *(*)
-     d  with_comments                10i 0 value
+     d                                 *   options(*omit)                       xmlChar *(*)
+     d  with_comments                      value like(xmlCint)
      d  buf                                value like(xmlOutputBufferPtr)
 
       /endif                                                                    LIBXML_OUTPUT_ENABLD
index 52baf4e..1dab819 100644 (file)
       /define XML_CATALOG_H__
 
       /include "libxmlrpg/xmlversion"
-      /include "libxmlrpg/xmlstring"
-      /include "libxmlrpg/tree"
 
       /if defined(LIBXML_CATALOG_ENABLED)
 
+      /include "libxmlrpg/xmlTypesC"
+      /include "libxmlrpg/xmlstring"
+      /include "libxmlrpg/tree"
+
       * XML_CATALOGS_NAMESPACE:
       *
       * The namespace for the XML Catalogs elements.
@@ -38,7 +40,8 @@
       * The API is voluntarily limited to general cataloging.
 
      d xmlCatalogPrefer...
-     d                 s             10u 0 based(######typedef######)           enum type
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d XML_CATA_PREFER_NONE...
      d                 c                   0
      d XML_CATA_PREFER_PUBLIC...
@@ -47,7 +50,8 @@
      d                 c                   2
 
      d xmlCatalogAllow...
-     d                 s             10u 0 based(######typedef######)           enum type
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d XML_CATA_ALLOW_NONE...
      d                 c                   0
      d XML_CATA_ALLOW_GLOBAL...
@@ -63,7 +67,7 @@
 
      d xmlNewCatalog   pr                  extproc('xmlNewCatalog')
      d                                     like(xmlCatalogPtr)
-     d  sgml                         10i 0 value
+     d  sgml                               value like(xmlCint)
 
      d xmlLoadACatalog...
      d                 pr                  extproc('xmlLoadACatalog')
      d  filename                       *   value options(*string)               const char *
 
      d xmlConvertSGMLCatalog...
-     d                 pr            10i 0 extproc('xmlConvertSGMLCatalog')
+     d                 pr                  extproc('xmlConvertSGMLCatalog')
+     d                                     like(xmlCint)
      d  catal                              value like(xmlCatalogPtr)
 
-     d xmlACatalogAdd  pr            10i 0 extproc('xmlACatalogAdd')
+     d xmlACatalogAdd  pr                  extproc('xmlACatalogAdd')
+     d                                     like(xmlCint)
      d  catal                              value like(xmlCatalogPtr)
      d  type                           *   value options(*string)               const xmlChar *
      d  orig                           *   value options(*string)               const xmlChar *
      d  replace                        *   value options(*string)               const xmlChar *
 
      d xmlACatalogRemove...
-     d                 pr            10i 0 extproc('xmlACatalogRemove')
+     d                 pr                  extproc('xmlACatalogRemove')
+     d                                     like(xmlCint)
      d  catal                              value like(xmlCatalogPtr)
      d  value                          *   value options(*string)               const xmlChar *
 
      d  catal                              value like(xmlCatalogPtr)
 
      d xmlCatalogIsEmpty...
-     d                 pr            10i 0 extproc('xmlCatalogIsEmpty')
+     d                 pr                  extproc('xmlCatalogIsEmpty')
+     d                                     like(xmlCint)
      d  catal                              value like(xmlCatalogPtr)
 
       * Global operations.
      d xmlInitializeCatalog...
      d                 pr                  extproc('xmlInitializeCatalog')
 
-     d xmlLoadCatalog  pr            10i 0 extproc('xmlLoadCatalog')
+     d xmlLoadCatalog  pr                  extproc('xmlLoadCatalog')
+     d                                     like(xmlCint)
      d  filename                       *   value options(*string)               const char *
 
      d xmlLoadCatalogs...
      d                 pr              *   extproc('xmlCatalogResolveURI')      xmlChar *
      d  URI                            *   value options(*string)               const xmlChar *
 
-     d xmlCatalogAdd   pr            10i 0 extproc('xmlCatalogAdd')
+     d xmlCatalogAdd   pr                  extproc('xmlCatalogAdd')
+     d                                     like(xmlCint)
      d  type                           *   value options(*string)               const xmlChar *
      d  orig                           *   value options(*string)               const xmlChar *
      d  replace                        *   value options(*string)               const xmlChar *
 
      d xmlCatalogRemove...
-     d                 pr            10i 0 extproc('xmlCatalogRemove')
+     d                 pr                  extproc('xmlCatalogRemove')
+     d                                     like(xmlCint)
      d  value                          *   value options(*string)               const xmlChar *
 
      d xmlParseCatalogFile...
      d  filename                       *   value options(*string)               const char *
 
      d xmlCatalogConvert...
-     d                 pr            10i 0 extproc('xmlCatalogConvert')
+     d                 pr                  extproc('xmlCatalogConvert')
+     d                                     like(xmlCint)
 
       * Strictly minimal interfaces for per-document catalogs used
       * by the parser.
       * Preference settings.
 
      d xmlCatalogSetDebug...
-     d                 pr            10i 0 extproc('xmlCatalogSetDebug')
-     d  level                        10i 0 value
+     d                 pr                  extproc('xmlCatalogSetDebug')
+     d                                     like(xmlCint)
+     d  level                              value like(xmlCint)
 
      d xmlCatalogSetDefaultPrefer...
      d                 pr                  extproc('xmlCatalogSetDefaultPrefer')
index 33393f6..c601442 100644 (file)
@@ -10,6 +10,7 @@
       /define XML_CHVALID_H__
 
       /include "libxmlrpg/xmlversion"
+      /include "libxmlrpg/xmlTypesC"
       /include "libxmlrpg/xmlstring"
 
       * Define our typedefs and structures
 
      d xmlChSRange     ds                  based(xmlChSRangePtr)
      d                                     align qualified
-     d  low                           5u 0
-     d  high                          5u 0
+     d  low                                like(xmlCushort)
+     d  high                               like(xmlCushort)
 
      d xmlChLRangePtr  s               *   based(######typedef######)
 
      d xmlChLRange     ds                  based(xmlChLRangePtr)
      d                                     align qualified
-     d  low                          10u 0
-     d  high                         10u 0
+     d  low                                like(xmlCuint)
+     d  high                               like(xmlCuint)
 
      d xmlChRangeGroupPtr...
      d                 s               *   based(######typedef######)
      d xmlChRangeGroup...
      d                 ds                  based(xmlChRangeGroupPtr)
      d                                     align qualified
-     d  nbShortRange                 10i 0
-     d  nbLongRange                  10i 0
+     d  nbShortRange                       like(xmlCint)
+     d  nbLongRange                        like(xmlCint)
      d  shortRange                         like(xmlChSRangePtr)
      d  longRange                          like(xmlChLRangePtr)
 
       * Range checking routine
 
-     d xmlCharInRange  pr            10i 0 extproc('xmlCharInRange')
-     d val                           10u 0 value
+     d xmlCharInRange  pr                  extproc('xmlCharInRange')
+     d                                     like(xmlCint)
+     d val                                 value like(xmlCuint)
      d group                               like(xmlChRangeGroupPtr)             const
 
      d xmlIsBaseCharGroup...
      d                 ds                  import('xmlIsIdeographicGroup')
      d                                     likeds(xmlChRangeGroup)              const
 
-     d xmlIsBaseChar   pr            10i 0 extproc('xmlIsBaseChar')
-     d ch                            10u 0 value
+     d xmlIsBaseChar   pr                  extproc('xmlIsBaseChar')
+     d                                     like(xmlCint)
+     d ch                                  value like(xmlCuint)
 
-     d xmlIsBlank      pr            10i 0 extproc('xmlIsBlank')
-     d ch                            10u 0 value
+     d xmlIsBlank      pr                  extproc('xmlIsBlank')
+     d                                     like(xmlCint)
+     d ch                                  value like(xmlCuint)
 
-     d xmlIsChar       pr            10i 0 extproc('xmlIsChar')
-     d ch                            10u 0 value
+     d xmlIsChar       pr                  extproc('xmlIsChar')
+     d                                     like(xmlCint)
+     d ch                                  value like(xmlCuint)
 
-     d xmlIsCombining  pr            10i 0 extproc('xmlIsCombining')
-     d ch                            10u 0 value
+     d xmlIsCombining  pr                  extproc('xmlIsCombining')
+     d                                     like(xmlCint)
+     d ch                                  value like(xmlCuint)
 
-     d xmlIsDigit      pr            10i 0 extproc('xmlIsDigit')
-     d ch                            10u 0 value
+     d xmlIsDigit      pr                  extproc('xmlIsDigit')
+     d                                     like(xmlCint)
+     d ch                                  value like(xmlCuint)
 
-     d xmlIsExtender   pr            10i 0 extproc('xmlIsExtender')
-     d ch                            10u 0 value
+     d xmlIsExtender   pr                  extproc('xmlIsExtender')
+     d                                     like(xmlCint)
+     d ch                                  value like(xmlCuint)
 
      d xmlIsIdeographic...
-     d                 pr            10i 0 extproc('xmlIsIdeographic')
-     d ch                            10u 0 value
+     d                 pr                  extproc('xmlIsIdeographic')
+     d                                     like(xmlCint)
+     d ch                                  value like(xmlCuint)
 
-     d xmlIsPubidChar  pr            10i 0 extproc('xmlIsPubidChar')
-     d ch                            10u 0 value
+     d xmlIsPubidChar  pr                  extproc('xmlIsPubidChar')
+     d                                     like(xmlCint)
+     d ch                                  value like(xmlCuint)
 
       /endif                                                                    XML_CHVALID_H__
index 5005a2d..81826bc 100644 (file)
       /define DEBUG_XML__
 
       /include "libxmlrpg/xmlversion"
-      /include "libxmlrpg/tree"
 
       /if defined(LIBXML_DEBUG_ENABLED)
 
+      /include "libxmlrpg/xmlTypesC"
+      /include "libxmlrpg/tree"
       /include "libxmlrpg/xpath"
 
       * The standard Dump routines.
      d                 pr                  extproc('xmlDebugDumpAttr')
      d  output                         *   value                                FILE *
      d  attr                               value like(xmlAttrPtr)
-     d  depth                        10i 0 value
+     d  depth                              value like(xmlCint)
 
      d xmlDebugDumpAttrList...
      d                 pr                  extproc('xmlDebugDumpAttrList')
      d  output                         *   value                                FILE *
      d  attr                               value like(xmlAttrPtr)
-     d  depth                        10i 0 value
+     d  depth                              value like(xmlCint)
 
      d xmlDebugDumpOneNode...
      d                 pr                  extproc('xmlDebugDumpOneNode')
      d  output                         *   value                                FILE *
      d  node                               value like(xmlNodePtr)
-     d  depth                        10i 0 value
+     d  depth                              value like(xmlCint)
 
      d xmlDebugDumpNode...
      d                 pr                  extproc('xmlDebugDumpNode')
      d  output                         *   value                                FILE *
      d  node                               value like(xmlNodePtr)
-     d  depth                        10i 0 value
+     d  depth                              value like(xmlCint)
 
      d xmlDebugDumpNodeList...
      d                 pr                  extproc('xmlDebugDumpNodeList')
      d  output                         *   value                                FILE *
      d  node                               value like(xmlNodePtr)
-     d  depth                        10i 0 value
+     d  depth                              value like(xmlCint)
 
      d xmlDebugDumpDocumentHead...
      d                 pr                  extproc('xmlDebugDumpDocumentHead')
@@ -80,7 +81,8 @@
       ****************************************************************
 
      d xmlDebugCheckDocument...
-     d                 pr            10i 0 extproc('xmlDebugCheckDocument')
+     d                 pr                  extproc('xmlDebugCheckDocument')
+     d                                     like(xmlCint)
      d  output                         *   value                                FILE *
      d  doc                                value like(xmlDocPtr)
 
      d  output                         *   value                                FILE *
      d  node                               value like(xmlNodePtr)
 
-     d xmlLsCountNode  pr            10i 0 extproc('xmlLsCountNode')
+     d xmlLsCountNode  pr                  extproc('xmlLsCountNode')
+     d                                     like(xmlCint)
      d  node                               value like(xmlNodePtr)
 
      d xmlBoolToText   pr              *   extproc('xmlBoolToText')             const char *
-     d  boolval                      10i 0 value
+     d  boolval                            value like(xmlCint)
 
       ****************************************************************
       *                                                              *
      d  doc                                like(xmlDocPtr)
      d  node                               like(xmlNodePtr)
      d  pctxt                              like(xmlXPathContextPtr)
-     d  loaded                       10i 0
+     d  loaded                             like(xmlCint)
      d  output                         *                                        FILE *
      d  input                              like(xmlShellReadlineFunc)
 
 
      d xmlShellPrintXPathError...
      d                 pr                  extproc('xmlShellPrintXPathError')
-     d  errorType                    10i 0 value
+     d  errorType                          value like(xmlCint)
      d  arg                            *   value options(*string)               const char *
 
      d xmlShellPrintXPathResult...
      d                 pr                  extproc('xmlShellPrintXPathResult')
      d  list                               value like(xmlXPathObjectPtr)
 
-     d xmlShellList    pr            10i 0 extproc('xmlShellList')
+     d xmlShellList    pr                  extproc('xmlShellList')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlShellCtxtPtr)
      d  arg                            *   value options(*string)               char *
      d  node                               value like(xmlNodePtr)
      d  node2                              value like(xmlNodePtr)
 
-     d xmlShellBase    pr            10i 0 extproc('xmlShellBase')
+     d xmlShellBase    pr                  extproc('xmlShellBase')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlShellCtxtPtr)
      d  arg                            *   value options(*string)               char *
      d  node                               value like(xmlNodePtr)
      d  node2                              value like(xmlNodePtr)
 
-     d xmlShellDir     pr            10i 0 extproc('xmlShellDir')
+     d xmlShellDir     pr                  extproc('xmlShellDir')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlShellCtxtPtr)
      d  arg                            *   value options(*string)               char *
      d  node                               value like(xmlNodePtr)
      d  node2                              value like(xmlNodePtr)
 
-     d xmlShellLoad    pr            10i 0 extproc('xmlShellLoad')
+     d xmlShellLoad    pr                  extproc('xmlShellLoad')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlShellCtxtPtr)
      d  filename                       *   value options(*string)               char *
      d  node                               value like(xmlNodePtr)
      d                 pr                  extproc('xmlShellPrintNode')
      d  node                               value like(xmlNodePtr)
 
-     d xmlShellCat     pr            10i 0 extproc('xmlShellCat')
+     d xmlShellCat     pr                  extproc('xmlShellCat')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlShellCtxtPtr)
      d  arg                            *   value options(*string)               char *
      d  node                               value like(xmlNodePtr)
      d  node2                              value like(xmlNodePtr)
 
-     d xmlShellWrite   pr            10i 0 extproc('xmlShellWrite')
+     d xmlShellWrite   pr                  extproc('xmlShellWrite')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlShellCtxtPtr)
      d  filename                       *   value options(*string)               char *
      d  node                               value like(xmlNodePtr)
      d  node2                              value like(xmlNodePtr)
 
-     d xmlShellSave    pr            10i 0 extproc('xmlShellSave')
+     d xmlShellSave    pr                  extproc('xmlShellSave')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlShellCtxtPtr)
      d  filename                       *   value options(*string)               char *
      d  node                               value like(xmlNodePtr)
 
       /if defined(LIBXML_VALID_ENABLED)
      d xmlShellValidate...
-     d                 pr            10i 0 extproc('xmlShellValidate')
+     d                 pr                  extproc('xmlShellValidate')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlShellCtxtPtr)
      d  dtd                            *   value options(*string)               char *
      d  node                               value like(xmlNodePtr)
      d  node2                              value like(xmlNodePtr)
       /endif                                                                    LIBXML_VALID_ENABLED
 
-     d xmlShellDu      pr            10i 0 extproc('xmlShellDu')
+     d xmlShellDu      pr                  extproc('xmlShellDu')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlShellCtxtPtr)
      d  arg                            *   value options(*string)               char *
      d  tree                               value like(xmlNodePtr)
      d  node2                              value like(xmlNodePtr)
 
-     d xmlShellPwd     pr            10i 0 extproc('xmlShellPwd')
+     d xmlShellPwd     pr                  extproc('xmlShellPwd')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlShellCtxtPtr)
      d  buffer                         *   value options(*string)               char *
      d  node                               value like(xmlNodePtr)
index cd36f50..c061e4c 100644 (file)
@@ -9,17 +9,19 @@
       /if not defined(XML_DICT_H__)
       /define XML_DICT_H__
 
-      /include "libxmlrpg/xmlversion"
-      /include "libxmlrpg/tree"
-
       * The dictionary.
 
      d xmlDictPtr      s               *   based(######typedef######)
 
+      /include "libxmlrpg/xmlversion"
+      /include "libxmlrpg/xmlTypesC"
+      /include "libxmlrpg/tree"
+
       * Initializer
 
      d xmlInitializeDict...
-     d                 pr            10i 0 extproc('xmlInitializeDict')
+     d                 pr                  extproc('xmlInitializeDict')
+     d                                     like(xmlCint)
 
       * Constructor and destructor.
 
      d                                     like(xmlDictPtr)
 
      d xmlDictSetLimit...
-     d                 pr            10u 0 extproc('xmlDictSetLimit')           size_t
+     d                 pr                  extproc('xmlDictSetLimit')
+     d                                     like(xmlCsize_t)
      d  dict                               value like(xmlDictPtr)
-     d  limit                        10u 0 value                                size_t
+     d  limit                              value like(xmlCsize_t)
 
      d xmlDictGetUsage...
-     d                 pr            10u 0 extproc('xmlDictGetUsage')           size_t
+     d                 pr                  extproc('xmlDictGetUsage')
+     d                                     like(xmlCsize_t)
      d  dict                               value like(xmlDictPtr)
 
      d xmlDictCreateSub...
@@ -41,7 +45,8 @@
      d  sub                                value like(xmlDictPtr)
 
      d xmlDictReference...
-     d                 pr            10i 0 extproc('xmlDictGetReference')
+     d                 pr                  extproc('xmlDictGetReference')
+     d                                     like(xmlCint)
      d  dict                               value like(xmlDictPtr)
 
      d xmlDictFree     pr                  extproc('xmlDictFree')
      d xmlDictLookup   pr              *   extproc('xmlDictLookup')             const xmlChar *
      d  dict                               value like(xmlDictPtr)
      d  name                           *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
      d xmlDictExists   pr              *   extproc('xmlDictExists')             const xmlChar *
      d  dict                               value like(xmlDictPtr)
      d  name                           *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
      d xmlDictQLookup  pr              *   extproc('xmlDictQLookup')            const xmlChar *
      d  dict                               value like(xmlDictPtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  name                           *   value options(*string)               const xmlChar *
 
-     d xmlDictOwns     pr            10i 0 extproc('xmlDictOwns')
+     d xmlDictOwns     pr                  extproc('xmlDictOwns')
+     d                                     like(xmlCint)
      d  dict                               value like(xmlDictPtr)
      d  str                            *   value options(*string)               const xmlChar *
 
-     d xmlDictSize     pr            10i 0 extproc('xmlDictSize')
+     d xmlDictSize     pr                  extproc('xmlDictSize')
+     d                                     like(xmlCint)
      d  dict                               value like(xmlDictPtr)
 
       * Cleanup function
index 80970fb..8153f3c 100644 (file)
@@ -21,6 +21,7 @@
       /define XML_CHAR_ENCODING_H__
 
       /include "libxmlrpg/xmlversion"
+      /include "libxmlrpg/xmlTypesC"
 
       * xmlCharEncoding:
       *
@@ -43,7 +44,8 @@
       * the specific UTF-16LE and UTF-16BE are present.
 
      d xmlCharEncoding...
-     d                 s             10i 0 based(######typedef######)           enum
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_CHAR_ENCODING_ERROR...                                              No encoding detected
      d                 c                   -1
      d  XML_CHAR_ENCODING_NONE...                                               No encoding detected
       * Interfaces for encoding names and aliases.
 
      d xmlAddEncodingAlias...
-     d                 pr            10i 0 extproc('xmlAddEncodingAlias')
+     d                 pr                  extproc('xmlAddEncodingAlias')
+     d                                     like(xmlCint)
      d  name                           *   value options(*string)               const char *
      d  alias                          *   value options(*string)               const char *
 
      d xmlDelEncodingAlias...
-     d                 pr            10i 0 extproc('xmlDelEncodingAlias')
+     d                 pr                  extproc('xmlDelEncodingAlias')
+     d                                     like(xmlCint)
      d  alias                          *   value options(*string)               const char *
 
      d xmlGetEncodingAlias...
      d                 pr                  extproc('xmlDetectCharEncoding')
      d                                     like(xmlCharEncoding)
      d  in                             *   value options(*string)               const unsigned char*
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
      d xmlCharEncOutFunc...
-     d                 pr            10i 0 extproc('xmlCharEncOutFunc')
-     d  handler                            like(xmlCharEncodingHandler)
+     d                 pr                  extproc('xmlCharEncOutFunc')
+     d                                     like(xmlCint)
+     d  handler                            likeds(xmlCharEncodingHandler)
      d  out                                value like(xmlBufferPtr)
      d  in                                 value like(xmlBufferPtr)
 
      d xmlCharEncInFunc...
-     d                 pr            10i 0 extproc('xmlCharEncInFunc')
-     d  handler                            like(xmlCharEncodingHandler)
+     d                 pr                  extproc('xmlCharEncInFunc')
+     d                                     like(xmlCint)
+     d  handler                            likeds(xmlCharEncodingHandler)
      d  out                                value like(xmlBufferPtr)
      d  in                                 value like(xmlBufferPtr)
 
      d xmlCharEncFirstLine...
-     d                 pr            10i 0 extproc('xmlCharEncFirstLine')
-     d  handler                            like(xmlCharEncodingHandler)
+     d                 pr                  extproc('xmlCharEncFirstLine')
+     d                                     like(xmlCint)
+     d  handler                            likeds(xmlCharEncodingHandler)
      d  out                                value like(xmlBufferPtr)
      d  in                                 value like(xmlBufferPtr)
 
      d xmlCharEncCloseFunc...
-     d                 pr            10i 0 extproc('xmlCharEncCloseFunc')
-     d  handler                            like(xmlCharEncodingHandler)
+     d                 pr                  extproc('xmlCharEncCloseFunc')
+     d                                     like(xmlCint)
+     d  handler                            likeds(xmlCharEncodingHandler)
 
       * Export a few useful functions
 
       /if defined(LIBXML_OUTPUT_ENABLED)
-     d UTF8Toisolat1   pr            10i 0 extproc('UTF8Toisolat1')
+     d UTF8Toisolat1   pr                  extproc('UTF8Toisolat1')
+     d                                     like(xmlCint)
      d  out                       65535    options(*varsize)                    unsigned char (*)
-     d  outlen                       10i 0
+     d  outlen                             like(xmlCint)
      d  in                             *   value options(*string)               const unsigned char*
-     d  inlen                        10i 0
+     d  inlen                              like(xmlCint)
 
       /endif                                                                    LIBXML_OUTPUT_ENABLD
 
-     d isolat1ToUTF8   pr            10i 0 extproc('isolat1ToUTF8')
+     d isolat1ToUTF8   pr                  extproc('isolat1ToUTF8')
+     d                                     like(xmlCint)
      d  out                       65535    options(*varsize)                    unsigned char (*)
-     d  outlen                       10i 0
+     d  outlen                             like(xmlCint)
      d  in                             *   value options(*string)               const unsigned char*
-     d  inlen                        10i 0
+     d  inlen                              like(xmlCint)
 
       /endif                                                                    XML_CHAR_ENCODING_H
index 8d97915..eeec1b6 100644 (file)
       /define XML_ENTITIES_H__
 
       /include "libxmlrpg/xmlversion"
+      /include "libxmlrpg/xmlTypesC"
       /include "libxmlrpg/tree"
 
       * The different valid entity types.
 
-     d xmlEntityType   s             10i 0 based(######typedef######)           enum
+     d xmlEntityType   s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_INTERNAL_GENERAL_ENTITY...
      d                 c                   1
      d  XML_EXTERNAL_GENERAL_PARSED_ENTITY...
      d  doc                                like(xmlDocPtr)                      containing document
      d  orig                           *                                        xmlChar *
      d  content                        *                                        xmlChar *
-     d  length                       10i 0                                      content length
+     d  length                             like(xmlCint)                        content length
      d  etype                              like(xmlEntityType)                  The entity type
      d  ExternalID                     *                                        const xmlChar *
      d  SystemlID                      *                                        const xmlChar *
      d  nexte                              like(xmlEntityPtr)                   unused
      d  URI                            *                                        const xmlChar *
-     d  owner                        10i 0                                      Owns children ?
-     d  checked                      10i 0                                      Content checked ?
+     d  owner                              like(xmlCint)                        Owns children ?
+     d  checked                            like(xmlCint)                        Content checked ?
 
       * All entities are stored in an hash table.
       * There is 2 separate hash tables for global and parameter entities.
@@ -71,7 +73,7 @@
      d                                     like(xmlEntityPtr)
      d  doc                                value like(xmlDocPtr)
      d  name                           *   value options(*string)               const xmlChar *
-     d  type                         10i 0 value
+     d  type                               value like(xmlCint)
      d  ExternalID                     *   value options(*string)               const xmlChar *
      d  SystemID                       *   value options(*string)               const xmlChar *
      d  content                        *   value options(*string)               const xmlChar *
@@ -81,7 +83,7 @@
      d                                     like(xmlEntityPtr)
      d  doc                                value like(xmlDocPtr)
      d  name                           *   value options(*string)               const xmlChar *
-     d  type                         10i 0 value
+     d  type                               value like(xmlCint)
      d  ExternalID                     *   value options(*string)               const xmlChar *
      d  SystemID                       *   value options(*string)               const xmlChar *
      d  content                        *   value options(*string)               const xmlChar *
@@ -91,7 +93,7 @@
      d                                     like(xmlEntityPtr)
      d  doc                                value like(xmlDocPtr)
      d  name                           *   value options(*string)               const xmlChar *
-     d  type                         10i 0 value
+     d  type                               value like(xmlCint)
      d  ExternalID                     *   value options(*string)               const xmlChar *
      d  SystemID                       *   value options(*string)               const xmlChar *
      d  content                        *   value options(*string)               const xmlChar *
index 80dadca..3fe3a9b 100644 (file)
@@ -13,6 +13,7 @@
       /define XML_GLOBALS_H
 
       /include "libxmlrpg/xmlversion"
+      /include "libxmlrpg/xmlTypesC"
       /include "libxmlrpg/parser"
       /include "libxmlrpg/xmlerror"
       /include "libxmlrpg/SAX"
      d  xmlParserVersion...
      d                                 *                                        const char *
      d  xmlDefaultSAXLocator...
-     d                                     like(xmlSAXLocator)
+     d                                     likeds(xmlSAXLocator)
      d  xmlDefaultSAXHandler...
-     d                                     like(xmlSAXHandlerV1)
+     d                                     likeds(xmlSAXHandlerV1)
      d  docbDefaultSAXHandler...
-     d                                     like(xmlSAXHandlerV1)
+     d                                     likeds(xmlSAXHandlerV1)
      d  htmlDefaultSAXHandler...
-     d                                     like(xmlSAXHandlerV1)
+     d                                     likeds(xmlSAXHandlerV1)
      d  xmlFree                            like(xmlFreeFunc)
      d  xmlMalloc                          like(xmlMallocFunc)
      d  xmlMemStrdup                       like(xmlStrdupFunc)
      d  xmlGenericErrorContext...
      d                                 *                                        void *
      d  oldXMLWDcompatibility...
-     d                               10i 0
+     d                                     like(xmlCint)
      d  xmlBufferAllocScheme...
      d                                     like(xmlBufferAllocationScheme)
      d  xmlDefaultBufferSize...
-     d                               10i 0
+     d                                     like(xmlCint)
      d  xmlSubstituteEntitiesDefaultValue...
-     d                               10i 0
+     d                                     like(xmlCint)
      d  xmlDoValidityCheckingDefaultValue...
-     d                               10i 0
+     d                                     like(xmlCint)
      d  xmlGetWarningsDefaultValue...
-     d                               10i 0
+     d                                     like(xmlCint)
      d  xmlKeepBlanksDefaultValue...
-     d                               10i 0
+     d                                     like(xmlCint)
      d  xmlLineNumbersDefaultValue...
-     d                               10i 0
+     d                                     like(xmlCint)
      d  xmlLoadExtDtdDefaultValue...
-     d                               10i 0
+     d                                     like(xmlCint)
      d  xmlParserDebugEntities...
-     d                               10i 0
+     d                                     like(xmlCint)
      d  xmlPedanticParserDefaultValue...
-     d                               10i 0
+     d                                     like(xmlCint)
      d  xmlSaveNoEmptyTags...
-     d                               10i 0
+     d                                     like(xmlCint)
      d  xmlIndentTreeOutput...
-     d                               10i 0
+     d                                     like(xmlCint)
      d  xmlTreeIndentString...
      d                                 *                                        const char *
      d  xmlRegisterNodeDefaultValue...
      d                                     like(xmlDeregisterNodeFunc)
      d  xmlMallocAtomic...
      d                                     like(xmlMallocFunc)
-     d  xmlLastError                       like(xmlError)
+     d  xmlLastError                       likeds(xmlError)
      d  xmlParserInputBufferCreateFilenameValue...
      d                                     like(xmlParserInputBuffer...
      d                                     CreateFilenameFunc)
      d get_docbDefaultSAXHandler...
      d                 pr                  extproc(
      d                                       '__get_docbDefaultSAXHandler')
-     d                                     like(xmlSAXHandlerV1)
+     d                                     likeds(xmlSAXHandlerV1)
 
      d set_docbDefaultSAXHandler...
      d                 pr                  extproc(
      d                                       '__set_docbDefaultSAXHandler')
-     d  value                              value like(xmlSAXHandlerV1)
+     d  value                              value likeds(xmlSAXHandlerV1)
       /endif
 
       /if defined(LIBXML_HTML_ENABLED)
      d get_htmlDefaultSAXHandler...
      d                 pr                  extproc(
      d                                       '__get_htmlDefaultSAXHandler')
-     d                                     like(xmlSAXHandlerV1)
+     d                                     likeds(xmlSAXHandlerV1)
 
      d set_htmlDefaultSAXHandler...
      d                 pr                  extproc(
      d                                       '__set_htmlDefaultSAXHandler')
-     d  value                              value like(xmlSAXHandlerV1)
+     d  value                              value likeds(xmlSAXHandlerV1)
       /endif
 
      d get_xmlLastError...
      d                 pr                  extproc('__get_xmlLastError')
-     d                                     like(xmlError)
+     d                                     likeds(xmlError)
 
      d set_xmlLastError...
      d                 pr                  extproc('__set_xmlLastError')
-     d  value                              value like(xmlError)
+     d  value                              value likeds(xmlError)
 
      d get_oldXMLWDcompatibility...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                       '__get_oldXMLWDcompatibility')
+     d                                     like(xmlCint)
 
      d set_oldXMLWDcompatibility...
      d                 pr                  extproc(
      d                                       '__set_oldXMLWDcompatibility')
-     d  value                        10i 0 value
+     d  value                              value like(xmlCint)
 
      d get_xmlBufferAllocScheme...
      d                 pr                  extproc('__get_xmlBufferAllocScheme')
      d  v                                  value like(xmlBufferAllocationScheme)
 
      d get_xmlDefaultBufferSize...
-     d                 pr            10i 0 extproc('__get_xmlDefaultBufferSize')
+     d                 pr                  extproc('__get_xmlDefaultBufferSize')
+     d                                     like(xmlCint)
 
      d set_xmlDefaultBufferSize...
      d                 pr                  extproc('__set_xmlDefaultBufferSize')
-     d  value                        10i 0 value
+     d  value                              value like(xmlCint)
 
      d xmlThrDefDefaultBufferSize...
-     d                 pr            10i 0 extproc('xmlThrDefDefaultBufferSize')
-     d  v                            10i 0 value
+     d                 pr                  extproc('xmlThrDefDefaultBufferSize')
+     d                                     like(xmlCint)
+     d  v                                  value like(xmlCint)
 
      d get_xmlDefaultSAXHandler...
      d                 pr                  extproc('__get_xmlDefaultSAXHandler')
-     d                                     like(xmlSAXHandlerV1)
+     d                                     likeds(xmlSAXHandlerV1)
 
      d set_xmlDefaultSAXHandler...
      d                 pr                  extproc('__set_xmlDefaultSAXHandler')
-     d  value                              value like(xmlSAXHandlerV1)
+     d  value                              value likeds(xmlSAXHandlerV1)
 
      d get_xmlDefaultSAXLocator...
      d                 pr                  extproc('__get_xmlDefaultSAXLocator')
-     d                                     like(xmlSAXLocator)
+     d                                     likeds(xmlSAXLocator)
 
      d set_xmlDefaultSAXLocator...
      d                 pr                  extproc('__set_xmlDefaultSAXLocator')
-     d  value                              value like(xmlSAXLocator)
+     d  value                              value likeds(xmlSAXLocator)
 
      d get_xmlDoValidityCheckingDefaultValue...
-     d                 pr            10i 0 extproc('__get_xmlDoValidity+
+     d                 pr                  extproc('__get_xmlDoValidity+
      d                                       CheckingDefaultValue')
+     d                                     like(xmlCint)
 
      d set_xmlDoValidityCheckingDefaultValue...
      d                 pr                  extproc('__set_xmlDoValidity+
      d                                       CheckingDefaultValue')
-     d  value                        10i 0 value
-    
+     d  value                              value like(xmlCint)
+
      d xmlThrDefDoValidityCheckingDefaultValue...
-     d                 pr            10i 0 extproc('xmlThrDefDoValidity+
+     d                 pr                  extproc('xmlThrDefDoValidity+
      d                                       CheckingDefaultValue')
-     d  v                            10i 0 value
+     d                                     like(xmlCint)
+     d  v                                  value like(xmlCint)
 
      d get_xmlGenericError...
      d                 pr                  extproc('__get_xmlGenericError')
      d xmlStructuredError...
      d                 pr                  extproc('__call_xmlStructuredError')
      d  userData                       *   value options(*string)               void *
-     d  error                              value like(xmlErrorPtr) 
+     d  error                              value like(xmlErrorPtr)
 
      d get_xmlGenericErrorContext...
      d                 pr                  extproc(
      d  value                          *   value options(*string)               void *
 
      d get_xmlGetWarningsDefaultValue...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                       '__get_xmlGetWarningsDefaultValue')
+     d                                     like(xmlCint)
 
      d set_xmlGetWarningsDefaultValue...
      d                 pr                  extproc(
      d                                       '__set_xmlGetWarningsDefaultValue')
-     d  value                        10i 0 value
+     d  value                              value like(xmlCint)
 
      d xmlThrDefGetWarningsDefaultValue...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                       'xmlThrDefGetWarningsDefaultValue')
-     d  v                            10i 0 value
+     d                                     like(xmlCint)
+     d  v                                  value like(xmlCint)
 
      d get_xmlIndentTreeOutput...
-     d                 pr            10i 0 extproc('__get_xmlIndentTreeOutput')
+     d                 pr                  extproc('__get_xmlIndentTreeOutput')
+     d                                     like(xmlCint)
 
      d set_xmlIndentTreeOutput...
-     d                 pr                   extproc('__set_xmlIndentTreeOutput')
-     d  value                        10i 0 value
+     d                 pr                  extproc('__set_xmlIndentTreeOutput')
+     d  value                              value like(xmlCint)
 
      d xmlThrDefIndentTreeOutput...
-     d                 pr            10i 0 extproc('xmlThrDefIndentTreeOutput')
-     d  v                            10i 0 value
+     d                 pr                  extproc('xmlThrDefIndentTreeOutput')
+     d                                     like(xmlCint)
+     d  v                                  value like(xmlCint)
 
      d get_xmlTreeIndentString...
      d                 pr              *   extproc('__get_xmlTreeIndentString') const char *
      d set_xmlTreeIndentString...
      d                 pr                  extproc('__set_xmlTreeIndentString')
      d  value                          *   value options(*string)               const char *
+
      d xmlThrDefTreeIndentString...
      d                 pr              *   extproc('xmlThrDefTreeIndentString') const char *
      d  v                              *   value options(*string)               const char *
 
      d get_xmlKeepBlanksDefaultValue...
-     d                 pr            10i 0 extproc(
-     d                                       '__get_xmlKeepBlanksDefaultValue') 
+     d                 pr                  extproc(
+     d                                       '__get_xmlKeepBlanksDefaultValue')
+     d                                     like(xmlCint)
 
      d set_xmlKeepBlanksDefaultValue...
      d                 pr                  extproc(
-     d                                       '__set_xmlKeepBlanksDefaultValue') 
-     d  value                        10i 0 value
+     d                                       '__set_xmlKeepBlanksDefaultValue')
+     d  value                              value like(xmlCint)
 
      d xmlThrDefKeepBlanksDefaultValue...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                       'xmlThrDefKeepBlanksDefaultValue')
-     d  v                            10i 0 value
+     d                                     like(xmlCint)
+     d  v                                  value like(xmlCint)
 
      d get_xmlLineNumbersDefaultValue...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                       '__get_xmlLineNumbersDefaultValue')
+     d                                     like(xmlCint)
 
      d set_xmlLineNumbersDefaultValue...
      d                 pr                  extproc(
      d                                       '__set_xmlLineNumbersDefaultValue')
-     d  value                        10i 0 value
+     d  value                              value like(xmlCint)
 
      d xmlThrDefLineNumbersDefaultValue...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                       'xmlThrDefLineNumbersDefaultValue')
-     d  v                            10i 0 value
+     d                                     like(xmlCint)
+     d  v                                  value like(xmlCint)
 
      d get_xmlLoadExtDtdDefaultValue...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                       '__get_xmlLoadExtDtdDefaultValue')
+     d                                     like(xmlCint)
 
      d set_xmlLoadExtDtdDefaultValue...
      d                 pr                  extproc(
      d                                       '__set_xmlLoadExtDtdDefaultValue')
-     d  value                        10i 0 value
+     d  value                              value like(xmlCint)
 
      d xmlThrDefLoadExtDtdDefaultValue...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                       'xmlThrDefLoadExtDtdDefaultValue')
-     d  v                            10i 0 value
+     d                                     like(xmlCint)
+     d  v                                  value like(xmlCint)
 
      d get_xmlParserDebugEntities...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                       '__get_xmlParserDebugEntities')
+     d                                     like(xmlCint)
 
      d set_xmlParserDebugEntities...
      d                 pr                  extproc(
      d                                       '__set_xmlParserDebugEntities')
-     d  value                        10i 0 value
+     d  value                              value like(xmlCint)
 
      d xmlThrDefParserDebugEntities...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                       'xmlThrDefParserDebugEntities')
-     d  v                            10i 0 value
+     d                                     like(xmlCint)
+     d  v                                  value like(xmlCint)
 
      d get_xmlParserVersion...
      d                 pr              *   extproc('__get_xmlParserVersion')    const char *
      d  value                          *   value options(*string)               const char *
 
      d get_xmlPedanticParserDefaultValue...
-     d                 pr            10i 0 extproc('__get_xmlPedantic+
+     d                 pr                  extproc('__get_xmlPedantic+
      d                                       ParserDefaultValue')
+     d                                     like(xmlCint)
 
      d set_xmlPedanticParserDefaultValue...
      d                 pr                  extproc('__set_xmlPedantic+
      d                                       ParserDefaultValue')
-     d  value                        10i 0 value
+     d  value                              value like(xmlCint)
 
      d xmlThrDefPedanticParserDefaultValue...
-     d                 pr            10i 0 extproc('xmlThrDefPedantic+
+     d                 pr                  extproc('xmlThrDefPedantic+
      d                                       ParserDefaultValue')
-     d  v                            10i 0 value
+     d                                     like(xmlCint)
+     d  v                                  value like(xmlCint)
 
      d get_xmlSaveNoEmptyTags...
-     d                 pr            10i 0 extproc('__get_xmlSaveNoEmptyTags')
+     d                 pr                  extproc('__get_xmlSaveNoEmptyTags')
+     d                                     like(xmlCint)
 
      d set_xmlSaveNoEmptyTags...
      d                 pr                  extproc('__set_xmlSaveNoEmptyTags')
-     d  value                        10i 0 value
+     d  value                              value like(xmlCint)
 
      d xmlThrDefSaveNoEmptyTags...
-     d                 pr            10i 0 extproc('xmlThrDefSaveNoEmptyTags')
-     d  v                            10i 0 value
+     d                 pr                  extproc('xmlThrDefSaveNoEmptyTags')
+     d                                     like(xmlCint)
+     d  v                                  value like(xmlCint)
 
      d get_xmlSubstituteEntitiesDefaultValue...
-     d                 pr            10i 0 extproc('__get_xmlSubstitute+
+     d                 pr                  extproc('__get_xmlSubstitute+
      d                                       EntitiesDefaultValue')
+     d                                     like(xmlCint)
 
      d set_xmlSubstituteEntitiesDefaultValue...
      d                 pr                  extproc('__set_xmlSubstitute+
      d                                       EntitiesDefaultValue')
-     d  value                        10i 0 value
+     d  value                              value like(xmlCint)
 
      d xmlThrDefSubstituteEntitiesDefaultValue...
-     d                 pr            10i 0 extproc('xmlThrDefSubstitute+
+     d                 pr                  extproc('xmlThrDefSubstitute+
      d                                       EntitiesDefaultValue')
-     d  v                            10i 0 value
+     d                                     like(xmlCint)
+     d  v                                  value like(xmlCint)
 
      d get_xmlRegisterNodeDefaultValue...
      d                 pr                  extproc('__get_xmlRegisterNode+
      d                                     like(xmlOutputBufferPtr)
      d  URI                            *   value options(*string)               const char *
      d  encoder                            value like(xmlCharEncodingHandlerPtr)
-     d  compression                  10i 0 value
+     d  compression                        value like(xmlCint)
 
       /endif                                                                    XML_GLOBALS_H
index 867f98f..b2169df 100644 (file)
@@ -9,6 +9,8 @@
       /if not defined(XML_HASH_H__)
       /define XML_HASH_H__
 
+      /include "libxmlrpg/xmlTypesC"
+
       * The hash table.
 
      d xmlHashTablePtr...
 
      d xmlHashCreate   pr                  extproc('xmlHashCreate')
      d                                     like(xmlHashTablePtr)
-     d  size                         10i 0 value
+     d  size                               value like(xmlCint)
 
      d xmlHashCreateDict...
      d                 pr                  extproc('xmlHashCreateDict')
      d                                     like(xmlHashTablePtr)
-     d  size                         10i 0 value
+     d  size                               value like(xmlCint)
      d  dict                               value like(xmlDictPtr)
 
      d xmlHashFree     pr                  extproc('xmlHashFree')
       * Add a new entry to the hash table.
 
      d xmlHashAddEntry...
-     d                 pr            10i 0 extproc('xmlHashAddEntry')
+     d                 pr                  extproc('xmlHashAddEntry')
+     d                                     like(xmlCint)
      d  table                              value like(xmlHashTablePtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  userdata                       *   value options(*string)               void *
 
      d xmlHashUpdateEntry...
-     d                 pr            10i 0 extproc('xmlHashUpdateEntry')
+     d                 pr                  extproc('xmlHashUpdateEntry')
+     d                                     like(xmlCint)
      d  table                              value like(xmlHashTablePtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  userdata                       *   value options(*string)               void *
      d  f                                  value like(xmlHashDeallocator)
 
      d xmlHashAddEntry2...
-     d                 pr            10i 0 extproc('xmlHashAddEntry2')
+     d                 pr                  extproc('xmlHashAddEntry2')
+     d                                     like(xmlCint)
      d  table                              value like(xmlHashTablePtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  name2                          *   value options(*string)               const xmlChar *
      d  userdata                       *   value options(*string)               void *
 
      d xmlHashUpdateEntry2...
-     d                 pr            10i 0 extproc('xmlHashUpdateEntry2')
+     d                 pr                  extproc('xmlHashUpdateEntry2')
+     d                                     like(xmlCint)
      d  table                              value like(xmlHashTablePtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  name2                          *   value options(*string)               const xmlChar *
      d  f                                  value like(xmlHashDeallocator)
 
      d xmlHashAddEntry3...
-     d                 pr            10i 0 extproc('xmlHashAddEntry3')
+     d                 pr                  extproc('xmlHashAddEntry3')
+     d                                     like(xmlCint)
      d  table                              value like(xmlHashTablePtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  name2                          *   value options(*string)               const xmlChar *
      d  userdata                       *   value options(*string)               void *
 
      d xmlHashUpdateEntry3...
-     d                 pr            10i 0 extproc('xmlHashUpdateEntry3')
+     d                 pr                  extproc('xmlHashUpdateEntry3')
+     d                                     like(xmlCint)
      d  table                              value like(xmlHashTablePtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  name2                          *   value options(*string)               const xmlChar *
       * Remove an entry from the hash table.
 
      d xmlHashRemoveEntry...
-     d                 pr            10i 0 extproc('xmlHashRemoveEntry')
+     d                 pr                  extproc('xmlHashRemoveEntry')
+     d                                     like(xmlCint)
      d  table                              value like(xmlHashTablePtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  f                                  value like(xmlHashDeallocator)
 
      d xmlHashRemoveEntry2...
-     d                 pr            10i 0 extproc('xmlHashRemoveEntry2')
+     d                 pr                  extproc('xmlHashRemoveEntry2')
+     d                                     like(xmlCint)
      d  table                              value like(xmlHashTablePtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  name2                          *   value options(*string)               const xmlChar *
      d  f                                  value like(xmlHashDeallocator)
 
      d xmlHashRemoveEntry3...
-     d                 pr            10i 0 extproc('xmlHashRemoveEntry3')
+     d                 pr                  extproc('xmlHashRemoveEntry3')
+     d                                     like(xmlCint)
      d  table                              value like(xmlHashTablePtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  name2                          *   value options(*string)               const xmlChar *
      d  table                              value like(xmlHashTablePtr)
      d  f                                  value like(xmlHashCopier)
 
-     d xmlHashSize     pr            10i 0 extproc('xmlHashSize')
+     d xmlHashSize     pr                  extproc('xmlHashSize')
+     d                                     like(xmlCint)
      d  table                              value like(xmlHashTablePtr)
 
      d xmlHashScan     pr                  extproc('xmlHashScan')
index c62fcbd..ce2fa1c 100644 (file)
@@ -10,6 +10,7 @@
       /define XML_LINK_INCLUDE__
 
       /include "libxmlrpg/xmlversion"
+      /include "libxmlrpg/xmlTypesC"
 
      d xmlLinkPtr      s               *   based(######typedef######)
 
      d  l                                  value like(xmlListPtr)
      d  data                           *   value                                void *
 
-     d xmlListInsert   pr            10i 0 extproc('xmlListInsert')
+     d xmlListInsert   pr                  extproc('xmlListInsert')
+     d                                     like(xmlCint)
      d  l                                  value like(xmlListPtr)
      d  data                           *   value                                void *
 
-     d xmlListAppend   pr            10i 0 extproc('xmlListAppend')
+     d xmlListAppend   pr                  extproc('xmlListAppend')
+     d                                     like(xmlCint)
      d  l                                  value like(xmlListPtr)
      d  data                           *   value                                void *
 
      d xmlListRemoveFirst...
-     d                 pr            10i 0 extproc('xmlListRemoveFirst')
+     d                 pr                  extproc('xmlListRemoveFirst')
+     d                                     like(xmlCint)
      d  l                                  value like(xmlListPtr)
      d  data                           *   value                                void *
 
      d xmlListRemoveLast...
-     d                 pr            10i 0 extproc('xmlListRemoveLast')
+     d                 pr                  extproc('xmlListRemoveLast')
+     d                                     like(xmlCint)
      d  l                                  value like(xmlListPtr)
      d  data                           *   value                                void *
 
      d xmlListRemoveAll...
-     d                 pr            10i 0 extproc('xmlListRemoveAll')
+     d                 pr                  extproc('xmlListRemoveAll')
+     d                                     like(xmlCint)
      d  l                                  value like(xmlListPtr)
      d  data                           *   value                                void *
 
      d xmlListClear    pr                  extproc('xmlListClear')
      d  l                                  value like(xmlListPtr)
 
-     d xmlListEmpty    pr            10i 0 extproc('xmlListEmpty')
+     d xmlListEmpty    pr                  extproc('xmlListEmpty')
+     d                                     like(xmlCint)
      d  l                                  value like(xmlListPtr)
 
      d xmlListFront    pr                  extproc('xmlListFront')
      d                                     like(xmlLinkPtr)
      d  l                                  value like(xmlListPtr)
 
-     d xmlListSize     pr            10i 0 extproc('xmlListSize')
+     d xmlListSize     pr                  extproc('xmlListSize')
+     d                                     like(xmlCint)
      d  l                                  value like(xmlListPtr)
 
      d xmlListPopFront...
      d  l                                  value like(xmlListPtr)
 
      d xmlListPushFront...
-     d                 pr            10i 0 extproc('xmlListPushFront')
+     d                 pr                  extproc('xmlListPushFront')
+     d                                     like(xmlCint)
      d  l                                  value like(xmlListPtr)
      d  data                           *   value                                void *
 
      d xmlListPushBack...
-     d                 pr            10i 0 extproc('xmlListPushBack')
+     d                 pr                  extproc('xmlListPushBack')
+     d                                     like(xmlCint)
      d  l                                  value like(xmlListPtr)
      d  data                           *   value                                void *
 
      d                                     like(xmlListPtr)
      d  old                                value like(xmlListPtr)
 
-     d xmlListCopy     pr            10i 0 extproc('xmlListCopy')
+     d xmlListCopy     pr                  extproc('xmlListCopy')
+     d                                     like(xmlCint)
      d  cur                                value like(xmlListPtr)
      d  old                                value like(xmlListPtr)               const
 
index 0637562..ac4f2aa 100644 (file)
@@ -9,10 +9,12 @@
       /if not defined(NANO_FTP_H__)
       /define NANO_FTP_H__
 
-      /include /libxmlrpg/xmlversion"
+      /include "libxmlrpg/xmlversion"
 
       /if defined(LIBXML_FTP_ENABLED)
 
+      /include "libxmlrpg/xmlTypesC"
+
      d INVALID_SOCKET  c                   -1
 
       * ftpListCallback:
@@ -67,7 +69,7 @@
      d xmlNanoFTPConnectTo...
      d                 pr              *   extproc('xmlNanoFTPConnectTo')       void *
      d  server                         *   value options(*string)               const char *
-     d  port                         10i 0 value
+     d  port                               value like(xmlCint)
 
       * Opening/closing session connections.
 
      d  URL                            *   value options(*string)               const char *
 
      d xmlNanoFTPConnect...
-     d                 pr            10i 0 extproc('xmlNanoFTPConnect')
+     d                 pr                  extproc('xmlNanoFTPConnect')
+     d                                     like(xmlCint)
      d  ctx                            *   value                                void *
 
      d xmlNanoFTPClose...
-     d                 pr            10i 0 extproc('xmlNanoFTPClose')
+     d                 pr                  extproc('xmlNanoFTPClose')
+     d                                     like(xmlCint)
      d  ctx                            *   value                                void *
 
-     d xmlNanoFTPQuit  pr            10i 0 extproc('xmlNanoFTPQuit')
+     d xmlNanoFTPQuit  pr                  extproc('xmlNanoFTPQuit')
+     d                                     like(xmlCint)
      d  ctx                            *   value                                void *
 
      d xmlNanoFTPScanProxy...
      d xmlNanoFTPProxy...
      d                 pr                  extproc('xmlNanoFTPProxy')
      d  host                           *   value options(*string)               const char *
-     d  port                         10i 0 value
+     d  port                               value like(xmlCint)
      d  user                           *   value options(*string)               const char *
      d  passwd                         *   value options(*string)               const char *
-     d  type                         10i 0 value
+     d  type                               value like(xmlCint)
 
      d xmlNanoFTPUpdateURL...
-     d                 pr            10i 0 extproc('xmlNanoFTPUpdateURL')
+     d                 pr                  extproc('xmlNanoFTPUpdateURL')
+     d                                     like(xmlCint)
      d  ctx                            *   value                                void *
      d  URL                            *   value options(*string)               const char *
 
       * Rather internal commands.
 
      d xmlNanoFTPGetResponse...
-     d                 pr            10i 0 extproc('xmlNanoFTPGetResponse')
+     d                 pr                  extproc('xmlNanoFTPGetResponse')
+     d                                     like(xmlCint)
      d  ctx                            *   value                                void *
 
      d xmlNanoFTPCheckResponse...
-     d                 pr            10i 0 extproc('xmlNanoFTPCheckResponse')
+     d                 pr                  extproc('xmlNanoFTPCheckResponse')
+     d                                     like(xmlCint)
      d  ctx                            *   value                                void *
 
       * CD/DIR/GET handlers.
 
-     d xmlNanoFTPCwd   pr            10i 0 extproc('xmlNanoFTPCwd')
+     d xmlNanoFTPCwd   pr                  extproc('xmlNanoFTPCwd')
+     d                                     like(xmlCint)
      d  ctx                            *   value                                void *
      d  directory                      *   value options(*string)               const char *
 
-     d xmlNanoFTPDele  pr            10i 0 extproc('xmlNanoFTPDele')
+     d xmlNanoFTPDele  pr                  extproc('xmlNanoFTPDele')
+     d                                     like(xmlCint)
      d  ctx                            *   value                                void *
      d  file                           *   value options(*string)               const char *
 
      d xmlNanoFTPGetConnection...
-     d                 pr            10i 0 extproc('xmlNanoFTPGetConnection')   Socket descriptor
+     d                 pr                  extproc('xmlNanoFTPGetConnection')   Socket descriptor
+     d                                     like(xmlCint)
      d  ctx                            *   value                                void *
 
      d xmlNanoFTPCloseConnection...
-     d                 pr            10i 0 extproc('xmlNanoFTPCloseConnection')
+     d                 pr                  extproc('xmlNanoFTPCloseConnection')
+     d                                     like(xmlCint)
      d  ctx                            *   value                                void *
 
-     d xmlNanoFTPList  pr            10i 0 extproc('xmlNanoFTPList')
+     d xmlNanoFTPList  pr                  extproc('xmlNanoFTPList')
+     d                                     like(xmlCint)
      d  ctx                            *   value                                void *
      d  callback                           value like(ftpListCallback)
      d  userData                       *   value                                void *
      d  filename                       *   value options(*string)               const char *
 
      d xmlNanoFTPGetSocket...
-     d                 pr            10i 0 extproc('xmlNanoFTPGetSocket')       Socket descriptor
+     d                 pr                  extproc('xmlNanoFTPGetSocket')       Socket descriptor
+     d                                     like(xmlCint)
      d  ctx                            *   value                                void *
      d  filename                       *   value options(*string)               const char *
 
-     d xmlNanoFTPGet   pr            10i 0 extproc('xmlNanoFTPGet')
+     d xmlNanoFTPGet   pr                  extproc('xmlNanoFTPGet')
+     d                                     like(xmlCint)
      d  ctx                            *   value                                void *
      d  callback                           value like(ftpDataCallback)
      d  userData                       *   value                                void *
      d  filename                       *   value options(*string)               const char *
 
-     d xmlNanoFTPRead  pr            10i 0 extproc('xmlNanoFTPRead')
+     d xmlNanoFTPRead  pr                  extproc('xmlNanoFTPRead')
+     d                                     like(xmlCint)
      d  ctx                            *   value                                void *
      d  dest                           *   value                                void *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
       /endif                                                                    LIBXML_FTP_ENABLED
       /endif                                                                    NANO_FTP_H__
index 4a076d2..d4e6008 100644 (file)
@@ -13,6 +13,8 @@
 
       /if defined(LIBXML_HTTP_ENABLED)
 
+      /include "libxmlrpg/xmlTypesC"
+
      d xmlNanoHTTPInit...
      d                 pr                  extproc('xmlNanoHTTPInit')
 
@@ -24,7 +26,8 @@
      d  URL                            *   value options(*string)               const char *
 
      d xmlNanoHTTPFetch...
-     d                 pr            10i 0 extproc('xmlNanoHTTPFetch')
+     d                 pr                  extproc('xmlNanoHTTPFetch')
+     d                                     like(xmlCint)
      d  URL                            *   value options(*string)               const char *
      d  filename                       *   value options(*string)               const char *
 
@@ -35,7 +38,7 @@
      d  input                          *   value options(*string)               const char *
      d  contentType                    *   value                                char * *
      d  headers                        *   value options(*string)               const char *
-     d  ilen                         10i 0 value
+     d  ilen                               value like(xmlCint)
 
      d xmlNanoHTTPMethodRedir...
      d                 pr              *   extproc('xmlNanoHTTPMethodRedir')    void *
@@ -45,7 +48,7 @@
      d  contentType                    *   value                                char * *
      d  redir                          *   value                                char * *
      d  headers                        *   value options(*string)               const char *
-     d  ilen                         10i 0 value
+     d  ilen                               value like(xmlCint)
 
      d xmlNanoHTTPOpen...
      d                 pr              *   extproc('xmlNanoHTTPOpen')           void *
@@ -59,7 +62,8 @@
      d  redir                          *   value                                char * *
 
      d xmlNanoHTTPReturnCode...
-     d                 pr            10i 0 extproc('xmlNanoHTTPReturnCode')
+     d                 pr                  extproc('xmlNanoHTTPReturnCode')
+     d                                     like(xmlCint)
      d  ctx                            *   value                                void *
 
      d xmlNanoHTTPAuthHeader...
@@ -71,7 +75,8 @@
      d  ctx                            *   value                                void *
 
      d xmlNanoHTTPContentLength...
-     d                 pr            10i 0 extproc('xmlNanoHTTPContentLength')
+     d                 pr                  extproc('xmlNanoHTTPContentLength')
+     d                                     like(xmlCint)
      d  ctx                            *   value                                void *
 
      d xmlNanoHTTPEncoding...
      d  ctx                            *   value                                void *
 
      d xmlNanoHTTPRead...
-     d                 pr            10i 0 extproc('xmlNanoHTTPRead')
+     d                 pr                  extproc('xmlNanoHTTPRead')
+     d                                     like(xmlCint)
      d  ctx                            *   value                                void *
      d  dest                           *   value                                void *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
       /if defined(LIBXML_OUTPUT_ENABLED)
      d xmlNanoHTTPSave...
-     d                 pr            10i 0 extproc('xmlNanoHTTPSave')
+     d                 pr                  extproc('xmlNanoHTTPSave')
+     d                                     like(xmlCint)
      d  ctxt                           *   value                                void *
      d  filename                       *   value options(*string)               const char *
       /endif                                                                    LIBXML_OUTPUT_ENABLD
index 7f29e31..fa48d4f 100644 (file)
@@ -9,6 +9,7 @@
       /define XML_PARSER_H__
 
       /include "libxmlrpg/xmlversion"
+      /include "libxmlrpg/xmlTypesC"
       /include "libxmlrpg/tree"
       /include "libxmlrpg/dict"
       /include "libxmlrpg/hash"
      d  base                           *                                        const char *
      d  cur                            *                                        const char *
      d  end                            *                                        const char *
-     d  length                       10i 0                                      Length if known
-     d  line                         10i 0                                      Current line
-     d  col                          10i 0                                      Current column
+     d  length                             like(xmlCint)                        Length if known
+     d  line                               like(xmlCint)                        Current line
+     d  col                                like(xmlCint)                        Current column
       *
       * NOTE: consumed is only tested for equality in the parser code,
       *       so even if there is an overflow this should not give troubles
       *       for parsing very large instances.
       *
-     d  consumed                     20u 0                                      # consumed xmlChars
+     d  consumed                           like(xmlCulong)                      # consumed xmlChars
      d  free                               like(xmlParserInputDeallocate)       base deallocator
      d  encoding                       *                                        const xmlChar *
      d  version                        *                                        const xmlChar *
-     d  standalone                   10i 0                                      Standalone entity ?
-     d  id                           10i 0                                      Entity unique ID
+     d  standalone                         like(xmlCint)                        Standalone entity ?
+     d  id                                 like(xmlCint)                        Entity unique ID
 
       * xmlParserNodeInfo:
       *
      d                                     align qualified
      d  node                               like(xmlNodePtr)                     const
       * Position & line # that text that created the node begins & ends on
-     d  begin_pos                    20u 0
-     d  begin_line                   20u 0
-     d  end_pos                      20u 0
-     d  end_line                     20u 0
+     d  begin_pos                          like(xmlCulong)
+     d  begin_line                         like(xmlCulong)
+     d  end_pos                            like(xmlCulong)
+     d  end_line                           like(xmlCulong)
 
      d xmlParserNodeInfoSeqPtr...
      d                 s               *   based(######typedef######)
@@ -92,8 +93,8 @@
      d xmlParserNodeInfoSeq...
      d                 ds                  based(xmlParserNodeInfoSeqPtr)
      d                                     align qualified
-     d  maximum                      20u 0
-     d  length                       20u 0
+     d  maximum                            like(xmlCulong)
+     d  length                             like(xmlCulong)
      d  buffer                             like(xmlParserNodeInfoPtr)
 
       * xmlParserInputState:
       * The recursive one use the state info for entities processing.
 
      d xmlParserInputState...
-     d                 s             10i 0 based(######typedef######)           enum
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_PARSER_EOF...                                                       Nothing to parse
      d                 c                   -1
      d  XML_PARSER_START...                                                     Nothing parsed
       *
       * A parser can operate in various modes
 
-     d xmlParserMode   s             10i 0 based(######typedef######)           enum
+     d xmlParserMode   s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_PARSE_UNKNOWN...
      d                 c                   0
      d  XML_PARSE_DOM...
      d  sax                                like(xmlSAXHandlerPtr)               The SAX handler
      d  userData                       *                                        SAX only-4 DOM build
      d  myDoc                              like(xmlDocPtr)                      Document being built
-     d  wellFormed                   10i 0                                      Well formed doc ?
+     d  wellFormed                         like(xmlCint)                        Well formed doc ?
      d  replaceEntities...                                                      Replace entities ?
-     d                               10i 0
+     d                                     like(xmlCint)
      d  version                        *                                        const xmlChar *
      d  encoding                       *                                        const xmlChar *
-     d  standalone                   10i 0                                      Standalone document
-     d  html                         10i 0                                      HTML state/type
+     d  standalone                         like(xmlCint)                        Standalone document
+     d  html                               like(xmlCint)                        HTML state/type
       *
       * Input stream stack
       *
      d  input                              like(xmlParserInputPtr)              Current input stream
-     d  inputNr                      10i 0                                      # current in streams
-     d  inputMax                     10i 0                                      Max # of in streams
+     d  inputNr                            like(xmlCint)                        # current in streams
+     d  inputMax                           like(xmlCint)                        Max # of in streams
      d  inputTab                       *                                        xmlParserInputPtr *
       *
       * Node analysis stack only used for DOM building
       *
      d  node                               like(xmlNodePtr)                     Current parsed node
-     d  nodeNr                       10i 0                                      Parsing stack depth
-     d  nodeMax                      10i 0                                      Max stack depth
+     d  nodeNr                             like(xmlCint)                        Parsing stack depth
+     d  nodeMax                            like(xmlCint)                        Max stack depth
      d  nodeTab                        *                                        xmlNodePtr *
       *
-     d  record_info                  10i 0                                      Keep node info ?
-     d  node_seq                           like(xmlParserNodeInfoSeq)           Parsed nodes info
+     d  record_info                        like(xmlCint)                        Keep node info ?
+     d  node_seq                           likeds(xmlParserNodeInfoSeq)         Parsed nodes info
       *
-     d  errNo                        10i 0                                      Error code
+     d  errNo                              like(xmlCint)                        Error code
       *
      d  hasExternalSubset...
-     d                               10i 0
-     d  hashPErefs                   10i 0
-     d  external                     10i 0                                      Parsing ext. entity?
+     d                                     like(xmlCint)
+     d  hasPErefs                          like(xmlCint)
+     d  external                           like(xmlCint)                        Parsing ext. entity?
       *
-     d  valid                        10i 0                                      Valid document ?
-     d  validate                     10i 0                                      Try to validate ?
-     d  vctxt                              like(xmlValidCtxt)                   Validity context
+     d  valid                              like(xmlCint)                        Valid document ?
+     d  validate                           like(xmlCint)                        Try to validate ?
+     d  vctxt                              likeds(xmlValidCtxt)                 Validity context
       *
      d  instate                            like(xmlParserInputState)            Current input type
-     d  token                        10i 0                                      Next look-ahead char
+     d  token                              like(xmlCint)                        Next look-ahead char
       *
      d  directory                      *                                        char *
       *
       * Node name stack
       *
      d  name                           *                                        const xmlChar *
-     d  nameNr                       10i 0                                      Parsing stack depth
-     d  nameMax                      10i 0                                      Max stack depth
+     d  nameNr                             like(xmlCint)                        Parsing stack depth
+     d  nameMax                            like(xmlCint)                        Max stack depth
      d  nameTab                        *                                        const xmlChar * *
       *
-     d  nbChars                      20i 0                                      # xmlChars processed
-     d  checkIndex                   20i 0                                      4 progressive parse
-     d  keepBlanks                   10i 0                                      Ugly but ...
-     d  disableSAX                   10i 0                                      Disable SAX cllbacks
-     d  inSubset                     10i 0                                      In int 1/ext 2 sbset
+     d  nbChars                            like(xmlClong)                       # xmlChars processed
+     d  checkIndex                         like(xmlClong)                       4 progressive parse
+     d  keepBlanks                         like(xmlCint)                        Ugly but ...
+     d  disableSAX                         like(xmlCint)                        Disable SAX cllbacks
+     d  inSubset                           like(xmlCint)                        In int 1/ext 2 sbset
      d  intSubName                     *                                        const xmlChar *
      d  extSubURI                      *                                        const xmlChar *
      d  extSubSytem                    *                                        const xmlChar *
       * xml:space values
       *
      d  space                          *                                        int *
-     d  spaceNr                      10i 0                                      Parsing stack depth
-     d  spaceMax                     10i 0                                      Max stack depth
+     d  spaceNr                            like(xmlCint)                        Parsing stack depth
+     d  spaceMax                           like(xmlCint)                        Max stack depth
      d  spaceTab                       *                                        int *
       *
-     d  depth                        10i 0                                      To detect loops
+     d  depth                              like(xmlCint)                        To detect loops
      d  entity                             like(xmlParserInputPtr)              To check boundaries
-     d  charset                      10i 0                                      In-memory content
-     d  nodelen                      10i 0                                      Speed up parsing
-     d  nodemem                      10i 0                                      Speed up parsing
-     d  pedantic                     10i 0                                      Enb. pedantic warng
+     d  charset                            like(xmlCint)                        In-memory content
+     d  nodelen                            like(xmlCint)                        Speed up parsing
+     d  nodemem                            like(xmlCint)                        Speed up parsing
+     d  pedantic                           like(xmlCint)                        Enb. pedantic warng
      d  #private                       *                                        void *
       *
-     d  loadsubset                   10i 0                                      Load ext. subset ?
-     d  linenumbers                  10i 0                                      Set line numbers ?
+     d  loadsubset                         like(xmlCint)                        Load ext. subset ?
+     d  linenumbers                        like(xmlCint)                        Set line numbers ?
      d  catalogs                       *                                        void *
-     d  recovery                     10i 0                                      Run in recovery mode
-     d  progressive                  10i 0                                      Progressive parsing?
+     d  recovery                           like(xmlCint)                        Run in recovery mode
+     d  progressive                        like(xmlCint)                        Progressive parsing?
      d  dict                               like(xmlDictPtr)                     Parser dictionary
      d  atts                           *                                        const xmlChar *
-     d  maxatts                      10i 0                                      Above array size
-     d  docdict                      10i 0                                      Use dictionary ?
+     d  maxatts                            like(xmlCint)                        Above array size
+     d  docdict                            like(xmlCint)                        Use dictionary ?
       *
       * pre-interned strings
       *
       *
       * Everything below is used only by the new SAX mode
       *
-     d  sax2                         10i 0                                      New SAX mode ?
-     d  nsNr                         10i 0                                      # inherited nmspaces
-     d  nsMax                        10i 0                                      Array size
+     d  sax2                               like(xmlCint)                        New SAX mode ?
+     d  nsNr                               like(xmlCint)                        # inherited nmspaces
+     d  nsMax                              like(xmlCint)                        Array size
      d  nsTab                          *                                        const xmlChar *
      d  attallocs                      *                                        int *
      d  pushTab                        *                                        void *
      d  attsDefault                        like(xmlHashTablePtr)                Defaulted attrs
      d  attsSpecial                        like(xmlHashTablePtr)                non-CDATA attrs
-     d  nsWellFormed                 10i 0                                      Doc namespace OK ?
-     d  options                      10i 0                                      Extra options
+     d  nsWellFormed                       like(xmlCint)                        Doc namespace OK ?
+     d  options                            like(xmlCint)                        Extra options
       *
       * Those fields are needed only for treaming parsing so far
       *
-     d  dictNames                    10i 0                                      Dict names in tree ?
-     d  freeElemsNr                  10i 0                                      # free element nodes
+     d  dictNames                          like(xmlCint)                        Dict names in tree ?
+     d  freeElemsNr                        like(xmlCint)                        # free element nodes
      d  freeElems                          like(xmlNodePtr)                     Free elem nodes list
-     d  freeAttrsNr                  10i 0                                      # free attr. nodes
+     d  freeAttrsNr                        like(xmlCint)                        # free attr. nodes
      d  freeAttrs                          like(xmlAttrPtr)                     Free attr noes list
       *
       * the complete error informations for the last error.
       *
-     d  lastError                          like(xmlError)
+     d  lastError                          likeds(xmlError)
      d  parseMode                          like(xmlParserMode)                  The parser mode
-     d  nbentities                   20u 0                                      # entity references
-     d  sizeentities                 20u 0                                      Parsed entities size
+     d  nbentities                         like(xmlCulong)                      # entity references
+     d  sizeentities                       like(xmlCulong)                      Parsed entities size
       *
       * for use by HTML non-recursive parser
       *
-     d  nodeInfo                           like(xmlParserNodeInfo)              Current NodeInfo
-     d  nodeInfoNr                   10i 0                                      Parsing stack depth
-     d  nodeInfoMax                  10i 0                                      Max stack depth
+     d  nodeInfo                           like(xmlParserNodeInfoPtr)           Current NodeInfo
+     d  nodeInfoNr                         like(xmlCint)                        Parsing stack depth
+     d  nodeInfoMax                        like(xmlCint)                        Max stack depth
      d  nodeInfoTab                    *                                        xmlParserNodeInfo *
       *
-     d  input_id                     10i 0                                      Label inputs ?
-     d  sizeentcopy                  20u 0                                      Entity copy volume
+     d  input_id                           like(xmlCint)                        Label inputs ?
+     d  sizeentcopy                        like(xmlCulong)                      Entity copy volume
 
       * xmlSAXLocator:
       *
      d  cdataBlock                         like(cdataBlockSAXFunc)
      d  externalSubset...
      d                                     like(externalSubsetSAXFunc)
-     d  initialized                  10u 0
+     d  initialized                        like(xmlCuint)
       *
       * The following fields are extensions available only on version 2
       *
      d  cdataBlock                         like(cdataBlockSAXFunc)
      d  externalSubset...
      d                                     like(externalSubsetSAXFunc)
-     d  initialized                  10u 0
+     d  initialized                        like(xmlCuint)
 
       * xmlExternalEntityLoader:
       * @URL: The System ID of the resource requested
       * Input functions
 
      d xmlParserInputRead...
-     d                 pr            10i 0 extproc('xmlParserInputRead')
+     d                 pr                  extproc('xmlParserInputRead')
+     d                                     like(xmlCint)
      d  in                                 value like(xmlParserInputPtr)
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
      d xmlParserInputGrow...
-     d                 pr            10i 0 extproc('xmlParserInputGrow')
+     d                 pr                  extproc('xmlParserInputGrow')
+     d                                     like(xmlCint)
      d  in                                 value like(xmlParserInputPtr)
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
       * Basic parsing Interfaces
 
      d xmlParseMemory  pr                  extproc('xmlParseMemory')
      d                                     like(xmlDocPtr)
      d  buffer                         *   value options(*string)               const char *
-     d  size                         10i 0 value
+     d  size                               value like(xmlCint)
       /endif                                                                    LIBXML_SAX1_ENABLED
 
      d xmlSubstituteEntitiesDefault...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                      'xmlSubstituteEntitiesDefault')
-     d  val                          10i 0 value
+     d                                     like(xmlCint)
+     d  val                                value like(xmlCint)
 
      d xmlKeepBlanksDefault...
-     d                 pr            10i 0 extproc('xmlKeepBlanksDefault')
-     d  val                          10i 0 value
+     d                 pr                  extproc('xmlKeepBlanksDefault')
+     d                                     like(xmlCint)
+     d  val                                value like(xmlCint)
 
      d xmlStopParser   pr                  extproc('xmlStopParser')
      d  ctxt                               value like(xmlParserCtxtPtr)
 
      d xmlPedanticParserDefault...
-     d                 pr            10i 0 extproc('xmlPedanticParserDefault')
-     d  val                          10i 0 value
+     d                 pr                  extproc('xmlPedanticParserDefault')
+     d                                     like(xmlCint)
+     d  val                                value like(xmlCint)
 
      d xmlLineNumbersDefault...
-     d                 pr            10i 0 extproc('xmlLineNumbersDefault')
-     d  val                          10i 0 value
+     d                 pr                  extproc('xmlLineNumbersDefault')
+     d                                     like(xmlCint)
+     d  val                                value like(xmlCint)
 
       /if defined(LIBXML_SAX1_ENABLED)
       * Recovery mode
      d                 pr                  extproc('xmlRecoverMemory')
      d                                     like(xmlDocPtr)
      d  buffer                         *   value options(*string)               const char *
-     d  size                         10i 0 value
+     d  size                               value like(xmlCint)
 
      d xmlRecoverFile  pr                  extproc('xmlRecoverFile')
      d                                     like(xmlDocPtr)
       * Less common routines and SAX interfaces
 
      d xmlParseDocument...
-     d                 pr            10i 0 extproc('xmlParseDocument')
+     d                 pr                  extproc('xmlParseDocument')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlParserCtxtPtr)
 
      d xmlParseExtParsedEnt...
-     d                 pr            10i 0 extproc('xmlParseExtParsedEnt')
+     d                 pr                  extproc('xmlParseExtParsedEnt')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlParserCtxtPtr)
 
       /if defined(LIBXML_SAX1_ENABLED)
      d xmlSAXUserParseFile...
-     d                 pr            10i 0 extproc('xmlSAXUserParseFile')
+     d                 pr                  extproc('xmlSAXUserParseFile')
+     d                                     like(xmlCint)
      d  sax                                value like(xmlSAXHandlerPtr)
      d  user_data                      *   value                                void *
      d  filename                       *   value options(*string)               const char *
 
      d xmlSAXUserParseMemory...
-     d                 pr            10i 0 extproc('xmlSAXUserParseMemory')
+     d                 pr                  extproc('xmlSAXUserParseMemory')
+     d                                     like(xmlCint)
      d  sax                                value like(xmlSAXHandlerPtr)
      d  user_data                      *   value                                void *
      d  buffer                         *   value options(*string)               const char *
-     d  size                         10i 0 value
+     d  size                               value like(xmlCint)
 
      d xmlSAXParseDoc  pr                  extproc('xmlSAXParseDoc')
      d                                     like(xmlDocPtr)
      d  sax                                value like(xmlSAXHandlerPtr)
      d  cur                            *   value options(*string)               const xmlChar *
-     d  recovery                     10i 0 value
+     d  recovery                           value like(xmlCint)
 
      d xmlSAXParseMemory...
      d                 pr                  extproc('xmlSAXParseMemory')
      d                                     like(xmlDocPtr)
      d  sax                                value like(xmlSAXHandlerPtr)
      d  buffer                         *   value options(*string)               const char *
-     d  size                         10i 0 value
-     d  recovery                     10i 0 value
+     d  size                               value like(xmlCint)
+     d  recovery                           value like(xmlCint)
 
      d xmlSAXParseMemoryWithData...
      d                 pr                  extproc('xmlSAXParseMemoryWithData')
      d                                     like(xmlDocPtr)
      d  sax                                value like(xmlSAXHandlerPtr)
      d  buffer                         *   value options(*string)               const char *
-     d  size                         10i 0 value
-     d  recovery                     10i 0 value
+     d  size                               value like(xmlCint)
+     d  recovery                           value like(xmlCint)
      d  data                           *   value                                void *
 
      d xmlSAXParseFile...
      d                                     like(xmlDocPtr)
      d  sax                                value like(xmlSAXHandlerPtr)
      d  filename                       *   value options(*string)               const char *
-     d  recovery                     10i 0 value
+     d  recovery                           value like(xmlCint)
 
      d xmlSAXParseFileWithData...
      d                 pr                  extproc('xmlSAXParseFileWithData')
      d                                     like(xmlDocPtr)
      d  sax                                value like(xmlSAXHandlerPtr)
      d  filename                       *   value options(*string)               const char *
-     d  recovery                     10i 0 value
+     d  recovery                           value like(xmlCint)
      d  data                           *   value                                void *
 
      d xmlSAXParseEntity...
 
       /if defined(LIBXML_SAX1_ENABLED)
      d xmlParseBalancedChunkMemory...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                      'xmlParseBalancedChunkMemory')
+     d                                     like(xmlCint)
      d  doc                                value like(xmlDocPtr)
      d  sax                                value like(xmlSAXHandlerPtr)
      d  user_data                      *   value                                void *
-     d  depth                        10i 0 value
+     d  depth                              value like(xmlCint)
      d  user_data                      *   value                                void *
      d  string                         *   value options(*string)               const xmlChar *
      d  lst                            *   value                                xmlNodePtr *
      d                                     like(xmlParserErrors)
      d  node                               value like(xmlNodePtr)
      d  data                           *   value options(*string)               const char *
-     d  datalen                      10i 0 value
-     d  options                      10i 0 value
+     d  datalen                            value like(xmlCint)
+     d  options                            value like(xmlCint)
      d  lst                            *   value                                xmlNodePtr *
 
       /if defined(LIBXML_SAX1_ENABLED)
      d xmlParseBalancedChunkMemoryRecover...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlParseBalancedChunkMemoryRecover')
+     d                                     like(xmlCint)
      d  doc                                value like(xmlDocPtr)
      d  sax                                value like(xmlSAXHandlerPtr)
      d  user_data                      *   value                                void *
-     d  depth                        10i 0 value
+     d  depth                              value like(xmlCint)
      d  string                         *   value options(*string)               const xmlChar *
      d  lst                            *   value                                xmlNodePtr *
-     d  recover                      10i 0 value
+     d  recover                            value like(xmlCint)
 
      d xmlParseExternalEntity...
-     d                 pr            10i 0 extproc('xmlParseExternalEntity')
+     d                 pr                  extproc('xmlParseExternalEntity')
+     d                                     like(xmlCint)
      d  doc                                value like(xmlDocPtr)
      d  sax                                value like(xmlSAXHandlerPtr)
      d  user_data                      *   value                                void *
-     d  depth                        10i 0 value
+     d  depth                              value like(xmlCint)
      d  URL                            *   value options(*string)               const xmlChar *
      d  ID                             *   value options(*string)               const xmlChar *
      d  lst                            *   value                                xmlNodePtr *
       /endif                                                                    LIBXML_SAX1_ENABLED
 
      d xmlParseCtxtExternalEntity...
-     d                 pr            10i 0 extproc('xmlParseCtxtExternalEntity')
+     d                 pr                  extproc('xmlParseCtxtExternalEntity')
+     d                                     like(xmlCint)
      d  sax                                value like(xmlSAXHandlerPtr)
      d  URL                            *   value options(*string)               const xmlChar *
      d  ID                             *   value options(*string)               const xmlChar *
      d                                     like(xmlParserCtxtPtr)
 
      d xmlInitParserCtxt...
-     d                 pr            10i 0 extproc('xmlInitParserCtxt')
+     d                 pr                  extproc('xmlInitParserCtxt')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlParserCtxtPtr)
 
      d xmlClearParserCtxt...
       * Reading/setting optional parsing features.
 
      d xmlGetFeaturesList...
-     d                 pr            10i 0 extproc('xmlGetFeaturesList')
-     d  len                          10i 0
+     d                 pr                  extproc('xmlGetFeaturesList')
+     d                                     like(xmlCint)
+     d  len                                like(xmlCint)
      d  result                         *                                        const char *(*)
 
-     d xmlGetFeature   pr            10i 0 extproc('xmlGetFeature')
+     d xmlGetFeature   pr                  extproc('xmlGetFeature')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlParserCtxtPtr)
      d  name                           *   value options(*string)               const char *
      d  result                         *   value                                void *
 
-     d xmlSetFeature   pr            10i 0 extproc('xmlSetFeature')
+     d xmlSetFeature   pr                  extproc('xmlSetFeature')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlParserCtxtPtr)
      d  name                           *   value options(*string)               const char *
      d  result                         *   value                                void *
      d  sax                                value like(xmlSAXHandlerPtr)
      d  user_data                      *   value                                void *
      d  chunk                          *   value options(*string)               const char *
-     d  size                         10i 0 value
+     d  size                               value like(xmlCint)
      d  filename                       *   value options(*string)               const char *
 
-     d xmlParseChunk   pr            10i 0 extproc('xmlParseChunk')
+     d xmlParseChunk   pr                  extproc('xmlParseChunk')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlParserCtxtPtr)
      d  chunk                          *   value options(*string)               const char *
-     d  size                         10i 0 value
-     d  terminate                    10i 0 value
+     d  size                               value like(xmlCint)
+     d  terminate                          value like(xmlCint)
       /endif                                                                    LIBXML_PUSH_ENABLED
 
       * Special I/O mode.
      d  seq                                value like(xmlParserNodeInfoSeqPtr)
 
      d xmlParserFindNodeInfoIndex...
-     d                 pr            20u 0 extproc('xmlParserFindNodeInfoIndex')
+     d                 pr                  extproc('xmlParserFindNodeInfoIndex')
+     d                                     like(xmlCulong)
      d  seq                                value like(xmlParserNodeInfoSeqPtr)
      d  node                               value like(xmlNodePtr)               const
 
       * Index lookup, actually implemented in the encoding module
 
      d xmlByteConsumed...
-     d                 pr            20i 0 extproc('xmlByteConsumed')
+     d                 pr                  extproc('xmlByteConsumed')
+     d                                     like(xmlClong)
      d  ctxt                               value like(xmlParserCtxtPtr)
 
       * New set of simpler/more flexible APIs
       * to the xmlReadDoc() and similar calls.
 
      d xmlParserOption...
-     d                 s             10i 0 based(######typedef######)           enum
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_PARSE_RECOVER...                                                    Recover on errors
      d                 c                   X'00000001'
      d  XML_PARSE_NOENT...                                                      Substitute entities
      d  ctxt                               value like(xmlParserCtxtPtr)
 
      d xmlCtxtResetPush...
-     d                 pr            10i 0 extproc('xmlCtxtResetPush')
+     d                 pr                  extproc('xmlCtxtResetPush')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlParserCtxtPtr)
      d  chunk                          *   value options(*string)               const char *
-     d  size                         10i 0 value
+     d  size                               value like(xmlCint)
      d  filename                       *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
 
      d xmlCtxtUseOptions...
-     d                 pr            10i 0 extproc('xmlCtxtUseOptions')
+     d                 pr                  extproc('xmlCtxtUseOptions')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlParserCtxtPtr)
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d xmlReadDoc      pr                  extproc('xmlReadDoc')
      d                                     like(xmlDocPtr)
      d  cur                            *   value options(*string)               const xmlChar *
      d  URL                            *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d xmlReadFile     pr                  extproc('xmlReadFile')
      d                                     like(xmlDocPtr)
      d  URL                            *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d xmlReadMemory   pr                  extproc('xmlReadMemory')
      d                                     like(xmlDocPtr)
      d  buffer                         *   value options(*string)               const char *
-     d  size                         10i 0 value
+     d  size                               value like(xmlCint)
      d  URL                            *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d xmlReadFd       pr                  extproc('xmlReadFd')
      d                                     like(xmlDocPtr)
-     d  fd                           10i 0 value
+     d  fd                                 value like(xmlCint)
      d  URL                            *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d xmlReadIO       pr                  extproc('xmlReadIO')
      d                                     like(xmlDocPtr)
      d  ioctx                          *   value                                void *
      d  URL                            *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d xmlCtxtReadDoc  pr                  extproc('xmlCtxtReadDoc')
      d                                     like(xmlDocPtr)
      d  cur                            *   value options(*string)               const xmlChar *
      d  URL                            *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d xmlCtxtReadFile...
      d                 pr                  extproc('xmlCtxtReadFile')
      d  ctxt                               value like(xmlParserCtxtPtr)
      d  filename                       *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d xmlCtxtReadMemory...
      d                 pr                  extproc('xmlCtxtReadMemory')
      d                                     like(xmlDocPtr)
      d  ctxt                               value like(xmlParserCtxtPtr)
      d  buffer                         *   value options(*string)               const char *
-     d  size                         10i 0 value
+     d  size                               value like(xmlCint)
      d  URL                            *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d xmlCtxtReadFd   pr                  extproc('xmlCtxtReadFd')
      d                                     like(xmlDocPtr)
      d  ctxt                               value like(xmlParserCtxtPtr)
-     d  fd                           10i 0 value
+     d  fd                                 value like(xmlCint)
      d  URL                            *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d xmlCtxtReadIO   pr                  extproc('xmlCtxtReadIO')
      d                                     like(xmlDocPtr)
      d  ioctx                          *   value                                void *
      d  URL                            *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
       * Library wide options
 
       * or disabled at compile-time.
       * They used to be called XML_FEATURE_xxx but this clashed with Expat
 
-     d xmlFeature      s             10i 0 based(######typedef######)           enum
+     d xmlFeature      s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_WITH_THREAD...
      d                 c                   1
      d  XML_WITH_TREE  c                   2
      d  XML_WITH_LZMA  c                   33
      d  XML_WITH_NONE  c                   99999
 
-     d xmlHasFeature   pr            10i 0 extproc('xmlHasFeature')
+     d xmlHasFeature   pr                  extproc('xmlHasFeature')
+     d                                     like(xmlCint)
      d  feature                            value like(xmlFeature)
 
       /endif                                                                    XML_PARSER_H__
index 6942b7d..6c8f388 100644 (file)
@@ -11,6 +11,7 @@
       /define XML_PARSER_INTERNALS_H__
 
       /include "libxmlrpg/xmlversion"
+      /include "libxmlrpg/xmlTypesC"
       /include "libxmlrpg/parser"
       /include "libxmlrpg/HTMLparser"
       /include "libxmlrpg/chvalid"
@@ -22,7 +23,8 @@
       * boundary feature, use XML_PARSE_HUGE option to override it.
 
      d xmlParserMaxDepth...
-     d                 s             10u 0 import('xmlParserMaxDepth')
+     d                 s                   import('xmlParserMaxDepth')
+     d                                     like(xmlCuint)
 
       * XML_MAX_TEXT_LENGTH:
       *
      d                 s              9    import('xmlStringTextNoenc')         \0 in 10th byte
 
      d xmlStringComment...
-     d                 s              7    import('xmlStringTextComment')       \0 in 8th byte
+     d                 s              7    import('xmlStringComment')           \0 in 8th byte
 
       * Function to finish the work of the macros where needed.
 
-     d xmlIsLetter     pr            10i 0 extproc('xmlIsLetter')
-     d c                             10i 0 value
+     d xmlIsLetter     pr                  extproc('xmlIsLetter')
+     d                                     like(xmlCint)
+     d c                                   value like(xmlCint)
 
       * Parser context.
 
      d                 pr                  extproc('xmlCreateURLParserCtxt')
      d                                     like(xmlParserCtxtPtr)
      d filename                        *   value options(*string)               const char *
-     d options                       10i 0 value
+     d options                             value like(xmlCint)
 
      d xmlCreateMemoryParserCtxt...
      d                 pr                  extproc('xmlCreateMemoryParserCtxt')
      d                                     like(xmlParserCtxtPtr)
      d buffer                          *   value options(*string)               const char *
-     d size                          10i 0 value
+     d size                                value like(xmlCint)
 
      d xmlCreateEntityParserCtxt...
      d                 pr                  extproc('xmlCreateEntityParserCtxt')
      d base                            *   value options(*string)               const xmlChar *
 
      d xmlSwitchEncoding...
-     d                 pr            10i 0 extproc('xmlSwitchEncoding')
+     d                 pr                  extproc('xmlSwitchEncoding')
+     d                                     like(xmlCint)
      d ctxt                                value like(xmlParserCtxtPtr)
      d enc                                 value like(xmlCharEncoding)
 
      d xmlSwitchToEncoding...
-     d                 pr            10i 0 extproc('xmlSwitchToEncoding')
+     d                 pr                  extproc('xmlSwitchToEncoding')
+     d                                     like(xmlCint)
      d ctxt                                value like(xmlParserCtxtPtr)
      d handler                             value like(xmlCharEncodingHandlerPtr)
 
      d xmlSwitchInputEncoding...
-     d                 pr            10i 0 extproc('xmlSwitchInputEncoding')
+     d                 pr                  extproc('xmlSwitchInputEncoding')
+     d                                     like(xmlCint)
      d ctxt                                value like(xmlParserCtxtPtr)
      d input                               value like(xmlParserInputPtr)
      d handler                             value like(xmlCharEncodingHandlerPtr)
      d ctxt                                value like(xmlParserCtxtPtr)
      d entity                              value like(xmlEntityPtr)
 
-     d xmlPushInput    pr            10i 0 extproc('xmlPushInput')
+     d xmlPushInput    pr                  extproc('xmlPushInput')
+     d                                     like(xmlCint)
      d ctxt                                value like(xmlParserCtxtPtr)
      d input                               value like(xmlParserInputPtr)
 
      d xmlParseCharData...
      d                 pr                  extproc('xmlParseCharData')
      d ctxt                                value like(xmlParserCtxtPtr)
-     d cdata                         10i 0 value
+     d cdata                               value like(xmlCint)
 
      d xmlParseExternalID...
      d                 pr              *   extproc('xmlParseExternalID')        xmlChar *
      d ctxt                                value like(xmlParserCtxtPtr)
      d publicID                        *                                        xmlChar *(*)
-     d strict                        10i 0 value
+     d strict                              value like(xmlCint)
 
      d xmlParseComment...
      d                 pr                  extproc('xmlParseComment')
      d ctxt                                value like(xmlParserCtxtPtr)
 
      d xmlParseDefaultDecl...
-     d                 pr            10i 0 extproc('xmlParseDefaultDecl')
+     d                 pr                  extproc('xmlParseDefaultDecl')
+     d                                     like(xmlCint)
      d ctxt                                value like(xmlParserCtxtPtr)
      d value                           *                                        xmlChar *(*)
 
      d ctxt                                value like(xmlParserCtxtPtr)
 
      d xmlParseEnumeratedType...
-     d                 pr            10i 0 extproc('xmlParseEnumeratedType')
+     d                 pr                  extproc('xmlParseEnumeratedType')
+     d                                     like(xmlCint)
      d ctxt                                value like(xmlParserCtxtPtr)
      d tree                            *   value                                xmlEnumerationPtr *
 
      d xmlParseAttributeType...
-     d                 pr            10i 0 extproc('xmlParseAttributeType')
+     d                 pr                  extproc('xmlParseAttributeType')
+     d                                     like(xmlCint)
      d ctxt                                value like(xmlParserCtxtPtr)
      d tree                            *   value                                xmlEnumerationPtr *
 
      d                                     'xmlParseElementMixedContentDecl')
      d                                     like(xmlElementContentPtr)
      d ctxt                                value like(xmlParserCtxtPtr)
-     d inputchk                      10i 0 value
+     d inputchk                            value like(xmlCint)
 
      d xmlParseElementChildrenContentDecl...
      d                 pr                  extproc(
      d                                     'xmlParseElementChildrenContentDecl')
      d                                     like(xmlElementContentPtr)
      d ctxt                                value like(xmlParserCtxtPtr)
-     d inputchk                      10i 0 value
+     d inputchk                            value like(xmlCint)
 
      d xmlParseElementContentDecl...
-     d                 pr            10i 0 extproc('xmlParseElementContentDecl')
+     d                 pr                  extproc('xmlParseElementContentDecl')
+     d                                     like(xmlCint)
      d ctxt                                value like(xmlParserCtxtPtr)
      d name                            *   value options(*string)               const xmlChar *
      d result                          *   value                                xmlElementContentPtr
      d                                                                          *
 
      d xmlParseElementDecl...
-     d                 pr            10i 0 extproc('xmlParseElementDecl')
+     d                 pr                  extproc('xmlParseElementDecl')
+     d                                     like(xmlCint)
      d ctxt                                value like(xmlParserCtxtPtr)
 
      d xmlParseMarkupDecl...
      d ctxt                                value like(xmlParserCtxtPtr)
 
      d xmlParseCharRef...
-     d                 pr            10i 0 extproc('xmlParseCharRef')
+     d                 pr                  extproc('xmlParseCharRef')
+     d                                     like(xmlCint)
      d ctxt                                value like(xmlParserCtxtPtr)
 
      d xmlParseEntityRef...
      d                 pr              *   extproc('xmlParseEncodingDecl')      const xmlChar *
      d ctxt                                value like(xmlParserCtxtPtr)
 
-     d xmlParseSDDecl  pr            10i 0 extproc('xmlParseSDDecl')
+     d xmlParseSDDecl  pr                  extproc('xmlParseSDDecl')
+     d                                     like(xmlCint)
      d ctxt                                value like(xmlParserCtxtPtr)
 
      d xmlParseXMLDecl...
      d                 pr              *   extproc('xmlStringDecodeEntities')   xmlChar *
      d ctxt                                value like(xmlParserCtxtPtr)
      d str                             *   value options(*string)               const xmlChar *
-     d what                          10i 0 value
+     d what                                value like(xmlCint)
      d end                                 value like(xmlChar)
      d end2                                value like(xmlChar)
      d end3                                value like(xmlChar)
      d                 pr              *   extproc('xmlStringLenDecodeEntities')xmlChar *
      d ctxt                                value like(xmlParserCtxtPtr)
      d str                             *   value options(*string)               const xmlChar *
-     d len                           10i 0 value
-     d what                          10i 0 value
+     d len                                 value like(xmlCint)
+     d what                                value like(xmlCint)
      d end                                 value like(xmlChar)
      d end2                                value like(xmlChar)
      d end3                                value like(xmlChar)
 
       * Generated by MACROS on top of parser.c c.f. PUSH_AND_POP.
 
-     d nodePush        pr            10i 0 extproc('nodePush')
+     d nodePush        pr                  extproc('nodePush')
+     d                                     like(xmlCint)
      d ctxt                                value like(xmlParserCtxtPtr)
      d value                               value like(xmlNodePtr)
 
      d                                     like(xmlNodePtr)
      d ctxt                                value like(xmlParserCtxtPtr)
 
-     d inputPush       pr            10i 0 extproc('inputPush')
+     d inputPush       pr                  extproc('inputPush')
+     d                                     like(xmlCint)
      d ctxt                                value like(xmlParserCtxtPtr)
      d value                               value like(xmlParserInputPtr)
 
      d namePop         pr              *   extproc('namePop')                   const xmlChar *
      d ctxt                                value like(xmlParserCtxtPtr)
 
-     d namePush        pr            10i 0 extproc('namePush')
+     d namePush        pr                  extproc('namePush')
+     d                                     like(xmlCint)
      d ctxt                                value like(xmlParserCtxtPtr)
      d value                           *   value options(*string)               const xmlChar *
 
       * other commodities shared between parser.c and parserInternals.
 
      d xmlSkipBlankChars...
-     d                 pr            10i 0 extproc('xmlSkipBlankChars')
+     d                 pr                  extproc('xmlSkipBlankChars')
+     d                                     like(xmlCint)
      d ctxt                                value like(xmlParserCtxtPtr)
 
      d xmlStringCurrentChar...
-     d                 pr            10i 0 extproc('xmlStringCurrentChar')
+     d                 pr                  extproc('xmlStringCurrentChar')
+     d                                     like(xmlCint)
      d ctxt                                value like(xmlParserCtxtPtr)
      d cur                             *   value options(*string)               const xmlChar *
      d len                             *   value                                int *
      d ctxt                                value like(xmlParserCtxtPtr)
 
      d xmlCheckLanguageID...
-     d                 pr            10i 0 extproc('xmlCheckLanguageID')
+     d                 pr                  extproc('xmlCheckLanguageID')
+     d                                     like(xmlCint)
      d lang                            *   value options(*string)               const xmlChar *
 
       * Really core function shared with HTML parser.
 
-     d xmlCurrentChar  pr            10i 0 extproc('xmlCurrentChar')
+     d xmlCurrentChar  pr                  extproc('xmlCurrentChar')
+     d                                     like(xmlCint)
      d ctxt                                value like(xmlParserCtxtPtr)
      d len                             *   value                                int *
 
      d xmlCopyCharMultiByte...
-     d                 pr            10i 0 extproc('xmlCopyCharMultiByte')
+     d                 pr                  extproc('xmlCopyCharMultiByte')
+     d                                     like(xmlCint)
      d out                             *   value options(*string)               xmlChar *
-     d val                           10i 0 value
+     d val                                 value like(xmlCint)
 
-     d xmlCopyChar     pr            10i 0 extproc('xmlCopyChar')
-     d len                           10i 0 value
+     d xmlCopyChar     pr                  extproc('xmlCopyChar')
+     d                                     like(xmlCint)
+     d len                                 value like(xmlCint)
      d out                             *   value options(*string)               xmlChar *
-     d val                           10i 0 value
+     d val                                 value like(xmlCint)
 
      d xmlNextChar     pr                  extproc('xmlNextChar')
      d ctxt                                value like(xmlParserCtxtPtr)
      d xmlDecodeEntities...
      d                 pr              *   extproc('xmlDecodeEntities')         xmlChar *
      d ctxt                                value like(xmlParserCtxtPtr)
-     d len                           10i 0 value
-     d what                          10i 0 value
+     d len                                 value like(xmlCint)
+     d what                                value like(xmlCint)
      d end                                 value like(xmlChar)
      d end2                                value like(xmlChar)
      d end3                                value like(xmlChar)
index 2e881e5..ef02301 100644 (file)
       /define XML_PATTERN_H__
 
       /include "libxmlrpg/xmlversion"
-      /include "libxmlrpg/tree"
-      /include "libxmlrpg/dict"
 
       /if defined(LIBXML_PATTERN_ENABLED)
 
+      /include "libxmlrpg/xmlTypesC"
+      /include "libxmlrpg/tree"
+      /include "libxmlrpg/dict"
+
       * xmlPattern:
       *
       * A compiled (XPath based) pattern to select nodes
@@ -28,7 +30,8 @@
       * matching with this module
 
      d xmlPatternFlags...
-     d                 s             10i 0 based(######typedef######)           enum
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_PATTERN_DEFAULT...                                                  Simple pattern match
      d                 c                   X'0000'
      d  XML_PATTERN_XPATH...                                                    Std XPath pattern
      d                                     like(xmlPatternPtr)
      d  pattern                        *   value options(*string)               const xmlChar *
      d  dict                           *   value                                xmlDict *
-     d  flags                        10i 0 value
+     d  flags                              value like(xmlCint)
      d  namespaces                     *                                        const xmlChar *(*)
 
      d xmlPatternMatch...
-     d                 pr            10i 0 extproc('xmlPatternMatch')
+     d                 pr                  extproc('xmlPatternMatch')
+     d                                     like(xmlCint)
      d  comp                               value like(xmlPatternPtr)
      d  node                               value like(xmlNodePtr)
 
      d                 s               *   based(######typedef######)
 
      d xmlPatternStreamable...
-     d                 pr            10i 0 extproc('xmlPatternStreamable')
+     d                 pr                  extproc('xmlPatternStreamable')
+     d                                     like(xmlCint)
      d  comp                               value like(xmlPatternPtr)
 
      d xmlPatternMaxDepth...
-     d                 pr            10i 0 extproc('xmlPatternMaxDepth')
+     d                 pr                  extproc('xmlPatternMaxDepth')
+     d                                     like(xmlCint)
      d  comp                               value like(xmlPatternPtr)
 
      d xmlPatternMinDepth...
-     d                 pr            10i 0 extproc('xmlPatternMinDepth')
+     d                 pr                  extproc('xmlPatternMinDepth')
+     d                                     like(xmlCint)
      d  comp                               value like(xmlPatternPtr)
 
      d xmlPatternFromRoot...
-     d                 pr            10i 0 extproc('xmlPatternFromRoot')
+     d                 pr                  extproc('xmlPatternFromRoot')
+     d                                     like(xmlCint)
      d  comp                               value like(xmlPatternPtr)
 
      d xmlPatternGetStreamCtxt...
      d  stream                             value like(xmlStreamCtxtPtr)
 
      d xmlStreamPushNode...
-     d                 pr            10i 0 extproc('xmlStreamPushNode')
+     d                 pr                  extproc('xmlStreamPushNode')
+     d                                     like(xmlCint)
      d  stream                             value like(xmlStreamCtxtPtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  ns                             *   value options(*string)               const xmlChar *
-     d  nodeType                     10i 0 value
+     d  nodeType                           value like(xmlCint)
 
-     d xmlStreamPush   pr            10i 0 extproc('xmlStreamPush')
+     d xmlStreamPush   pr                  extproc('xmlStreamPush')
+     d                                     like(xmlCint)
      d  stream                             value like(xmlStreamCtxtPtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  ns                             *   value options(*string)               const xmlChar *
 
      d xmlStreamPushAttr...
-     d                 pr            10i 0 extproc('xmlStreamPushAttr')
+     d                 pr                  extproc('xmlStreamPushAttr')
+     d                                     like(xmlCint)
      d  stream                             value like(xmlStreamCtxtPtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  ns                             *   value options(*string)               const xmlChar *
 
-     d xmlStreamPop    pr            10i 0 extproc('xmlStreamPop')
+     d xmlStreamPop    pr                  extproc('xmlStreamPop')
+     d                                     like(xmlCint)
      d  stream                             value like(xmlStreamCtxtPtr)
 
      d xmlStreamWantsAnyNode...
-     d                 pr            10i 0 extproc('xmlStreamWantsAnyNode')
+     d                 pr                  extproc('xmlStreamWantsAnyNode')
+     d                                     like(xmlCint)
      d  stream                             value like(xmlStreamCtxtPtr)
 
       /endif                                                                    LIBXML_PATTERN_ENBLD
index af662aa..15b8471 100644 (file)
@@ -9,11 +9,13 @@
       /define XML_RELAX_NG__
 
       /include "libxmlrpg/xmlversion"
-      /include "libxmlrpg/hash"
-      /include "libxmlrpg/xmlstring"
 
       /if defined(LIBXML_SCHEMAS_ENABLED)
 
+      /include "libxmlrpg/xmlTypesC"
+      /include "libxmlrpg/hash"
+      /include "libxmlrpg/xmlstring"
+
      d xmlRelaxNGPtr   s               *   based(######typedef######)
 
       * xmlRelaxNGValidityErrorFunc:
@@ -51,7 +53,8 @@
       * List of possible Relax NG validation errors
 
      d xmlRelaxNGValidErr...
-     d                 s             10i 0 based(######typedef######)           enum
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_RELAXNG_OK...
      d                 c                   0
      d  XML_RELAXNG_ERR_MEMORY...
       * List of possible Relax NG Parser flags
 
      d xmlRelaxNGParserFlag...
-     d                 s             10i 0 based(######typedef######)           enum
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_RELAXNGP_NONE...
      d                 c                   0
      d  XML_RELAXNGP_FREE_DOC...
      d                 c                   2
 
      d xmlRelaxNGInitTypes...
-     d                 pr            10i 0 extproc('xmlRelaxNGInitTypes')
+     d                 pr                  extproc('xmlRelaxNGInitTypes')
+     d                                     like(xmlCint)
 
      d xmlRelaxNGCleanupTypes...
      d                 pr                  extproc('xmlRelaxNGCleanupTypes')
      d                 pr                  extproc('xmlRelaxNGNewMemParserCtxt')
      d                                     like(xmlRelaxNGParserCtxtPtr)
      d  buffer                         *   value options(*string)               const char *
-     d  size                         10i 0 value
+     d  size                               value like(xmlCint)
 
      d xmlRelaxNGNewDocParserCtxt...
      d                 pr                  extproc('xmlRelaxNGNewDocParserCtxt')
      d  doc                                value like(xmlDocPtr)
 
      d xmlRelaxParserSetFlag...
-     d                 pr            10i 0 extproc('xmlRelaxParserSetFlag')
+     d                 pr                  extproc('xmlRelaxParserSetFlag')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlRelaxNGParserCtxtPtr)
-     d  flag                         10i 0 value
+     d  flag                               value like(xmlCint)
 
      d xmlRelaxNGFreeParserCtxt...
      d                 pr                  extproc('xmlRelaxNGFreeParserCtxt')
      d  ctx                            *   value                                void *
 
      d xmlRelaxNGGetParserErrors...
-     d                 pr            10i 0 extproc('xmlRelaxNGGetParserErrors')
+     d                 pr                  extproc('xmlRelaxNGGetParserErrors')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlRelaxNGParserCtxtPtr)
      d  err                                like(xmlRelaxNGValidityErrorFunc)
      d  warn                               like(xmlRelaxNGValidityWarningFunc)
      d  ctx                            *   value                                void *
 
      d xmlRelaxNGGetValidErrors...
-     d                 pr            10i 0 extproc('xmlRelaxNGGetValidErrors')
+     d                 pr                  extproc('xmlRelaxNGGetValidErrors')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlRelaxNGValidCtxtPtr)
      d  err                                like(xmlRelaxNGValidityErrorFunc)
      d  warn                               like(xmlRelaxNGValidityWarningFunc)
      d  ctxt                               value like(xmlRelaxNGValidCtxtPtr)
 
      d xmlRelaxNGValidateDoc...
-     d                 pr            10i 0 extproc('xmlRelaxNGValidateDoc')
+     d                 pr                  extproc('xmlRelaxNGValidateDoc')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlRelaxNGValidCtxtPtr)
      d  doc                                value like(xmlDocPtr)
 
       * Interfaces for progressive validation when possible
 
      d xmlRelaxNGValidatePushElement...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlRelaxNGValidatePushElement')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlRelaxNGValidCtxtPtr)
      d  doc                                value like(xmlDocPtr)
      d  elem                               value like(xmlNodePtr)
 
      d xmlRelaxNGValidatePushCData...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlRelaxNGValidatePushCData')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlRelaxNGValidCtxtPtr)
      d  data                           *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
      d xmlRelaxNGValidatePopElement...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlRelaxNGValidatePopElement')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlRelaxNGValidCtxtPtr)
      d  doc                                value like(xmlDocPtr)
      d  elem                               value like(xmlNodePtr)
 
      d xmlRelaxNGValidateFullElement...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlRelaxNGValidateFullElement')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlRelaxNGValidCtxtPtr)
      d  doc                                value like(xmlDocPtr)
      d  elem                               value like(xmlNodePtr)
index edeea5b..8d3013e 100644 (file)
       /include "libxmlrpg/xmlversion"
 
       /if defined(LIBXML_SCHEMAS_ENABLED)
+
+      /include "libxmlrpg/xmlTypesC"
       /include "libxmlrpg/xmlregexp"
       /include "libxmlrpg/hash"
       /include "libxmlrpg/dict"
 
      d xmlSchemaValType...
-     d                 s             10i 0 based(######typedef######)           enum
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_SCHEMAS_UNKNOWN...
      d                 c                   0
      d  XML_SCHEMAS_STRING...
       * XML Schemas defines multiple type of types.
 
      d xmlSchemaTypeType...
-     d                 s             10i 0 based(######typedef######)           enum
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_SCHEMA_TYPE_BASIC...                                                A builtin datatype
      d                 c                   1
      d  XML_SCHEMA_TYPE_ANY...
      d                 c                   2001
 
      d xmlSchemaContentType...
-     d                 s             10i 0 based(######typedef######)           enum
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_SCHEMA_CONTENT_UNKNOWN...
      d                 c                   0
      d  XML_SCHEMA_CONTENT_EMPTY...
      d  annot                              like(xmlSchemaAnnotPtr)
       *
      d  base                               like(xmlSchemaTypePtr)               Deprecated
-     d  occurs                       10i 0                                      Deprecated
+     d  occurs                             like(xmlCint)                        Deprecated
      d  defValue                       *                                        const xmlChar *
      d  subtypes                           like(xmlSchemaTypePtr)               The type definition
      d  node                               like(xmlNodePtr)
      d  targetNamespace...                                                      const xmlChar *
      d                                 *
-     d  flags                        10i 0
+     d  flags                              like(xmlCint)
      d  refPrefix                      *                                        const xmlChar *
      d  defVal                             like(xmlSchemaValPtr)                Compiled constraint
      d  refDecl                            like(xmlSchemaAttributePtr)          Deprecated
      d  id                             *                                        const xmlChar *
      d  annot                              like(xmlSchemaAnnotPtr)
      d  node                               like(xmlNodePtr)
-     d  minOccurs                    10i 0                                      Deprecated; not used
-     d  maxOccurs                    10i 0                                      Deprecated; not used
+     d  minOccurs                          like(xmlCint)                        Deprecated; not used
+     d  maxOccurs                          like(xmlCint)                        Deprecated; not used
      d  processContents...
-     d                               10i 0
-     d  any                          10i 0                                      Ns constraint ##any?
+     d                                     like(xmlCint)
+     d  any                                like(xmlCint)                        Ns constraint ##any?
      d  nsSet                              like(xmlSchemaWildcardNsPtr)         Allowed namspce list
      d  negNsSet                           like(xmlSchemaWildcardNsPtr)         Negated namespace
-     d  flags                        10i 0                                      Deprecated; not used
+     d  flags                              like(xmlCint)                        Deprecated; not used
 
       * XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED:
       *
       *
      d  attributes                         like(xmlSchemaAttributePtr)          Deprecated; not used
      d  node                               like(xmlNodePtr)
-     d  flags                        10i 0
+     d  flags                              like(xmlCint)
      d  attributeWildcard...
      d                                     like(xmlSchemaWildcardPtr)
      d  refPrefix                      *                                        const xmlChar *
      d  subtypes                           like(xmlSchemaTypePtr)
      d  attributes                         like(xmlSchemaAttributePtr)          Deprecated; not used
      d  node                               like(xmlNodePtr)
-     d  minOccurs                    10i 0                                      Deprecated; not used
-     d  maxOccurs                    10i 0                                      Deprecated; not used
+     d  minOccurs                          like(xmlCint)                        Deprecated; not used
+     d  maxOccurs                          like(xmlCint)                        Deprecated; not used
       *
-     d  flags                        10i 0
+     d  flags                              like(xmlCint)
      d  contentType                        like(xmlSchemaContentType)
      d  base                           *                                        const xmlChar *
      d  baseNs                         *                                        const xmlChar *
      d  baseType                           like(xmlSchemaTypePtr)               Base type component
      d  facets                             like(xmlSchemaFacetPtr)              Local facets
      d  redef                              like(xmlSchemaTypePtr)               Deprecated; not used
-     d  recurse                      10i 0                                      Obsolete
+     d  recurse                            like(xmlCint)                        Obsolete
      d  attributeUses                      like(xmlSchemaAttributeLinkPtr)      Deprecated; not used
      d  attributeWildcard...
      d                                     like(xmlSchemaWildcardPtr)
-     d  builtInType                  10i 0                                      Built-in types type
+     d  builtInType                        like(xmlCint)                        Built-in types type
      d  memberTypes                        like(xmlSchemaTypeLinkPtr)           Union member-types
      d  facetSet                           like(xmlSchemaFacetLinkPtr)          All facets
      d  refPrefix                      *                                        const xmlChar *
      d  subtypes                           like(xmlSchemaTypePtr)
      d  attributes                         like(xmlSchemaAttributePtr)          Deprecated; not used
      d  node                               like(xmlNodePtr)
-     d  minOccurs                    10i 0                                      Deprecated; not used
-     d  maxOccurs                    10i 0                                      Deprecated; not used
+     d  minOccurs                          like(xmlCint)                        Deprecated; not used
+     d  maxOccurs                          like(xmlCint)                        Deprecated; not used
       *
-     d  flags                        10i 0
+     d  flags                              like(xmlCint)
      d  targetNamespace...
      d                                 *                                        const xmlChar *
      d  namedType                      *                                        const xmlChar *
      d  id                             *                                        const xmlChar *
      d  annot                              like(xmlSchemaAnnotPtr)
      d  node                               like(xmlNodePtr)
-     d  fixed                        10i 0                                      _FACET_PRESERVE, etc
-     d  whitespace                   10i 0
+     d  fixed                              like(xmlCint)                        _FACET_PRESERVE, etc
+     d  whitespace                         like(xmlCint)
      d  val                                like(xmlSchemaValPtr)                Compiled value
      d  regexp                             like(xmlRegexpPtr)                   Regexp for patterns
 
      d  id                             *                                        const xmlChar *
      d  doc                                like(xmlDocPtr)
      d  annot                              like(xmlSchemaAnnotPtr)
-     d  flags                        10i 0
+     d  flags                              like(xmlCint)
       *
      d  typeDecl                           like(xmlHashTablePtr)
      d  attrDecl                           like(xmlHashTablePtr)
      d  groupDecl                          like(xmlHashTablePtr)
      d  dict                               like(xmlDictPtr)
      d  includes                       *                                        void *
-     d  preserve                     10i 0                                      Do not free doc ?
-     d  counter                      10i 0                                      For name uniqueness
+     d  preserve                           like(xmlCint)                        Do not free doc ?
+     d  counter                            like(xmlCint)                        For name uniqueness
      d  idcDef                             like(xmlHashTablePtr)                All id-constr. defs
      d  volatiles                      *                                        void *
 
index ff8ea62..8271ca5 100644 (file)
 
       /if defined(LIBXML_SCHEMATRON_ENABLED)
 
+      /include "libxmlrpg/xmlTypesC"
       /include "libxmlrpg/tree"
 
      d xmlSchematronValidOptions...
-     d                 s             10i 0 based(######typedef######)           enum
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_SCHEMATRON_OUT_QUIET...                                             Quiet no report
      d                 c                   X'0001'
      d  XML_SCHEMATRON_OUT_TEXT...                                              Build textual report
@@ -78,7 +80,7 @@
      d                                     'xmlSchematronNewMemParserCtxt')
      d                                     like(xmlSchematronParserCtxtPtr)
      d  buffer                         *   value options(*string)               const char *
-     d  size                         10i 0 value
+     d  size                               value like(xmlCint)
 
      d xmlSchematronNewDocParserCtxt...
      d                 pr                  extproc(
      d  err                                value
      d                                     like(xmlSchematronValidityErrorFunc)
      d  warn                               value like(
-     d                                     xmlSchematronValidityWarningFunc)
+     d                                       xmlSchematronValidityWarningFunc)
      d  ctx                            *   value                                void *
 
      d xmlSchematronGetParserErrors...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlSchematronGetParserErrors')
+     d                                     like(xmlCint)
      d  ctxt                               value
      d                                     like(xmlSchematronParserCtxtPtr)
      d  err                                like(xmlSchematronValidityErrorFunc)
      d  ctx                            *                                        void *(*)
 
      d xmlSchematronIsValid...
-     d                 pr            10i 0 extproc('xmlSchematronIsValid')
+     d                 pr                  extproc('xmlSchematronIsValid')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlSchematronValidCtxtPtr)
       /endif
 
      d  ctx                            *   value                                void *
 
      d xmlSchematronGetValidErrors...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlSchematronGetValidErrors')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlSchematronValidCtxtPtr)
      d  err                                like(xmlSchematronValidityErrorFunc)
      d  warn                               like(
      d  ctx                            *                                        void *(*)
 
      d xmlSchematronSetValidOptions...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlSchematronSetValidOptions')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlSchematronValidCtxtPtr)
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d xmlSchematronValidCtxtGetOptions...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlSchematronValidCtxtGetOptions')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlSchematronValidCtxtPtr)
 
      d xmlSchematronValidateOneElement...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlSchematronValidateOneElement')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlSchematronValidCtxtPtr)
      d  elem                               value like(xmlNodePtr)
       /endif
      d                 pr                  extproc('xmlSchematronNewValidCtxt')
      d                                     like(xmlSchematronValidCtxtPtr)
      d  schema                             value like(xmlSchematronPtr)
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d xmlSchematronFreeValidCtxt...
      d                 pr                  extproc('xmlSchematronFreeValidCtxt')
      d  ctxt                               value like(xmlSchematronValidCtxtPtr)
 
      d xmlSchematronValidateDoc...
-     d                 pr            10i 0 extproc('xmlSchematronValidateDoc')
+     d                 pr                  extproc('xmlSchematronValidateDoc')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlSchematronValidCtxtPtr)
      d  instance                           value like(xmlDocPtr)
 
index 07d4278..124798b 100644 (file)
@@ -10,6 +10,7 @@
       /define XML_THREADS_H__
 
       /include "libxmlrpg/xmlversion"
+      /include "libxmlrpg/xmlTypesC"
 
       * xmlMutex are a simple mutual exception locks.
 
      d xmlUnlockLibrary...
      d                 pr                  extproc('xmlUnlockLibrary')
 
-     d xmlGetThreadId  pr            10i 0 extproc('xmlGetThreadId')
+     d xmlGetThreadId  pr                  extproc('xmlGetThreadId')
+     d                                     like(xmlCint)
 
      d xmlIsMainThread...
-     d                 pr            10i 0 extproc('xmlIsMainThread')
+     d                 pr                  extproc('xmlIsMainThread')
+     d                                     like(xmlCint)
 
      d xmlCleanupThreads...
      d                 pr                  extproc('xmlCleanupThreads')
index 8b4981a..6512778 100644 (file)
@@ -11,6 +11,7 @@
       /define XML_TREE_H__
 
       /include "libxmlrpg/xmlversion"
+      /include "libxmlrpg/xmlTypesC"
       /include "libxmlrpg/xmlstring"
 
 
@@ -66,7 +67,8 @@
       * need or double it's allocated size each time it is found too small.
 
      d xmlBufferAllocationScheme...
-     d                 s             10i 0 based(######typedef######)           enum
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_BUFFER_ALLOC_DOUBLEIT...
      d                 c                   0
      d  XML_BUFFER_ALLOC_EXACT...
@@ -88,8 +90,8 @@
      d xmlBuffer       ds                  based(xmlBufferPtr)
      d                                     align qualified
      d  content                        *                                        xmlChar *
-     d  use                          10u 0                                      The buffer size used
-     d  size                         10u 0                                      The buffer size
+     d  use                                like(xmlCuint)
+     d  size                               like(xmlCuint)
      d  alloc                              like(xmlBufferAllocationScheme)      The realloc method
      d  contentIO                      *                                        xmlChar *
 
      d xmlBufEnd       pr              *   extproc('xmlBufEnd')                 xmlChar *
      d  buf                                value like(xmlBufPtr)                const
 
-     d xmlBufUse       pr            10u 0 extproc('xmlBufUse')                 size_t
+     d xmlBufUse       pr                  extproc('xmlBufUse')
+     d                                     like(xmlCsize_t)
      d  buf                                value like(xmlBufPtr)                const
 
-     d xmlBufShrink    pr            10u 0 extproc('xmlBufShrink')              size_t
+     d xmlBufShrink    pr                  extproc('xmlBufShrink')
+     d                                     like(xmlCsize_t)
      d  buf                                value like(xmlBufPtr)
-     d  len                          10u 0 value                                size_t
+     d  len                                value like(xmlCsize_t)
 
       * LIBXML2_NEW_BUFFER:
       *
       * Actually this had diverged a bit, and now XML_DOCUMENT_TYPE_NODE should
       * be deprecated to use an XML_DTD_NODE.
 
-     d xmlElementType  s             10i 0 based(######typedef######)           enum
+     d xmlElementType  s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_ELEMENT_NODE...
      d                 c                   1
      d  XML_ATTRIBUTE_NODE...
       * A DTD Attribute type definition.
 
      d xmlAttributeType...
-     d                 s             10i 0 based(######typedef######)           enum
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_ATTRIBUTE_CDATA...
      d                 c                   1
      d  XML_ATTRIBUTE_ID...
       * A DTD Attribute default definition.
 
      d xmlAttributeDefault...
-     d                 s             10i 0 based(######typedef######)           enum
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_ATTRIBUTE_NONE...
      d                 c                   1
      d  XML_ATTRIBUTE_REQUIRED...
       * Possible definitions of element content types.
 
      d xmlElementContentType...
-     d                 s             10i 0 based(######typedef######)           enum
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_ELEMENT_CONTENT_PCDATA...
      d                 c                   1
      d  XML_ELEMENT_CONTENT_ELEMENT...
       * Possible definitions of element content occurrences.
 
      d xmlElementContentOccur...
-     d                 s             10i 0 based(######typedef######)           enum
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_ELEMENT_CONTENT_ONCE...
      d                 c                   1
      d  XML_ELEMENT_CONTENT_OPT...
       * The different possibilities for an element content type.
 
      d xmlElementTypeVal...
-     d                 s             10i 0 based(######typedef######)           enum
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_ELEMENT_TYPE_UNDEFINED...
      d                 c                   0
      d  XML_ELEMENT_TYPE_EMPTY...
      d  next                               like(xmlIdPtr)                       Next ID
      d  attr                               like(xmlAttrPtr)                     Attribute holding it
      d  name                           *                                        const xmlChar *
-     d  lineno                       10i 0                                      Line # if not avail
+     d  lineno                             like(xmlCint)                        Line # if not avail
      d  doc                                like(xmlDocPtr)                      Doc holding ID
 
       * xmlRef:
      d  value                          *                                        const xmlChar *
      d  attr                               like(xmlAttrPtr)                     Attribute holding it
      d  name                           *                                        const xmlChar *
-     d  lineno                       10i 0                                      Line # if not avail
+     d  lineno                             like(xmlCint)                        Line # if not avail
 
       * xmlNode:
       *
      d  properties                         like(xmlAttrPtr)                     Properties list
      d  nsDef                              like(xmlNsPtr)                       Node ns definitions
      d  psvi                           *                                        Type/PSVI info
-     d  line                          5u 0                                      Line number
-     d  extra                         5u 0                                      Data for XPath/XSLT
+     d  line                               like(xmlCushort)
+     d  extra                              like(xmlCushort)                     Data for XPath/XSLT
 
       * xmlDocProperty
       *
       * Some of them are linked to similary named xmlParserOption
 
      d xmlDocProperties...
-     d                 s             10i 0 based(######typedef######)           enum
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_DOC_WELLFORMED...
      d                 c                   X'00000001'
      d  XML_DOC_NSVALID...
      d  next                               like(xmlNodePtr)                     next sibling link
      d  prev                               like(xmlNodePtr)                     previous sibling lnk
      d  doc                                like(xmlDocPtr)                      Reference to itself
-     d  compression                  10i 0                                      zlib compression lev
-     d  standalone                   10i 0
+     d  compression                        like(xmlCint)                        zlib compression lev
+     d  standalone                         like(xmlCint)
      d  intSubset                          like(xmlDtdPtr)                      Internal subset
      d  extSubset                          like(xmlDtdPtr)                      External subset
      d  oldns                              like(xmlNsPtr)                       Global namespace
      d  ids                            *                                        IDs hash table
      d  refs                           *                                        IDREFs hash table
      d  URL                            *                                        const xmlChar *
-     d  charset                      10i 0                                      In-memory encoding
+     d  charset                            like(xmlCint)                        In-memory encoding
      d  dict                           *                                        xmlDictPtr for names
      d  psvi                           *                                        Type/PSVI ino
-     d  parseFlags                   10i 0                                      xmlParserOption's
-     d  properties                   10i 0                                      xmlDocProperties
+     d  parseFlags                         like(xmlCint)                        xmlParserOption's
+     d  properties                         like(xmlCint)                        xmlDocProperties
 
       * xmlDOMWrapAcquireNsFunction:
       * @ctxt:  a DOM wrapper context
      d                 ds                  based(xmlDOMWrapCtxtPtr)
      d                                     align qualified
      d  #private                       *                                        void *
-     d  type                         10i 0
+     d  type                               like(xmlCint)
      d  namespaceMap                   *                                        void *
      d  getNsForNodeFunc...
      d                                     like(xmlDOMWrapAcquireNsFunction)
       /endif
       /if defined(XML_TESTVAL)
      d xmlValidateNCName...
-     d                 pr            10i 0 extproc('xmlValidateNCName')
+     d                 pr                  extproc('xmlValidateNCName')
+     d                                     like(xmlCint)
      d  value                          *   value options(*string)               const xmlChar *
-     d  space                        10i 0 value
+     d  space                              value like(xmlCint)
 
       /undefine XML_TESTVAL
       /endif
       /endif
       /if defined(XML_TESTVAL)
      d xmlValidateQName...
-     d                 pr            10i 0 extproc('xmlValidateQName')
+     d                 pr                  extproc('xmlValidateQName')
+     d                                     like(xmlCint)
      d  value                          *   value options(*string)               const xmlChar *
-     d  space                        10i 0 value
+     d  space                              value like(xmlCint)
 
      d xmlValidateName...
-     d                 pr            10i 0 extproc('xmlValidateName')
+     d                 pr                  extproc('xmlValidateName')
+     d                                     like(xmlCint)
      d  value                          *   value options(*string)               const xmlChar *
-     d  space                        10i 0 value
+     d  space                              value like(xmlCint)
 
      d xmlValidateNMToken...
-     d                 pr            10i 0 extproc('xmlValidateNMToken')
+     d                 pr                  extproc('xmlValidateNMToken')
+     d                                     like(xmlCint)
      d  value                          *   value options(*string)               const xmlChar *
-     d  space                        10i 0 value
+     d  space                              value like(xmlCint)
 
       /undefine XML_TESTVAL
       /endif
      d  ncname                         *   value options(*string)               const xmlChar *
      d  prefix                         *   value options(*string)               const xmlChar *
      d  memory                    65535    options(*varsize: *omit)             xmlChar[]
-     d  len                          10i 0 value                                memory length
+     d  len                                value like(xmlCint)                  memory length
 
      d xmlSplitQName2  pr              *   extproc('xmlSplitQName2')            xmlChar *
      d  name                           *   value options(*string)               const xmlChar *
 
      d xmlSplitQName3  pr              *   extproc('xmlSplitQName3')            const xmlChar *
      d  name                           *   value options(*string)               const xmlChar *
-     d  len                          10i 0
+     d  len                                like(xmlCint)
 
       * Handling Buffers, the old ones see @xmlBuf for the new ones.
 
      d xmlBufferCreateSize...
      d                 pr                  extproc('xmlBufferCreateSize')
      d                                     like(xmlBufferPtr)
-     d  size                         10u 0 value                                size_t
+     d  size                               value like(xmlCsize_t)
 
      d xmlBufferCreateStatic...
      d                 pr                  extproc('xmlBufferCreateStatic')
      d                                     like(xmlBufferPtr)
      d  mem                            *   value
-     d  size                         10u 0 value                                size_t
+     d  size                               value like(xmlCsize_t)
 
      d xmlBufferResize...
-     d                 pr            10i 0 extproc('xmlBufferResize')
+     d                 pr                  extproc('xmlBufferResize')
+     d                                     like(xmlCint)
      d  buf                                value like(xmlBufferPtr)
-     d  size                         10u 0 value                                size_t
+     d  size                               value like(xmlCsize_t)
 
      d xmlBufferFree   pr                  extproc('xmlBufferFree')
      d  buf                                value like(xmlBufferPtr)
 
-     d xmlBufferDump   pr            10i 0 extproc('xmlBufferDump')
+     d xmlBufferDump   pr                  extproc('xmlBufferDump')
+     d                                     like(xmlCint)
      d  file                           *   value                                FILE *
      d  buf                                value like(xmlBufferPtr)
 
-     d xmlBufferAdd    pr            10i 0 extproc('xmlBufferAdd')
+     d xmlBufferAdd    pr                  extproc('xmlBufferAdd')
+     d                                     like(xmlCint)
      d  buf                                value like(xmlBufferPtr)
      d  str                            *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value                                str length
+     d  len                                value like(xmlCint)                  str length
 
      d xmlBufferAddHead...
-     d                 pr            10i 0 extproc('xmlBufferAddHead')
+     d                 pr                  extproc('xmlBufferAddHead')
+     d                                     like(xmlCint)
      d  buf                                value like(xmlBufferPtr)
      d  str                            *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value                                str length
+     d  len                                value like(xmlCint)                  str length
 
-     d xmlBufferCat    pr            10i 0 extproc('xmlBufferCat')
+     d xmlBufferCat    pr                  extproc('xmlBufferCat')
+     d                                     like(xmlCint)
      d  buf                                value like(xmlBufferPtr)
      d  str                            *   value options(*string)               const xmlChar *
 
-     d xmlBufferCCat   pr            10i 0 extproc('xmlBufferCCat')
+     d xmlBufferCCat   pr                  extproc('xmlBufferCCat')
+     d                                     like(xmlCint)
      d  buf                                value like(xmlBufferPtr)
      d  str                            *   value options(*string)               const char *
 
      d xmlBufferShrink...
-     d                 pr            10i 0 extproc('xmlBufferShrink')
+     d                 pr                  extproc('xmlBufferShrink')
+     d                                     like(xmlCint)
      d  buf                                value like(xmlBufferPtr)
-     d  len                          10u 0 value                                str length
+     d  len                                value like(xmlCuint)
 
-     d xmlBufferGrow   pr            10i 0 extproc('xmlBufferGrow')
+     d xmlBufferGrow   pr                  extproc('xmlBufferGrow')
+     d                                     like(xmlCint)
      d  buf                                value like(xmlBufferPtr)
-     d  len                          10u 0 value                                str length
+     d  len                                value like(xmlCuint)
 
      d xmlBufferEmpty  pr                  extproc('xmlBufferEmpty')
      d  buf                                value like(xmlBufferPtr)
      d                                     like(xmlBufferAllocationScheme)
 
      d xmlBufferLength...
-     d                 pr            10i 0 extproc('xmlBufferLength')
+     d                 pr                  extproc('xmlBufferLength')
+     d                                     like(xmlCint)
      d  buf                                value like(xmlBufferPtr)
 
       * Creating/freeing new structures.
      d xmlCopyDoc      pr                  extproc('xmlCopyDoc')
      d                                     like(xmlDocPtr)
      d  doc                                value like(xmlDocPtr)
-     d  recursive                    10i 0 value
+     d  recursive                          value like(xmlCint)
 
       /undefine XML_TESTVAL
       /endif
      d                                     like(xmlNodePtr)
      d  doc                                value like(xmlDocPtr)
      d  content                        *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
      d xmlNewTextLen   pr                  extproc('xmlNewTextLen')
      d                                     like(xmlNodePtr)
      d  content                        *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
      d xmlNewDocComment...
      d                 pr                  extproc('xmlNewDocComment')
      d                                     like(xmlNodePtr)
      d  doc                                value like(xmlDocPtr)
      d  content                        *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
      d xmlNewCharRef   pr                  extproc('xmlNewCharRef')
      d                                     like(xmlNodePtr)
      d xmlCopyNode     pr                  extproc('xmlCopyNode')
      d                                     like(xmlNodePtr)
      d  node                               value like(xmlNodePtr)
-     d  recursive                    10i 0 value
+     d  recursive                          value like(xmlCint)
 
      d xmlDocCopyNode  pr                  extproc('xmlDocCopyNode')
      d                                     like(xmlNodePtr)
      d  node                               value like(xmlNodePtr)
      d  doc                                value like(xmlDocPtr)
-     d  recursive                    10i 0 value
+     d  recursive                          value like(xmlCint)
 
      d xmlDocCopyNodeList...
      d                 pr                  extproc('xmlDocCopyNodeList')
       * Navigating.
 
      d xmlNewDocFragment...
-     d xmlGetLineNo    pr            20i 0 extproc('xmlGetLineNo')
+     d xmlGetLineNo    pr                  extproc('xmlGetLineNo')
+     d                                     like(xmlClong)
      d  node                               value like(xmlNodePtr)
 
       /if defined(LIBXML_TREE_ENABLED)
      d                                     like(xmlNodePtr)
      d  parent                             value like(xmlNodePtr)
 
-     d xmlNodeIsText   pr            10i 0 extproc('xmlNodeIsText')
+     d xmlNodeIsText   pr                  extproc('xmlNodeIsText')
+     d                                     like(xmlCint)
      d  node                               value like(xmlNodePtr)
 
-     d xmlIsBlankNode  pr            10i 0 extproc('xmlIsBlankNode')
+     d xmlIsBlankNode  pr                  extproc('xmlIsBlankNode')
+     d                                     like(xmlCint)
      d  node                               value like(xmlNodePtr)
 
       * Changing the structure.
      d  first                              value like(xmlNodePtr)
      d  second                             value like(xmlNodePtr)
 
-     d xmlTextConcat   pr            10i 0 extproc('xmlTextConcat')
+     d xmlTextConcat   pr                  extproc('xmlTextConcat')
+     d                                     like(xmlCint)
      d  node                               value like(xmlNodePtr)
      d  content                        *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
      d xmlFreeNodeList...
      d                 pr                  extproc('xmlFreeNodeList')
      d                                     like(xmlNodePtr)
      d  doc                                value like(xmlDocPtr)
      d  value                          *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
      d xmlNodeListGetString...
      d                 pr              *   extproc('xmlNodeListGetString')      xmlChar *
      d  doc                                value like(xmlDocPtr)
      d  list                               value like(xmlNodePtr)
-     d  inLine                       10i 0 value
+     d  inLine                             value like(xmlCint)
 
       /if defined(LIBXML_TREE_ENABLED)
      d xmlNodeListGetRawString...
      d                 pr              *   extproc('xmlNodeListGetRawString')   xmlChar *
      d  doc                                value like(xmlDocPtr)
      d  list                               value like(xmlNodePtr)
-     d  inLine                       10i 0 value
+     d  inLine                             value like(xmlCint)
       /endif                                                                    LIBXML_TREE_ENABLED
 
      d xmlNodeSetContent...
      d                 pr                  extproc('xmlNodeSetContentLen')
      d  cur                                value like(xmlNodePtr)
      d  content                        *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
       /endif                                                                    LIBXML_TREE_ENABLED
 
      d xmlNodeAddContent...
      d                 pr                  extproc('xmlNodeAddContentLen')
      d  cur                                value like(xmlNodePtr)
      d  content                        *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
      d xmlNodeGetContent...
      d                 pr              *   extproc('xmlNodeGetContent')         xmlChar *
      d  cur                                value like(xmlNodePtr)
 
      d xmlNodeBufGetContent...
-     d                 pr            10i 0 extproc('xmlNodeBufGetContent')
+     d                 pr                  extproc('xmlNodeBufGetContent')
+     d                                     like(xmlCint)
      d  buffer                             value like(xmlBufferPtr)
      d  cur                                value like(xmlNodePtr)
 
      d xmlBufGetNodeContent...
-     d                 pr            10i 0 extproc('xmlBufGetNodeContent')
+     d                 pr                  extproc('xmlBufGetNodeContent')
+     d                                     like(xmlCint)
      d  buf                                value like(xmlBufPtr)
      d  cur                                value like(xmlNodePtr)
 
      d  cur                                value like(xmlNodePtr)
 
      d xmlNodeGetSpacePreserve...
-     d                 pr            10i 0 extproc('xmlNodeGetSpacePreserve')
+     d                 pr                  extproc('xmlNodeGetSpacePreserve')
+     d                                     like(xmlCint)
      d  cur                                value like(xmlNodePtr)
 
       /if defined(LIBXML_TREE_ENABLED)
      d xmlNodeSetSpacePreserve...
      d                 pr                  extproc('xmlNodeSetSpacePreserve')
      d  cur                                value like(xmlNodePtr)
-     d  val                          10i 0 value
+     d  val                                value like(xmlCint)
       /endif                                                                    LIBXML_TREE_ENABLED
 
      d xmlNodeGetBase  pr              *   extproc('xmlNodeGetBase')            xmlChar *
 
       * Removing content.
 
-     d xmlRemoveProp   pr            10i 0 extproc('xmlRemoveProp')
+     d xmlRemoveProp   pr                  extproc('xmlRemoveProp')
+     d                                     like(xmlCint)
      d  cur                                value like(xmlAttrPtr)
 
       /if defined(LIBXML_TREE_ENABLED)
       /define XML_TESTVAL
       /endif
       /if defined(XML_TESTVAL)
-     d xmlUnsetNsProp  pr            10i 0 extproc('xmlUnsetNsProp')
+     d xmlUnsetNsProp  pr                  extproc('xmlUnsetNsProp')
+     d                                     like(xmlCint)
      d  node                               value like(xmlNodePtr)
      d  ns                                 value like(xmlNsPtr)
      d  name                           *   value options(*string)               const xmlChar *
 
-     d xmlUnsetProp    pr            10i 0 extproc('xmlUnsetProp')
+     d xmlUnsetProp    pr                  extproc('xmlUnsetProp')
+     d                                     like(xmlCint)
      d  node                               value like(xmlNodePtr)
      d  name                           *   value options(*string)               const xmlChar *
 
       * Namespace handling.
 
      d xmlReconciliateNs...
-     d                 pr            10i 0 extproc('xmlReconciliateNs')
+     d                 pr                  extproc('xmlReconciliateNs')
+     d                                     like(xmlCint)
      d  doc                                value like(xmlDocPtr)
      d  tree                               value like(xmlNodePtr)
       /endif
      d                 pr                  extproc('xmlDocDumpFormatMemory')
      d  cur                                value like(xmlDocPtr)
      d  mem                            *                                        xmlChar * (*)
-     d  size                         10i 0
-     d  format                       10i 0 value
+     d  size                               like(xmlCint)
+     d  format                             value like(xmlCint)
 
      d xmlDocDumpMemory...
      d                 pr                  extproc('xmlDocDumpMemory')
      d  cur                                value like(xmlDocPtr)
      d  mem                            *                                        xmlChar * (*)
-     d  size                         10i 0
+     d  size                               like(xmlCint)
 
      d xmlDocDumpMemoryEnc...
      d                 pr                  extproc('xmlDocDumpMemoryEnc')
      d  out_doc                            value like(xmlDocPtr)
      d  doc_txt_ptr                    *                                        xmlChar * (*)
-     d  doc_txt_len                  10i 0
+     d  doc_txt_len                        like(xmlCint)
      d  txt_encoding                   *   value options(*string)               const char *
 
      d xmlDocDumpFormatMemoryEnc...
      d                 pr                  extproc('xmlDocDumpFormatMemoryEnc')
      d  out_doc                            value like(xmlDocPtr)
      d  doc_txt_ptr                    *                                        xmlChar * (*)
-     d  doc_txt_len                  10i 0
+     d  doc_txt_len                        like(xmlCint)
      d  txt_encoding                   *   value options(*string)               const char *
-     d  format                       10i 0 value
+     d  format                             value like(xmlCint)
 
      d xmlDocFormatDump...
-     d                 pr            10i 0 extproc('xmlDocFormatDump')
+     d                 pr                  extproc('xmlDocFormatDump')
+     d                                     like(xmlCint)
      d  f                              *   value                                FILE *
      d  cur                                value like(xmlDocPtr)
-     d  format                       10i 0 value
+     d  format                             value like(xmlCint)
 
-     d xmlDocDump      pr            10i 0 extproc('xmlDocDump')
+     d xmlDocDump      pr                  extproc('xmlDocDump')
+     d                                     like(xmlCint)
      d  f                              *   value                                FILE *
      d  cur                                value like(xmlDocPtr)
 
      d  doc                                value like(xmlDocPtr)
      d  cur                                value like(xmlNodePtr)
 
-     d xmlSaveFile     pr            10i 0 extproc('xmlSaveFile')
+     d xmlSaveFile     pr                  extproc('xmlSaveFile')
+     d                                     like(xmlCint)
      d  filename                       *   value options(*string)               const char *
      d  cur                                value like(xmlDocPtr)
 
      d xmlSaveFormatFile...
-     d                 pr            10i 0 extproc('xmlSaveFormatFile')
+     d                 pr                  extproc('xmlSaveFormatFile')
+     d                                     like(xmlCint)
      d  filename                       *   value options(*string)               const char *
      d  cur                                value like(xmlDocPtr)
-     d  format                       10i 0 value
+     d  format                             value like(xmlCint)
 
-     d xmlBufNodeDump  pr            10u 0 extproc('xmlBufNodeDump')            size_t
+     d xmlBufNodeDump  pr                  extproc('xmlBufNodeDump')
+     d                                     like(xmlCsize_t)
      d  buf                                value like(xmlBufPtr)
      d  doc                                value like(xmlDocPtr)
      d  cur                                value like(xmlNodePtr)
-     d  level                        10i 0 value
-     d  format                       10i 0 value
+     d  level                              value like(xmlCint)
+     d  format                             value like(xmlCint)
 
-     d xmlNodeDump     pr            10i 0 extproc('xmlNodeDump')
+     d xmlNodeDump     pr                  extproc('xmlNodeDump')
+     d                                     like(xmlCint)
      d  buf                                value like(xmlBufferPtr)
      d  doc                                value like(xmlDocPtr)
      d  cur                                value like(xmlNodePtr)
-     d  level                        10i 0 value
-     d  format                       10i 0 value
+     d  level                              value like(xmlCint)
+     d  format                             value like(xmlCint)
 
-     d xmlSaveFileTo   pr            10i 0 extproc('xmlSaveFileTo')
+     d xmlSaveFileTo   pr                  extproc('xmlSaveFileTo')
+     d                                     like(xmlCint)
      d  buf                                value like(xmlOutputBufferPtr)
      d  cur                                value like(xmlDocPtr)
      d  encoding                       *   value options(*string)               const char *
 
      d xmlSaveFormatFileTo...
-     d                 pr            10i 0 extproc('xmlSaveFormatFileTo')
+     d                 pr                  extproc('xmlSaveFormatFileTo')
+     d                                     like(xmlCint)
      d  buf                                value like(xmlOutputBufferPtr)
      d  cur                                value like(xmlDocPtr)
      d  encoding                       *   value options(*string)               const char *
-     d  format                       10i 0 value
+     d  format                             value like(xmlCint)
 
      d xmlNodeDumpOutput...
      d                 pr                  extproc('xmlNodeDumpOutput')
      d  buf                                value like(xmlOutputBufferPtr)
      d  doc                                value like(xmlDocPtr)
      d  cur                                value like(xmlNodePtr)
-     d  level                        10i 0 value
-     d  format                       10i 0 value
+     d  level                              value like(xmlCint)
+     d  format                             value like(xmlCint)
      d  encoding                       *   value options(*string)               const char *
 
      d xmlSaveFormatFileEnc...
-     d                 pr            10i 0 extproc('xmlSaveFormatFileEnc')
+     d                 pr                  extproc('xmlSaveFormatFileEnc')
+     d                                     like(xmlCint)
      d  filename                       *   value options(*string)               const char *
      d  cur                                value like(xmlDocPtr)
      d  encoding                       *   value options(*string)               const char *
-     d  format                       10i 0 value
+     d  format                             value like(xmlCint)
 
-     d xmlSaveFileEnc  pr            10i 0 extproc('xmlSaveFileEnc')
+     d xmlSaveFileEnc  pr                  extproc('xmlSaveFileEnc')
+     d                                     like(xmlCint)
      d  filename                       *   value options(*string)               const char *
      d  cur                                value like(xmlDocPtr)
      d  encoding                       *   value options(*string)               const char *
 
       * XHTML
 
-     d xmlIsXHTML      pr            10i 0 extproc('xmlIsXHTML')
+     d xmlIsXHTML      pr                  extproc('xmlIsXHTML')
+     d                                     like(xmlCint)
      d  systemID                       *   value options(*string)               const xmlChar *
      d  publicID                       *   value options(*string)               const xmlChar *
 
       * Compression.
 
      d xmlGetDocCompressMode...
-     d                 pr            10i 0 extproc('xmlGetDocCompressMode')
+     d                 pr                  extproc('xmlGetDocCompressMode')
+     d                                     like(xmlCint)
      d  doc                                value like(xmlDocPtr)
 
      d xmlSetDocCompressMode...
      d                 pr                  extproc('xmlSetDocCompressMode')
      d  doc                                value like(xmlDocPtr)
-     d  mode                         10i 0 value
+     d  mode                               value like(xmlCint)
 
      d xmlGetCompressMode...
-     d                 pr            10i 0 extproc('xmlGetCompressMode')
+     d                 pr                  extproc('xmlGetCompressMode')
+     d                                     like(xmlCint)
 
      d xmlSetCompressMode...
      d                 pr                  extproc('xmlSetCompressMode')
-     d  mode                         10i 0 value
+     d  mode                               value like(xmlCint)
 
       * DOM-wrapper helper functions.
 
      d  ctxt                               value like(xmlDOMWrapCtxtPtr)
 
      d xmlDOMWrapReconcileNamespaces...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                      'xmlDOMWrapReconcileNamespaces')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlDOMWrapCtxtPtr)
      d  elem                               value like(xmlNodePtr)
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d xmlDOMWrapAdoptNode...
-     d                 pr            10i 0 extproc('xmlDOMWrapAdoptNode')
+     d                 pr                  extproc('xmlDOMWrapAdoptNode')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlDOMWrapCtxtPtr)
      d  sourceDoc                          value like(xmlDocPtr)
      d  node                               value like(xmlNodePtr)
      d  destDoc                            value like(xmlDocPtr)
      d  destParent                         value like(xmlNodePtr)
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d xmlDOMWrapRemoveNode...
-     d                 pr            10i 0 extproc('xmlDOMWrapRemoveNode')
+     d                 pr                  extproc('xmlDOMWrapRemoveNode')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlDOMWrapCtxtPtr)
      d  doc                                value like(xmlDocPtr)
      d  node                               value like(xmlNodePtr)
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d xmlDOMWrapCloneNode...
-     d                 pr            10i 0 extproc('xmlDOMWrapCloneNode')
+     d                 pr                  extproc('xmlDOMWrapCloneNode')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlDOMWrapCtxtPtr)
      d  sourceDoc                          value like(xmlDocPtr)
      d  node                               value like(xmlNodePtr)
      d  clonedNode                         like(xmlNodePtr)
      d  destDoc                            value like(xmlDocPtr)
      d  destParent                         value like(xmlNodePtr)
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
       /if defined(LIBXML_TREE_ENABLED)
 
       * traversal.
 
      d xmlChildElementCount...
-     d                 pr            20u 0 extproc('xmlChildElementCount')
+     d                 pr                  extproc('xmlChildElementCount')
+     d                                     like(xmlClong)
      d  parent                             value like(xmlNodePtr)
 
      d xmlNextElementSibling...
index 9a23d80..de03392 100644 (file)
@@ -10,6 +10,7 @@
       /define XML_URI_H__
 
       /include "libxmlrpg/xmlversion"
+      /include "libxmlrpg/xmlTypesC"
       /include "libxmlrpg/tree"
 
       * xmlURI:
      d  authority                      *                                        char *
      d  server                         *                                        char *
      d  user                           *                                        char *
-     d  port                         10i 0
+     d  port                               like(xmlCint)
      d  path                           *                                        char *
      d  query                          *                                        char *
      d  fragment                       *                                        char *
-     d  cleanup                      10i 0
+     d  cleanup                            like(xmlCint)
      d  query_raw                      *                                        char *
 
      d xmlCreateURI    pr                  extproc('xmlCreateURI')
      d xmlParseURIRaw  pr                  extproc('xmlParseURIRaw')
      d                                     like(xmlURIPtr)
      d  str                            *   value options(*string)               const char *
-     d  raw                          10i 0 value
+     d  raw                                value like(xmlCint)
 
      d xmlParseURIReference...
-     d                 pr            10i 0 extproc('xmlParseURIReference')
+     d                 pr                  extproc('xmlParseURIReference')
+     d                                     like(xmlCint)
      d  uri                                value like(xmlURIPtr)
      d  str                            *   value options(*string)               const char *
 
      d xmlURIUnescapeString...
      d                 pr              *   extproc('xmlURIUnescapeString')      char *
      d  str                            *   value options(*string)               const char *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
      d  target                         *   value options(*string)               char *
 
      d xmlNormalizeURIPath...
-     d                 pr            10i 0 extproc('xmlNormalizeURIPath')
+     d                 pr                  extproc('xmlNormalizeURIPath')
+     d                                     like(xmlCint)
      d  path                           *   value options(*string)               char *
 
      d xmlURIEscape    pr              *   extproc('xmlURIEscape')              xmlChar *
index 722b89d..32ebbd3 100644 (file)
@@ -9,6 +9,7 @@
       /define XML_VALID_H__
 
       /include "libxmlrpg/xmlversion"
+      /include "libxmlrpg/xmlTypesC"
       /include "libxmlrpg/xmlerror"
       /include "libxmlrpg/tree"
       /include "libxmlrpg/list"
       * Node analysis stack used when validating within entities
       *
      d  node                               like(xmlNodePtr)                     Current parsed Node
-     d  nodeNr                       10i 0                                      Parsing stack depth
-     d  nodeMax                      10i 0                                      Max stack depth
+     d  nodeNr                             like(xmlCint)                        Parsing stack depth
+     d  nodeMax                            like(xmlCint)                        Max stack depth
      d  nodeTab                        *                                        xmlNodePtr *
       *
-     d  finishDtd                    10u 0                                      Finish validtng DTD?
+     d  finishDtd                          like(xmlCuint)
      d  doc                                like(xmlDocPtr)                      The document
-     d  valid                        10i 0                                      Temp check result
+     d  valid                              like(xmlCint)                        Temp check result
       *
       * state state used for non-determinist content validation
       *
      d  vstate                         *                                        xmlValidState *
-     d  vstateNr                     10i 0                                      Validat. stack depth
-     d  vstateMax                    10i 0                                      Max stack depth
+     d  vstateNr                           like(xmlCint)                        Validat. stack depth
+     d  vstateMax                          like(xmlCint)                        Max stack depth
      d  vstateTab                      *                                        xmlValidState *
       *
       /if defined(LIBXML_REGEXP_ENABLED)
      d xmlSnprintfElementContent...
      d                 pr                  extproc('xmlSnprintfElementContent')
      d  buf                       65535    options(*varsize)
-     d  size                         10i 0 value
+     d  size                               value like(xmlCint)
      d  content                            value like(xmlElementContentPtr)
-     d  englob                       10i 0 value
+     d  englob                             value like(xmlCint)
 
       /if defined(LIBXML_OUTPUT_ENABLED)
       * DEPRECATED
      d                 pr                  extproc('xmlSprintfElementContent')
      d  buf                       65535    options(*varsize)
      d  content                            value like(xmlElementContentPtr)
-     d  englob                       10i 0 value
+     d  englob                             value like(xmlCint)
       /endif                                                                    LIBXML_OUTPUT_ENABLD
 
       * DEPRECATED
      d  doc                                value like(xmlDocPtr)
      d  ID                             *   value options(*string)               const xmlChar *
 
-     d xmlIsID         pr            10i 0 extproc('xmlIsID')
+     d xmlIsID         pr                  extproc('xmlIsID')
+     d                                     like(xmlCint)
      d  doc                                value like(xmlDocPtr)
      d  node                               value like(xmlNodePtr)
      d  attr                               value like(xmlAttrPtr)
 
-     d xmlRemoveID     pr            10i 0 extproc('xmlRemoveID')
+     d xmlRemoveID     pr                  extproc('xmlRemoveID')
+     d                                     like(xmlCint)
      d  doc                                value like(xmlDocPtr)
      d  attr                               value like(xmlAttrPtr)
 
      d                 pr                  extproc('xmlFreeRefTable')
      d  table                              value like(xmlRefTablePtr)
 
-     d xmlIsRef        pr            10i 0 extproc('xmlIsRef')
+     d xmlIsRef        pr                  extproc('xmlIsRef')
+     d                                     like(xmlCint)
      d  doc                                value like(xmlDocPtr)
      d  node                               value like(xmlNodePtr)
      d  attr                               value like(xmlAttrPtr)
 
-     d xmlRemoveRef    pr            10i 0 extproc('xmlRemoveRef')
+     d xmlRemoveRef    pr                  extproc('xmlRemoveRef')
+     d                                     like(xmlCint)
      d  doc                                value like(xmlDocPtr)
      d  attr                               value like(xmlAttrPtr)
 
      d  ctxt                               value like(xmlValidCtxtPtr)
 
      d xmlValidateRoot...
-     d                 pr            10i 0 extproc('xmlValidateRoot')
+     d                 pr                  extproc('xmlValidateRoot')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlValidCtxtPtr)
      d  doc                                value like(xmlDocPtr)
 
      d xmlValidateElementDecl...
-     d                 pr            10i 0 extproc('xmlValidateElementDecl')
+     d                 pr                  extproc('xmlValidateElementDecl')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlValidCtxtPtr)
      d  doc                                value like(xmlDocPtr)
      d  elem                               value like(xmlElementPtr)
      d  value                          *   value options(*string)               const xmlChar *
 
      d xmlValidateAttributeDecl...
-     d                 pr            10i 0 extproc('xmlValidateAttributeDecl')
+     d                 pr                  extproc('xmlValidateAttributeDecl')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlValidCtxtPtr)
      d  doc                                value like(xmlDocPtr)
      d  attr                               value like(xmlAttributePtr)
 
      d xmlValidateAttributeValue...
-     d                 pr            10i 0 extproc('xmlValidateAttributeValue')
+     d                 pr                  extproc('xmlValidateAttributeValue')
+     d                                     like(xmlCint)
      d  type                               value like(xmlAttributeType)
      d  value                          *   value options(*string)               const xmlChar *
 
      d xmlValidateNotationDecl...
-     d                 pr            10i 0 extproc('xmlValidateNotationDecl')
+     d                 pr                  extproc('xmlValidateNotationDecl')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlValidCtxtPtr)
      d  doc                                value like(xmlDocPtr)
      d  nota                               value like(xmlNotationPtr)
 
-     d xmlValidateDtd  pr            10i 0 extproc('xmlValidateDtd')
+     d xmlValidateDtd  pr                  extproc('xmlValidateDtd')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlValidCtxtPtr)
      d  doc                                value like(xmlDocPtr)
      d  dtd                                value like(xmlDtdPtr)
 
      d xmlValidateDtdFinal...
-     d                 pr            10i 0 extproc('xmlValidateDtdFinal')
+     d                 pr                  extproc('xmlValidateDtdFinal')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlValidCtxtPtr)
      d  doc                                value like(xmlDocPtr)
 
      d xmlValidateDocument...
-     d                 pr            10i 0 extproc('xmlValidateDocument')
+     d                 pr                  extproc('xmlValidateDocument')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlValidCtxtPtr)
      d  doc                                value like(xmlDocPtr)
 
      d xmlValidateElement...
-     d                 pr            10i 0 extproc('xmlValidateElement')
+     d                 pr                  extproc('xmlValidateElement')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlValidCtxtPtr)
      d  doc                                value like(xmlDocPtr)
      d  elem                               value like(xmlNodePtr)
 
      d xmlValidateOneElement...
-     d                 pr            10i 0 extproc('xmlValidateOneElement')
+     d                 pr                  extproc('xmlValidateOneElement')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlValidCtxtPtr)
      d  doc                                value like(xmlDocPtr)
      d  elem                               value like(xmlNodePtr)
 
      d xmlValidateOneAttribute...
-     d                 pr            10i 0 extproc('xmlValidateOneAttribute')
+     d                 pr                  extproc('xmlValidateOneAttribute')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlValidCtxtPtr)
      d  doc                                value like(xmlDocPtr)
      d  elem                               value like(xmlNodePtr)
      d  value                          *   value options(*string)               const xmlChar *
 
      d xmlValidateOneNamespace...
-     d                 pr            10i 0 extproc('xmlValidateOneNamespace')
+     d                 pr                  extproc('xmlValidateOneNamespace')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlValidCtxtPtr)
      d  doc                                value like(xmlDocPtr)
      d  elem                               value like(xmlNodePtr)
      d  value                          *   value options(*string)               const xmlChar *
 
      d xmlValidateDocumentFinal...
-     d                 pr            10i 0 extproc('xmlValidateDocumentFinal')
+     d                 pr                  extproc('xmlValidateDocumentFinal')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlValidCtxtPtr)
      d  doc                                value like(xmlDocPtr)
       /endif                                                                    LIBXML_VALID_ENABLED
       /endif
       /if defined(XML_TESTVAL)
      d xmlValidateNotationUse...
-     d                 pr            10i 0 extproc('xmlValidateNotationUse')
+     d                 pr                  extproc('xmlValidateNotationUse')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlValidCtxtPtr)
      d  doc                                value like(xmlDocPtr)
      d  notationName                   *   value options(*string)               const xmlChar *
       /endif
 
      d xmlIsMixedElement...
-     d                 pr            10i 0 extproc('xmlIsMixedElement')
+     d                 pr                  extproc('xmlIsMixedElement')
+     d                                     like(xmlCint)
      d  doc                                value like(xmlDocPtr)
      d  name                           *   value options(*string)               const xmlChar *
 
 
       /if defined(LIBXML_VALID_ENABLED)
      d xmlValidGetPotentialChildren...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                      'xmlValidGetPotentialChildren')
+     d                                     like(xmlCint)
      d  ctree                          *   value                                xmlElementContent *
      d  names                          *                                        const xmlChar *(*)
-     d  len                          10i 0
-     d  max                          10i 0 value
+     d  len                                like(xmlCint)
+     d  max                                value like(xmlCint)
 
      d xmlValidGetValidElements...
-     d                 pr            10i 0 extproc('xmlValidGetValidElements')
+     d                 pr                  extproc('xmlValidGetValidElements')
+     d                                     like(xmlCint)
      d  prev                               like(xmlNodePtr)
      d  next                               like(xmlNodePtr)
      d  names                          *                                        const xmlChar *(*)
-     d  max                          10i 0 value
+     d  max                                value like(xmlCint)
 
      d xmlValidateNameValue...
-     d                 pr            10i 0 extproc('xmlValidateNameValue')
+     d                 pr                  extproc('xmlValidateNameValue')
+     d                                     like(xmlCint)
      d  value                          *   value options(*string)               const xmlChar *
 
      d xmlValidateNamesValue...
-     d                 pr            10i 0 extproc('xmlValidateNamesValue')
+     d                 pr                  extproc('xmlValidateNamesValue')
+     d                                     like(xmlCint)
      d  value                          *   value options(*string)               const xmlChar *
 
      d xmlValidateNmtokenValue...
-     d                 pr            10i 0 extproc('xmlValidateNmtokenValue')
+     d                 pr                  extproc('xmlValidateNmtokenValue')
+     d                                     like(xmlCint)
      d  value                          *   value options(*string)               const xmlChar *
 
      d xmlValidateNmtokensValue...
-     d                 pr            10i 0 extproc('xmlValidateNmtokensValue')
+     d                 pr                  extproc('xmlValidateNmtokensValue')
+     d                                     like(xmlCint)
      d  value                          *   value options(*string)               const xmlChar *
 
       /if defined(LIBXML_REGEXP_ENABLED)
       * Validation based on the regexp support
 
      d xmlValidBuildContentModel...
-     d                 pr            10i 0 extproc('xmlValidBuildContentModel')
+     d                 pr                  extproc('xmlValidBuildContentModel')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlValidCtxtPtr)
      d  elem                               value like(xmlElementPtr)
 
      d xmlValidatePushElement...
-     d                 pr            10i 0 extproc('xmlValidatePushElement')
+     d                 pr                  extproc('xmlValidatePushElement')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlValidCtxtPtr)
      d  doc                                value like(xmlDocPtr)
      d  elem                               value like(xmlNodePtr)
      d  qname                          *   value options(*string)               const xmlChar *
 
      d xmlValidatePushCData...
-     d                 pr            10i 0 extproc('xmlValidatePushCData')
+     d                 pr                  extproc('xmlValidatePushCData')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlValidCtxtPtr)
      d  data                           *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
      d xmlValidatePopElement...
-     d                 pr            10i 0 extproc('xmlValidatePopElement')
+     d                 pr                  extproc('xmlValidatePopElement')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlValidCtxtPtr)
      d  doc                                value like(xmlDocPtr)
      d  elem                               value like(xmlNodePtr)
index c0b68ff..93b7c51 100644 (file)
@@ -12,6 +12,7 @@
       /define XML_XINCLUDE_H__
 
       /include "libxmlrpg/xmlversion"
+      /include "libxmlrpg/xmlTypesC"
       /include "libxmlrpg/tree"
 
       /if defined(LIBXML_XINCLUDE_ENABLED)
       * standalone processing
 
      d xmlXIncludeProcess...
-     d                 pr            10i 0 extproc('xmlXIncludeProcess')
+     d                 pr                  extproc('xmlXIncludeProcess')
+     d                                     like(xmlCint)
      d  doc                                value like(xmlDocPtr)
 
      d xmlXIncludeProcessFlags...
-     d                 pr            10i 0 extproc('xmlXIncludeProcessFlags')
+     d                 pr                  extproc('xmlXIncludeProcessFlags')
+     d                                     like(xmlCint)
      d  doc                                value like(xmlDocPtr)
-     d  flags                        10i 0 value
+     d  flags                              value like(xmlCint)
 
      d xmlXIncludeProcessFlagsData...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlXIncludeProcessFlagsData')
+     d                                     like(xmlCint)
      d  doc                                value like(xmlDocPtr)
-     d  flags                        10i 0 value
+     d  flags                              value like(xmlCint)
      d  data                           *   value                                void *
 
      d xmlXIncludeProcessTreeFlagsData...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlXIncludeProcessTreeFlagsData')
+     d                                     like(xmlCint)
      d  tree                               value like(xmlNodePtr)
-     d  flags                        10i 0 value
+     d  flags                              value like(xmlCint)
      d  data                           *   value                                void *
 
      d xmlXIncludeProcessTree...
-     d                 pr            10i 0 extproc('xmlXIncludeProcessTree')
+     d                 pr                  extproc('xmlXIncludeProcessTree')
+     d                                     like(xmlCint)
      d  tree                               value like(xmlNodePtr)
 
      d xmlXIncludeProcessTreeFlags...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlXIncludeProcessTreeFlags')
+     d                                     like(xmlCint)
      d  tree                               value like(xmlNodePtr)
-     d  flags                        10i 0 value
+     d  flags                              value like(xmlCint)
 
 
       * contextual processing
      d  doc                                value like(xmlDocPtr)
 
      d xmlXIncludeSetFlags...
-     d                 pr            10i 0 extproc('xmlXIncludeSetFlags')
+     d                 pr                  extproc('xmlXIncludeSetFlags')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlXIncludeCtxtPtr)
-     d  flags                        10i 0 value
+     d  flags                              value like(xmlCint)
 
      d xmlXIncludeFreeContext...
      d                 pr                  extproc('xmlXIncludeFreeContext')
      d  ctxt                               value like(xmlXIncludeCtxtPtr)
 
      d xmlXIncludeProcessNode...
-     d                 pr            10i 0 extproc('xmlXIncludeProcessNode')
+     d                 pr                  extproc('xmlXIncludeProcessNode')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlXIncludeCtxtPtr)
      d  tree                               value like(xmlNodePtr)
 
index 964e605..e6ebdc6 100644 (file)
@@ -9,10 +9,12 @@
       /define XML_XLINK_H__
 
       /include "libxmlrpg/xmlversion"
-      /include "libxmlrpg/tree"
 
       /if defined(LIBXML_XPTR_ENABLED)
 
+      /include "libxmlrpg/xmlTypesC"
+      /include "libxmlrpg/tree"
+
       * Various defines for the various Link properties.
       *
       * NOTE: the link detection layer will try to resolve QName expansion
@@ -26,7 +28,8 @@
      d xlinkRole       s               *   based(######typedef######)           xmlChar *
      d xlinkTitle      s               *   based(######typedef######)           xmlChar *
 
-     d xlinkType       s             10i 0 based(######typedef######)           enum
+     d xlinkType       s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XLINK_TYPE_NONE...
      d                 c                   0
      d  XLINK_TYPE_SIMPLE...
@@ -36,7 +39,8 @@
      d  XLINK_TYPE_EXTENDED_SET...
      d                 c                   3
 
-     d xlinkShow       s             10i 0 based(######typedef######)           enum
+     d xlinkShow       s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XLINK_SHOW_NONE...
      d                 c                   0
      d  XLINK_SHOW_NEW...
@@ -46,7 +50,8 @@
      d  XLINK_SHOW_REPLACE...
      d                 c                   3
 
-     d xlinkActuate    s             10i 0 based(######typedef######)           enum
+     d xlinkActuate    s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XLINK_ACTUATE_NONE...
      d                 c                   0
      d  XLINK_ACTUATE_AUTO...
index 72911bc..6c0afcc 100644 (file)
@@ -9,6 +9,7 @@
       /define XML_IO_H__
 
       /include "libxmlrpg/xmlversion"
+      /include "libxmlrpg/xmlTypesC"
 
       * Those are the functions and datatypes for the parser input
       * I/O structures.
       *
      d  buffer                             like(xmlBufPtr)                      UTF-8 local buffer
      d  raw                                like(xmlBufPtr)                      Raw input buffer
-     d  compressed                   10i 0
-     d  error                        10i 0
-     d  rawconsumed                  20u 0
+     d  compressed                         like(xmlCint)
+     d  error                              like(xmlCint)
+     d  rawconsumed                        like(xmlCulong)
 
       /if defined(LIBXML_OUTPUT_ENABLED)
      d xmlOutputBuffer...
       *
      d  buffer                             like(xmlBufPtr)                      UTF-8/ISOLatin local
      d  conv                               like(xmlBufPtr)                      Buffer for output
-     d  written                      10i 0                                      Total # byte written
-     d  error                        10i 0
+     d  written                            like(xmlCint)                        Total # byte written
+     d  error                              like(xmlCint)
       /endif                                                                    LIBXML_OUTPUT_ENABLD
 
       * Interfaces for input
      d                 pr                  extproc('xmlCleanupInputCallbacks')
 
      d xmlPopInputCallbacks...
-     d                 pr            10i 0 extproc('xmlPopInputCallbacks')
+     d                 pr                  extproc('xmlPopInputCallbacks')
+     d                                     like(xmlCint)
 
      d xmlRegisterDefaultInputCallbacks...
      d                 pr                  extproc(
      d                 pr                  extproc(
      d                                      'xmlParserInputBufferCreateFd')
      d                                     like(xmlParserInputBufferPtr)
-     d  fd                           10i 0 value
+     d  fd                                 value like(xmlCint)
      d  enc                                value like(xmlCharEncoding)
 
      d xmlParserInputBufferCreateMem...
      d                                      'xmlParserInputBufferCreateMem')
      d                                     like(xmlParserInputBufferPtr)
      d  mem                            *   value options(*string)               const char *
-     d  size                         10i 0 value
+     d  size                               value like(xmlCint)
      d  enc                                value like(xmlCharEncoding)
 
      d xmlParserInputBufferCreateStatic...
      d                                      'xmlParserInputBufferCreateStatic')
      d                                     like(xmlParserInputBufferPtr)
      d  mem                            *   value options(*string)               const char *
-     d  size                         10i 0 value
+     d  size                               value like(xmlCint)
      d  enc                                value like(xmlCharEncoding)
 
      d xmlParserInputBufferCreateIO...
      d  enc                                value like(xmlCharEncoding)
 
      d xmlParserInputBufferRead...
-     d                 pr            10i 0 extproc('xmlParserInputBufferRead')
+     d                 pr                  extproc('xmlParserInputBufferRead')
+     d                                     like(xmlCint)
      d  in                                 value like(xmlParserInputBufferPtr)
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
      d xmlParserInputBufferGrow...
-     d                 pr            10i 0 extproc('xmlParserInputBufferGrow')
+     d                 pr                  extproc('xmlParserInputBufferGrow')
+     d                                     like(xmlCint)
      d  in                                 value like(xmlParserInputBufferPtr)
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
      d xmlParserInputBufferPush...
-     d                 pr            10i 0 extproc('xmlParserInputBufferPush')
+     d                 pr                  extproc('xmlParserInputBufferPush')
+     d                                     like(xmlCint)
      d  in                                 value like(xmlParserInputBufferPtr)
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
      d  buf                            *   value options(*string)               const char *
 
      d xmlFreeParserInputBuffer...
      d  filename                       *   value options(*string)               const char *
 
      d xmlRegisterInputCallbacks...
-     d                 pr            10i 0 extproc('xmlRegisterInputCallbacks')
+     d                 pr                  extproc('xmlRegisterInputCallbacks')
+     d                                     like(xmlCint)
      d  matchFunc                          value like(xmlInputMatchCallback)
      d  openFunc                           value like(xmlInputOpenCallback)
      d  readFunc                           value like(xmlInputReadCallback)
      d  URI                            *   value options(*string)               const char *
      d  encoder                            value
      d                                     like(xmlCharEncodingHandlerPtr)
-     d  compression                  10i 0 value
+     d  compression                        value like(xmlCint)
 
      d xmlOutputBufferCreateFile...
      d                 pr                  extproc('xmlOutputBufferCreateFile')
      d xmlOutputBufferCreateFd...
      d                 pr                  extproc('xmlOutputBufferCreateFd')
      d                                     like(xmlOutputBufferPtr)
-     d  fd                           10i 0 value
+     d  fd                                 value like(xmlCint)
      d  encoder                            value
      d                                     like(xmlCharEncodingHandlerPtr)
 
      d  out                                value like(xmlOutputBufferPtr)
 
      d xmlOutputBufferGetSize...
-     d                 pr            10u 0 extproc('xmlOutputBufferGetSize')    size_t
+     d                 pr                  extproc('xmlOutputBufferGetSize')
+     d                                     like(xmlCsize_t)
      d  out                                value like(xmlOutputBufferPtr)
 
      d xmlOutputBufferWrite...
-     d                 pr            10i 0 extproc('xmlOutputBufferWrite')
+     d                 pr                  extproc('xmlOutputBufferWrite')
+     d                                     like(xmlCint)
      d  out                                value like(xmlOutputBufferPtr)
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
      d  buf                            *   value options(*string)               const char *
 
      d xmlOutputBufferWriteString...
-     d                 pr            10i 0 extproc('xmlOutputBufferWriteString')
+     d                 pr                  extproc('xmlOutputBufferWriteString')
+     d                                     like(xmlCint)
      d  out                                value like(xmlOutputBufferPtr)
      d  str                            *   value options(*string)               const char *
 
      d xmlOutputBufferWriteEscape...
-     d                 pr            10i 0 extproc('xmlOutputBufferWriteEscape')
+     d                 pr                  extproc('xmlOutputBufferWriteEscape')
+     d                                     like(xmlCint)
      d  out                                value like(xmlOutputBufferPtr)
      d  str                            *   value options(*string)               const xmlChar *
      d  escaping                           value like(xmlCharEncodingOutputFunc)
 
      d xmlOutputBufferFlush...
-     d                 pr            10i 0 extproc('xmlOutputBufferFlush')
+     d                 pr                  extproc('xmlOutputBufferFlush')
+     d                                     like(xmlCint)
      d  out                                value like(xmlOutputBufferPtr)
 
      d xmlOutputBufferClose...
-     d                 pr            10i 0 extproc('xmlOutputBufferClose')
+     d                 pr                  extproc('xmlOutputBufferClose')
+     d                                     like(xmlCint)
      d  out                                value like(xmlOutputBufferPtr)
 
      d xmlRegisterOutputCallbacks...
-     d                 pr            10i 0 extproc('xmlRegisterOutputCallbacks')
+     d                 pr                  extproc('xmlRegisterOutputCallbacks')
+     d                                     like(xmlCint)
      d  matchFunc                          value like(xmlOutputMatchCallback)
      d  openFunc                           value like(xmlOutputOpenCallback)
      d  writeFunc                          value like(xmlOutputWriteCallback)
      d  path                           *   value options(*string)               const xmlChar *
 
      d xmlCheckFilename...
-     d                 pr            10i 0 extproc('xmlCheckFilename')
+     d                 pr                  extproc('xmlCheckFilename')
+     d                                     like(xmlCint)
      d  path                           *   value options(*string)               const char *
 
       * Default 'file://' protocol callbacks
 
-     d xmlFileMatch    pr            10i 0 extproc('xmlFileMatch')
+     d xmlFileMatch    pr                  extproc('xmlFileMatch')
+     d                                     like(xmlCint)
      d  filename                       *   value options(*string)               const char *
 
      d xmlFileOpen     pr              *   extproc('xmlFileOpen')               void *
      d  filename                       *   value options(*string)               const char *
 
-     d xmlFileRead     pr            10i 0 extproc('xmlFileRead')
+     d xmlFileRead     pr                  extproc('xmlFileRead')
+     d                                     like(xmlCint)
      d  context                        *   value                                void *
      d  buffer                    65535    options(*varsize)
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
-     d xmlFileClose    pr            10i 0 extproc('xmlFileClose')
+     d xmlFileClose    pr                  extproc('xmlFileClose')
+     d                                     like(xmlCint)
      d  context                        *   value                                void *
 
       * Default 'http://' protocol callbacks
 
       /if defined(LIBXML_HTTP_ENABLED)
-     d xmlIOHTTPMatch  pr            10i 0 extproc('xmlIOHTTPMatch')
+     d xmlIOHTTPMatch  pr                  extproc('xmlIOHTTPMatch')
+     d                                     like(xmlCint)
      d  filename                       *   value options(*string)               const char *
 
      d xmlIOHTTPOpen   pr              *   extproc('xmlIOHTTPOpen')             void *
       /if defined(LIBXML_OUTPUT_ENABLED)
      d xmlIOHTTPOpenW  pr              *   extproc('xmlIOHTTPOpenW')            void *
      d  post_uri                       *   value options(*string)               const char *
-     d  compression                  10i 0 value
+     d  compression                        value like(xmlCint)
       /endif                                                                    LIBXML_OUTPUT_ENABLD
 
-     d xmlIOHTTPRead   pr            10i 0 extproc('xmlIOHTTPRead')
+     d xmlIOHTTPRead   pr                  extproc('xmlIOHTTPRead')
+     d                                     like(xmlCint)
      d  context                        *   value                                void *
      d  buffer                    65535    options(*varsize)
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
-     d xmlIOHTTPClose  pr            10i 0 extproc('xmlIOHTTPClose')
+     d xmlIOHTTPClose  pr                  extproc('xmlIOHTTPClose')
+     d                                     like(xmlCint)
      d  context                        *   value                                void *
       /endif                                                                    LIBXML_HTTP_ENABLED
 
       * Default 'ftp://' protocol callbacks
 
       /if defined(LIBXML_FTP_ENABLED)
-     d xmlIOFTPMatch   pr            10i 0 extproc('xmlIOFTPMatch')
+     d xmlIOFTPMatch   pr                  extproc('xmlIOFTPMatch')
+     d                                     like(xmlCint)
      d  filename                       *   value options(*string)               const char *
 
      d xmlIOFTPOpen    pr              *   extproc('xmlIOFTPOpen')              void *
      d  filename                       *   value options(*string)               const char *
 
-     d xmlIOFTPRead    pr            10i 0 extproc('xmlIOFTPRead')
+     d xmlIOFTPRead    pr                  extproc('xmlIOFTPRead')
+     d                                     like(xmlCint)
      d  context                        *   value                                void *
      d  buffer                    65535    options(*varsize)
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
-     d xmlIOFTPClose   pr            10i 0 extproc('xmlIOFTPClose')
+     d xmlIOFTPClose   pr                  extproc('xmlIOFTPClose')
+     d                                     like(xmlCint)
      d  context                        *   value                                void *
       /endif                                                                    LIBXML_FTP_ENABLED
 
diff --git a/os400/libxmlrpg/xmlTypesC.rpgle b/os400/libxmlrpg/xmlTypesC.rpgle
new file mode 100644 (file)
index 0000000..48a23bf
--- /dev/null
@@ -0,0 +1,26 @@
+      * Eqivalent of C data types.
+      *
+      * Copy: See Copyright for the status of this software.
+      *
+      * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+      /if not defined(XMLTYPESC_H__)
+      /define XMLTYPESC_H__
+
+     d xmlCchar        s              3i 0 based(######typedef######)
+     d xmlCuchar       s              3u 0 based(######typedef######)
+     d xmlCshort       s              5i 0 based(######typedef######)
+     d xmlCushort      s              5u 0 based(######typedef######)
+     d xmlCint         s             10i 0 based(######typedef######)
+     d xmlCuInt        s             10u 0 based(######typedef######)
+     d xmlClong        s             10i 0 based(######typedef######)
+     d xmlCulong       s             10u 0 based(######typedef######)
+     d xmlClonglong    s             20i 0 based(######typedef######)
+     d xmlCulonglong   s             20u 0 based(######typedef######)
+     d xmlCenum        s             10i 0 based(######typedef######)
+     d xmlCssize_t     s             10i 0 based(######typedef######)
+     d xmlCsize_t      s             10u 0 based(######typedef######)
+     d xmlCfloat       s              4f   based(######typedef######)
+     d xmlCdouble      s              8f   based(######typedef######)
+
+      /endif
index 4979725..0e9cc22 100644 (file)
@@ -9,11 +9,12 @@
       /define XML_AUTOMATA_H__
 
       /include "libxmlrpg/xmlversion"
-      /include "libxmlrpg/tree"
 
       /if defined(LIBXML_REGEXP_ENABLED)
       /if defined(LIBXML_AUTOMATA_ENABLED)
 
+      /include "libxmlrpg/xmlTypesC"
+      /include "libxmlrpg/tree"
       /include "libxmlrpg/xmlregexp"
 
       * xmlAutomataPtr:
@@ -44,7 +45,8 @@
      d  am                                 value like(xmlAutomataPtr)
 
      d xmlAutomataSetFinalState...
-     d                 pr            10i 0 extproc('xmlAutomataSetFinalState')
+     d                 pr                  extproc('xmlAutomataSetFinalState')
+     d                                     like(xmlCint)
      d  am                                 value like(xmlAutomataPtr)
      d  state                              value like(xmlAutomataStatePtr)
 
@@ -89,8 +91,8 @@
      d  from                               value like(xmlAutomataStatePtr)
      d  to                                 value like(xmlAutomataStatePtr)
      d  token                          *   value options(*string)               const xmlChar *
-     d  min                          10i 0 value
-     d  max                          10i 0 value
+     d  min                                value like(xmlCint)
+     d  max                                value like(xmlCint)
      d  data                           *   value options(*string)               void *
 
      d xmlAutomataNewCountTrans2...
      d  to                                 value like(xmlAutomataStatePtr)
      d  token                          *   value options(*string)               const xmlChar *
      d  token2                         *   value options(*string)               const xmlChar *
-     d  min                          10i 0 value
-     d  max                          10i 0 value
+     d  min                                value like(xmlCint)
+     d  max                                value like(xmlCint)
      d  data                           *   value options(*string)               void *
 
      d xmlAutomataNewOnceTrans...
      d  from                               value like(xmlAutomataStatePtr)
      d  to                                 value like(xmlAutomataStatePtr)
      d  token                          *   value options(*string)               const xmlChar *
-     d  min                          10i 0 value
-     d  max                          10i 0 value
+     d  min                                value like(xmlCint)
+     d  max                                value like(xmlCint)
      d  data                           *   value options(*string)               void *
 
      d xmlAutomataNewOnceTrans2...
      d  to                                 value like(xmlAutomataStatePtr)
      d  token                          *   value options(*string)               const xmlChar *
      d  token2                         *   value options(*string)               const xmlChar *
-     d  min                          10i 0 value
-     d  max                          10i 0 value
+     d  min                                value like(xmlCint)
+     d  max                                value like(xmlCint)
      d  data                           *   value options(*string)               void *
 
      d xmlAutomataNewAllTrans...
      d  am                                 value like(xmlAutomataPtr)
      d  from                               value like(xmlAutomataStatePtr)
      d  to                                 value like(xmlAutomataStatePtr)
-     d  lax                          10i 0 value
+     d  lax                                value like(xmlCint)
 
      d xmlAutomataNewEpsilon...
      d                 pr                  extproc('xmlAutomataNewEpsilon')
      d  am                                 value like(xmlAutomataPtr)
      d  from                               value like(xmlAutomataStatePtr)
      d  to                                 value like(xmlAutomataStatePtr)
-     d  counter                      10i 0 value
+     d  counter                            value like(xmlCint)
 
      d xmlAutomataNewCounterTrans...
      d                 pr                  extproc('xmlAutomataNewCounterTrans')
      d  am                                 value like(xmlAutomataPtr)
      d  from                               value like(xmlAutomataStatePtr)
      d  to                                 value like(xmlAutomataStatePtr)
-     d  counter                      10i 0 value
+     d  counter                            value like(xmlCint)
 
      d xmlAutomataNewCounter...
-     d                 pr            10i 0 extproc('xmlAutomataNewCounter')
+     d                 pr                  extproc('xmlAutomataNewCounter')
+     d                                     like(xmlCint)
      d  am                                 value like(xmlAutomataPtr)
-     d  min                          10i 0 value
-     d  max                          10i 0 value
+     d  min                                value like(xmlCint)
+     d  max                                value like(xmlCint)
 
      d xmlAutomataCompile...
      d                 pr                  extproc('xmlAutomataCompile')
      d  am                                 value like(xmlAutomataPtr)
 
      d xmlAutomataIsDeterminist...
-     d                 pr            10i 0 extproc('xmlAutomataIsDeterminist')
+     d                 pr                  extproc('xmlAutomataIsDeterminist')
+     d                                     like(xmlCint)
      d  am                                 value like(xmlAutomataPtr)
 
       /endif                                                                    AUTOMATA_ENABLED
index b77caad..6688b37 100644 (file)
@@ -5,16 +5,18 @@
       *
       * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
 
-      /include "libxmlrpg/parser"
-
       /if not defined(XML_ERROR_H__)
       /define XML_ERROR_H__
 
+      /include "libxmlrpg/xmlTypesC"
+      /include "libxmlrpg/parser"
+
       * xmlErrorLevel:
       *
       * Indicates the level of an error
 
-     d xmlErrorLevel   s             10i 0 based(######typedef######)           enum
+     d xmlErrorLevel   s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_ERR_NONE   c                   0
      d  XML_ERR_WARNING...                                                      A simple warning
      d                 c                   1
@@ -25,7 +27,8 @@
       *
       * Indicates where an error may have come from
 
-     d xmlErrorDomain  s             10i 0 based(######typedef######)           enum
+     d xmlErrorDomain  s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_FROM_NONE  c                   0
      d  XML_FROM_PARSER...                                                      XML parser
      d                 c                   1
 
      d xmlError        ds                  based(xmlErrorPtr)
      d                                     align qualified
-     d  domain                       10i 0                                      Libpart raising err
-     d  code                         10i 0                                      Error code
+     d  domain                             like(xmlCint)                        Libpart raising err
+     d  code                               like(xmlCint)                        Error code
      d  message                        *                                        char *
      d  level                              like(xmlErrorLevel)                  Error severity
      d  file                           *                                        File name
-     d  line                         10i 0                                      Line number
+     d  line                               like(xmlCint)                        Line number
      d  str1                           *                                        char *
      d  str2                           *                                        char *
      d  str3                           *                                        char *
-     d  int1                         10i 0                                      Extra number info
-     d  int2                         10i 0                                      Error column
+     d  int1                               like(xmlCint)                        Extra number info
+     d  int2                               like(xmlCint)                        Error column
      d  ctxt                           *                                        void *
      d  node                           *                                        void *
 
       * This is an error that the XML (or HTML) parser can generate
 
      d xmlParserErrors...
-     d                 s             10i 0 based(######typedef######)           enum
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_ERR_OK     c                   0
      d  XML_ERR_INTERNAL_ERROR...
      d                 c                   1
      d xmlResetError   pr                  extproc('xmlResetError')
      d  err                                value like(xmlErrorPtr)
 
-     d xmlCopyError    pr            10i 0 extproc('xmlCopyError')
+     d xmlCopyError    pr                  extproc('xmlCopyError')
+     d                                     like(xmlCint)
      d  from                               value like(xmlErrorPtr)
      d  to                                 value like(xmlErrorPtr)
 
index 165eaca..472e941 100644 (file)
@@ -10,6 +10,7 @@
       /define DEBUG_MEMORY_ALLOC__
 
       /include "libxmlrpg/xmlversion"
+      /include "libxmlrpg/xmlTypesC"
 
       * DEBUG_MEMORY:
       *
@@ -96,7 +97,7 @@
      d  func                               value like(xmlMallocFunc)
 
      d xmlMalloc       pr              *   extproc('__call_xmlMalloc')          void *
-     d  size                         10u 0 value                                size_t
+     d  size                               value like(xmlCsize_t)
 
      d get_xmlMallocAtomic...
      d                 pr                  extproc('__get_xmlMallocAtomic')
 
      d xmlMallocAtomic...
      d                 pr              *   extproc('__call_xmlMallocAtomic')    void *
-     d  size                         10u 0 value                                size_t
+     d  size                               value like(xmlCsize_t)
 
      d get_xmlRealloc  pr                  extproc('__get_xmlRealloc')
      d                                     like(xmlReallocFunc)
 
      d xmlRealloc      pr              *   extproc('__call_xmlRealloc')         void *
      d  mem                            *   value                                void *
-     d  size                         10u 0 value                                size_t
+     d  size                               value like(xmlCsize_t)
 
      d get_xmlMemStrdup...
      d                 pr                  extproc('__get_xmlMemStrdup')
       * The xmlGc function have an extra entry for atomic block
       * allocations useful for garbage collected memory allocators
 
-     d xmlMemSetup     pr            10i 0 extproc('xmlMemSetup')
+     d xmlMemSetup     pr                  extproc('xmlMemSetup')
+     d                                     like(xmlCint)
      d  freeFunc                           value like(xmlFreeFunc)
      d  mallocFunc                         value like(xmlMallocFunc)
      d  reallocFunc                        value like(xmlReallocFunc)
      d  strdupFunc                         value like(xmlStrdupFunc)
 
-     d xmlMemGet       pr            10i 0 extproc('xmlMemGet')
+     d xmlMemGet       pr                  extproc('xmlMemGet')
+     d                                     like(xmlCint)
      d  freeFunc                           like(xmlFreeFunc)
      d  mallocFunc                         like(xmlMallocFunc)
      d  reallocFunc                        like(xmlReallocFunc)
      d  strdupFunc                         like(xmlStrdupFunc)
 
-     d xmlGcMemSetup   pr            10i 0 extproc('xmlGcMemSetup')
+     d xmlGcMemSetup   pr                  extproc('xmlGcMemSetup')
+     d                                     like(xmlCint)
      d  freeFunc                           value like(xmlFreeFunc)
      d  mallocFunc                         value like(xmlMallocFunc)
      d  mallocAtomicFunc...
      d  reallocFunc                        value like(xmlReallocFunc)
      d  strdupFunc                         value like(xmlStrdupFunc)
 
-     d xmlGcMemGet     pr            10i 0 extproc('xmlGcMemGet')
+     d xmlGcMemGet     pr                  extproc('xmlGcMemGet')
+     d                                     like(xmlCint)
      d  freeFunc                           like(xmlFreeFunc)
      d  mallocFunc                         like(xmlMallocFunc)
      d  mallocAtomicFunc...
 
       * Initialization of the memory layer.
 
-     d xmlInitMemory   pr            10i 0 extproc('xmlInitMemory')
+     d xmlInitMemory   pr                  extproc('xmlInitMemory')
+     d                                     like(xmlCint)
 
       * Cleanup of the memory layer.
 
 
       * These are specific to the XML debug memory wrapper.
 
-     d xmlMemUsed      pr            10i 0 extproc('xmlMemUsed')
+     d xmlMemUsed      pr                  extproc('xmlMemUsed')
+     d                                     like(xmlCint)
 
-     d xmlMemBlocks    pr            10i 0 extproc('xmlMemBlocks')
+     d xmlMemBlocks    pr                  extproc('xmlMemBlocks')
+     d                                     like(xmlCint)
 
      d xmlMemDisplay   pr                  extproc('xmlMemDisplay')
      d  fp                             *   value                                FILE *
      d xmlMmDisplayLast...
      d                 pr                  extproc('xmlMemDisplayLast')
      d  fp                             *   value                                FILE *
-     d  nbBytes                      20i 0 value
+     d  nbBytes                            value like(xmlClong)
 
      d xmlMemShow      pr                  extproc('xmlMemShow')
      d  fp                             *   value                                FILE *
-     d  nr                           10i 0 value
+     d  nr                                 value like(xmlCint)
 
      d xmlMemoryDump   pr                  extproc('xmlMemoryDump')
 
      d xmlMemMalloc    pr              *   extproc('xmlMemMalloc')              void *
-     d  size                         10u 0 value                                size_t
+     d  size                               value like(xmlCsize_t)
 
      d xmlMemRealloc   pr              *   extproc('xmlMemRealloc')             void *
      d  ptr                            *   value                                void *
-     d  size                         10u 0 value                                size_t
+     d  size                               value like(xmlCsize_t)
 
      d xmlMemFree      pr                  extproc('xmlMemFree')
      d  ptr                            *   value                                void *
      d  str                            *   value options(*string)               const char *
 
      d xmlMallocLoc    pr              *   extproc('xmlMallocLoc')              void *
-     d  size                         10u 0 value                                size_t
+     d  size                               value like(xmlCsize_t)
      d  file                           *   value options(*string)               const char *
-     d  line                         10i 0 value
+     d  line                               value like(xmlCint)
 
      d xmlReallocLoc   pr              *   extproc('xmlReallocLoc')              void *
      d  ptr                            *   value                                void *
-     d  size                         10u 0 value                                size_t
+     d  size                               value like(xmlCsize_t)
      d  file                           *   value options(*string)               const char *
-     d  line                         10i 0 value
+     d  line                               value like(xmlCint)
 
      d xmlMallocAtomicLoc...
      d                 pr              *   extproc('xmlMallocAtomicLoc')        void *
-     d  size                         10u 0 value                                size_t
+     d  size                               value like(xmlCsize_t)
      d  file                           *   value options(*string)               const char *
-     d  line                         10i 0 value
+     d  line                               value like(xmlCint)
 
      d xmlMemStrdupLoc...
      d                 pr              *   extproc('xmlMemStrdupLoc')           char *
      d  str                            *   value options(*string)               const char *
      d  file                           *   value options(*string)               const char *
-     d  line                         10i 0 value
+     d  line                               value like(xmlCint)
 
       /if not defined(XML_GLOBALS_H)
       /if not defined(XML_THREADS_H__)
index 09592a6..035254d 100644 (file)
@@ -13,6 +13,8 @@
 
       /if defined(LIBXML_MODULES_ENABLED)
 
+      /include "libxmlrpg/xmlTypesC"
+
       * xmlModulePtr:
       *
       * A handle to a dynamically loaded module
@@ -24,7 +26,8 @@
       * enumeration of options that can be passed down to xmlModuleOpen()
 
      d xmlModuleOption...
-     d                 s             10i 0 based(######typedef######)           enum
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_MODULE_LAZY...                                                      Lazy binding
      d                 c                   1
      d  XML_MODULE_LOCAL...                                                     Local binding
      d xmlModuleOpen   pr                  extproc('xmlModuleOpen')
      d                                     like(xmlModulePtr)
      d  filename                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d xmlModuleSymbol...
-     d                 pr            10i 0 extproc('xmlModuleSymbol')
+     d                 pr                  extproc('xmlModuleSymbol')
+     d                                     like(xmlCint)
      d  module                             value like(xmlModulePtr)
      d  name                           *   value options(*string)               const char *
      d  result                         *                                        void *(*)
 
-     d xmlModuleClose  pr            10i 0 extproc('xmlModuleClose')
+     d xmlModuleClose  pr                  extproc('xmlModuleClose')
+     d                                     like(xmlCint)
      d  module                             value like(xmlModulePtr)
 
-     d xmlModuleFree   pr            10i 0 extproc('xmlModuleFree')
+     d xmlModuleFree   pr                  extproc('xmlModuleFree')
+     d                                     like(xmlCint)
      d  module                             value like(xmlModulePtr)
 
       /endif                                                                    LIBXML_MODULES_ENBLD
index eccd37c..9ec76b3 100644 (file)
@@ -9,6 +9,7 @@
       /define XML_XMLREADER_H__
 
       /include "libxmlrpg/xmlversion"
+      /include "libxmlrpg/xmlTypesC"
       /include "libxmlrpg/tree"
       /include "libxmlrpg/xmlIO"
 
@@ -23,7 +24,8 @@
       * is used.
 
      d xmlParserSeverities...
-     d                 s             10i 0 based(######typedef######)           enum
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_PARSER_SEVERITY_VALIDITY_WARNING...
      d                 c                   1
      d  XML_PARSER_SEVERITY_VALIDITY_ERROR...
@@ -40,7 +42,8 @@
       * Internal state values for the reader.
 
      d xmlTextReaderMode...
-     d                 s             10i 0 based(######typedef######)           enum
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_TEXTREADER_MODE_INITIAL...
      d                 c                   0
      d  XML_TEXTREADER_MODE_INTERACTIVE...
@@ -61,7 +64,8 @@
       * xmlReaderForxxx APIs now.
 
      d xmlParserProperties...
-     d                 s             10i 0 based(######typedef######)           enum
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_PARSER_LOADDTD...
      d                 c                   1
      d  XML_PARSER_DEFAULTATTRS...
@@ -75,7 +79,8 @@
       *
       * Predefined constants for the different types of nodes.
 
-     d xmlReaderTypes  s             10i 0 based(######typedef######)           enum
+     d xmlReaderTypes  s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_READER_TYPE_NONE...
      d                 c                   0
      d  XML_READER_TYPE_ELEMENT...
      d  reader                             value like(xmlTextReaderPtr)
 
      d xmlTextReaderSetup...
-     d                 pr            10i 0 extproc('xmlTextReaderSetup')
+     d                 pr                  extproc('xmlTextReaderSetup')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
      d  input                              value like(xmlParserInputBufferPtr)
      d  URL                            *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
       * Iterators
 
      d xmlTextReaderRead...
-     d                 pr            10i 0 extproc('xmlTextReaderRead')
+     d                 pr                  extproc('xmlTextReaderRead')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
 
       /if defined(LIBXML_WRITER_ENABLED)
      d  reader                             value like(xmlTextReaderPtr)
 
      d xmlTextReaderReadAttributeValue...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextReaderReadAttributeValue')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
 
       * Attributes of the node
 
      d xmlTextReaderAttributeCount...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextReaderAttributeCount')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
 
      d xmlTextReaderDepth...
-     d                 pr            10i 0 extproc('xmlTextReaderDepth')
+     d                 pr                  extproc('xmlTextReaderDepth')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
 
      d xmlTextReaderHasAttributes...
-     d                 pr            10i 0 extproc('xmlTextReaderHasAttributes')
+     d                 pr                  extproc('xmlTextReaderHasAttributes')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
 
      d xmlTextReaderHasValue...
-     d                 pr            10i 0 extproc('xmlTextReaderHasValue')
+     d                 pr                  extproc('xmlTextReaderHasValue')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
 
      d xmlTextReaderIsDefault...
-     d                 pr            10i 0 extproc('xmlTextReaderIsDefault')
+     d                 pr                  extproc('xmlTextReaderIsDefault')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
 
      d xmlTextReaderIsEmptyElement...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextReaderIsEmptyElement')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
 
      d xmlTextReaderNodeType...
-     d                 pr            10i 0 extproc('xmlTextReaderNodeType')
+     d                 pr                  extproc('xmlTextReaderNodeType')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
 
      d xmlTextReaderQuoteChar...
-     d                 pr            10i 0 extproc('xmlTextReaderQuoteChar')
+     d                 pr                  extproc('xmlTextReaderQuoteChar')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
 
      d xmlTextReaderReadState...
-     d                 pr            10i 0 extproc('xmlTextReaderReadState')
+     d                 pr                  extproc('xmlTextReaderReadState')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
 
      d xmlTextReaderIsNamespaceDecl...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextReaderIsNamespaceDecl')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
 
      d xmlTextReaderConstBaseUri...
       * Methods of the XmlTextReader
 
      d xmlTextReaderClose...
-     d                 pr            10i 0 extproc('xmlTextReaderClose')
+     d                 pr                  extproc('xmlTextReaderClose')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
 
      d xmlTextReaderGetAttributeNo...
      d                 pr              *   extproc(                             xmlChar *
      d                                     'xmlTextReaderGetAttributeNo')
      d  reader                             value like(xmlTextReaderPtr)
-     d  no                           10i 0 value
+     d  no                                 value like(xmlCint)
 
      d xmlTextReaderGetAttribute...
      d                 pr              *   extproc('xmlTextReaderGetAttribute') xmlChar *
      d  prefix                         *   value options(*string)               const xmlChar *
 
      d xmlTextReaderMoveToAttributeNo...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextReaderMoveToAttributeNo')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
-     d  no                           10i 0 value
+     d  no                                 value like(xmlCint)
 
      d xmlTextReaderMoveToAttribute...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextReaderMoveToAttribute')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
      d  name                           *   value options(*string)               const xmlChar *
 
      d xmlTextReaderMoveToAttributeNs...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextReaderMoveToAttributeNs')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
      d  localName                      *   value options(*string)               const xmlChar *
      d  namespaceURI                   *   value options(*string)               const xmlChar *
 
      d xmlTextReaderMoveToFirstAttribute...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextReaderMoveToFirstAttribute')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
 
      d xmlTextReaderMoveToNextAttribute...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextReaderMoveToNextAttribute')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
 
      d xmlTextReaderMoveToElement...
-     d                 pr            10i 0 extproc('xmlTextReaderMoveToElement')
+     d                 pr                  extproc('xmlTextReaderMoveToElement')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
 
      d xmlTextReaderNormalization...
-     d                 pr            10i 0 extproc('xmlTextReaderNormalization')
+     d                 pr                  extproc('xmlTextReaderNormalization')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
 
      d xmlTextReaderConstEncoding...
       * Extensions
 
      d xmlTextReaderSetParserProp...
-     d                 pr            10i 0 extproc('xmlTextReaderSetParserProp')
+     d                 pr                  extproc('xmlTextReaderSetParserProp')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
-     d  prop                         10i 0 value
-     d  value                        10i 0 value
+     d  prop                               value like(xmlCint)
+     d  value                              value like(xmlCint)
 
      d xmlTextReaderGetParserProp...
-     d                 pr            10i 0 extproc('xmlTextReaderGetParserProp')
+     d                 pr                  extproc('xmlTextReaderGetParserProp')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
-     d  prop                         10i 0 value
+     d  prop                               value like(xmlCint)
 
      d xmlTextReaderCurrentNode...
      d                 pr                  extproc('xmlTextReaderCurrentNode')
      d  reader                             value like(xmlTextReaderPtr)
 
      d xmlTextReaderGetParserLineNumber...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextReaderGetParserLineNumber')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
 
      d xmlTextReaderGetParserColumnNumber...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextReaderGetParserColumnNumber')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
 
      d xmlTextReaderPreserve...
 
       /if defined(LIBXML_PATTERN_ENABLED)
      d xmlTextReaderPreservePattern...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextReaderPreservePattern')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
      d  pattern                        *   value options(*string)               const xmlChar *
      d  namespaces                     *                                        const xmlChar *(*)
      d  reader                             value like(xmlTextReaderPtr)
 
      d xmlTextReaderNext...
-     d                 pr            10i 0 extproc('xmlTextReaderNext')
+     d                 pr                  extproc('xmlTextReaderNext')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
 
      d xmlTextReaderNextSibling...
-     d                 pr            10i 0 extproc('xmlTextReaderNextSibling')
+     d                 pr                  extproc('xmlTextReaderNextSibling')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
 
      d xmlTextReaderIsValid...
-     d                 pr            10i 0 extproc('xmlTextReaderIsValid')
+     d                 pr                  extproc('xmlTextReaderIsValid')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
 
       /if defined(LIBXML_SCHEMAS_ENABLED)
      d xmlTextReaderRelaxNGValidate...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextReaderRelaxNGValidate')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
      d  rng                            *   value options(*string)               const char *
 
      d xmlTextReaderRelaxNGValidateCtxt...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextReaderRelaxNGValidateCtxt')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
      d  ctxt                               value like(xmlRelaxNGValidCtxtPtr)
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d xmlTextReaderRelaxNGSetSchema...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextReaderRelaxNGSetSchema')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
      d  schema                             value like(xmlRelaxNGPtr)
 
      d xmlTextReaderSchemaValidate...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextReaderSchemaValidate')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
      d  xsd                            *   value options(*string)               const char *
 
      d xmlTextReaderSchemaValidateCtxt...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextReaderSchemaValidateCtxt')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
      d  ctxt                               value like(xmlSchemaValidCtxtPtr)
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d xmlTextReaderSetSchema...
-     d                 pr            10i 0 extproc('xmlTextReaderSetSchema')
+     d                 pr                  extproc('xmlTextReaderSetSchema')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
      d  schema                             value like(xmlSchemaPtr)
       /endif
      d  reader                             value like(xmlTextReaderPtr)
 
      d xmlTextReaderStandalone...
-     d                 pr            10i 0 extproc('xmlTextReaderStandalone')
+     d                 pr                  extproc('xmlTextReaderStandalone')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
 
       * Index lookup
 
      d xmlTextReaderByteConsumed...
-     d                 pr            20i 0 extproc('xmlTextReaderByteConsumed')
+     d                 pr                  extproc('xmlTextReaderByteConsumed')
+     d                                     like(xmlClong)
      d  reader                             value like(xmlTextReaderPtr)
 
       * New more complete APIs for simpler creation and reuse of readers
      d  cur                            *   value options(*string)               const xmlChar *
      d  URL                            *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d xmlReaderForFile...
      d                 pr                  extproc('xmlReaderForFile')
      d                                     like(xmlTextReaderPtr)
      d  filename                       *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d xmlReaderForMemory...
      d                 pr                  extproc('xmlReaderForMemory')
      d                                     like(xmlTextReaderPtr)
      d  buffer                         *   value options(*string)               const char *
-     d  size                         10i 0 value
+     d  size                               value like(xmlCint)
      d  URL                            *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d xmlReaderForFd  pr                  extproc('xmlReaderForFd')
      d                                     like(xmlTextReaderPtr)
-     d  fd                           10i 0 value
+     d  fd                                 value like(xmlCint)
      d  URL                            *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d xmlReaderForIO  pr                  extproc('xmlReaderForIO')
      d                                     like(xmlTextReaderPtr)
      d  ioctx                          *   value                                void *
      d  URL                            *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d xmlReaderNewWalker...
-     d                 pr            10i 0 extproc('xmlReaderNewWalker')
+     d                 pr                  extproc('xmlReaderNewWalker')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
      d  doc                                value like(xmlDocPtr)
 
      d xmlReaderNewDoc...
-     d                 pr            10i 0 extproc('xmlReaderNewDoc')
+     d                 pr                  extproc('xmlReaderNewDoc')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
      d  cur                            *   value options(*string)               const xmlChar *
      d  URL                            *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d xmlReaderNewFile...
-     d                 pr            10i 0 extproc('xmlReaderNewFile')
+     d                 pr                  extproc('xmlReaderNewFile')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
      d  filename                       *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d xmlReaderNewMemory...
-     d                 pr            10i 0 extproc('xmlReaderNewMemory')
+     d                 pr                  extproc('xmlReaderNewMemory')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
      d  buffer                         *   value options(*string)               const char *
-     d  size                         10i 0 value
+     d  size                               value like(xmlCint)
      d  URL                            *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
-     d xmlReaderNewFd  pr            10i 0 extproc('xmlReaderNewFd')
+     d xmlReaderNewFd  pr                  extproc('xmlReaderNewFd')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
-     d  fd                           10i 0 value
+     d  fd                                 value like(xmlCint)
      d  URL                            *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
-     d xmlReaderNewIO  pr            10i 0 extproc('xmlReaderNewIO')
+     d xmlReaderNewIO  pr                  extproc('xmlReaderNewIO')
+     d                                     like(xmlCint)
      d  reader                             value like(xmlTextReaderPtr)
      d  ioread                             value like(xmlInputReadCallback)
      d  ioclose                            value like(xmlInputCloseCallback)
      d  ioctx                          *   value                                void *
      d  URL                            *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
       * Error handling extensions
 
      d                                     procptr
 
      d xmlTextReaderLocatorLineNumber...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextReaderLocatorLineNumber')
+     d                                     like(xmlCint)
      d  locator                            value like(xmlTextReaderLocatorPtr)
 
      d xmlTextReaderLocatorBaseURI...
index 65c2d07..01d411a 100644 (file)
@@ -13,6 +13,8 @@
 
       /if defined(LIBXML_REGEXP_ENABLED)
 
+      /include "libxmlrpg/xmlTypesC"
+
       * xmlRegexpPtr:
       *
       * A libxml regular expression, they can actually be far more complex
@@ -41,7 +43,8 @@
      d                 pr                  extproc('xmlRegFreeRegexp')
      d  regexp                             value like(xmlRegexpPtr)
 
-     d xmlRegexpExec   pr            10i 0 extproc('xmlRegexpExec')
+     d xmlRegexpExec   pr                  extproc('xmlRegexpExec')
+     d                                     like(xmlCint)
      d  comp                               value like(xmlRegexpPtr)
      d  value                          *   value options(*string)               const xmlChar *
 
@@ -50,7 +53,8 @@
      d  regexp                             value like(xmlRegexpPtr)
 
      d xmlRegexpIsDeterminist...
-     d                 pr            10i 0 extproc('xmlRegexpIsDeterminist')
+     d                 pr                  extproc('xmlRegexpIsDeterminist')
+     d                                     like(xmlCint)
      d  comp                               value like(xmlRegexpPtr)
 
       * xmlRegExecCallbacks:
      d  exec                               value like(xmlRegExecCtxtPtr)
 
      d xmlRegExecPushString...
-     d                 pr            10i 0 extproc('xmlRegExecPushString')
+     d                 pr                  extproc('xmlRegExecPushString')
+     d                                     like(xmlCint)
      d  exec                               value like(xmlRegExecCtxtPtr)
      d  value                          *   value options(*string)               const xmlChar *
      d  data                           *   value                                void *
 
      d xmlRegExecPushString2...
-     d                 pr            10i 0 extproc('xmlRegExecPushString2')
+     d                 pr                  extproc('xmlRegExecPushString2')
+     d                                     like(xmlCint)
      d  exec                               value like(xmlRegExecCtxtPtr)
      d  value                          *   value options(*string)               const xmlChar *
      d  value2                         *   value options(*string)               const xmlChar *
      d  data                           *   value                                void *
 
      d xmlRegExecNextValues...
-     d                 pr            10i 0 extproc('xmlRegExecNextValues')
+     d                 pr                  extproc('xmlRegExecNextValues')
+     d                                     like(xmlCint)
      d  exec                               value like(xmlRegExecCtxtPtr)
-     d  nbval                        10i 0
-     d  nbneg                        10i 0
+     d  nbval                              like(xmlCint)
+     d  nbneg                              like(xmlCint)
      d  values                         *                                        xmlChar * (*)
-     d  terminal                     10i 0
+     d  terminal                           like(xmlCint)
 
      d xmlRegExecErrInfo...
-     d                 pr            10i 0 extproc('xmlRegExecErrInfo')
+     d                 pr                  extproc('xmlRegExecErrInfo')
+     d                                     like(xmlCint)
      d  exec                               value like(xmlRegExecCtxtPtr)
      d  string                         *                                        const xmlChar * (*)
-     d  nbval                        10i 0
-     d  nbneg                        10i 0
+     d  nbval                              like(xmlCint)
+     d  nbneg                              like(xmlCint)
      d  values                         *                                        xmlChar * (*)
-     d  terminal                     10i 0
+     d  terminal                           like(xmlCint)
 
       /if defined(LIBXML_EXPR_ENABLED)
 
 
      d xmlExpNewCtxt   pr                  extproc('xmlExpNewCtxt')
      d                                     like(xmlExpCtxtPtr)
-     d  maxNodes                     10i 0 value
+     d  maxNodes                           value like(xmlCint)
      d  dict                               value like(xmlDictPtr)
 
      d xmlExpCtxtNbNodes...
-     d                 pr            10i 0 extproc('xmlExpCtxtNbNodes')
+     d                 pr                  extproc('xmlExpCtxtNbNodes')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlExpCtxtPtr)
 
      d xmlExpCtxtNbCons...
-     d                 pr            10i 0 extproc('xmlExpCtxtNbCons')
+     d                 pr                  extproc('xmlExpCtxtNbCons')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlExpCtxtPtr)
 
       * Expressions are trees but the tree is opaque
 
      d xmlExpNodePtr   s               *   based(######typedef######)
 
-     d xmlExpNodeType  s             10i 0 based(######typedef######)           enum
+     d xmlExpNodeType  s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_EXP_EMPTY  c                   0
      d  XML_EXP_FORBID...
      d                 c                   1
      d                                     like(xmlExpNodePtr)
      d  ctxt                               value like(xmlExpCtxtPtr)
      d  name                           *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
      d xmlExpNewOr     pr                  extproc('xmlExpNewOr')
      d                                     like(xmlExpNodePtr)
      d                                     like(xmlExpNodePtr)
      d  ctxt                               value like(xmlExpCtxtPtr)
      d  subset                             value like(xmlExpNodePtr)
-     d  min                          10i 0 value
-     d  max                          10i 0 value
+     d  min                                value like(xmlCint)
+     d  max                                value like(xmlCint)
 
       * The really interesting APIs
 
      d xmlExpIsNillable...
-     d                 pr            10i 0 extproc('xmlExpIsNillable')
+     d                 pr                  extproc('xmlExpIsNillable')
+     d                                     like(xmlCint)
      d  expr                               value like(xmlExpNodePtr)
 
-     d xmlExpMaxToken  pr            10i 0 extproc('xmlExpMaxToken')
+     d xmlExpMaxToken  pr                  extproc('xmlExpMaxToken')
+     d                                     like(xmlCint)
      d  expr                               value like(xmlExpNodePtr)
 
      d xmlExpGetLanguage...
-     d                 pr            10i 0 extproc('xmlExpGetLanguage')
+     d                 pr                  extproc('xmlExpGetLanguage')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlExpCtxtPtr)
      d  expr                               value like(xmlExpNodePtr)
      d  langList                       *                                        const xmlChar *(*)
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
-     d xmlExpGetStart  pr            10i 0 extproc('xmlExpGetStart')
+     d xmlExpGetStart  pr                  extproc('xmlExpGetStart')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlExpCtxtPtr)
      d  expr                               value like(xmlExpNodePtr)
      d  tokList                        *                                        const xmlChar *(*)
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
      d xmlExpStringDerive...
      d                 pr                  extproc('xmlExpStringDerive')
      d  ctxt                               value like(xmlExpCtxtPtr)
      d  expr                               value like(xmlExpNodePtr)
      d  str                            *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
      d xmlExpExpDerive...
      d                 pr                  extproc('xmlExpExpDerive')
      d  expr                               value like(xmlExpNodePtr)
      d  sub                                value like(xmlExpNodePtr)
 
-     d xmlExpSubsume   pr            10i 0 extproc('xmlExpSubsume')
+     d xmlExpSubsume   pr                  extproc('xmlExpSubsume')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlExpCtxtPtr)
      d  expr                               value like(xmlExpNodePtr)
      d  sub                                value like(xmlExpNodePtr)
index efcb09f..ad0d15d 100644 (file)
@@ -9,18 +9,21 @@
       /define XML_XMLSAVE_H__
 
       /include "libxmlrpg/xmlversion"
+
+      /if defined(LIBXML_OUTPUT_ENABLED)
+
+      /include "libxmlrpg/xmlTypesC"
       /include "libxmlrpg/tree"
       /include "libxmlrpg/encoding"
       /include "libxmlrpg/xmlIO"
 
-      /if defined(LIBXML_OUTPUT_ENABLED)
-
       * xmlSaveOption:
       *
       * This is the set of XML save options that can be passed down
       * to the xmlSaveToFd() and similar calls.
 
-     d xmlSaveOption   s             10i 0 based(######typedef######)           enum
+     d xmlSaveOption   s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_SAVE_FORMAT...                                                      Format save output
      d                 c                   X'0001'
      d  XML_SAVE_NO_DECL...                                                     Drop xml declaration
 
      d xmlSaveToFd     pr                  extproc('xmlSaveToFd')
      d                                     like(xmlSaveCtxtPtr)
-     d  fd                           10i 0 value
+     d  fd                                 value like(xmlCint)
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d xmlSaveToFilename...
      d                 pr                  extproc('xmlSaveToFilename')
      d                                     like(xmlSaveCtxtPtr)
      d  filename                       *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d xmlSaveToBuffer...
      d                 pr                  extproc('xmlSaveToBuffer')
      d                                     like(xmlSaveCtxtPtr)
      d  buffer                             value like(xmlBufferPtr)
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
      d xmlSaveToIO     pr                  extproc('xmlSaveToIO')
      d                                     like(xmlSaveCtxtPtr)
      d  ioclose                            value like(xmlOutputCloseCallback)
      d  ioctx                          *   value                                void *
      d  encoding                       *   value options(*string)               const char *
-     d  options                      10i 0 value
+     d  options                            value like(xmlCint)
 
-     d xmlSaveDoc      pr            20i 0 extproc('xmlSaveDoc')
+     d xmlSaveDoc      pr                  extproc('xmlSaveDoc')
+     d                                     like(xmlClong)
      d  ctxt                               value like(xmlSaveCtxtPtr)
      d  doc                                value like(xmlDocPtr)
 
-     d xmlSaveTree     pr            20i 0 extproc('xmlSaveTree')
+     d xmlSaveTree     pr                  extproc('xmlSaveTree')
+     d                                     like(xmlClong)
      d  ctxt                               value like(xmlSaveCtxtPtr)
      d  node                               value like(xmlNodePtr)
 
-     d xmlSaveFlush    pr            10i 0 extproc('xmlSaveFlush')
+     d xmlSaveFlush    pr                  extproc('xmlSaveFlush')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlSaveCtxtPtr)
 
-     d xmlSaveClose    pr            10i 0 extproc('xmlSaveClose')
+     d xmlSaveClose    pr                  extproc('xmlSaveClose')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlSaveCtxtPtr)
 
      d xmlSaveSetEscape...
-     d                 pr            10i 0 extproc('xmlSaveSetEscape')
+     d                 pr                  extproc('xmlSaveSetEscape')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlSaveCtxtPtr)
      d  escape                             value like(xmlCharEncodingOutputFunc)
 
      d xmlSaveSetAttrEscape...
-     d                 pr            10i 0 extproc('xmlSaveSetAttrEscape')
+     d                 pr                  extproc('xmlSaveSetAttrEscape')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlSaveCtxtPtr)
      d  escape                             value like(xmlCharEncodingOutputFunc)
 
index 865dd26..f34ddcd 100644 (file)
 
       /if defined(LIBXML_SCHEMAS_ENABLED)
 
+      /include "libxmlrpg/xmlTypesC"
       /include "libxmlrpg/tree"
 
       * This error codes are obsolete; not used any more.
 
      d xmlSchemaValidError...
-     d                 s             10i 0 based(######typedef######)           enum
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_SCHEMAS_ERR_OK...
      d                 c                   0
      d  XML_SCHEMAS_ERR_NOROOT...
@@ -81,7 +83,8 @@
       * This is the set of XML Schema validation options.
 
      d xmlSchemaValidOption...
-     d                 s             10i 0 based(######typedef######)           enum
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
       *
       * Default/fixed: create an attribute node
       * or an element's text node on the instance.
      d                 pr                  extproc('xmlSchemaNewMemParserCtxt')
      d                                     like(xmlSchemaParserCtxtPtr)
      d buffer                          *   value options(*string)               const char *
-     d size                          10i 0 value
+     d size                                value like(xmlCint)
 
      d xmlSchemaNewDocParserCtxt...
      d                 pr                  extproc('xmlSchemaNewDocParserCtxt')
      d ctx                             *   value                                void *
 
      d xmlSchemaGetParserErrors...
-     d                 pr            10i 0 extproc('xmlSchemaGetParserErrors')
+     d                 pr                  extproc('xmlSchemaGetParserErrors')
+     d                                     like(xmlCint)
      d ctxt                                value like(xmlSchemaParserCtxtPtr)
      d err                                 like(xmlSchemaValidityErrorFunc)
      d warn                                like(xmlSchemaValidityWarningFunc)
      d ctx                             *                                        void *(*)
 
      d xmlSchemaIsValid...
-     d                 pr            10i 0 extproc('xmlSchemaIsValid')
+     d                 pr                  extproc('xmlSchemaIsValid')
+     d                                     like(xmlCint)
      d ctxt                                value like(xmlSchemaValidCtxtPtr)
 
      d xmlSchemaParse  pr                  extproc('xmlSchemaParse')
      d ctx                             *   value                                void *
 
      d xmlSchemaGetValidErrors...
-     d                 pr            10i 0 extproc('xmlSchemaGetValidErrors')
+     d                 pr                  extproc('xmlSchemaGetValidErrors')
+     d                                     like(xmlCint)
      d ctxt                                value like(xmlSchemaValidCtxtPtr)
      d err                                 like(xmlSchemaValidityErrorFunc)
      d warn                                like(xmlSchemaValidityWarningFunc)
      d ctx                             *                                        void *(*)
 
      d xmlSchemaSetValidOptions...
-     d                 pr            10i 0 extproc('xmlSchemaSetValidOptions')
+     d                 pr                  extproc('xmlSchemaSetValidOptions')
+     d                                     like(xmlCint)
      d ctxt                                value like(xmlSchemaValidCtxtPtr)
-     d options                       10i 0 value
+     d options                             value like(xmlCint)
 
      d xmlSchemaValidateSetFilename...
      d                 pr                  extproc(
      d filename                        *   value options(*string)               const char *
 
      d xmlSchemaValidCtxtGetOptions...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlSchemaValidCtxtGetOptions')
+     d                                     like(xmlCint)
      d ctxt                                value like(xmlSchemaValidCtxtPtr)
 
      d xmlSchemaNewValidCtxt...
      d ctxt                                value like(xmlSchemaValidCtxtPtr)
 
      d xmlSchemaValidateDoc...
-     d                 pr            10i 0 extproc('xmlSchemaValidateDoc')
+     d                 pr                  extproc('xmlSchemaValidateDoc')
+     d                                     like(xmlCint)
      d ctxt                                value like(xmlSchemaValidCtxtPtr)
      d instance                            value like(xmlDocPtr)
 
      d xmlSchemaValidateOneElement...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlSchemaValidateOneElement')
+     d                                     like(xmlCint)
      d ctxt                                value like(xmlSchemaValidCtxtPtr)
      d elem                                value like(xmlNodePtr)
 
      d xmlSchemaValidateStream...
-     d                 pr            10i 0 extproc('xmlSchemaValidateStream')
+     d                 pr                  extproc('xmlSchemaValidateStream')
+     d                                     like(xmlCint)
      d ctxt                                value like(xmlSchemaValidCtxtPtr)
      d input                               value like(xmlParserInputBufferPtr)
      d enc                                 value like(xmlCharEncoding)
      d user_data                       *   value                                void *
 
      d xmlSchemaValidateFile...
-     d                 pr            10i 0 extproc('xmlSchemaValidateFile')
+     d                 pr                  extproc('xmlSchemaValidateFile')
+     d                                     like(xmlCint)
      d ctxt                                value like(xmlSchemaValidCtxtPtr)
      d filename                        *   value options(*string)               const char *
-     d options                       10i 0 value
+     d options                             value like(xmlCint)
 
      d xmlSchemaValidCtxtGetParserCtxt...
      d                 pr                  extproc(
      d user_data                       *                                        void *(*)
 
      d xmlSchemaSAXUnplug...
-     d                 pr            10i 0 extproc('xmlSchemaSAXUnplug')
+     d                 pr                  extproc('xmlSchemaSAXUnplug')
+     d                                     like(xmlCint)
      d plug                                value like(xmlSchemaSAXPlugPtr)
 
      d xmlSchemaValidateSetLocator...
index 6433c32..ecd6aba 100644 (file)
 
       /if defined(LIBXML_SCHEMAS_ENABLED)
 
+      /include "libxmlrpg/xmlTypesC"
       /include "libxmlrpg/schemasInternals"
       /include "libxmlrpg/xmlschemas"
 
      d xmlSchemaWhitespaceValueType...
-     d                 s             10i 0 based(######typedef######)           enum
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XML_SCHEMA_WHITESPACE_UNKNOWN...
      d                 c                   0
      d  XML_SCHEMA_WHITESPACE_PRESERVE...
      d  ns                             *   value options(*string)               const xmlChar *
 
      d xmlSchemaValidatePredefinedType...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlSchemaValidatePredefinedType')
+     d                                     like(xmlCint)
      d  type                               value like(xmlSchemaTypePtr)
      d  value                          *   value options(*string)               const xmlChar *
      d  val                            *   value                                xmlSchemaValPtr *
 
      d xmlSchemaValPredefTypeNode...
-     d                 pr            10i 0 extproc('xmlSchemaValPredefTypeNode')
+     d                 pr                  extproc('xmlSchemaValPredefTypeNode')
+     d                                     like(xmlCint)
      d  type                               value like(xmlSchemaTypePtr)
      d  value                          *   value options(*string)               const xmlChar *
      d  val                            *   value                                xmlSchemaValPtr *
      d  node                               value like(xmlNodePtr)
 
      d xmlSchemaValidateFacet...
-     d                 pr            10i 0 extproc('xmlSchemaValidateFacet')
+     d                 pr                  extproc('xmlSchemaValidateFacet')
+     d                                     like(xmlCint)
      d  base                               value like(xmlSchemaTypePtr)
      d  facet                              value like(xmlSchemaFacetPtr)
      d  value                          *   value options(*string)               const xmlChar *
      d  val                                value like(xmlSchemaValPtr)
 
      d xmlSchemaValidateFacetWhtsp...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlSchemaValidateFacetWhtsp')
+     d                                     like(xmlCint)
      d  facet                              value like(xmlSchemaFacetPtr)
      d  fws                                value
      d                                     like(xmlSchemaWhitespaceValueType)
@@ -81,7 +87,8 @@
      d                                     like(xmlSchemaFacetPtr)
 
      d xmlSchemaCheckFacet...
-     d                 pr            10i 0 extproc('xmlSchemaCheckFacet')
+     d                 pr                  extproc('xmlSchemaCheckFacet')
+     d                                     like(xmlCint)
      d  facet                              value like(xmlSchemaFacetPtr)
      d  typeDecl                           value like(xmlSchemaTypePtr)
      d  ctxt                               value like(xmlSchemaParserCtxtPtr)
@@ -92,7 +99,8 @@
      d  facet                              value like(xmlSchemaFacetPtr)
 
      d xmlSchemaCompareValues...
-     d                 pr            10i 0 extproc('xmlSchemaCompareValues')
+     d                 pr                  extproc('xmlSchemaCompareValues')
+     d                                     like(xmlCint)
      d  x                                  value like(xmlSchemaValPtr)
      d  y                                  value like(xmlSchemaValPtr)
 
      d  type                               value like(xmlSchemaTypePtr)
 
      d xmlSchemaValidateListSimpleTypeFacet...
-     d                 pr            10i 0 extproc('xmlSchemaValidateListSimple-
+     d                 pr                  extproc('xmlSchemaValidateListSimple-
      d                                     TypeFacet')
+     d                                     like(xmlCint)
      d  facet                              value like(xmlSchemaFacetPtr)
      d  value                          *   value options(*string)               const xmlChar *
-     d  actualLen                    20u 0 value
+     d  actualLen                          value like(xmlCulong)
      d  expectedLen                    *   value                                unsigned long *
 
      d xmlSchemaGetBuiltInType...
      d  type                               value like(xmlSchemaValType)
 
      d xmlSchemaIsBuiltInTypeFacet...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlSchemaIsBuiltInTypeFacet')
+     d                                     like(xmlCint)
      d  type                               value like(xmlSchemaTypePtr)
-     d  facetType                    10i 0 value
+     d  facetType                          value like(xmlCint)
 
      d xmlSchemaCollapseString...
      d                 pr              *   extproc('xmlSchemaCollapseString')   xmlChar *
      d  value                          *   value options(*string)               const xmlChar *
 
      d xmlSchemaGetFacetValueAsULong...
-     d                 pr            20u 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlSchemaGetFacetValueAsULong')
+     d                                     like(xmlCulong)
      d  facet                              value like(xmlSchemaFacetPtr)
 
      d xmlSchemaValidateLengthFacet...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlSchemaValidateLengthFacet')
+     d                                     like(xmlCint)
      d  type                               value like(xmlSchemaTypePtr)
      d  facet                              value like(xmlSchemaFacetPtr)
      d  value                          *   value options(*string)               const xmlChar *
      d  val                                value like(xmlSchemaValPtr)
-     d  length                       20u 0
+     d  length                             like(xmlCulong)
 
      d xmlSchemaValidateLengthFacetWhtsp...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlSchemaValidateLengthFacetWhtsp')
+     d                                     like(xmlCint)
      d  facet                              value like(xmlSchemaFacetPtr)
      d  valType                            value like(xmlSchemaValType)
      d  value                          *   value options(*string)               const xmlChar *
      d  val                                value like(xmlSchemaValPtr)
-     d  length                       20u 0
+     d  length                             like(xmlCulong)
      d  ws                                 value
      d                                     like(xmlSchemaWhitespaceValueType)
 
      d xmlSchemaValPredefTypeNodeNoNorm...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlSchemaValPredefTypeNodeNoNorm')
+     d                                     like(xmlCint)
      d  type                               value like(xmlSchemaTypePtr)
      d  value                          *   value options(*string)               const xmlChar *
      d  val                                like(xmlSchemaValPtr)
      d  node                               value like(xmlNodePtr)
 
      d xmlSchemaGetCanonValue...
-     d                 pr            10i 0 extproc('xmlSchemaGetCanonValue')
+     d                 pr                  extproc('xmlSchemaGetCanonValue')
+     d                                     like(xmlCint)
      d  val                                value like(xmlSchemaValPtr)
      d  retValue                       *   value                                const xmlChar * *
 
      d xmlSchemaGetCanonValueWhtsp...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlSchemaGetCanonValueWhtsp')
+     d                                     like(xmlCint)
      d  val                                value like(xmlSchemaValPtr)
      d  retValue                       *   value                                const xmlChar * *
      d  ws                                 value
      d                                     like(xmlSchemaWhitespaceValueType)
 
      d xmlSchemaValueAppend...
-     d                 pr            10i 0 extproc('xmlSchemaValueAppend')
+     d                 pr                  extproc('xmlSchemaValueAppend')
+     d                                     like(xmlCint)
      d  prev                               value like(xmlSchemaValPtr)
      d  cur                                value like(xmlSchemaValPtr)
 
      d  val                                value like(xmlSchemaValPtr)
 
      d xmlSchemaValueGetAsBoolean...
-     d                 pr            10i 0 extproc('xmlSchemaValueGetAsBoolean')
+     d                 pr                  extproc('xmlSchemaValueGetAsBoolean')
+     d                                     like(xmlCint)
      d  val                                value like(xmlSchemaValPtr)
 
      d xmlSchemaNewStringValue...
      d  localName                      *   value options(*string)               const xmlChar *
 
      d xmlSchemaCompareValuesWhtsp...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlSchemaCompareValuesWhtsp')
+     d                                     like(xmlCint)
      d  x                                  value like(xmlSchemaValPtr)
      d  xws                                value
      d                                     like(xmlSchemaWhitespaceValueType)
index 4e6f121..3c8e200 100644 (file)
@@ -8,6 +8,7 @@
       /define XML_STDARG_H__
 
       /include "libxmlrpg/xmlversion"
+      /include "libxmlrpg/xmlTypesC"
 
       * The va_list object.
 
       * Procedures.
 
      d xmlVaStart      pr                  extproc('__xmlVaStart')
-     d  list                               like(xmlVaList)
+     d  list                               likeds(xmlVaList)
      d  lastargaddr                    *   value
-     d  lastargsize                  10u 0 value
+     d  lastargsize                        value like(xmlCsize_t)
 
      d xmlVaArg        pr              *   extproc('__xmlVaArg')
-     d  list                               like(xmlVaList)
+     d  list                               likeds(xmlVaList)
      d  dest                           *   value
-     d  argsize                      10i 0 value
+     d  argsize                            value like(xmlCsize_t)
 
      d xmlVaEnd        pr                  extproc('__xmlVaEnd')
-     d  list                               like(xmlVaList)
+     d  list                               likeds(xmlVaList)
 
       /endif                                                                    XML_STDARG_H__
index 41e9eb5..8980fc0 100644 (file)
@@ -10,6 +10,7 @@
       /define XML_STRING_H__
 
       /include "libxmlrpg/xmlversion"
+      /include "libxmlrpg/xmlTypesC"
       /include "libxmlrpg/xmlstdarg"
 
       * xmlChar:
@@ -18,7 +19,8 @@
       * It's unsigned allowing to pinpoint case where char * are assigned
       * to xmlChar * (possibly making serialization back impossible).
 
-     d xmlChar         s              3u 0 based(######typedef######)
+     d xmlChar         s                   based(######typedef######)
+     d                                     like(xmlCuchar)
 
       * xmlChar handling
 
 
      d xmlStrndup      pr              *   extproc('xmlStrndup')                xmlChar *
      d  cur                            *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
      d xmlCharStrndup  pr              *   extproc('xmlCharStrndup')            xmlChar *
      d  cur                            *   value options(*string)               const char *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
      d xmlCharStrdup   pr              *   extproc('xmlCharStrdup')             xmlChar *
      d  cur                            *   value options(*string)               const char *
 
      d xmlStrsub       pr              *   extproc('xmlStrsub')                 const xmlChar *
      d  str                            *   value options(*string)               const xmlChar *
-     d  start                        10i 0 value
-     d  len                          10i 0 value
+     d  start                              value like(xmlCint)
+     d  len                                value like(xmlCint)
 
      d xmlStrchr       pr              *   extproc('xmlStrchr')                 const xmlChar *
      d  str                            *   value options(*string)               const xmlChar *
      d  str                            *   value options(*string)               const xmlChar *
      d  val                            *   value options(*string)               const xmlChar *
 
-     d xmlStrcmp       pr            10i 0 extproc('xmlStrcmp')
+     d xmlStrcmp       pr                  extproc('xmlStrcmp')
+     d                                     like(xmlCint)
      d  str1                           *   value options(*string)               const xmlChar *
      d  str2                           *   value options(*string)               const xmlChar *
 
-     d xmlStrncmp      pr            10i 0 extproc('xmlStrncmp')
+     d xmlStrncmp      pr                  extproc('xmlStrncmp')
+     d                                     like(xmlCint)
      d  str1                           *   value options(*string)               const xmlChar *
      d  str2                           *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
-     d xmlStrcasecmp   pr            10i 0 extproc('xmlStrcasecmp')
+     d xmlStrcasecmp   pr                  extproc('xmlStrcasecmp')
+     d                                     like(xmlCint)
      d  str1                           *   value options(*string)               const xmlChar *
      d  str2                           *   value options(*string)               const xmlChar *
 
-     d xmlStrncasecmp  pr            10i 0 extproc('xmlStrncasecmp')
+     d xmlStrncasecmp  pr                  extproc('xmlStrncasecmp')
+     d                                     like(xmlCint)
      d  str1                           *   value options(*string)               const xmlChar *
      d  str2                           *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
-     d xmlStrEqual     pr            10i 0 extproc('xmlStrEqual')
+     d xmlStrEqual     pr                  extproc('xmlStrEqual')
+     d                                     like(xmlCint)
      d  str1                           *   value options(*string)               const xmlChar *
      d  str2                           *   value options(*string)               const xmlChar *
 
-     d xmlStrQEqual    pr            10i 0 extproc('xmlStrQEqual')
+     d xmlStrQEqual    pr                  extproc('xmlStrQEqual')
+     d                                     like(xmlCint)
      d  pref                           *   value options(*string)               const xmlChar *
      d  name                           *   value options(*string)               const xmlChar *
      d  stre                           *   value options(*string)               const xmlChar *
 
-     d xmlStrlen       pr            10i 0 extproc('xmlStrlen')
+     d xmlStrlen       pr                  extproc('xmlStrlen')
+     d                                     like(xmlCint)
      d  str                            *   value options(*string)               const xmlChar *
 
      d xmlStrcat       pr              *   extproc('xmlStrcat')                 xmlChar *
      d xmlStrncat      pr              *   extproc('xmlStrncat')                xmlChar *
      d  cur                            *   value options(*string)               xmlChar *
      d  add                            *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
      d xmlStrncatNew   pr              *   extproc('xmlStrncatNew')             xmlChar *
      d  str1                           *   value options(*string)               const xmlChar *
      d  str2                           *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
       * xmlStrPrintf() is a vararg function.
       * The following prototype supports up to 8 pointer arguments.
       * Other argument signature can be achieved by defining alternate
       *   prototypes redirected to the same function.
 
-     d xmlStrPrintf    pr            10i 0 extproc('xmlStrPrintf')
+     d xmlStrPrintf    pr                  extproc('xmlStrPrintf')
+     d                                     like(xmlCint)
      d  buf                            *   value options(*string)               xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
      d  msg                            *   value options(*string)               const xmlChar *
      d  arg1                           *   value options(*string: *nopass)
      d  arg2                           *   value options(*string: *nopass)
      d  arg7                           *   value options(*string: *nopass)
      d  arg8                           *   value options(*string: *nopass)
 
-     d xmlStrVPrintf   pr            10i 0 extproc('xmlStrVPrintf')
+     d xmlStrVPrintf   pr                  extproc('xmlStrVPrintf')
+     d                                     like(xmlCint)
      d  buf                            *   value options(*string)               xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
      d  msg                            *   value options(*string)               const xmlChar *
      d  ap                                 likeds(xmlVaList)
 
-     d xmlGetUTF8Char  pr            10i 0 extproc('xmlGetUTF8Char')
+     d xmlGetUTF8Char  pr                  extproc('xmlGetUTF8Char')
+     d                                     like(xmlCint)
      d  utf                            *   value options(*string)               const uns. char *
-     d  len                          10i 0
+     d  len                                like(xmlCint)
 
-     d xmlCheckUTF8    pr            10i 0 extproc('xmlCheckUTF8')
+     d xmlCheckUTF8    pr                  extproc('xmlCheckUTF8')
+     d                                     like(xmlCint)
      d  utf                            *   value options(*string)               const uns. char *
 
-     d xmlUTF8Strsize  pr            10i 0 extproc('xmlUTF8Strsize')
+     d xmlUTF8Strsize  pr                  extproc('xmlUTF8Strsize')
+     d                                     like(xmlCint)
      d  utf                            *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
      d xmlUTF8Strndup  pr              *   extproc('xmlUTF8Strndup')            xmlChar *
      d  utf                            *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
      d xmlUTF8Strpos   pr              *   extproc('xmlUTF8Strpos')             const xmlChar *
      d  utf                            *   value options(*string)               const xmlChar *
-     d  pos                          10i 0 value
+     d  pos                                value like(xmlCint)
 
-     d xmlUTF8Strloc   pr            10i 0 extproc('xmlUTF8Strloc')
+     d xmlUTF8Strloc   pr                  extproc('xmlUTF8Strloc')
+     d                                     like(xmlCint)
      d  utf                            *   value options(*string)               const xmlChar *
      d  utfchar                        *   value options(*string)               const xmlChar *
 
      d xmlUTF8Strsub   pr              *   extproc('xmlUTF8Strsub')             xmlChar *
      d  utf                            *   value options(*string)               const xmlChar *
-     d  start                        10i 0 value
-     d  len                          10i 0 value
+     d  start                              value like(xmlCint)
+     d  len                                value like(xmlCint)
 
-     d xmlUTF8Strlen   pr            10i 0 extproc('xmlUTF8Strlen')
+     d xmlUTF8Strlen   pr                  extproc('xmlUTF8Strlen')
+     d                                     like(xmlCint)
      d  utf                            *   value options(*string)               const xmlChar *
 
-     d xmlUTF8Size     pr            10i 0 extproc('xmlUTF8Size')
+     d xmlUTF8Size     pr                  extproc('xmlUTF8Size')
+     d                                     like(xmlCint)
      d  utf                            *   value options(*string)               const xmlChar *
 
-     d xmlUTF8Charcmp  pr            10i 0 extproc('xmlUTF8Charcmp')
+     d xmlUTF8Charcmp  pr                  extproc('xmlUTF8Charcmp')
+     d                                     like(xmlCint)
      d  utf1                           *   value options(*string)               const xmlChar *
      d  utf2                           *   value options(*string)               const xmlChar *
 
index 64f7abf..c4c4ba1 100644 (file)
 
       /if defined(LIBXML_UNICODE_ENABLED)
 
+      /include "libxmlrpg/xmlTypesC"
+
      d xmlUCSIsAegeanNumbers...
-     d                 pr            10i 0 extproc('xmlUCSIsAegeanNumbers')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsAegeanNumbers')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsAlphabeticPresentationForms...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlUCSIsAlphabeticPresentationForms'
      d                                     )
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsArabic  pr            10i 0 extproc('xmlUCSIsArabic')
-     d  code                         10i 0 value
+     d xmlUCSIsArabic  pr                  extproc('xmlUCSIsArabic')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsArabicPresentationFormsA...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlUCSIsArabicPresentationFormsA')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsArabicPresentationFormsB...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlUCSIsArabicPresentationFormsB')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsArmenian...
-     d                 pr            10i 0 extproc('xmlUCSIsArmenian')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsArmenian')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsArrows  pr            10i 0 extproc('xmlUCSIsArrows')
-     d  code                         10i 0 value
+     d xmlUCSIsArrows  pr                  extproc('xmlUCSIsArrows')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsBasicLatin...
-     d                 pr            10i 0 extproc('xmlUCSIsBasicLatin')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsBasicLatin')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsBengali...
-     d                 pr            10i 0 extproc('xmlUCSIsBengali')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsBengali')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsBlockElements...
-     d                 pr            10i 0 extproc('xmlUCSIsBlockElements')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsBlockElements')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsBopomofo...
-     d                 pr            10i 0 extproc('xmlUCSIsBopomofo')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsBopomofo')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsBopomofoExtended...
-     d                 pr            10i 0 extproc('xmlUCSIsBopomofoExtended')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsBopomofoExtended')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsBoxDrawing...
-     d                 pr            10i 0 extproc('xmlUCSIsBoxDrawing')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsBoxDrawing')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsBraillePatterns...
-     d                 pr            10i 0 extproc('xmlUCSIsBraillePatterns')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsBraillePatterns')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsBuhid   pr            10i 0 extproc('xmlUCSIsBuhid')
-     d  code                         10i 0 value
+     d xmlUCSIsBuhid   pr                  extproc('xmlUCSIsBuhid')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsByzantineMusicalSymbols...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlUCSIsByzantineMusicalSymbols')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsCJKCompatibility...
-     d                 pr            10i 0 extproc('xmlUCSIsCJKCompatibility')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsCJKCompatibility')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsCJKCompatibilityForms...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlUCSIsCJKCompatibilityForms')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsCJKCompatibilityIdeographs...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlUCSIsCJKCompatibilityIdeographs')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsCJKCompatibilityIdeographsSupplement...
-     d                 pr            10i 0 extproc('xmlUCSIsCJKCompatibilityIde-
+     d                 pr                  extproc('xmlUCSIsCJKCompatibilityIde-
      d                                     ographsSupplement')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsCJKRadicalsSupplement...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlUCSIsCJKRadicalsSupplement')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsCJKSymbolsandPunctuation...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlUCSIsCJKSymbolsandPunctuation')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsCJKUnifiedIdeographs...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlUCSIsCJKUnifiedIdeographs')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsCJKUnifiedIdeographsExtensionA...
-     d                 pr            10i 0 extproc('xmlUCSIsCJKUnifiedIdeograph-
+     d                 pr                  extproc('xmlUCSIsCJKUnifiedIdeograph-
      d                                     sExtensionA')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsCJKUnifiedIdeographsExtensionB...
-     d                 pr            10i 0 extproc('xmlUCSIsCJKUnifiedIdeograph-
+     d                 pr                  extproc('xmlUCSIsCJKUnifiedIdeograph-
      d                                     sExtensionB')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsCherokee...
-     d                 pr            10i 0 extproc('xmlUCSIsCherokee')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsCherokee')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsCombiningDiacriticalMarks...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlUCSIsCombiningDiacriticalMarks')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsCombiningDiacriticalMarksforSymbols...
-     d                 pr            10i 0 extproc('xmlUCSIsCombiningDiacritica-
+     d                 pr                  extproc('xmlUCSIsCombiningDiacritica-
      d                                     lMarksforSymbols')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsCombiningHalfMarks...
-     d                 pr            10i 0 extproc('xmlUCSIsCombiningHalfMarks')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsCombiningHalfMarks')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsCombiningMarksforSymbols...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlUCSIsCombiningMarksforSymbols')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsControlPictures...
-     d                 pr            10i 0 extproc('xmlUCSIsControlPictures')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsControlPictures')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsCurrencySymbols...
-     d                 pr            10i 0 extproc('xmlUCSIsCurrencySymbols')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsCurrencySymbols')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsCypriotSyllabary...
-     d                 pr            10i 0 extproc('xmlUCSIsCypriotSyllabary')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsCypriotSyllabary')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsCyrillic...
-     d                 pr            10i 0 extproc('xmlUCSIsCyrillic')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsCyrillic')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsCyrillicSupplement...
-     d                 pr            10i 0 extproc('xmlUCSIsCyrillicSupplement')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsCyrillicSupplement')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsDeseret...
-     d                 pr            10i 0 extproc('xmlUCSIsDeseret')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsDeseret')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsDevanagari...
-     d                 pr            10i 0 extproc('xmlUCSIsDevanagari')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsDevanagari')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsDingbats...
-     d                 pr            10i 0 extproc('xmlUCSIsDingbats')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsDingbats')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsEnclosedAlphanumerics...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlUCSIsEnclosedAlphanumerics')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsEnclosedCJKLettersandMonths...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlUCSIsEnclosedCJKLettersandMonths'
      d                                     )
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsEthiopic...
-     d                 pr            10i 0 extproc('xmlUCSIsEthiopic')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsEthiopic')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsGeneralPunctuation...
-     d                 pr            10i 0 extproc('xmlUCSIsGeneralPunctuation')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsGeneralPunctuation')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsGeometricShapes...
-     d                 pr            10i 0 extproc('xmlUCSIsGeometricShapes')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsGeometricShapes')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsGeorgian...
-     d                 pr            10i 0 extproc('xmlUCSIsGeorgian')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsGeorgian')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsGothic  pr            10i 0 extproc('xmlUCSIsGothic')
-     d  code                         10i 0 value
+     d xmlUCSIsGothic  pr                  extproc('xmlUCSIsGothic')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsGreek   pr            10i 0 extproc('xmlUCSIsGreek')
-     d  code                         10i 0 value
+     d xmlUCSIsGreek   pr                  extproc('xmlUCSIsGreek')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsGreekExtended...
-     d                 pr            10i 0 extproc('xmlUCSIsGreekExtended')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsGreekExtended')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsGreekandCoptic...
-     d                 pr            10i 0 extproc('xmlUCSIsGreekandCoptic')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsGreekandCoptic')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsGujarati...
-     d                 pr            10i 0 extproc('xmlUCSIsGujarati')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsGujarati')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsGurmukhi...
-     d                 pr            10i 0 extproc('xmlUCSIsGurmukhi')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsGurmukhi')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsHalfwidthandFullwidthForms...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlUCSIsHalfwidthandFullwidthForms')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsHangulCompatibilityJamo...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlUCSIsHangulCompatibilityJamo')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsHangulJamo...
-     d                 pr            10i 0 extproc('xmlUCSIsHangulJamo')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsHangulJamo')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsHangulSyllables...
-     d                 pr            10i 0 extproc('xmlUCSIsHangulSyllables')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsHangulSyllables')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsHanunoo...
-     d                 pr            10i 0 extproc('xmlUCSIsHanunoo')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsHanunoo')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsHebrew  pr            10i 0 extproc('xmlUCSIsHebrew')
-     d  code                         10i 0 value
+     d xmlUCSIsHebrew  pr                  extproc('xmlUCSIsHebrew')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsHighPrivateUseSurrogates...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlUCSIsHighPrivateUseSurrogates')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsHighSurrogates...
-     d                 pr            10i 0 extproc('xmlUCSIsHighSurrogates')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsHighSurrogates')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsHiragana...
-     d                 pr            10i 0 extproc('xmlUCSIsHiragana')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsHiragana')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsIPAExtensions...
-     d                 pr            10i 0 extproc('xmlUCSIsIPAExtensions')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsIPAExtensions')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsIdeographicDescriptionCharacters...
-     d                 pr            10i 0 extproc('xmlUCSIsIdeographicDescript-
+     d                 pr                  extproc('xmlUCSIsIdeographicDescript-
      d                                     ionCharacters')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsKanbun  pr            10i 0 extproc('xmlUCSIsKanbun')
-     d  code                         10i 0 value
+     d xmlUCSIsKanbun  pr                  extproc('xmlUCSIsKanbun')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsKangxiRadicals...
-     d                 pr            10i 0 extproc('xmlUCSIsKangxiRadicals')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsKangxiRadicals')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsKannada...
-     d                 pr            10i 0 extproc('xmlUCSIsKannada')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsKannada')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsKatakana...
-     d                 pr            10i 0 extproc('xmlUCSIsKatakana')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsKatakana')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsKatakanaPhoneticExtensions...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlUCSIsKatakanaPhoneticExtensions')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsKhmer   pr            10i 0 extproc('xmlUCSIsKhmer')
-     d  code                         10i 0 value
+     d xmlUCSIsKhmer   pr                  extproc('xmlUCSIsKhmer')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsKhmerSymbols...
-     d                 pr            10i 0 extproc('xmlUCSIsKhmerSymbols')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsKhmerSymbols')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsLao     pr            10i 0 extproc('xmlUCSIsLao')
-     d  code                         10i 0 value
+     d xmlUCSIsLao     pr                  extproc('xmlUCSIsLao')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsLatin1Supplement...
-     d                 pr            10i 0 extproc('xmlUCSIsLatin1Supplement')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsLatin1Supplement')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsLatinExtendedA...
-     d                 pr            10i 0 extproc('xmlUCSIsLatinExtendedA')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsLatinExtendedA')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsLatinExtendedB...
-     d                 pr            10i 0 extproc('xmlUCSIsLatinExtendedB')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsLatinExtendedB')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsLatinExtendedAdditional...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlUCSIsLatinExtendedAdditional')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsLetterlikeSymbols...
-     d                 pr            10i 0 extproc('xmlUCSIsLetterlikeSymbols')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsLetterlikeSymbols')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsLimbu   pr            10i 0 extproc('xmlUCSIsLimbu')
-     d  code                         10i 0 value
+     d xmlUCSIsLimbu   pr                  extproc('xmlUCSIsLimbu')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsLinearBIdeograms...
-     d                 pr            10i 0 extproc('xmlUCSIsLinearBIdeograms')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsLinearBIdeograms')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsLinearBSyllabary...
-     d                 pr            10i 0 extproc('xmlUCSIsLinearBSyllabary')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsLinearBSyllabary')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsLowSurrogates...
-     d                 pr            10i 0 extproc('xmlUCSIsLowSurrogates')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsLowSurrogates')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsMalayalam...
-     d                 pr            10i 0 extproc('xmlUCSIsMalayalam')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsMalayalam')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsMathematicalAlphanumericSymbols...
-     d                 pr            10i 0 extproc('xmlUCSIsMathematicalAlphanu-
+     d                 pr                  extproc('xmlUCSIsMathematicalAlphanu-
      d                                     mericSymbols')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsMathematicalOperators...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlUCSIsMathematicalOperators')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsMiscellaneousMathematicalSymbolsA...
-     d                 pr            10i 0 extproc('xmlUCSIsMiscellaneousMathem-
+     d                 pr                  extproc('xmlUCSIsMiscellaneousMathem-
      d                                     aticalSymbolsA')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsMiscellaneousMathematicalSymbolsB...
-     d                 pr            10i 0 extproc('xmlUCSIsMiscellaneousMathem-
+     d                 pr                  extproc('xmlUCSIsMiscellaneousMathem-
      d                                     aticalSymbolsB')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsMiscellaneousSymbols...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlUCSIsMiscellaneousSymbols')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsMiscellaneousSymbolsandArrows...
-     d                 pr            10i 0 extproc('xmlUCSIsMiscellaneousSymbol-
+     d                 pr                  extproc('xmlUCSIsMiscellaneousSymbol-
      d                                     sandArrows')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsMiscellaneousTechnical...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlUCSIsMiscellaneousTechnical')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsMongolian...
-     d                 pr            10i 0 extproc('xmlUCSIsMongolian')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsMongolian')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsMusicalSymbols...
-     d                 pr            10i 0 extproc('xmlUCSIsMusicalSymbols')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsMusicalSymbols')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsMyanmar...
-     d                 pr            10i 0 extproc('xmlUCSIsMyanmar')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsMyanmar')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsNumberForms...
-     d                 pr            10i 0 extproc('xmlUCSIsNumberForms')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsNumberForms')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsOgham   pr            10i 0 extproc('xmlUCSIsOgham')
-     d  code                         10i 0 value
+     d xmlUCSIsOgham   pr                  extproc('xmlUCSIsOgham')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsOldItalic...
-     d                 pr            10i 0 extproc('xmlUCSIsOldItalic')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsOldItalic')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsOpticalCharacterRecognition...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlUCSIsOpticalCharacterRecognition'
      d                                     )
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsOriya   pr            10i 0 extproc('xmlUCSIsOriya')
-     d  code                         10i 0 value
+     d xmlUCSIsOriya   pr                  extproc('xmlUCSIsOriya')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsOsmanya...
-     d                 pr            10i 0 extproc('xmlUCSIsOsmanya')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsOsmanya')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsPhoneticExtensions...
-     d                 pr            10i 0 extproc('xmlUCSIsPhoneticExtensions')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsPhoneticExtensions')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsPrivateUse...
-     d                 pr            10i 0 extproc('xmlUCSIsPrivateUse')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsPrivateUse')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsPrivateUseArea...
-     d                 pr            10i 0 extproc('xmlUCSIsPrivateUseArea')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsPrivateUseArea')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsRunic   pr            10i 0 extproc('xmlUCSIsRunic')
-     d  code                         10i 0 value
+     d xmlUCSIsRunic   pr                  extproc('xmlUCSIsRunic')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsShavian...
-     d                 pr            10i 0 extproc('xmlUCSIsShavian')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsShavian')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsSinhala...
-     d                 pr            10i 0 extproc('xmlUCSIsSinhala')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsSinhala')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsSmallFormVariants...
-     d                 pr            10i 0 extproc('xmlUCSIsSmallFormVariants')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsSmallFormVariants')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsSpacingModifierLetters...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlUCSIsSpacingModifierLetters')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsSpecials...
-     d                 pr            10i 0 extproc('xmlUCSIsSpecials')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsSpecials')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsSuperscriptsandSubscripts...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlUCSIsSuperscriptsandSubscripts')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsSupplementalArrowsA...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlUCSIsSupplementalArrowsA')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsSupplementalArrowsB...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlUCSIsSupplementalArrowsB')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsSupplementalMathematicalOperators...
-     d                 pr            10i 0 extproc('xmlUCSIsSupplementalMathema-
+     d                 pr                  extproc('xmlUCSIsSupplementalMathema-
      d                                     ticalOperators')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsSupplementaryPrivateUseAreaA...
-     d                 pr            10i 0 extproc('xmlUCSIsSupplementaryPrivat-
+     d                 pr                  extproc('xmlUCSIsSupplementaryPrivat-
      d                                     eUseAreaA')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsSupplementaryPrivateUseAreaB...
-     d                 pr            10i 0 extproc('xmlUCSIsSupplementaryPrivat-
+     d                 pr                  extproc('xmlUCSIsSupplementaryPrivat-
      d                                     eUseAreaB')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsSyriac  pr            10i 0 extproc('xmlUCSIsSyriac')
-     d  code                         10i 0 value
+     d xmlUCSIsSyriac  pr                  extproc('xmlUCSIsSyriac')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsTagalog...
-     d                 pr            10i 0 extproc('xmlUCSIsTagalog')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsTagalog')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsTagbanwa...
-     d                 pr            10i 0 extproc('xmlUCSIsTagbanwa')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsTagbanwa')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsTags    pr            10i 0 extproc('xmlUCSIsTags')
-     d  code                         10i 0 value
+     d xmlUCSIsTags    pr                  extproc('xmlUCSIsTags')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsTaiLe   pr            10i 0 extproc('xmlUCSIsTaiLe')
-     d  code                         10i 0 value
+     d xmlUCSIsTaiLe   pr                  extproc('xmlUCSIsTaiLe')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsTaiXuanJingSymbols...
-     d                 pr            10i 0 extproc('xmlUCSIsTaiXuanJingSymbols')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsTaiXuanJingSymbols')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsTamil   pr            10i 0 extproc('xmlUCSIsTamil')
-     d  code                         10i 0 value
+     d xmlUCSIsTamil   pr                  extproc('xmlUCSIsTamil')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsTelugu  pr            10i 0 extproc('xmlUCSIsTelugu')
-     d  code                         10i 0 value
+     d xmlUCSIsTelugu  pr                  extproc('xmlUCSIsTelugu')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsThaana  pr            10i 0 extproc('xmlUCSIsThaana')
-     d  code                         10i 0 value
+     d xmlUCSIsThaana  pr                  extproc('xmlUCSIsThaana')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsThai    pr            10i 0 extproc('xmlUCSIsThai')
-     d  code                         10i 0 value
+     d xmlUCSIsThai    pr                  extproc('xmlUCSIsThai')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsTibetan...
-     d                 pr            10i 0 extproc('xmlUCSIsTibetan')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsTibetan')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsUgaritic...
-     d                 pr            10i 0 extproc('xmlUCSIsUgaritic')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsUgaritic')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsUnifiedCanadianAboriginalSyllabics...
-     d                 pr            10i 0 extproc('xmlUCSIsUnifiedCanadianAbor-
+     d                 pr                  extproc('xmlUCSIsUnifiedCanadianAbor-
      d                                     iginalSyllabics')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsVariationSelectors...
-     d                 pr            10i 0 extproc('xmlUCSIsVariationSelectors')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsVariationSelectors')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsVariationSelectorsSupplement...
-     d                 pr            10i 0 extproc('xmlUCSIsVariationSelectorsS-
+     d                 pr                  extproc('xmlUCSIsVariationSelectorsS-
      d                                     upplement')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsYiRadicals...
-     d                 pr            10i 0 extproc('xmlUCSIsYiRadicals')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsYiRadicals')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsYiSyllables...
-     d                 pr            10i 0 extproc('xmlUCSIsYiSyllables')
-     d  code                         10i 0 value
+     d                 pr                  extproc('xmlUCSIsYiSyllables')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
      d xmlUCSIsYijingHexagramSymbols...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlUCSIsYijingHexagramSymbols')
-     d  code                         10i 0 value
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsBlock   pr            10i 0 extproc('xmlUCSIsBlock')
-     d  code                         10i 0 value
+     d xmlUCSIsBlock   pr                  extproc('xmlUCSIsBlock')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
      d  block                          *   value options(*string)               const char *
 
-     d xmlUCSIsCatC    pr            10i 0 extproc('xmlUCSIsCatC')
-     d  code                         10i 0 value
+     d xmlUCSIsCatC    pr                  extproc('xmlUCSIsCatC')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatCc   pr            10i 0 extproc('xmlUCSIsCatCc')
-     d  code                         10i 0 value
+     d xmlUCSIsCatCc   pr                  extproc('xmlUCSIsCatCc')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatCf   pr            10i 0 extproc('xmlUCSIsCatCf')
-     d  code                         10i 0 value
+     d xmlUCSIsCatCf   pr                  extproc('xmlUCSIsCatCf')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatCo   pr            10i 0 extproc('xmlUCSIsCatCo')
-     d  code                         10i 0 value
+     d xmlUCSIsCatCo   pr                  extproc('xmlUCSIsCatCo')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatCs   pr            10i 0 extproc('xmlUCSIsCatCs')
-     d  code                         10i 0 value
+     d xmlUCSIsCatCs   pr                  extproc('xmlUCSIsCatCs')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatL    pr            10i 0 extproc('xmlUCSIsCatL')
-     d  code                         10i 0 value
+     d xmlUCSIsCatL    pr                  extproc('xmlUCSIsCatL')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatLl   pr            10i 0 extproc('xmlUCSIsCatLl')
-     d  code                         10i 0 value
+     d xmlUCSIsCatLl   pr                  extproc('xmlUCSIsCatLl')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatLm   pr            10i 0 extproc('xmlUCSIsCatLm')
-     d  code                         10i 0 value
+     d xmlUCSIsCatLm   pr                  extproc('xmlUCSIsCatLm')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatLo   pr            10i 0 extproc('xmlUCSIsCatLo')
-     d  code                         10i 0 value
+     d xmlUCSIsCatLo   pr                  extproc('xmlUCSIsCatLo')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatLt   pr            10i 0 extproc('xmlUCSIsCatLt')
-     d  code                         10i 0 value
+     d xmlUCSIsCatLt   pr                  extproc('xmlUCSIsCatLt')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatLu   pr            10i 0 extproc('xmlUCSIsCatLu')
-     d  code                         10i 0 value
+     d xmlUCSIsCatLu   pr                  extproc('xmlUCSIsCatLu')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatM    pr            10i 0 extproc('xmlUCSIsCatM')
-     d  code                         10i 0 value
+     d xmlUCSIsCatM    pr                  extproc('xmlUCSIsCatM')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatMc   pr            10i 0 extproc('xmlUCSIsCatMc')
-     d  code                         10i 0 value
+     d xmlUCSIsCatMc   pr                  extproc('xmlUCSIsCatMc')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatMe   pr            10i 0 extproc('xmlUCSIsCatMe')
-     d  code                         10i 0 value
+     d xmlUCSIsCatMe   pr                  extproc('xmlUCSIsCatMe')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatMn   pr            10i 0 extproc('xmlUCSIsCatMn')
-     d  code                         10i 0 value
+     d xmlUCSIsCatMn   pr                  extproc('xmlUCSIsCatMn')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatN    pr            10i 0 extproc('xmlUCSIsCatN')
-     d  code                         10i 0 value
+     d xmlUCSIsCatN    pr                  extproc('xmlUCSIsCatN')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatNd   pr            10i 0 extproc('xmlUCSIsCatNd')
-     d  code                         10i 0 value
+     d xmlUCSIsCatNd   pr                  extproc('xmlUCSIsCatNd')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatNl   pr            10i 0 extproc('xmlUCSIsCatNl')
-     d  code                         10i 0 value
+     d xmlUCSIsCatNl   pr                  extproc('xmlUCSIsCatNl')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatNo   pr            10i 0 extproc('xmlUCSIsCatNo')
-     d  code                         10i 0 value
+     d xmlUCSIsCatNo   pr                  extproc('xmlUCSIsCatNo')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatP    pr            10i 0 extproc('xmlUCSIsCatP')
-     d  code                         10i 0 value
+     d xmlUCSIsCatP    pr                  extproc('xmlUCSIsCatP')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatPc   pr            10i 0 extproc('xmlUCSIsCatPc')
-     d  code                         10i 0 value
+     d xmlUCSIsCatPc   pr                  extproc('xmlUCSIsCatPc')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatPd   pr            10i 0 extproc('xmlUCSIsCatPd')
-     d  code                         10i 0 value
+     d xmlUCSIsCatPd   pr                  extproc('xmlUCSIsCatPd')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatPe   pr            10i 0 extproc('xmlUCSIsCatPe')
-     d  code                         10i 0 value
+     d xmlUCSIsCatPe   pr                  extproc('xmlUCSIsCatPe')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatPf   pr            10i 0 extproc('xmlUCSIsCatPf')
-     d  code                         10i 0 value
+     d xmlUCSIsCatPf   pr                  extproc('xmlUCSIsCatPf')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatPi   pr            10i 0 extproc('xmlUCSIsCatPi')
-     d  code                         10i 0 value
+     d xmlUCSIsCatPi   pr                  extproc('xmlUCSIsCatPi')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatPo   pr            10i 0 extproc('xmlUCSIsCatPo')
-     d  code                         10i 0 value
+     d xmlUCSIsCatPo   pr                  extproc('xmlUCSIsCatPo')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatPs   pr            10i 0 extproc('xmlUCSIsCatPs')
-     d  code                         10i 0 value
+     d xmlUCSIsCatPs   pr                  extproc('xmlUCSIsCatPs')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatS    pr            10i 0 extproc('xmlUCSIsCatS')
-     d  code                         10i 0 value
+     d xmlUCSIsCatS    pr                  extproc('xmlUCSIsCatS')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatSc   pr            10i 0 extproc('xmlUCSIsCatSc')
-     d  code                         10i 0 value
+     d xmlUCSIsCatSc   pr                  extproc('xmlUCSIsCatSc')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatSk   pr            10i 0 extproc('xmlUCSIsCatSk')
-     d  code                         10i 0 value
+     d xmlUCSIsCatSk   pr                  extproc('xmlUCSIsCatSk')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatSm   pr            10i 0 extproc('xmlUCSIsCatSm')
-     d  code                         10i 0 value
+     d xmlUCSIsCatSm   pr                  extproc('xmlUCSIsCatSm')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatSo   pr            10i 0 extproc('xmlUCSIsCatSo')
-     d  code                         10i 0 value
+     d xmlUCSIsCatSo   pr                  extproc('xmlUCSIsCatSo')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatZ    pr            10i 0 extproc('xmlUCSIsCatZ')
-     d  code                         10i 0 value
+     d xmlUCSIsCatZ    pr                  extproc('xmlUCSIsCatZ')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatZl   pr            10i 0 extproc('xmlUCSIsCatZl')
-     d  code                         10i 0 value
+     d xmlUCSIsCatZl   pr                  extproc('xmlUCSIsCatZl')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatZp   pr            10i 0 extproc('xmlUCSIsCatZp')
-     d  code                         10i 0 value
+     d xmlUCSIsCatZp   pr                  extproc('xmlUCSIsCatZp')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCatZs   pr            10i 0 extproc('xmlUCSIsCatZs')
-     d  code                         10i 0 value
+     d xmlUCSIsCatZs   pr                  extproc('xmlUCSIsCatZs')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
 
-     d xmlUCSIsCat     pr            10i 0 extproc('xmlUCSIsCat')
-     d  code                         10i 0 value
+     d xmlUCSIsCat     pr                  extproc('xmlUCSIsCat')
+     d                                     like(xmlCint)
+     d  code                               value like(xmlCint)
      d  cat                            *   value options(*string)               const char *
 
       /endif                                                                    LIBXML_UNICODE_ENBLD
index 81676be..955599e 100644 (file)
@@ -8,6 +8,7 @@
       /if not defined(XML_VERSION_H__)
       /define XML_VERSION_H__
 
+      /include "libxmlrpg/xmlTypesC"
       /include "libxmlrpg/xmlexports"
 
       * use those to be sure nothing nasty will happen if
@@ -16,7 +17,7 @@
 
      d xmlCheckVersion...
      d                 pr                  extproc('xmlCheckVersion')
-     d  version                      10i 0 value
+     d  version                            value like(xmlCint)
 
       * LIBXML_DOTTED_VERSION:
       *
index f2d3d30..c8530f8 100644 (file)
@@ -12,6 +12,7 @@
 
       /if defined(LIBXML_WRITER_ENABLED)
 
+      /include "libxmlrpg/xmlTypesC"
       /include "libxmlrpg/xmlstdarg"
       /include "libxmlrpg/xmlIO"
       /include "libxmlrpg/list"
      d                 pr                  extproc('xmlNewTextWriterFilename')
      d                                     like(xmlTextWriterPtr)
      d  uri                            *   value options(*string)               const char *
-     d  compression                  10i 0 value
+     d  compression                        value like(xmlCint)
 
      d xmlNewTextWriterMemory...
      d                 pr                  extproc('xmlNewTextWriterMemory')
      d                                     like(xmlTextWriterPtr)
      d  buf                                value like(xmlBufferPtr)
-     d  compression                  10i 0 value
+     d  compression                        value like(xmlCint)
 
      d xmlNewTextWriterPushParser...
      d                 pr                  extproc('xmlNewTextWriterPushParser')
      d                                     like(xmlTextWriterPtr)
      d  ctxt                               value like(xmlParserCtxtPtr)
-     d  compression                  10i 0 value
+     d  compression                        value like(xmlCint)
 
      d xmlNewTextWriterDoc...
      d                 pr                  extproc('xmlNewTextWriterDoc')
      d                                     like(xmlTextWriterPtr)
      d  doc                                like(xmlDocPtr)
-     d  compression                  10i 0 value
+     d  compression                        value like(xmlCint)
 
      d xmlNewTextWriterTree...
      d                 pr                  extproc('xmlNewTextWriterTree')
      d                                     like(xmlTextWriterPtr)
      d  doc                                value like(xmlDocPtr)
      d  node                               value like(xmlNodePtr)
-     d  compression                  10i 0 value
+     d  compression                        value like(xmlCint)
 
      d xmlFreeTextWriter...
      d                 pr                  extproc('xmlFreeTextWriter')
       * Document
 
      d xmlTextWriterStartDocument...
-     d                 pr            10i 0 extproc('xmlTextWriterStartDocument')
+     d                 pr                  extproc('xmlTextWriterStartDocument')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  version                        *   value options(*string)               const char *
      d  encoding                       *   value options(*string)               const char *
      d  standalone                     *   value options(*string)               const char *
 
      d xmlTextWriterEndDocument...
-     d                 pr            10i 0 extproc('xmlTextWriterEndDocument')
+     d                 pr                  extproc('xmlTextWriterEndDocument')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
 
       * Comments
 
      d xmlTextWriterStartComment...
-     d                 pr            10i 0 extproc('xmlTextWriterStartComment')
+     d                 pr                  extproc('xmlTextWriterStartComment')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
 
      d xmlTextWriterEndComment...
-     d                 pr            10i 0 extproc('xmlTextWriterEndComment')
+     d                 pr                  extproc('xmlTextWriterEndComment')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
 
      d xmlTextWriterWriteFormatComment...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteFormatComment')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  format                         *   value options(*string: *nopass)      const char *
      d  #vararg1                       *   value options(*string: *nopass)      void *
      d  #vararg8                       *   value options(*string: *nopass)      void *
 
      d xmlTextWriterWriteVFormatComment...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteVFormatComment')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  format                         *   value options(*string)               const char *
      d  argptr                             likeds(xmlVaList)
 
      d xmlTextWriterWriteComment...
-     d                 pr            10i 0 extproc('xmlTextWriterWriteComment')
+     d                 pr                  extproc('xmlTextWriterWriteComment')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  content                        *   value options(*string)               const xmlChar *
 
       * Elements
 
      d xmlTextWriterStartElement...
-     d                 pr            10i 0 extproc('xmlTextWriterStartElement')
+     d                 pr                  extproc('xmlTextWriterStartElement')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  name                           *   value options(*string)               const xmlChar *
 
      d xmlTextWriterStartElementNS...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterStartElementNS')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  prefix                         *   value options(*string)               const xmlChar *
      d  name                           *   value options(*string)               const xmlChar *
      d  namespaceURI                   *   value options(*string)               const xmlChar *
 
      d xmlTextWriterEndElement...
-     d                 pr            10i 0 extproc('xmlTextWriterEndElement')
+     d                 pr                  extproc('xmlTextWriterEndElement')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
 
      d xmlTextWriterFullEndElement...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterFullEndElement')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
 
       * Elements conveniency functions
 
      d xmlTextWriterWriteFormatElement...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteFormatElement')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  format                         *   value options(*string)               const char *
      d  #vararg8                       *   value options(*string: *nopass)      void *
 
      d xmlTextWriterWriteVFormatElement...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteVFormatElement')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  format                         *   value options(*string)               const char *
      d  argptr                             likeds(xmlVaList)
 
      d xmlTextWriterWriteElement...
-     d                 pr            10i 0 extproc('xmlTextWriterWriteElement')
+     d                 pr                  extproc('xmlTextWriterWriteElement')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  content                        *   value options(*string)               const xmlChar *
 
      d xmlTextWriterWriteFormatElementNS...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteFormatElementNS')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  prefix                         *   value options(*string)               const xmlChar *
      d  name                           *   value options(*string)               const xmlChar *
      d  #vararg8                       *   value options(*string: *nopass)      void *
 
      d xmlTextWriterWriteVFormatElementNS...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteVFormatElementNS')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  prefix                         *   value options(*string)               const xmlChar *
      d  name                           *   value options(*string)               const xmlChar *
      d  argptr                             likeds(xmlVaList)
 
      d xmlTextWriterWriteElementNS...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteElementNS')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  prefix                         *   value options(*string)               const xmlChar *
      d  name                           *   value options(*string)               const xmlChar *
       * Text
 
      d xmlTextWriterWriteFormatRaw...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteFormatRaw')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  format                         *   value options(*string)               const char *
      d  #vararg1                       *   value options(*string: *nopass)      void *
      d  #vararg8                       *   value options(*string: *nopass)      void *
 
      d xmlTextWriterWriteVFormatRaw...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteVFormatRaw')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  format                         *   value options(*string)               const char *
      d  argptr                             likeds(xmlVaList)
 
      d xmlTextWriterWriteRawLen...
-     d                 pr            10i 0 extproc('xmlTextWriterWriteRawLen')
+     d                 pr                  extproc('xmlTextWriterWriteRawLen')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  content                        *   value options(*string)               const xmlChar *
-     d  len                          10i 0 value
+     d  len                                value like(xmlCint)
 
      d xmlTextWriterWriteRaw...
-     d                 pr            10i 0 extproc('xmlTextWriterWriteRaw')
+     d                 pr                  extproc('xmlTextWriterWriteRaw')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  content                        *   value options(*string)               const xmlChar *
 
      d xmlTextWriterWriteFormatString...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteFormatString')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  format                         *   value options(*string)               const char *
      d  #vararg1                       *   value options(*string: *nopass)      void *
      d  #vararg8                       *   value options(*string: *nopass)      void *
 
      d xmlTextWriterWriteVFormatString...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteVFormatString')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  format                         *   value options(*string)               const char *
      d  argptr                             likeds(xmlVaList)
 
      d xmlTextWriterWriteString...
-     d                 pr            10i 0 extproc('xmlTextWriterWriteString')
+     d                 pr                  extproc('xmlTextWriterWriteString')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  content                        *   value options(*string)               const xmlChar *
 
      d xmlTextWriterWriteBase64...
-     d                 pr            10i 0 extproc('xmlTextWriterWriteBase64')
+     d                 pr                  extproc('xmlTextWriterWriteBase64')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  data                           *   value options(*string)               const char *
-     d  start                        10i 0 value
-     d  len                          10i 0 value
+     d  start                              value like(xmlCint)
+     d  len                                value like(xmlCint)
 
      d xmlTextWriterWriteBinHex...
-     d                 pr            10i 0 extproc('xmlTextWriterWriteBinHex')
+     d                 pr                  extproc('xmlTextWriterWriteBinHex')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  data                           *   value options(*string)               const char *
-     d  start                        10i 0 value
-     d  len                          10i 0 value
+     d  start                              value like(xmlCint)
+     d  len                                value like(xmlCint)
 
       * Attributes
 
      d xmlTextWriterStartAttribute...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterStartAttribute')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  name                           *   value options(*string)               const xmlChar *
 
      d xmlTextWriterStartAttributeNS...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterStartAttributeNS')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  prefix                         *   value options(*string)               const xmlChar *
      d  name                           *   value options(*string)               const xmlChar *
      d  namespaceURI                   *   value options(*string)               const xmlChar *
 
      d xmlTextWriterEndAttribute...
-     d                 pr            10i 0 extproc('xmlTextWriterEndAttribute')
+     d                 pr                  extproc('xmlTextWriterEndAttribute')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
 
       * Attributes conveniency functions
 
      d xmlTextWriterWriteFormatAttribute...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteFormatAttribute')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  format                         *   value options(*string)               const char *
      d  #vararg8                       *   value options(*string: *nopass)      void *
 
      d xmlTextWriterWriteVFormatAttribute...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteVFormatAttribute')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  format                         *   value options(*string)               const char *
      d  argptr                             likeds(xmlVaList)
 
      d xmlTextWriterWriteAttribute...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteAttribute')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  content                        *   value options(*string)               const xmlChar *
 
      d xmlTextWriterWriteFormatAttributeNS...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteFormatAttributeNS'
      d                                     )
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  prefix                         *   value options(*string)               const xmlChar *
      d  name                           *   value options(*string)               const xmlChar *
      d  #vararg8                       *   value options(*string: *nopass)      void *
 
      d xmlTextWriterWriteVFormatAttributeNS...
-     d                 pr            10i 0 extproc('xmlTextWriterWriteVFormatAt-
+     d                 pr                  extproc('xmlTextWriterWriteVFormatAt-
      d                                     tributeNS')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  prefix                         *   value options(*string)               const xmlChar *
      d  name                           *   value options(*string)               const xmlChar *
      d  argptr                             likeds(xmlVaList)
 
      d xmlTextWriterWriteAttributeNS...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteAttributeNS')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  prefix                         *   value options(*string)               const xmlChar *
      d  name                           *   value options(*string)               const xmlChar *
       * PI's
 
      d xmlTextWriterStartPI...
-     d                 pr            10i 0 extproc('xmlTextWriterStartPI')
+     d                 pr                  extproc('xmlTextWriterStartPI')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  target                         *   value options(*string)               const xmlChar *
 
      d xmlTextWriterEndPI...
-     d                 pr            10i 0 extproc('xmlTextWriterEndPI')
+     d                 pr                  extproc('xmlTextWriterEndPI')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
 
       * PI conveniency functions
 
      d xmlTextWriterWriteFormatPI...
-     d                 pr            10i 0 extproc('xmlTextWriterWriteFormatPI')
+     d                 pr                  extproc('xmlTextWriterWriteFormatPI')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  target                         *   value options(*string)               const xmlChar *
      d  format                         *   value options(*string)               const char *
      d  #vararg8                       *   value options(*string: *nopass)      void *
 
      d xmlTextWriterWriteVFormatPI...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteVFormatPI')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  target                         *   value options(*string)               const xmlChar *
      d  format                         *   value options(*string)               const char *
      d  argptr                             likeds(xmlVaList)
 
      d xmlTextWriterWritePI...
-     d                 pr            10i 0 extproc('xmlTextWriterWritePI')
+     d                 pr                  extproc('xmlTextWriterWritePI')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  target                         *   value options(*string)               const xmlChar *
      d  content                        *   value options(*string)               const xmlChar *
       * This macro maps to xmlTextWriterWritePI
 
      d xmlTextWriterWriteProcessingInstruction...
-     d                 pr            10i 0 extproc('xmlTextWriterWritePI')
+     d                 pr                  extproc('xmlTextWriterWritePI')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  target                         *   value options(*string)               const xmlChar *
      d  content                        *   value options(*string)               const xmlChar *
       * CDATA
 
      d xmlTextWriterStartCDATA...
-     d                 pr            10i 0 extproc('xmlTextWriterStartCDATA')
+     d                 pr                  extproc('xmlTextWriterStartCDATA')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
 
      d xmlTextWriterEndCDATA...
-     d                 pr            10i 0 extproc('xmlTextWriterEndCDATA')
+     d                 pr                  extproc('xmlTextWriterEndCDATA')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
 
       * CDATA conveniency functions
 
      d xmlTextWriterWriteFormatCDATA...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteFormatCDATA')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  format                         *   value options(*string)               const char *
      d  #vararg1                       *   value options(*string: *nopass)      void *
      d  #vararg8                       *   value options(*string: *nopass)      void *
 
      d xmlTextWriterWriteVFormatCDATA...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteVFormatCDATA')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  format                         *   value options(*string)               const char *
      d  argptr                             likeds(xmlVaList)
 
      d xmlTextWriterWriteCDATA...
-     d                 pr            10i 0 extproc('xmlTextWriterWriteCDATA')
+     d                 pr                  extproc('xmlTextWriterWriteCDATA')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  content                        *   value options(*string)               const xmlChar *
 
       * DTD
 
      d xmlTextWriterStartDTD...
-     d                 pr            10i 0 extproc('xmlTextWriterStartDTD')
+     d                 pr                  extproc('xmlTextWriterStartDTD')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  pubid                          *   value options(*string)               const xmlChar *
      d  sysid                          *   value options(*string)               const xmlChar *
 
      d xmlTextWriterEndDTD...
-     d                 pr            10i 0 extproc('xmlTextWriterEndDTD')
+     d                 pr                  extproc('xmlTextWriterEndDTD')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
 
       * DTD conveniency functions
 
      d xmlTextWriterWriteFormatDTD...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteFormatDTD')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  pubid                          *   value options(*string)               const xmlChar *
      d  #vararg8                       *   value options(*string: *nopass)      void *
 
      d xmlTextWriterWriteVFormatDTD...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteVFormatDTD')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  pubid                          *   value options(*string)               const xmlChar *
      d  argptr                             likeds(xmlVaList)
 
      d xmlTextWriterWriteDTD...
-     d                 pr            10i 0 extproc('xmlTextWriterWriteDTD')
+     d                 pr                  extproc('xmlTextWriterWriteDTD')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  pubid                          *   value options(*string)               const xmlChar *
       * this macro maps to xmlTextWriterWriteDTD
 
      d xmlTextWriterWriteDocType...
-     d                 pr            10i 0 extproc('xmlTextWriterWriteDTD')
+     d                 pr                  extproc('xmlTextWriterWriteDTD')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  pubid                          *   value options(*string)               const xmlChar *
       * DTD element definition
 
      d xmlTextWriterStartDTDElement...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterStartDTDElement')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  name                           *   value options(*string)               const xmlChar *
 
      d xmlTextWriterEndDTDElement...
-     d                 pr            10i 0 extproc('xmlTextWriterEndDTDElement')
+     d                 pr                  extproc('xmlTextWriterEndDTDElement')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
 
       * DTD element definition conveniency functions
 
      d xmlTextWriterWriteFormatDTDElement...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteFormatDTDElement')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  format                         *   value options(*string)               const char *
      d  #vararg8                       *   value options(*string: *nopass)      void *
 
      d xmlTextWriterWriteVFormatDTDElement...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteVFormatDTDElement'
      d                                     )
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  format                         *   value options(*string)               const char *
      d  argptr                             likeds(xmlVaList)
 
      d xmlTextWriterWriteDTDElement...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteDTDElement')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  content                        *   value options(*string)               const xmlChar *
       * DTD attribute list definition
 
      d xmlTextWriterStartDTDAttlist...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterStartDTDAttlist')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  name                           *   value options(*string)               const xmlChar *
 
      d xmlTextWriterEndDTDAttlist...
-     d                 pr            10i 0 extproc('xmlTextWriterEndDTDAttlist')
+     d                 pr                  extproc('xmlTextWriterEndDTDAttlist')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
 
       * DTD attribute list definition conveniency functions
 
      d xmlTextWriterWriteFormatDTDAttlist...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteFormatDTDAttlist')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  format                         *   value options(*string)               const char *
      d  #vararg8                       *   value options(*string: *nopass)      void *
 
      d xmlTextWriterWriteVFormatDTDAttlist...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteVFormatDTDAttlist'
      d                                     )
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  format                         *   value options(*string)               const char *
      d  argptr                             likeds(xmlVaList)
 
      d xmlTextWriterWriteDTDAttlist...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteDTDAttlist')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  content                        *   value options(*string)               const xmlChar *
       * DTD entity definition
 
      d xmlTextWriterStartDTDEntity...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterStartDTDEntity')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
-     d  pe                           10i 0 value
+     d  pe                                 value like(xmlCint)
      d  name                           *   value options(*string)               const xmlChar *
 
      d xmlTextWriterEndDTDEntity...
-     d                 pr            10i 0 extproc('xmlTextWriterEndDTDEntity')
+     d                 pr                  extproc('xmlTextWriterEndDTDEntity')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
 
       * DTD entity definition conveniency functions
 
      d xmlTextWriterWriteFormatDTDInternalEntity...
-     d                 pr            10i 0 extproc('xmlTextWriterWriteFormatDTD-
+     d                 pr                  extproc('xmlTextWriterWriteFormatDTD-
      d                                     InternalEntity')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
-     d  pe                           10i 0 value
+     d  pe                                 value like(xmlCint)
      d  name                           *   value options(*string)               const xmlChar *
      d  format                         *   value options(*string)               const char *
      d  #vararg1                       *   value options(*string: *nopass)      void *
      d  #vararg8                       *   value options(*string: *nopass)      void *
 
      d xmlTextWriterWriteVFormatDTDInternalEntity...
-     d                 pr            10i 0 extproc('xmlTextWriterWriteVFormatDT-
+     d                 pr                  extproc('xmlTextWriterWriteVFormatDT-
      d                                     DInternalEntity')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
-     d  pe                           10i 0 value
+     d  pe                                 value like(xmlCint)
      d  name                           *   value options(*string)               const xmlChar *
      d  format                         *   value options(*string)               const char *
      d  argptr                             likeds(xmlVaList)
 
      d xmlTextWriterWriteDTDInternalEntity...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteDTDInternalEntity'
      d                                     )
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
-     d  pe                           10i 0 value
+     d  pe                                 value like(xmlCint)
      d  name                           *   value options(*string)               const xmlChar *
      d  content                        *   value options(*string)               const xmlChar *
 
      d xmlTextWriterWriteDTDExternalEntity...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteDTDExternalEntity'
      d                                     )
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
-     d  pe                           10i 0 value
+     d  pe                                 value like(xmlCint)
      d  name                           *   value options(*string)               const xmlChar *
      d  pubid                          *   value options(*string)               const xmlChar *
      d  sysid                          *   value options(*string)               const xmlChar *
      d  ndataid                        *   value options(*string)               const xmlChar *
 
      d xmlTextWriterWriteDTDExternalEntityContents...
-     d                 pr            10i 0 extproc('xmlTextWriterWriteDTDExtern-
+     d                 pr                  extproc('xmlTextWriterWriteDTDExtern-
      d                                     alEntityContents')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  pubid                          *   value options(*string)               const xmlChar *
      d  sysid                          *   value options(*string)               const xmlChar *
      d  ndataid                        *   value options(*string)               const xmlChar *
 
      d xmlTextWriterWriteDTDEntity...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteDTDEntity')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
-     d  pe                           10i 0 value
+     d  pe                                 value like(xmlCint)
      d  name                           *   value options(*string)               const xmlChar *
      d  pubid                          *   value options(*string)               const xmlChar *
      d  sysid                          *   value options(*string)               const xmlChar *
       * DTD notation definition
 
      d xmlTextWriterWriteDTDNotation...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterWriteDTDNotation')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  pubid                          *   value options(*string)               const xmlChar *
       * Indentation
 
      d xmlTextWriterSetIndent...
-     d                 pr            10i 0 extproc('xmlTextWriterSetIndent')
+     d                 pr                  extproc('xmlTextWriterSetIndent')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
-     d  indent                       10i 0 value
+     d  indent                             value like(xmlCint)
 
      d xmlTextWriterSetIndentString...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlTextWriterSetIndentString')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  str                            *   value options(*string)               const xmlChar *
 
      d xmlTextWriterSetQuoteChar...
-     d                 pr            10i 0 extproc('xmlTextWriterSetQuoteChar')
+     d                 pr                  extproc('xmlTextWriterSetQuoteChar')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
      d  quotechar                          value like(xmlChar)
 
       * misc
 
      d xmlTextWriterFlush...
-     d                 pr            10i 0 extproc('xmlTextWriterFlush')
+     d                 pr                  extproc('xmlTextWriterFlush')
+     d                                     like(xmlCint)
      d  writer                             value like(xmlTextWriterPtr)
 
       /endif                                                                    LIBXML_WRITER_ENABLD
index 3f3be32..6e591ee 100644 (file)
@@ -21,6 +21,7 @@
 
       /if defined(LIBXML_XPATH_ENABLED)
 
+      /include "libxmlrpg/xmlTypesC"
       /include "libxmlrpg/xmlerror"
       /include "libxmlrpg/tree"
       /include "libxmlrpg/hash"
@@ -36,7 +37,8 @@
 
       * The set of XPath error codes.
 
-     d xmlXPathError   s             10i 0 based(######typedef######)           enum
+     d xmlXPathError   s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XPATH_EXPRESSION_OK...
      d                 c                   0
      d  XPATH_NUMBER_ERROR...
@@ -94,8 +96,8 @@
 
      d xmlNodeSet      ds                  based(xmlNodeSetPtr)
      d                                     align qualified
-     d  nodeNr                       10i 0                                      Set node count
-     d  nodeMax                      10i 0                                      Max # nodes in set
+     d  nodeNr                             like(xmlCint)                        Set node count
+     d  nodeMax                            like(xmlCint)                        Max # nodes in set
      d  nodeTab                        *                                        xmlNodePtr *
 
       * An expression is evaluated to yield an object, which
       * @@ XPointer will add more types !
 
      d xmlXPathObjectType...
-     d                 s             10i 0 based(######typedef######)           enum
+     d                 s                   based(######typedef######)
+     d                                     like(xmlCenum)
      d  XPATH_UNDEFINED...
      d                 c                   0
      d  XPATH_NODESET  c                   1
      d                                     align qualified
      d  type                               like(xmlXPathObjectType)
      d  nodesetval                         like(xmlNodeSetPtr)
-     d  boolval                      10i 0
-     d  floatval                      8f
+     d  boolval                            like(xmlCint)
+     d  floatval                           like(xmlCdouble)
      d  stringval                      *                                        xmlChar *
      d  user                           *                                        void *
-     d  index                        10i 0
+     d  index                              like(xmlCint)
      d  user2                          *                                        void *
-     d  index2                       10i 0
+     d  index2                             like(xmlCint)
 
       * xmlXPathConvertFunc:
       * @obj:  an XPath object
      d  node                               like(xmlNodePtr)                     Current node
       *
      d  nb_variables_unused...                                                  Unused (hash table)
-     d                               10i 0
-     d  max_variables_unused...                                                  Unused (hash table)
-     d                               10i 0
-     d  varHash                            like(xmlHashTablePtr)                 Defined variables
+     d                                     like(xmlCint)
+     d  max_variables_unused...                                                 Unused (hash table)
+     d                                     like(xmlCint)
+     d  varHash                            like(xmlHashTablePtr)                Defined variables
       *
-     d  nb_types                     10i 0                                       # of defined types
-     d  max_types                    10i 0                                       Max number of types
-     d  types                              like(xmlXPathTypePtr)                 Defined types array
+     d  nb_types                           like(xmlCint)                        # of defined types
+     d  max_types                          like(xmlCint)                        Max number of types
+     d  types                              like(xmlXPathTypePtr)                Defined types array
       *
      d  nb_funcs_unused...                                                      Unused (hash table)
-     d                               10i 0
-     d  max_funcs_unused...                                                      Unused (hash table)
-     d                               10i 0
-     d  funcHash                           like(xmlHashTablePtr)                 Defined functions
+     d                                     like(xmlCint)
+     d  max_funcs_unused...                                                     Unused (hash table)
+     d                                     like(xmlCint)
+     d  funcHash                           like(xmlHashTablePtr)                Defined functions
       *
-     d  nb_axis                      10i 0                                       # of defined axis
-     d  max_axis                     10i 0                                       Max number of axis
-     d  axis                               like(xmlXPathAxisPtr)                 Defined axis array
+     d  nb_axis                            like(xmlCint)                        # of defined axis
+     d  max_axis                           like(xmlCint)                        Max number of axis
+     d  axis                               like(xmlXPathAxisPtr)                Defined axis array
       *
       * the namespace nodes of the context node
       *
-     d  namespaces                     *                                         xmlNsPtr *
-     d  nsNr                         10i 0                                       # scope namespaces
-     d  user                           *   procptr                               Function to free
+     d  namespaces                     *                                        xmlNsPtr *
+     d  nsNr                               like(xmlCint)                        # scope namespaces
+     d  user                           *   procptr                              Function to free
       *
       * extra variables
       *
-     d  contextSize                  10i 0                                       The context size
+     d  contextSize                        like(xmlCint)                        The context size
      d  proximityPosition...
-     d                               10i 0
+     d                                     like(xmlCint)
       *
       * extra stuff for XPointer
       *
-     d  xptr                         10i 0                                       XPointer context ?
-     d  here                               like(xmlNodePtr)                      For here()
-     d  origin                             like(xmlNodePtr)                      For origin()
+     d  xptr                               like(xmlCint)                        XPointer context ?
+     d  here                               like(xmlNodePtr)                     For here()
+     d  origin                             like(xmlNodePtr)                     For origin()
       *
       * the set of namespace declarations in scope for the expression
       *
-     d  nsHash                             like(xmlHashTablePtr)                 Namespace hashtable
-     d  varLookupFunc                      like(xmlXPathVariableLookupFunc)      Var lookup function
-     d  varLookupData                  *                                         void *
+     d  nsHash                             like(xmlHashTablePtr)                Namespace hashtable
+     d  varLookupFunc                      like(xmlXPathVariableLookupFunc)     Var lookup function
+     d  varLookupData                  *                                        void *
       *
       * Possibility to link in an extra item
       *
-     d  extra                          *                                         void *
+     d  extra                          *                                        void *
       *
       * The function name and URI when calling a function
       *
-     d  function                       *                                         const xmlChar *
-     d  functionURI                    *                                         const xmlChar *
+     d  function                       *                                        const xmlChar *
+     d  functionURI                    *                                        const xmlChar *
       *
       * function lookup function and data
       *
-     d  funcLookupFunc...                                                        Func lookup func
+     d  funcLookupFunc...                                                       Func lookup func
      d                                     like(xmlXPathVariableLookupFunc)
-     d  funcLookupData...                                                        void *
+     d  funcLookupData...                                                       void *
      d                                 *
       *
       * temporary namespace lists kept for walking the namespace axis
       *
      d  tmpNsList                      *                                        xmlNsPtr *
-     d  tmpNsNr                      10i 0                                      # scope namespaces
+     d  tmpNsNr                            like(xmlCint)                        # scope namespaces
       *
       * error reporting mechanism
       *
      d  userData                       *                                        void *
      d  error                              like(xmlStructuredErrorFunc)         Error callback
-     d  lastError                          like(xmlError)                       The last error
+     d  lastError                          likeds(xmlError)                     The last error
      d  debugNode                          like(xmlNodePtr)                     XSLT source node
       *
       * dictionary
       *
      d  dict                               like(xmlDictPtr)                     Dictionary if any
       *
-     d  flags                        10i 0                                      Compilation control
+     d  flags                              like(xmlCint)                        Compilation control
       *
       * Cache for reusal of XPath objects
       *
      d  cur                            *                                        const xmlChar *
      d  base                           *                                        const xmlChar *
       *
-     d  error                        10i 0                                      Error code
+     d  error                              like(xmlCint)                        Error code
       *
      d  context                            like(xmlXPathContextPtr)             Evaluation context
      d  value                              like(xmlXPathObjectPtr)              The current value
-     d  valueNr                      10i 0                                      Value stack depth
-     d  valueMax                     10i 0                                      Max stack depth
+     d  valueNr                            like(xmlCint)                        Value stack depth
+     d  valueMax                           like(xmlCint)                        Max stack depth
      d  valueTab                       *                                        xmlXPathObjectPtr *
       *
      d  comp                               like(xmlXPathCompExprPtr)            Precompiled expr.
-     d  xptr                         10i 0                                      XPointer expression?
+     d  xptr                               like(xmlCint)                        XPointer expression?
      d  ancestor                           like(xmlNodePtr)                     To walk prec. axis
       *
-     d  valueFrame                   10i 0                                      Limit stack pop
+     d  valueFrame                         like(xmlCint)                        Limit stack pop
 
       **************************************************************************
       *                                                                        *
 
       * Objects and Nodesets handling
 
-     d xmlXPathNAN     s              8f   import('xmlXPathNAN')
-     d xmlXPathPINF    s              8f   import('xmlXPathPINF')
-     d xmlXPathNINF    s              8f   import('xmlXPathNINF')
+     d xmlXPathNAN     s                   import('xmlXPathNAN')
+     d                                     like(xmlCdouble)
+
+     d xmlXPathPINF    s                   import('xmlXPathPINF')
+     d                                     like(xmlCdouble)
+
+     d xmlXPathNINF    s                   import('xmlXPathNINF')
+     d                                     like(xmlCdouble)
 
      d xmlXPathFreeObject...
      d                 pr                  extproc('xmlXPathFreeObject')
      d val                                 value like(xmlXPathObjectPtr)
 
      d xmlXPathCmpNodes...
-     d                 pr            10i 0 extproc('xmlXPathCmpNodes')
+     d                 pr                  extproc('xmlXPathCmpNodes')
+     d                                     like(xmlCint)
      d node1                               value like(xmlNodePtr)
      d node2                               value like(xmlNodePtr)
 
       * Conversion functions to basic types.
 
      d xmlXPathCastNumberToBoolean...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                      'xmlXPathCastNumberToBoolean')
-     d val                            8f   value
+     d                                     like(xmlCint)
+     d val                                 value like(xmlCdouble)
 
      d xmlXPathCastStringToBoolean...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                      'xmlXPathCastStringToBoolean')
+     d                                     like(xmlCint)
      d val                             *   value options(*string)               const xmlChar *
 
      d xmlXPathCastNodeSetToBoolean...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlXPathCastNodeSetToBoolean')
+     d                                     like(xmlCint)
      d ns                                  value like(xmlNodeSetPtr)
 
      d xmlXPathCastToBoolean...
-     d                 pr            10i 0 extproc('xmlXPathCastToBoolean')
+     d                 pr                  extproc('xmlXPathCastToBoolean')
+     d                                     like(xmlCint)
      d val                                 value like(xmlXPathObjectPtr)
 
      d xmlXPathCastBooleanToNumber...
      d                 pr                  extproc(
      d                                      'xmlXPathCastBooleanToNumber')
-     d                                8f
-     d val                           10i 0 value
+     d                                     like(xmlCdouble)
+     d val                                 value like(xmlCint)
 
      d xmlXPathCastStringToNumber...
-     d                 pr             8f   extproc('xmlXPathCastStringToNumber')
+     d                 pr                  extproc('xmlXPathCastStringToNumber')
+     d                                     like(xmlCdouble)
      d val                             *   value options(*string)               const xmlChar *
 
      d xmlXPathCastNodeToNumber...
-     d                 pr             8f   extproc('xmlXPathCastNodeToNumber')
+     d                 pr                  extproc('xmlXPathCastNodeToNumber')
+     d                                     like(xmlCdouble)
      d node                                value like(xmlNodePtr)
 
      d xmlXPathCastNodeSetToNumber...
-     d                 pr             8f   extproc(
+     d                 pr                  extproc(
      d                                      'xmlXPathCastNodeSetToNumber')
+     d                                     like(xmlCdouble)
      d ns                                  value like(xmlNodeSetPtr)
 
      d xmlXPathCastToNumber...
-     d                 pr             8f   extproc('xmlXPathCastToNumber')
+     d                 pr                  extproc('xmlXPathCastToNumber')
+     d                                     like(xmlCdouble)
      d val                                 value like(xmlXPathObjectPtr)
 
      d xmlXPathCastBooleanToString...
      d                 pr              *   extproc(                             xmlChar *
      d                                      'xmlXPathCastBooleanToString')
-     d val                           10i 0 value
+     d val                                 value like(xmlCint)
 
      d xmlXPathCastNumberToString...
      d                 pr              *   extproc('xmlXPathCastNumberToString')xmlChar *
-     d val                            8f   value
+     d val                                 value like(xmlCdouble)
 
      d xmlXPathCastNodeToString...
      d                 pr              *   extproc('xmlXPathCastNodeToString')  xmlChar *
      d ctxt                                value like(xmlXPathContextPtr)
 
      d xmlXPathContextSetCache...
-     d                 pr            10i 0 extproc('xmlXPathContextSetCache')
+     d                 pr                  extproc('xmlXPathContextSetCache')
+     d                                     like(xmlCint)
      d ctxt                                value like(xmlXPathContextPtr)
-     d active                        10i 0 value
-     d value                         10i 0 value
-     d options                       10i 0 value
+     d active                              value like(xmlCint)
+     d value                               value like(xmlCint)
+     d options                             value like(xmlCint)
 
       * Evaluation functions.
 
      d xmlXPathOrderDocElems...
-     d                 pr            20i 0 extproc('xmlXPathOrderDocElems')
+     d                 pr                  extproc('xmlXPathOrderDocElems')
+     d                                     like(xmlClong)
      d doc                                 value like(xmlDocPtr)
 
      d xmlXPathSetContextNode...
-     d                 pr            10i 0 extproc('xmlXPathSetContextNode')
+     d                 pr                  extproc('xmlXPathSetContextNode')
+     d                                     like(xmlCint)
      d node                                value like(xmlNodePtr)
      d ctx                                 value like(xmlXPathContextPtr)
 
      d ctxt                                value like(xmlXPathContextPtr)
 
      d xmlXPathEvalPredicate...
-     d                 pr            10i 0 extproc('xmlXPathEvalPredicate')
+     d                 pr                  extproc('xmlXPathEvalPredicate')
+     d                                     like(xmlCint)
      d ctxt                                value like(xmlXPathContextPtr)
      d res                                 value like(xmlXPathObjectPtr)
 
      d ctx                                 value like(xmlXPathContextPtr)
 
      d xmlXPathCompiledEvalToBoolean...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlXPathCompiledEvalToBoolean')
+     d                                     like(xmlCint)
      d comp                                value like(xmlXPathCompExprPtr)
      d ctxt                                value like(xmlXPathContextPtr)
 
       /if defined(XML_TESTVAL)
      d xmlXPathInit    pr                  extproc('xmlXPathInit')
 
-     d xmlXPathIsNaN   pr            10i 0 extproc('xmlXPathIsNaN')
-     d val                            8f   value
+     d xmlXPathIsNaN   pr                  extproc('xmlXPathIsNaN')
+     d                                     like(xmlCint)
+     d val                                 value like(xmlCdouble)
 
-     d xmlXPathIsInf   pr            10i 0 extproc('xmlXPathIsInf')
-     d val                            8f   value
+     d xmlXPathIsInf   pr                  extproc('xmlXPathIsInf')
+     d                                     like(xmlCint)
+     d val                                 value like(xmlCdouble)
 
       /undefine XML_TESTVAL
       /endif
 
       /if defined(LIBXML_XPATH_ENABLED)
      d xmlXPathNodeSetGetLength...
-     d                 pr            10i 0 extproc('__xmlXPathNodeSetGetLength')
+     d                 pr                  extproc('__xmlXPathNodeSetGetLength')
+     d                                     like(xmlCint)
      d  ns                                 value like(xmlNodeSetPtr)
 
      d xmlXPathNodeSetItem...
      d                 pr                  extproc('__xmlXPathNodeSetItem')
      d                                     like(xmlNodePtr)
      d  ns                                 value like(xmlNodeSetPtr)
-     d  index                        10i 0 value
+     d  index                              value like(xmlCint)
 
      d xmlXPathNodeSetIsEmpty...
-     d                 pr            10i 0 extproc('__xmlXPathNodeSetIsEmpty')
+     d                 pr                  extproc('__xmlXPathNodeSetIsEmpty')
+     d                                     like(xmlCint)
      d  ns                                 value like(xmlNodeSetPtr)
       /endif                                                                    LIBXML_XPATH_ENABLED
       /endif                                                                    XML_XPATH_H__
index 69f3ae0..a6d12e1 100644 (file)
       /define XML_XPATH_INTERNALS_H__
 
       /include "libxmlrpg/xmlversion"
-      /include "libxmlrpg/xpath"
 
       /if defined(LIBXML_XPATH_ENABLED)
 
+      /include "libxmlrpg/xmlTypesC"
+      /include "libxmlrpg/xpath"
+
       ************************************************************************
       *                                                                      *
       *                            Helpers                                   *
       * shouldn't be used in #ifdef's preprocessor instructions.
 
      d xmlXPathPopBoolean...
-     d                 pr            10i 0 extproc('xmlXPathPopBoolean')
+     d                 pr                  extproc('xmlXPathPopBoolean')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlXPathParserContextPtr)
 
      d xmlXPathPopNumber...
-     d                 pr             8f   extproc('xmlXPathPopNumber')
+     d                 pr                  extproc('xmlXPathPopNumber')
+     d                                     like(xmlCdouble)
      d  ctxt                               value like(xmlXPathParserContextPtr)
 
      d xmlXPathPopString...
      d                 pr                  extproc('xmlXPatherror')
      d  ctxt                               value like(xmlXPathParserContextPtr)
      d  file                           *   value options(*string)               const char *
-     d  line                         10i 0 value
-     d  no                           10i 0 value
+     d  line                               value like(xmlCint)
+     d  no                                 value like(xmlCint)
 
      d xmlXPathErr     pr                  extproc('xmlXPathErr')
      d  ctxt                               value like(xmlXPathParserContextPtr)
-     d  error                        10i 0 value
+     d  error                              value like(xmlCint)
 
       /if defined(LIBXML_DEBUG_ENABLED)
      d xmlXPathDebugDumpObject...
      d                 pr                  extproc('xmlXPathDebugDumpObject')
      d  output                         *   value                                FILE *
      d  cur                                value like(xmlXPathObjectPtr)
-     d  depth                        10i 0 value
+     d  depth                              value like(xmlCint)
 
      d xmlXPathDebugDumpCompExpr...
      d                 pr                  extproc('xmlXPathDebugDumpCompExpr')
      d  output                         *   value                                FILE *
      d  comp                               value like(xmlXPathCompExprPtr)
-     d  depth                        10i 0 value
+     d  depth                              value like(xmlCint)
       /endif
 
       * NodeSet handling.
 
      d xmlXPathNodeSetContains...
-     d                 pr            10i 0 extproc('xmlXPathNodeSetContains')
+     d                 pr                  extproc('xmlXPathNodeSetContains')
+     d                                     like(xmlCint)
      d  cur                                value like(xmlNodeSetPtr)
      d  val                                value like(xmlNodePtr)
 
      d  nodes                              value like(xmlNodeSetPtr)
 
      d xmlXPathHasSameNodes...
-     d                 pr            10i 0 extproc('xmlXPathHasSameNodes')
+     d                 pr                  extproc('xmlXPathHasSameNodes')
+     d                                     like(xmlCint)
      d  nodes1                             value like(xmlNodeSetPtr)
      d  nodes2                             value like(xmlNodeSetPtr)
 
       * Extending a context.
 
      d xmlXPathRegisterNs...
-     d                 pr            10i 0 extproc('xmlXPathRegisterNs')
+     d                 pr                  extproc('xmlXPathRegisterNs')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlXPathContextPtr)
      d  prefix                         *   value options(*string)               const xmlChar *
      d  ns_uri                         *   value options(*string)               const xmlChar *
      d  ctxt                               value like(xmlXPathContextPtr)
 
      d xmlXPathRegisterFunc...
-     d                 pr            10i 0 extproc('xmlXPathRegisterFunc')
+     d                 pr                  extproc('xmlXPathRegisterFunc')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlXPathContextPtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  f                                  value like(xmlXPathFunction)
 
      d xmlXPathRegisterFuncNS...
-     d                 pr            10i 0 extproc('xmlXPathRegisterFuncNS')
+     d                 pr                  extproc('xmlXPathRegisterFuncNS')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlXPathContextPtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  ns_uri                         *   value options(*string)               const xmlChar *
      d  f                                  value like(xmlXPathFunction)
 
      d xmlXPathRegisterVariable...
-     d                 pr            10i 0 extproc('xmlXPathRegisterVariable')
+     d                 pr                  extproc('xmlXPathRegisterVariable')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlXPathContextPtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  value                              value like(xmlXPathObjectPtr)
 
      d xmlXPathRegisterVariableNS...
-     d                 pr            10i 0 extproc('xmlXPathRegisterVariableNS')
+     d                 pr                  extproc('xmlXPathRegisterVariableNS')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlXPathContextPtr)
      d  name                           *   value options(*string)               const xmlChar *
      d  ns_uri                         *   value options(*string)               const xmlChar *
      d                                     like(xmlXPathObjectPtr)
      d  ctxt                               value like(xmlXPathParserContextPtr)
 
-     d valuePush       pr            10i 0 extproc('valuePush')
+     d valuePush       pr                  extproc('valuePush')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlXPathParserContextPtr)
      d  value                              value like(xmlXPathObjectPtr)
 
      d xmlXPathNewFloat...
      d                 pr                  extproc('xmlXPathNewFloat')
      d                                     like(xmlXPathObjectPtr)
-     d  val                           8f   value
+     d  val                                value like(xmlCdouble)
 
      d xmlXPathNewBoolean...
      d                 pr                  extproc('xmlXPathNewBoolean')
      d                                     like(xmlXPathObjectPtr)
-     d  val                          10i 0 value
+     d  val                                value like(xmlCint)
 
      d xmlXPathNewNodeSet...
      d                 pr                  extproc('xmlXPathNewNodeSet')
      d  val                                value like(xmlNodePtr)
 
      d xmlXPathNodeSetAdd...
-     d                 pr            10i 0 extproc('xmlXPathNodeSetAdd')
+     d                 pr                  extproc('xmlXPathNodeSetAdd')
+     d                                     like(xmlCint)
      d  cur                                value like(xmlNodeSetPtr)
      d  val                                value like(xmlNodePtr)
 
      d xmlXPathNodeSetAddUnique...
-     d                 pr            10i 0 extproc('xmlXPathNodeSetAddUnique')
+     d                 pr                  extproc('xmlXPathNodeSetAddUnique')
+     d                                     like(xmlCint)
      d  cur                                value like(xmlNodeSetPtr)
      d  val                                value like(xmlNodePtr)
 
      d xmlXPathNodeSetAddNs...
-     d                 pr            10i 0 extproc('xmlXPathNodeSetAddNs')
+     d                 pr                  extproc('xmlXPathNodeSetAddNs')
+     d                                     like(xmlCint)
      d  cur                                value like(xmlNodeSetPtr)
      d  node                               value like(xmlNodePtr)
      d  ns                                 value like(xmlNsPtr)
       * Existing functions.
 
      d xmlXPathStringEvalNumber...
-     d                 pr             8f   extproc('xmlXPathStringEvalNumber')
+     d                 pr                  extproc('xmlXPathStringEvalNumber')
+     d                                     like(xmlCdouble)
      d  str                            *   value options(*string)               const xmlChar *
 
      d xmlXPathEvaluatePredicateResult...
-     d                 pr            10i 0 extproc(
+     d                 pr                  extproc(
      d                                     'xmlXPathEvaluatePredicateResult')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlXPathParserContextPtr)
      d  res                                value like(xmlXPathObjectPtr)
 
      d xmlXPathNodeSetRemove...
      d                 pr                  extproc('xmlXPathNodeSetRemove')
      d  cur                                value like(xmlNodeSetPtr)
-     d  val                          10i 0 value
+     d  val                                value like(xmlCint)
 
      d xmlXPathNewNodeSetList...
      d                 pr                  extproc('xmlXPathNewNodeSetList')
      d  val                            *   value                                void *
 
      d xmlXPathEqualValues...
-     d                 pr            10i 0 extproc('xmlXPathEqualValues')
+     d                 pr                  extproc('xmlXPathEqualValues')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlXPathParserContextPtr)
 
      d xmlXPathNotEqualValues...
-     d                 pr            10i 0 extproc('xmlXPathNotEqualValues')
+     d                 pr                  extproc('xmlXPathNotEqualValues')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlXPathParserContextPtr)
 
      d xmlXPathCompareValues...
-     d                 pr            10i 0 extproc('xmlXPathCompareValues')
+     d                 pr                  extproc('xmlXPathCompareValues')
+     d                                     like(xmlCint)
      d  ctxt                               value like(xmlXPathParserContextPtr)
-     d  inf                          10i 0 value
-     d  strict                       10i 0 value
+     d  inf                                value like(xmlCint)
+     d  strict                             value like(xmlCint)
 
      d xmlXPathValueFlipSign...
      d                 pr                  extproc('xmlXPathValueFlipSign')
      d  ctxt                               value like(xmlXPathParserContextPtr)
 
      d xmlXPathIsNodeType...
-     d                 pr            10i 0 extproc('xmlXPathIsNodeType')
+     d                 pr                  extproc('xmlXPathIsNodeType')
+     d                                     like(xmlCint)
      d  name                           *   value options(*string)               const xmlChar *
 
       * Some of the axis navigation routines.
      d xmlXPathLastFunction...
      d                 pr                  extproc('xmlXPathLastFunction')
      d  ctxt                               value like(xmlXPathParserContextPtr)
-     d  nargs                        10i 0 value
+     d  nargs                              value like(xmlCint)
 
      d xmlXPathPositionFunction...
      d                 pr                  extproc('xmlXPathPositionFunction')
      d  ctxt                               value like(xmlXPathParserContextPtr)
-     d  nargs                        10i 0 value
+     d  nargs                              value like(xmlCint)
 
      d xmlXPathCountFunction...
      d                 pr                  extproc('xmlXPathCountFunction')
      d  ctxt                               value like(xmlXPathParserContextPtr)
-     d  nargs                        10i 0 value
+     d  nargs                              value like(xmlCint)
 
      d xmlXPathIdFunction...
      d                 pr                  extproc('xmlXPathIdFunction')
      d  ctxt                               value like(xmlXPathParserContextPtr)
-     d  nargs                        10i 0 value
+     d  nargs                              value like(xmlCint)
 
      d xmlXPathLocalNameFunction...
      d                 pr                  extproc('xmlXPathLocalNameFunction')
      d  ctxt                               value like(xmlXPathParserContextPtr)
-     d  nargs                        10i 0 value
+     d  nargs                              value like(xmlCint)
 
      d xmlXPathNamespaceURIFunction...
      d                 pr                  extproc(
      d                                     'xmlXPathNamespaceURIFunction')
      d  ctxt                               value like(xmlXPathParserContextPtr)
-     d  nargs                        10i 0 value
+     d  nargs                              value like(xmlCint)
 
      d xmlXPathStringFunction...
      d                 pr                  extproc('xmlXPathStringFunction')
      d  ctxt                               value like(xmlXPathParserContextPtr)
-     d  nargs                        10i 0 value
+     d  nargs                              value like(xmlCint)
 
      d xmlXPathStringLengthFunction...
      d                 pr                  extproc(
      d                                     'xmlXPathStringLengthFunction')
      d  ctxt                               value like(xmlXPathParserContextPtr)
-     d  nargs                        10i 0 value
+     d  nargs                              value like(xmlCint)
 
      d xmlXPathConcatFunction...
      d                 pr                  extproc('xmlXPathConcatFunction')
      d  ctxt                               value like(xmlXPathParserContextPtr)
-     d  nargs                        10i 0 value
+     d  nargs                              value like(xmlCint)
 
      d xmlXPathContainsFunction...
      d                 pr                  extproc('xmlXPathContainsFunction')
      d  ctxt                               value like(xmlXPathParserContextPtr)
-     d  nargs                        10i 0 value
+     d  nargs                              value like(xmlCint)
 
      d xmlXPathStartsWithFunction...
      d                 pr                  extproc('xmlXPathStartsWithFunction')
      d  ctxt                               value like(xmlXPathParserContextPtr)
-     d  nargs                        10i 0 value
+     d  nargs                              value like(xmlCint)
 
      d xmlXPathSubstringFunction...
      d                 pr                  extproc('xmlXPathSubstringFunction')
      d  ctxt                               value like(xmlXPathParserContextPtr)
-     d  nargs                        10i 0 value
+     d  nargs                              value like(xmlCint)
 
      d xmlXPathSubstringBeforeFunction...
      d                 pr                  extproc(
      d                                     'xmlXPathSubstringBeforeFunction')
      d  ctxt                               value like(xmlXPathParserContextPtr)
-     d  nargs                        10i 0 value
+     d  nargs                              value like(xmlCint)
 
      d xmlXPathSubstringAfterFunction...
      d                 pr                  extproc(
      d                                     'xmlXPathSubstringAfterFunction')
      d  ctxt                               value like(xmlXPathParserContextPtr)
-     d  nargs                        10i 0 value
+     d  nargs                              value like(xmlCint)
 
 
      d xmlXPathNormalizeFunction...
      d                 pr                  extproc('xmlXPathNormalizeFunction')
      d  ctxt                               value like(xmlXPathParserContextPtr)
-     d  nargs                        10i 0 value
+     d  nargs                              value like(xmlCint)
 
      d xmlXPathTranslateFunction...
      d                 pr                  extproc('xmlXPathTranslateFunction')
      d  ctxt                               value like(xmlXPathParserContextPtr)
-     d  nargs                        10i 0 value
+     d  nargs                              value like(xmlCint)
 
      d xmlXPathNotFunction...
      d                 pr                  extproc('xmlXPathNotFunction')
      d  ctxt                               value like(xmlXPathParserContextPtr)
-     d  nargs                        10i 0 value
+     d  nargs                              value like(xmlCint)
 
      d xmlXPathTrueFunction...
      d                 pr                  extproc('xmlXPathTrueFunction')
      d  ctxt                               value like(xmlXPathParserContextPtr)
-     d  nargs                        10i 0 value
+     d  nargs                              value like(xmlCint)
 
      d xmlXPathFalseFunction...
      d                 pr                  extproc('xmlXPathFalseFunction')
      d  ctxt                               value like(xmlXPathParserContextPtr)
-     d  nargs                        10i 0 value
+     d  nargs                              value like(xmlCint)
 
      d xmlXPathLangFunction...
      d                 pr                  extproc('xmlXPathLangFunction')
      d  ctxt                               value like(xmlXPathParserContextPtr)
-     d  nargs                        10i 0 value
+     d  nargs                              value like(xmlCint)
 
      d xmlXPathNumberFunction...
      d                 pr                  extproc('xmlXPathNumberFunction')
      d  ctxt                               value like(xmlXPathParserContextPtr)
-     d  nargs                        10i 0 value
+     d  nargs                              value like(xmlCint)
 
      d xmlXPathSumFunction...
      d                 pr                  extproc('xmlXPathSumFunction')
      d  ctxt                               value like(xmlXPathParserContextPtr)
-     d  nargs                        10i 0 value
+     d  nargs                              value like(xmlCint)
 
      d xmlXPathFloorFunction...
      d                 pr                  extproc('xmlXPathFloorFunction')
      d  ctxt                               value like(xmlXPathParserContextPtr)
-     d  nargs                        10i 0 value
+     d  nargs                              value like(xmlCint)
 
      d xmlXPathCeilingFunction...
      d                 pr                  extproc('xmlXPathCeilingFunction')
      d  ctxt                               value like(xmlXPathParserContextPtr)
-     d  nargs                        10i 0 value
+     d  nargs                              value like(xmlCint)
 
      d xmlXPathRoundFunction...
      d                 pr                  extproc('xmlXPathRoundFunction')
      d  ctxt                               value like(xmlXPathParserContextPtr)
-     d  nargs                        10i 0 value
+     d  nargs                              value like(xmlCint)
 
      d xmlXPathBooleanFunction...
      d                 pr                  extproc('xmlXPathBooleanFunction')
      d  ctxt                               value like(xmlXPathParserContextPtr)
-     d  nargs                        10i 0 value
+     d  nargs                              value like(xmlCint)
 
       * Really internal functions
 
index 6f43314..29ef0f3 100644 (file)
@@ -19,6 +19,7 @@
 
       /if defined(LIBXML_XPTR_ENABLED)
 
+      /include "libxmlrpg/xmlTypesC"
       /include "libxmlrpg/tree"
       /include "libxmlrpg/xpath"
 
@@ -29,8 +30,8 @@
 
      d xmlLocationSet  ds                  based(xmlLocationSetPtr)
      d                                     align qualified
-     d  locNr                        10i 0                                      # locations in set
-     d  locMax                       10i 0                                      Max locations in set
+     d  locNr                              like(xmlCint)                        # locations in set
+     d  locMax                             like(xmlCint)                        Max locations in set
      d  locTab                         *                                        xmlXPathObjectPtr *
 
       * Handling of location sets.
@@ -54,9 +55,9 @@
      d                 pr                  extproc('xmlXPtrNewRange')
      d                                     like(xmlXPathObjectPtr)
      d start                               value like(xmlNodePtr)
-     d startindex                    10i 0 value
+     d startindex                          value like(xmlCint)
      d end                                 value like(xmlNodePtr)
-     d endindex                      10i 0 value
+     d endindex                            value like(xmlCint)
 
      d xmlXPtrNewRangePoints...
      d                 pr                  extproc('xmlXPtrNewRangePoints')
      d xmlXPtrLocationSetRemove...
      d                 pr                  extproc('xmlXPtrLocationSetRemove')
      d cur                                 value like(xmlLocationSetPtr)
-     d val                           10i 0 value
+     d val                                 value like(xmlCint)
 
       * Functions.
 
      d xmlXPtrRangeToFunction...
      d                 pr                  extproc('xmlXPtrRangeToFunction')
      d ctxt                                value like(xmlXPathParserContextPtr)
-     d nargs                         10i 0 value
+     d nargs                               value like(xmlCint)
 
      d xmlXPtrBuildNodeList...
      d                 pr                  extproc('xmlXPtrBuildNodeList')
index 95d3249..664b47b 100644 (file)
@@ -25,8 +25,6 @@ fi
 
 #       Map file names to DB2 name syntax.
 
-> tmpsubstfile
-
 for HFILE in *.rpgle *.rpgle.in
 do      NAME="`basename \"${HFILE}\" .in`"
         VAR="`basename \"${NAME}\" .rpgle`"
@@ -36,9 +34,14 @@ do      NAME="`basename \"${HFILE}\" .in`"
         then    VAL=SCHMTYPES
         fi
 
-        echo "s/${VAR}/${VAL}/g" >> tmpsubstfile
         eval "VAR_${VAR}=\"${VAL}\""
-done
+        echo "${VAR} s/${VAR}/${VAL}/g"
+done > tmpsubstfile1
+
+#       Order substitution commands so that a prefix appears after all
+#               file names beginning with the prefix.
+
+sort -r tmpsubstfile1 | sed 's/^[^ ]*[ ]*//' > tmpsubstfile2
 
 
 change_include()
@@ -47,7 +50,7 @@ change_include()
         sed -e '\#^....../include  *"libxmlrpg/#{'                      \
             -e 's///'                                                   \
             -e 's/".*//'                                                \
-            -f tmpsubstfile                                             \
+            -f tmpsubstfile2                                            \
             -e 's#.*#      /include libxmlrpg,&#'                       \
             -e '}'
 }
index f06cfaf..6094de8 100644 (file)
@@ -17,7 +17,7 @@ cd "${TOPDIR}"
 echo '#pragma comment(user, "libxml2 version '"${LIBXML_VERSION}"'")' > os400.c
 echo '#pragma comment(user, __DATE__)' >> os400.c
 echo '#pragma comment(user, __TIME__)' >> os400.c
-echo '#pragma comment(copyright, "Copyright (C) 1998-2014 Daniel Veillard. OS/400 version by P. Monnerat.")' >> os400.c
+echo '#pragma comment(copyright, "Copyright (C) 1998-2015 Daniel Veillard. OS/400 version by P. Monnerat.")' >> os400.c
 make_module     OS400           os400.c
 LINK=                           # No need to rebuild service program yet.
 MODULES=
@@ -62,11 +62,11 @@ INCLUDES="'`pwd`'"
 
 #       OS/400 specific modules first.
 
-make_module     DLFCN           "${SCRIPTDIR}/dlfcn/dlfcn.c"    ''      ebcdic
-make_module     ICONV           "${SCRIPTDIR}/iconv/iconv.c"    ''      ebcdic
-make_module     WRAPPERS        "${SCRIPTDIR}/wrappers.c"       ''      ebcdic
-make_module     TRANSCODE       "${SCRIPTDIR}/transcode.c"
-make_module     RPGSUPPORT      "${SCRIPTDIR}/rpgsupport.c"
+make_module     --ebcdic        DLFCN           "${SCRIPTDIR}/dlfcn/dlfcn.c"
+make_module     --ebcdic        ICONV           "${SCRIPTDIR}/iconv/iconv.c"
+make_module     --ebcdic        WRAPPERS        "${SCRIPTDIR}/wrappers.c"
+make_module                     TRANSCODE       "${SCRIPTDIR}/transcode.c"
+make_module                     RPGSUPPORT      "${SCRIPTDIR}/rpgsupport.c"
 
 #       Regular libxml2 modules.
 
@@ -239,3 +239,117 @@ then    rm -rf "${LIBIFSNAME}/${DYNBNDDIR}.BNDDIR"
         CMD="${CMD} OBJ((*LIBL/${SRVPGM} *SRVPGM))"
         system "${CMD}"
 fi
+
+
+#       Compile the ASCII main() stub.
+
+make_module     --ebcdic --sysiconv     LIBXMLMAIN  "${SCRIPTDIR}/libxmlmain.c"
+
+
+#       Compile and link program xmllint.
+
+if action_needed "${LIBIFSNAME}/XMLLINT.PGM" "xmllint.c" ||
+   action_needed "${LIBIFSNAME}/XMLLINT.PGM" "${LIBIFSNAME}/${SRVPGM}.SRVPGM" ||
+   action_needed "${LIBIFSNAME}/XMLLINT.PGM" "${LIBIFSNAME}/LIBXMLMAIN.MODULE"
+then    make_module XMLLINT xmllint.c
+        CMD="CRTPGM PGM(${TARGETLIB}/XMLLINT) MODULE(${TARGETLIB}/XMLLINT)"
+        CMD="${CMD} ENTMOD(${TARGETLIB}/LIBXMLMAIN)"
+        CMD="${CMD} BNDSRVPGM(QADRTTS) BNDDIR((${TARGETLIB}/${STATBNDDIR})"
+        if [ "${WITH_ZLIB}" -ne 0 ]
+        then    CMD="${CMD} (${ZLIB_LIB}/${ZLIB_BNDDIR})"
+        fi
+        CMD="${CMD}) ACTGRP(*NEW) TEXT('XML tool')"
+        CMD="${CMD} TGTRLS(${TGTRLS})"
+        system "${CMD}"
+        rm -f "${LIBIFSNAME}/XMLLINT.MODULE"
+fi
+
+#       Install xmllint in IFS.
+
+if [ ! -d "${IFSDIR}/bin" ]
+then    mkdir -p "${IFSDIR}/bin"
+fi
+rm -f "${IFSDIR}/bin/xmllint"
+ln -s "${LIBIFSNAME}/XMLLINT.PGM" "${IFSDIR}/bin/xmllint"
+
+#       Prepare the XMLLINT command and its response program.
+
+if action_needed "${LIBIFSNAME}/XMLLINTCL.PGM" "${SCRIPTDIR}/xmllintcl.c"
+then    make_module --ebcdic XMLLINTCL "${SCRIPTDIR}/xmllintcl.c"
+        CMD="CRTPGM PGM(${TARGETLIB}/XMLLINTCL) MODULE(${TARGETLIB}/XMLLINTCL)"
+        CMD="${CMD} ACTGRP(*NEW) TEXT('XMLLINT command response')"
+        CMD="${CMD} TGTRLS(${TGTRLS})"
+        system "${CMD}"
+        rm -f "${LIBIFSNAME}/XMLLINTCL.MODULE"
+fi
+
+if action_needed "${LIBIFSNAME}/TOOLS.FILE/XMLLINT.MBR"                 \
+                 "${SCRIPTDIR}/xmllint.cmd"
+then    CMD="CPY OBJ('${SCRIPTDIR}/xmllint.cmd')"
+        CMD="${CMD} TOOBJ('${LIBIFSNAME}/TOOLS.FILE/XMLLINT.MBR')"
+        CMD="${CMD} TOCCSID(${TGTCCSID}) DTAFMT(*TEXT) REPLACE(*YES)"
+        system "${CMD}"
+fi
+
+if action_needed "${LIBIFSNAME}/XMLLINT.CMD"                            \
+                 "${LIBIFSNAME}/TOOLS.FILE/XMLLINT.MBR"
+then    CMD="CRTCMD CMD(${TARGETLIB}/XMLLINT) PGM(${TARGETLIB}/XMLLINTCL)"
+        CMD="${CMD} SRCFILE(${TARGETLIB}/TOOLS) SRCMBR(XMLLINT) THDSAFE(*YES)"
+        CMD="${CMD} TEXT('XML tool') REPLACE(*YES)"
+        system "${CMD}"
+fi
+
+
+#       Compile and link program xmlcatalog.
+
+if action_needed "${LIBIFSNAME}/XMLCATALOG.PGM" "xmlcatalog.c" ||
+   action_needed "${LIBIFSNAME}/XMLCATALOG.PGM"                         \
+                 "${LIBIFSNAME}/${SRVPGM}.SRVPGM" ||
+   action_needed "${LIBIFSNAME}/XMLCATALOG.PGM"                         \
+                 "${LIBIFSNAME}/LIBXMLMAIN.MODULE"
+then    make_module XMLCATALOG xmlcatalog.c
+        CMD="CRTPGM PGM(${TARGETLIB}/XMLCATALOG)"
+        CMD="${CMD}  MODULE(${TARGETLIB}/XMLCATALOG)"
+        CMD="${CMD} ENTMOD(${TARGETLIB}/LIBXMLMAIN)"
+        CMD="${CMD} BNDSRVPGM(QADRTTS) BNDDIR((${TARGETLIB}/${STATBNDDIR})"
+        if [ "${WITH_ZLIB}" -ne 0 ]
+        then    CMD="${CMD} (${ZLIB_LIB}/${ZLIB_BNDDIR})"
+        fi
+        CMD="${CMD}) ACTGRP(*NEW) TEXT('XML/SGML catalog tool')"
+        CMD="${CMD} TGTRLS(${TGTRLS})"
+        system "${CMD}"
+        rm -f "${LIBIFSNAME}/XMLCATALOG.MODULE"
+fi
+
+#       Install xmlcatalog in IFS.
+
+rm -f "${IFSDIR}/bin/xmlcatalog"
+ln -s "${LIBIFSNAME}/XMLCATALOG.PGM" "${IFSDIR}/bin/xmlcatalog"
+
+#       Prepare the XMLCATALOG command and its response program.
+
+if action_needed "${LIBIFSNAME}/XMLCATLGCL.PGM" "${SCRIPTDIR}/xmlcatlgcl.c"
+then    make_module --ebcdic XMLCATLGCL "${SCRIPTDIR}/xmlcatlgcl.c"
+        CMD="CRTPGM PGM(${TARGETLIB}/XMLCATLGCL)"
+        CMD="${CMD} MODULE(${TARGETLIB}/XMLCATLGCL)"
+        CMD="${CMD} ACTGRP(*NEW) TEXT('XMLCATALOG command response')"
+        CMD="${CMD} TGTRLS(${TGTRLS})"
+        system "${CMD}"
+        rm -f "${LIBIFSNAME}/XMLCATLGCL.MODULE"
+fi
+
+if action_needed "${LIBIFSNAME}/TOOLS.FILE/XMLCATALOG.MBR"              \
+                 "${SCRIPTDIR}/xmlcatalog.cmd"
+then    CMD="CPY OBJ('${SCRIPTDIR}/xmlcatalog.cmd')"
+        CMD="${CMD} TOOBJ('${LIBIFSNAME}/TOOLS.FILE/XMLCATALOG.MBR')"
+        CMD="${CMD} TOCCSID(${TGTCCSID}) DTAFMT(*TEXT) REPLACE(*YES)"
+        system "${CMD}"
+fi
+
+if action_needed "${LIBIFSNAME}/XMLCATALOG.CMD"                         \
+                 "${LIBIFSNAME}/TOOLS.FILE/XMLCATALOG.MBR"
+then    CMD="CRTCMD CMD(${TARGETLIB}/XMLCATALOG) PGM(${TARGETLIB}/XMLCATLGCL)"
+        CMD="${CMD} SRCFILE(${TARGETLIB}/TOOLS) SRCMBR(XMLCATALOG)"
+        CMD="${CMD} THDSAFE(*YES) TEXT('XML/SGML catalog tool') REPLACE(*YES)"
+        system "${CMD}"
+fi
index 864e72b..95a35a2 100644 (file)
@@ -42,7 +42,16 @@ do      if [ -f "${TEXT}" ]
                 MEMBER="${LIBIFSNAME}/DOCS.FILE/`db2_name \"${MEMBER}\"`.MBR"
 
                 if action_needed "${MEMBER}" "${TEXT}"
-                then    CMD="CPY OBJ('${TEXT}') TOOBJ('${MEMBER}')"
+                then    # Sources are in UTF-8.
+                        rm -f "${TOPDIR}/tmpfile"[12]
+                        CMD="CPY OBJ('${TEXT}') TOOBJ('${TOPDIR}/tmpfile1')"
+                        CMD="${CMD} FROMCCSID(1208) TOCCSID(${TGTCCSID})"
+                        CMD="${CMD} DTAFMT(*TEXT) REPLACE(*YES)"
+                        system "${CMD}"
+                        # Make sure all lines are < 100 characters.
+                        sed -e 's/.\{99\}/&\
+/g' -e 's/\n$//' "${TOPDIR}/tmpfile1" > "${TOPDIR}/tmpfile2"
+                        CMD="CPY OBJ('${TOPDIR}/tmpfile2') TOOBJ('${MEMBER}')"
                         CMD="${CMD} TOCCSID(${TGTCCSID})"
                         CMD="${CMD} DTAFMT(*TEXT) REPLACE(*YES)"
                         system "${CMD}"
index a3609c0..ad4cc5d 100644 (file)
@@ -219,7 +219,7 @@ int
 __xmlXPathNodeSetGetLength(const xmlNodeSet * ns)
 
 {
-       return xmlXPathNodeSetGetLength(ns);
+        return xmlXPathNodeSetGetLength(ns);
 }
 
 
@@ -227,7 +227,7 @@ xmlNodePtr
 __xmlXPathNodeSetItem(const xmlNodeSet * ns, int index)
 
 {
-       return xmlXPathNodeSetItem(ns, index);
+        return xmlXPathNodeSetItem(ns, index);
 }
 
 
@@ -235,7 +235,7 @@ int
 __xmlXPathNodeSetIsEmpty(const xmlNodeSet * ns)
 
 {
-       return xmlXPathNodeSetIsEmpty(ns);
+        return xmlXPathNodeSetIsEmpty(ns);
 }
 
 #endif
@@ -247,16 +247,16 @@ const char *
 __htmlDefaultSubelement(const htmlElemDesc * elt)
 
 {
-       return htmlDefaultSubelement(elt);
+        return htmlDefaultSubelement(elt);
 }
 
 
 int
 __htmlElementAllowedHereDesc(const htmlElemDesc * parent,
-                                               const htmlElemDesc * elt)
+                                                const htmlElemDesc * elt)
 
 {
-       return htmlElementAllowedHereDesc(parent, elt);
+        return htmlElementAllowedHereDesc(parent, elt);
 }
 
 
@@ -264,7 +264,7 @@ const char * *
 __htmlRequiredAttrs(const htmlElemDesc * elt)
 
 {
-       return htmlRequiredAttrs(elt);
+        return htmlRequiredAttrs(elt);
 }
 
 #endif
index 6725b59..d8016d7 100644 (file)
@@ -141,17 +141,17 @@ XMLPUBFUN void *        __xmlVaArg(char * * list, void * dest, size_t argsize);
 XMLPUBFUN void          __xmlVaEnd(char * * list);
 
 #ifdef LIBXML_XPATH_ENABLED
-XMLPUBFUN int          __xmlXPathNodeSetGetLength(xmlNodeSetPtr ns);
-XMLPUBFUN xmlNodePtr   __xmlXPathNodeSetItem(xmlNodeSetPtr ns, int index);
-XMLPUBFUN int          __xmlXPathNodeSetIsEmpty(xmlNodeSetPtr ns);
+XMLPUBFUN int           __xmlXPathNodeSetGetLength(xmlNodeSetPtr ns);
+XMLPUBFUN xmlNodePtr    __xmlXPathNodeSetItem(xmlNodeSetPtr ns, int index);
+XMLPUBFUN int           __xmlXPathNodeSetIsEmpty(xmlNodeSetPtr ns);
 #endif
 
 #ifdef LIBXML_HTML_ENABLED
-XMLPUBFUN const char * __htmlDefaultSubelement(const htmlElemDesc * elt);
-XMLPUBFUN int  __htmlElementAllowedHereDesc(const htmlElemDesc * parent,
-                       const htmlElemDesc * elt);
+XMLPUBFUN const char *  __htmlDefaultSubelement(const htmlElemDesc * elt);
+XMLPUBFUN int   __htmlElementAllowedHereDesc(const htmlElemDesc * parent,
+                        const htmlElemDesc * elt);
 XMLPUBFUN const char * *
-                       __htmlRequiredAttrs(const htmlElemDesc * elt);
+                        __htmlRequiredAttrs(const htmlElemDesc * elt);
 #endif
 
 #endif
diff --git a/os400/xmlcatalog.cmd b/os400/xmlcatalog.cmd
new file mode 100644 (file)
index 0000000..92f0270
--- /dev/null
@@ -0,0 +1,112 @@
+/*      XMLCATALOG CL command.                                                */
+/*                                                                            */
+/*      See Copyright for the status of this software.                        */
+/*                                                                            */
+/*      Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.          */
+
+/*      Interface to program XMLCATLGCL                                       */
+
+             CMD        PROMPT('XML/SGML catalog  tool')
+
+             /* Catalog file path. */
+
+             PARM       KWD(INSTMF) TYPE(*PNAME) LEN(5000) VARY(*YES *INT2)    +
+                          CASE(*MIXED) EXPR(*YES) MIN(1) SPCVAL((*NEW ''))     +
+                          CHOICE('Stream file path')                           +
+                          PROMPT('XML/SGML catalog file')
+
+             /* Catalog kind: XML/SGML. */
+
+             PARM       KWD(KIND) TYPE(*CHAR) LEN(7) VARY(*YES *INT2)          +
+                          EXPR(*YES) RSTD(*YES) DFT(*XML)                      +
+                          SPCVAL((*XML '') (*SGML '--sgml'))                   +
+                          PROMPT('Catalog kind')
+
+             /* Output file. */
+
+             PARM       KWD(OUTSTMF) TYPE(*PNAME) LEN(5000) VARY(*YES *INT2)   +
+                          CASE(*MIXED) EXPR(*YES) DFT(*STDOUT)                 +
+                          SPCVAL((*STDOUT '') (*INSTMF X'00'))                 +
+                          CHOICE('*STDOUT, *INSTMF or file path')              +
+                          PROMPT('Output stream file path')
+
+             /* Convert SGML to XML catalog. */
+
+             PARM       KWD(CONVERT) TYPE(*CHAR) LEN(10) VARY(*YES *INT2)      +
+                          RSTD(*YES) SPCVAL((*YES '--convert') (*NO ''))       +
+                          EXPR(*YES) DFT(*NO) PMTCTL(TYPEXML)                  +
+                          PROMPT('Convert SGML to XML catalog')
+
+             /* SGML super catalog update. */
+
+             PARM       KWD(SUPERUPD) TYPE(*CHAR) LEN(17) VARY(*YES *INT2)     +
+                          SPCVAL((*YES '') (*NO '--no-super-update'))          +
+                          EXPR(*YES) DFT(*YES) RSTD(*YES) PMTCTL(TYPESGML)     +
+                          PROMPT('Update the SGML super catalog')
+
+             /* Verbose/debug output. */
+
+             PARM       KWD(VERBOSE) TYPE(*CHAR) LEN(4) VARY(*YES *INT2)       +
+                          RSTD(*YES) SPCVAL((*YES '-v') (*NO ''))              +
+                          EXPR(*YES) DFT(*NO)                                  +
+                          PROMPT('Output debugging information')
+
+             /* Interactive shell not supported. */
+
+             /* Values to delete. */
+
+             PARM       KWD(DELETE) TYPE(*PNAME) LEN(256) VARY(*YES *INT2)     +
+                          CASE(*MIXED) MAX(64) EXPR(*YES)                      +
+                          CHOICE('Identifier value')                           +
+                          PROMPT('Delete System/URI identifier')
+
+             /* Values to add. */
+
+             PARM       KWD(ADD) TYPE(XMLELEM) MAX(10) PMTCTL(TYPEXML)         +
+                          PROMPT('Add definition')
+XMLELEM:     ELEM       TYPE(*CHAR) LEN(16) VARY(*YES *INT2) DFT(*PUBLIC)      +
+                          PROMPT('Entry type')                                 +
+                          EXPR(*YES) RSTD(*YES) SPCVAL(                        +
+                            (*PUBLIC         'public')                         +
+                            (*SYSTEM         'system')                         +
+                            (*URI            'uri')                            +
+                            (*REWRITESYSTEM  'rewriteSystem')                  +
+                            (*REWRITEURI     'rewriteURI')                     +
+                            (*DELEGATEPUBLIC 'delegatePublic')                 +
+                            (*DELEGATESYSTEM 'delegateSystem')                 +
+                            (*DELEGATEURI    'delegateURI')                    +
+                            (*NEXTCATALOG    'nextCatalog')                    +
+                          )
+             ELEM       TYPE(*PNAME) LEN(256) VARY(*YES *INT2) EXPR(*YES)      +
+                          CASE(*MIXED) PROMPT('Original reference/file name')
+             ELEM       TYPE(*PNAME) LEN(256) VARY(*YES *INT2) EXPR(*YES)      +
+                          CASE(*MIXED) PROMPT('Replacement entity URI')
+
+             PARM       KWD(SGMLADD) TYPE(SGMLELEM) MAX(10)                    +
+                          PMTCTL(TYPESGML) PROMPT('Add SGML definition')
+SGMLELEM:    ELEM       TYPE(*PNAME) LEN(256) VARY(*YES *INT2) EXPR(*YES)      +
+                          CASE(*MIXED) PROMPT('SGML catalog file name')
+             ELEM       TYPE(*PNAME) LEN(256) VARY(*YES *INT2) EXPR(*YES)      +
+                          CASE(*MIXED) PROMPT('SGML definition')
+
+             /* Entities to resolve. */
+
+             PARM       KWD(ENTITY) TYPE(*PNAME) LEN(256) VARY(*YES *INT2)     +
+                          CASE(*MIXED) EXPR(*YES) MAX(150)                     +
+                          PROMPT('Resolve entity')
+
+             /* Additional catalog files. */
+
+             PARM       KWD(CATALOG) TYPE(*PNAME) LEN(5000) VARY(*YES *INT2)   +
+                          CASE(*MIXED) EXPR(*YES) MAX(150) DFT(*DEFAULT)       +
+                          CHOICE('Catalog stream file path')                   +
+                          PROMPT('Additional catalog file') SPCVAL(            +
+                            (*DEFAULT       '/etc/xml/catalog')                +
+                            (*NONE          '')                                +
+                          )
+
+
+             /* Conditional prompting. */
+
+TYPEXML:     PMTCTL     CTL(KIND) COND((*EQ ''))
+TYPESGML:    PMTCTL     CTL(KIND) COND((*NE ''))
diff --git a/os400/xmlcatlgcl.c b/os400/xmlcatlgcl.c
new file mode 100644 (file)
index 0000000..6f1e4ff
--- /dev/null
@@ -0,0 +1,288 @@
+/**
+***     XMLCATALOG command response program.
+***
+***     See Copyright for the status of this software.
+***
+***     Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+**/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <qshell.h>
+
+
+/* Variable-length string, with 16-bit length. */
+typedef struct {
+        short           len;
+        char            string[5000];
+}               vary2;
+
+
+/* Variable-length string, with 32-bit length. */
+typedef struct {
+        int             len;
+        char            string[5000];
+}               vary4;
+
+
+/* Multiple occurrence parameter list. */
+#define paramlist(itemsize, itemtype)                                   \
+        _Packed struct {                                                \
+                short           len;                                    \
+                _Packed union {                                         \
+                         char           _pad[itemsize];                 \
+                        itemtype        param;                          \
+                }               item[1];                                \
+        }
+
+/* Add element list structure. */
+typedef struct {
+        short           elcount;        /* Element count (=3). */
+        paramlist(16, char) type;       /* vary2(16). */
+        paramlist(256, char) origin;    /* vary2(256). */
+        paramlist(256, char) replace;   /* vary2(256). */
+}               addelement;
+
+/* SGML add element list structure. */
+typedef struct {
+        short           elcount;        /* Element count (=3). */
+        paramlist(256, char) catalog;   /* vary2(256). */
+        paramlist(256, char) ident;     /* vary2(256). */
+}               sgmladdelement;
+
+
+/* Arguments from CL command. */
+typedef struct {
+        char *          pgm;            /* Program name. */
+        vary2 *         instmf;         /* Input catalog file name. */
+        vary2 *         kind;           /* Catalog kind. */
+        vary2 *         outstmf;        /* Output catalog file name. */
+        vary2 *         convert;        /* Convert SGML to XML. */
+        vary2 *         superupd;       /* --no-super-update. */
+        vary2 *         verbose;        /* Verbose output. */
+        paramlist(256 + 2, vary2) * delete; /* Identifiers to delete. */
+        paramlist(2, unsigned short) * add; /* Items to add. */
+        paramlist(2, unsigned short) * sgmladd; /* SGML items to add. */
+        paramlist(256 + 2, vary2) * resolve; /* Identifiers to resolve. */
+        paramlist(5000 + 2, vary2) * catalog; /* Additional catalog files. */
+}               arguments;
+
+
+/* Definition of QSHELL program. */
+extern void     qshell(vary4 * cmd);
+#pragma linkage(qshell, OS)
+#pragma map(qshell, "QSHELL/QZSHQSHC")
+
+/* Macro to handle displacements. */
+#define OFFSETBY(t, p, n)       ((t *) (((char *) (p)) + (n)))
+
+
+static void
+vary4nappend(vary4 * dst, const char * src, size_t len)
+
+{
+        if (len > sizeof(dst->string) - dst->len)
+                len = sizeof(dst->string) - dst->len;
+
+        if (len) {
+                memcpy(dst->string + dst->len, src, len);
+                dst->len += len;
+                }
+}
+
+
+static void
+vary4append(vary4 * dst, const char * src)
+
+{
+        vary4nappend(dst, src, strlen(src));
+}
+
+
+static void
+vary4arg(vary4 * dst, const char * arg)
+
+{
+        vary4nappend(dst, " ", 1);
+        vary4append(dst, arg);
+}
+
+
+static void
+vary4varg(vary4 * dst, vary2 * arg)
+
+{
+        vary4nappend(dst, " ", 1);
+        vary4nappend(dst, arg->string, arg->len);
+}
+
+
+static void
+vary4vescape(vary4 * dst, vary2 * arg)
+
+{
+        int i;
+
+        for (i = 0; i < arg->len; i++)
+                if (arg->string[i] == '\'')
+                        vary4nappend(dst, "'\"'\"'", 5);
+                else
+                        vary4nappend(dst, arg->string + i, 1);
+}
+
+
+static void
+vary4vargquote(vary4 * dst, vary2 * arg)
+
+{
+        vary4nappend(dst, " '", 2);
+        vary4vescape(dst, arg);
+        vary4nappend(dst, "'", 1);
+}
+
+
+int
+main(int argsc, arguments * args)
+
+{
+        vary4 cmd;
+        int i;
+        char c;
+        addelement * aelp;
+        sgmladdelement * saelp;
+
+        /* Specify additional catalogs. */
+        cmd.len = 0;
+        if (args->catalog->len) {
+                for (i = 0; i < args->catalog->len &&
+                            !args->catalog->item[i].param.len; i++)
+                        ;
+
+                vary4append(&cmd, "XML_CATALOG_FILES=");
+                if (i < args->catalog->len) {
+                        c = '\'';
+                        for (i = 0; i < args->catalog->len; i++) {
+                                if (!args->catalog->item[i].param.len)
+                                        continue;
+                                vary4nappend(&cmd, &c, 1);
+                                c = ' ';
+                                vary4vescape(&cmd,
+                                            &args->catalog->item[i].param);
+                                }
+                        vary4nappend(&cmd, "'", 1);
+                        }
+                vary4nappend(&cmd, " ", 1);
+                }
+
+        /* find length of library name. */
+        for (i = 0; i < 10 && args->pgm[i] && args->pgm[i] != '/'; i++)
+                ;
+
+        /* Store program name in command buffer. */
+        vary4append(&cmd, "/QSYS.LIB/");
+        vary4nappend(&cmd, args->pgm, i);
+        vary4append(&cmd, ".LIB/XMLCATALOG.PGM");
+
+        /* Map command arguments to standard xmlcatalog argument vector. */
+        if (args->kind && args->kind->len)
+                vary4varg(&cmd, args->kind);
+
+        if (args->verbose && args->verbose->len)
+                vary4varg(&cmd, args->verbose);
+
+        if (args->delete)
+                for (i = 0; i < args->delete->len; i++) {
+                        vary4arg(&cmd, "--del");
+                        vary4vargquote(&cmd, &args->delete->item[i].param);
+                        }
+
+        if (args->kind && args->kind->len) {
+                /* Process SGML-specific parameters. */
+                if (args->superupd && args->superupd->len)
+                        vary4varg(&cmd, args->superupd);
+
+                if (args->sgmladd)
+                        for (i = 0; i < args->sgmladd->len; i++) {
+                                saelp = OFFSETBY(sgmladdelement, args->sgmladd,
+                                                args->sgmladd->item[i].param);
+                                if (!((vary2 *) &saelp->catalog)->len)
+                                        continue;
+                                vary4arg(&cmd, "--add");
+                                vary4vargquote(&cmd, (vary2 *) &saelp->catalog);
+                                vary4vargquote(&cmd, (vary2 *) &saelp->ident);
+                                }
+                }
+        else {
+                /* Process XML-specific parameters. */
+                if (args->convert && args->convert->len)
+                        vary4varg(&cmd, args->convert);
+
+                if (args->add)
+                        for (i = 0; i < args->add->len; i++) {
+                                aelp = OFFSETBY(addelement, args->add,
+                                                args->add->item[i].param);
+                                if (!((vary2 *) &aelp->origin)->len)
+                                        continue;
+                                vary4arg(&cmd, "--add");
+                                vary4varg(&cmd, (vary2 *) &aelp->type);
+                                vary4vargquote(&cmd, (vary2 *) &aelp->origin);
+                                vary4vargquote(&cmd, (vary2 *) &aelp->replace);
+                                }
+                }
+
+        /* Avoid INSTMF(*NEW) and OUTSMTF(*INSTMF). */
+        if (args->outstmf && args->outstmf->len && !args->outstmf->string[0])
+                if (args->instmf && args->instmf->len)
+                        args->outstmf = args->instmf;
+                else
+                        args->outstmf = NULL;
+
+        /* If INSTMF(*NEW) and OUTSTMF(somepath), Use --create --noout and
+           somepath as (unexisting) input file. */
+        if (args->outstmf && args->outstmf->len)
+                if (!args->instmf || !args->instmf->len) {
+                        vary4arg(&cmd, "--create");
+                        vary4arg(&cmd, "--noout");
+                        args->instmf = args->outstmf;
+                        args->outstmf = NULL;
+                        }
+
+        /* If output to input file, use --noout option. */
+        if (args->instmf && args->outstmf && args->instmf->len &&
+            args->instmf->len == args->outstmf->len &&
+            !strncmp(args->instmf->string, args->outstmf->string,
+                     args->instmf->len)) {
+                vary4arg(&cmd, "--noout");
+                args->outstmf = NULL;
+                }
+
+        /* If no input file create catalog, else specify the input file name. */
+        /* Specify the input file name: my be a dummy one. */
+        if (!args->instmf || !args->instmf->len) {
+                vary4arg(&cmd, "--create -");
+                vary4arg(&cmd, ".dmyxmlcatalog");
+                }
+        else {
+                vary4arg(&cmd, "-");
+                vary4vargquote(&cmd, args->instmf);
+                }
+
+        /* Query entities. */
+
+        if (args->resolve)
+                for (i = 0; i < args->resolve->len; i++)
+                        vary4vargquote(&cmd, &args->resolve->item[i].param);
+
+        /* Redirect output if requested. */
+        if (args->outstmf && args->outstmf->len) {
+                vary4arg(&cmd, ">");
+                vary4vargquote(&cmd, args->outstmf);
+                }
+
+        /* Execute the shell command. */
+        qshell(&cmd);
+
+        /* Terminate. */
+        exit(0);
+}
diff --git a/os400/xmllint.cmd b/os400/xmllint.cmd
new file mode 100644 (file)
index 0000000..1582837
--- /dev/null
@@ -0,0 +1,146 @@
+/*      XMLLINT CL command.                                                   */
+/*                                                                            */
+/*      See Copyright for the status of this software.                        */
+/*                                                                            */
+/*      Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.          */
+
+/*      Interface to program XMLLINTCL                                        */
+
+             CMD        PROMPT('XML tool')
+
+             /* XML input file location. */
+
+             PARM       KWD(STMF) TYPE(*PNAME) LEN(5000) VARY(*YES *INT2)      +
+                          CASE(*MIXED) EXPR(*YES) MIN(1)                       +
+                          CHOICE('Stream file path')                           +
+                          PROMPT('XML Stream file')
+
+             /* DTD location. */
+
+             PARM       KWD(DTD) TYPE(*PNAME) LEN(5000) VARY(*YES *INT2)       +
+                          CASE(*MIXED) EXPR(*YES) PASSVAL(*NULL)               +
+                          CHOICE('ID, URL or stream file path')                +
+                          PROMPT('DTD id, URL or file path')
+
+             PARM       KWD(DTDLOCATOR) TYPE(*CHAR) LEN(8) DFT(*DTDURL)        +
+                          SPCVAL(*DTDURL *DTDFPI) EXPR(*YES) RSTD(*YES)        +
+                          PROMPT('DTD locator is URL/FPI')
+
+             /* Schema location. */
+
+             PARM       KWD(SCHEMA) TYPE(*PNAME) LEN(5000) VARY(*YES *INT2)    +
+                          CASE(*MIXED) EXPR(*YES) PASSVAL(*NULL)               +
+                          CHOICE('URL or stream file path')                    +
+                          PROMPT('Schema URL or stream file path')
+
+             PARM       KWD(SCHEMAKIND) TYPE(*CHAR) LEN(12) VARY(*YES *INT2)   +
+                          RSTD(*YES) DFT(*XSD)                                 +
+                          PROMPT('Validating schema kind')                     +
+                          CHOICE('Keyword') SPCVAL(                            +
+                            (*XSD               '--schema')                    +
+                            (*RELAXNG           '--relaxng')                   +
+                            (*SCHEMATRON        '--schematron')                +
+                          )
+
+             /* Output location. */
+
+             PARM       KWD(OUTSTMF) TYPE(*PNAME) LEN(5000) VARY(*YES *INT2)   +
+                          CASE(*MIXED) EXPR(*YES) PASSVAL(*NULL)               +
+                          CHOICE('Stream file path')                           +
+                          PROMPT('Output stream file path')
+
+             /* Other parameters with arguments. */
+
+             PARM       KWD(XPATH) TYPE(*CHAR) LEN(5000) VARY(*YES *INT2)      +
+                          CASE(*MIXED) EXPR(*YES) PASSVAL(*NULL)               +
+                          CHOICE('XPath expression')                           +
+                          PROMPT('XPath filter')
+
+             PARM       KWD(PATTERN) TYPE(*CHAR) LEN(5000) VARY(*YES *INT2)    +
+                          CASE(*MIXED) EXPR(*YES) PASSVAL(*NULL)               +
+                          CHOICE('Reader pattern')                             +
+                          PROMPT('Reader node filter')
+
+             /* Paths for resources. */
+
+             PARM       KWD(PATH) TYPE(*PNAME) LEN(5000) VARY(*YES *INT2)      +
+                          CASE(*MIXED) EXPR(*YES) MAX(64)                      +
+                          CHOICE('IFS directory path')                         +
+                          PROMPT('Path for resources')
+
+             PARM       KWD(PRETTY) TYPE(*CHAR) LEN(11) VARY(*YES *INT2)       +
+                          RSTD(*YES) DFT(*NONE)                                +
+                          PROMPT('Pretty-print style')                         +
+                          CHOICE('Keyword') SPCVAL(                            +
+                            (*NONE              '0')                           +
+                            (*FORMAT            '1')                           +
+                            (*WHITESPACE        '2')                           +
+                          )
+
+             PARM       KWD(MAXMEM) TYPE(*UINT4) EXPR(*YES) DFT(0)             +
+                          CHOICE('Number of bytes')                            +
+                          PROMPT('Maximum dynamic memory')
+
+             PARM       KWD(ENCODING) TYPE(*CHAR) LEN(32) VARY(*YES *INT2)     +
+                          CASE(*MIXED) EXPR(*YES) PASSVAL(*NULL)               +
+                          PMTCTL(ENCODING) CHOICE('Encoding name')             +
+                          PROMPT('Output character encoding')
+ENCODING:    PMTCTL     CTL(OUTSTMF) COND(*SPCFD)
+
+             /* Boolean options. */
+             /* --shell is not supported from command mode. */
+
+             PARM       KWD(OPTIONS) TYPE(*CHAR) LEN(20) VARY(*YES *INT2)      +
+                          MAX(50) RSTD(*YES) PROMPT('Options')                 +
+                          CHOICE('Keyword') SPCVAL(                            +
+                            (*VERSION         '--version')                     +
+                            (*DEBUG           '--debug')                       +
+                            (*DEBUGENT        '--debugent')                    +
+                            (*COPY            '--copy')                        +
+                            (*RECOVER         '--recover')                     +
+                            (*HUGE            '--huge')                        +
+                            (*NOENT           '--noent')                       +
+                            (*NOENC           '--noenc')                       +
+                            (*NOOUT           '--noout')                       +
+                            (*LOADTRACE       '--load-trace')                  +
+                            (*NONET           '--nonet')                       +
+                            (*NOCOMPACT       '--nocompact')                   +
+                            (*HTMLOUT         '--htmlout')                     +
+                            (*NOWRAP          '--nowrap')                      +
+                            (*VALID           '--valid')                       +
+                            (*POSTVALID       '--postvalid')                   +
+                            (*TIMING          '--timing')                      +
+                            (*REPEAT          '--repeat')                      +
+                            (*INSERT          '--insert')                      +
+                            (*COMPRESS        '--compress')                    +
+                            (*HTML            '--html')                        +
+                            (*XMLOUT          '--xmlout')                      +
+                            (*NODEFDTD        '--nodefdtd')                    +
+                            (*PUSH            '--push')                        +
+                            (*PUSHSMALL       '--pushsmall')                   +
+                            (*MEMORY          '--memory')                      +
+                            (*NOWARNING       '--nowarning')                   +
+                            (*NOBLANKS        '--noblanks')                    +
+                            (*NOCDATA         '--nocdata')                     +
+                            (*FORMAT          '--format')                      +
+                            (*DROPDTD         '--dropdtd')                     +
+                            (*NSCLEAN         '--nsclean')                     +
+                            (*TESTIO          '--testIO')                      +
+                            (*CATALOGS        '--catalogs')                    +
+                            (*NOCATALOGS      '--nocatalogs')                  +
+                            (*AUTO            '--auto')                        +
+                            (*XINCLUDE        '--xinclude')                    +
+                            (*NOXINCLUDENODE  '--noxincludenode')              +
+                            (*NOFIXUPBASEURIS '--nofixup-base-uris')           +
+                            (*LOADDTD         '--loaddtd')                     +
+                            (*DTDATTR         '--dtdattr')                     +
+                            (*STREAM          '--stream')                      +
+                            (*WALKER          '--walker')                      +
+                            (*CHKREGISTER     '--chkregister')                 +
+                            (*C14N            '--c14n')                        +
+                            (*C14N11          '--c14n11')                      +
+                            (*EXCC14N         '--exc-c14n')                    +
+                            (*SAX1            '--sax1')                        +
+                            (*SAX             '--sax')                         +
+                            (*OLDXML10        '--oldxml10')                    +
+                          )
diff --git a/os400/xmllintcl.c b/os400/xmllintcl.c
new file mode 100644 (file)
index 0000000..1226385
--- /dev/null
@@ -0,0 +1,216 @@
+/**
+***     XMLLINT command response program.
+***
+***     See Copyright for the status of this software.
+***
+***     Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+**/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <qshell.h>
+
+
+/* Variable-length string, with 16-bit length. */
+typedef struct {
+        short           len;
+        char            string[5000];
+}               vary2;
+
+
+/* Variable-length string, with 32-bit length. */
+typedef struct {
+        int             len;
+        char            string[5000];
+}               vary4;
+
+
+/* Multiple occurrence parameter list. */
+#define paramlist(itemsize, itemtype)                                   \
+        _Packed struct {                                                \
+                short           len;                                    \
+                union {                                                 \
+                         char           _pad[itemsize];                 \
+                        itemtype        param;                          \
+                }               item[1];                                \
+        }
+
+
+/* Arguments from CL command. */
+typedef struct {
+        char *          pgm;            /* Program name. */
+        vary2 *         stmf;           /* XML file name or URL. */
+        vary2 *         dtd;            /* DTD location or public identifier. */
+        char *          dtdvalid;       /* *DTDURL or *DTDFPI. */
+        vary2 *         schema;         /* Schema file name or URL. */
+        vary2 *         schemakind;     /* --schema/--relaxng/--schematron. */
+        vary2 *         outstmf;        /* Output stream file name. */
+        vary2 *         xpath;          /* XPath filter. */
+        vary2 *         pattern;        /* Reader filter pattern. */
+        paramlist(5000 + 2, vary2) * path; /* Path for resources. */
+        vary2 *         pretty;         /* Pretty-print style. */
+        unsigned long * maxmem;         /* Maximum dynamic memory. */
+        vary2 *         encoding;       /* Output encoding. */
+        paramlist(20 + 2, vary2) * options; /* Other options. */
+}               arguments;
+
+
+/* Definition of QSHELL program. */
+extern void     qshell(vary4 * cmd);
+#pragma linkage(qshell, OS)
+#pragma map(qshell, "QSHELL/QZSHQSHC")
+
+
+static void
+vary4nappend(vary4 * dst, const char * src, size_t len)
+
+{
+        if (len > sizeof(dst->string) - dst->len)
+                len = sizeof(dst->string) - dst->len;
+
+        if (len) {
+                memcpy(dst->string + dst->len, src, len);
+                dst->len += len;
+                }
+}
+
+
+static void
+vary4append(vary4 * dst, const char * src)
+
+{
+        vary4nappend(dst, src, strlen(src));
+}
+
+
+static void
+vary4arg(vary4 * dst, const char * arg)
+
+{
+        vary4nappend(dst, " ", 1);
+        vary4append(dst, arg);
+}
+
+
+static void
+vary4varg(vary4 * dst, vary2 * arg)
+
+{
+        vary4nappend(dst, " ", 1);
+        vary4nappend(dst, arg->string, arg->len);
+}
+
+
+static void
+vary4vescape(vary4 * dst, vary2 * arg)
+
+{
+        int i;
+
+        for (i = 0; i < arg->len; i++)
+                if (arg->string[i] == '\'')
+                        vary4nappend(dst, "'\"'\"'", 5);
+                else
+                        vary4nappend(dst, arg->string + i, 1);
+}
+
+
+static void
+vary4vargquote(vary4 * dst, vary2 * arg)
+
+{
+        vary4nappend(dst, " '", 2);
+        vary4vescape(dst, arg);
+        vary4nappend(dst, "'", 1);
+}
+
+
+int
+main(int argsc, arguments * args)
+
+{
+        vary4 cmd;
+        int i;
+        char textbuf[20];
+        char * lang;
+
+        /* find length of library name. */
+        for (i = 0; i < 10 && args->pgm[i] && args->pgm[i] != '/'; i++)
+                ;
+
+        /* Store program name in command buffer. */
+        cmd.len = 0;
+        vary4append(&cmd, "/QSYS.LIB/");
+        vary4nappend(&cmd, args->pgm, i);
+        vary4append(&cmd, ".LIB/XMLLINT.PGM");
+
+        /* Map command arguments to standard xmllint argument vector. */
+
+        if (args->dtd && args->dtd->len) {
+                if (args->dtdvalid && args->dtdvalid[4] == 'F')
+                        vary4arg(&cmd, "--dtdvalidfpi");
+                else
+                        vary4arg(&cmd, "--dtdvalid");
+
+                vary4vargquote(&cmd, args->dtd);
+                }
+
+        if (args->schema && args->schema->len) {
+                vary4varg(&cmd, args->schemakind);
+                vary4vargquote(&cmd, args->schema);
+                }
+
+        if (args->outstmf && args->outstmf->len) {
+                vary4arg(&cmd, "--output");
+                vary4vargquote(&cmd, args->outstmf);
+
+                if (args->encoding && args->encoding->len) {
+                        vary4arg(&cmd, "--encoding");
+                        vary4vargquote(&cmd, args->encoding);
+                        }
+                }
+
+        if (args->xpath && args->xpath->len) {
+                vary4arg(&cmd, "--xpath");
+                vary4vargquote(&cmd, args->xpath);
+                }
+
+        if (args->pattern && args->pattern->len) {
+                vary4arg(&cmd, "--pattern");
+                vary4vargquote(&cmd, args->pattern);
+                }
+
+        if (args->path && args->path->len) {
+                vary4arg(&cmd, "--path '");
+                vary4vescape(&cmd, &args->path->item[0].param);
+                for (i = 1; i < args->path->len; i++) {
+                        vary4nappend(&cmd, ":", 1);
+                        vary4vescape(&cmd, &args->path->item[i].param);
+                        }
+                vary4nappend(&cmd, "'", 1);
+                }
+
+        if (args->pretty && args->pretty->len &&
+            args->pretty->string[0] != '0') {
+                vary4arg(&cmd, "--pretty");
+                vary4varg(&cmd, args->pretty);
+                }
+
+        if (args->maxmem && *args->maxmem) {
+                snprintf(textbuf, sizeof textbuf, "%lu", *args->maxmem);
+                vary4arg(&cmd, "--maxmem");
+                vary4arg(&cmd, textbuf);
+                }
+
+        for (i = 0; i < args->options->len; i++)
+                vary4varg(&cmd, &args->options->item[i].param);
+
+        vary4vargquote(&cmd, args->stmf);
+
+        /* Execute the shell command. */
+        qshell(&cmd);
+
+        /* Terminate. */
+        exit(0);
+}
index 1d93967..53a6b7f 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -94,6 +94,8 @@ static xmlParserCtxtPtr
 xmlCreateEntityParserCtxtInternal(const xmlChar *URL, const xmlChar *ID,
                          const xmlChar *base, xmlParserCtxtPtr pctx);
 
+static void xmlHaltParser(xmlParserCtxtPtr ctxt);
+
 /************************************************************************
  *                                                                     *
  *     Arbitrary limits set in the parser. See XML_PARSE_HUGE          *
@@ -136,14 +138,20 @@ xmlParserEntityCheck(xmlParserCtxtPtr ctxt, size_t size,
      * entities problems
      */
     if ((ent != NULL) && (ent->etype != XML_INTERNAL_PREDEFINED_ENTITY) &&
-       (ent->content != NULL) && (ent->checked == 0)) {
+       (ent->content != NULL) && (ent->checked == 0) &&
+       (ctxt->errNo != XML_ERR_ENTITY_LOOP)) {
        unsigned long oldnbent = ctxt->nbentities;
        xmlChar *rep;
 
        ent->checked = 1;
 
+        ++ctxt->depth;
        rep = xmlStringDecodeEntities(ctxt, ent->content,
                                  XML_SUBSTITUTE_REF, 0, 0, 0);
+        --ctxt->depth;
+       if (ctxt->errNo == XML_ERR_ENTITY_LOOP) {
+           ent->content[0] = 0;
+       }
 
        ent->checked = (ctxt->nbentities - oldnbent + 1) * 2;
        if (rep != NULL) {
@@ -342,7 +350,6 @@ static void
 xmlFatalErr(xmlParserCtxtPtr ctxt, xmlParserErrors error, const char *info)
 {
     const char *errmsg;
-    char errstr[129] = "";
 
     if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
         (ctxt->instate == XML_PARSER_EOF))
@@ -529,15 +536,17 @@ xmlFatalErr(xmlParserCtxtPtr ctxt, xmlParserErrors error, const char *info)
         default:
             errmsg = "Unregistered error message";
     }
-    if (info == NULL)
-        snprintf(errstr, 128, "%s\n", errmsg);
-    else
-        snprintf(errstr, 128, "%s: %%s\n", errmsg);
     if (ctxt != NULL)
        ctxt->errNo = error;
-    __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, error,
-                    XML_ERR_FATAL, NULL, 0, info, NULL, NULL, 0, 0, &errstr[0],
-                    info);
+    if (info == NULL) {
+        __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, error,
+                        XML_ERR_FATAL, NULL, 0, info, NULL, NULL, 0, 0, "%s\n",
+                        errmsg);
+    } else {
+        __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, error,
+                        XML_ERR_FATAL, NULL, 0, info, NULL, NULL, 0, 0, "%s: %s\n",
+                        errmsg, info);
+    }
     if (ctxt != NULL) {
        ctxt->wellFormed = 0;
        if (ctxt->recovery == 0)
@@ -553,7 +562,7 @@ xmlFatalErr(xmlParserCtxtPtr ctxt, xmlParserErrors error, const char *info)
  *
  * Handle a fatal parser error, i.e. violating Well-Formedness constraints
  */
-static void
+static void LIBXML_ATTR_FORMAT(3,0)
 xmlFatalErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
                const char *msg)
 {
@@ -581,7 +590,7 @@ xmlFatalErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
  *
  * Handle a warning.
  */
-static void
+static void LIBXML_ATTR_FORMAT(3,0)
 xmlWarningMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
               const char *msg, const xmlChar *str1, const xmlChar *str2)
 {
@@ -619,7 +628,7 @@ xmlWarningMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
  *
  * Handle a validity error.
  */
-static void
+static void LIBXML_ATTR_FORMAT(3,0)
 xmlValidityError(xmlParserCtxtPtr ctxt, xmlParserErrors error,
               const char *msg, const xmlChar *str1, const xmlChar *str2)
 {
@@ -659,7 +668,7 @@ xmlValidityError(xmlParserCtxtPtr ctxt, xmlParserErrors error,
  *
  * Handle a fatal parser error, i.e. violating Well-Formedness constraints
  */
-static void
+static void LIBXML_ATTR_FORMAT(3,0)
 xmlFatalErrMsgInt(xmlParserCtxtPtr ctxt, xmlParserErrors error,
                   const char *msg, int val)
 {
@@ -689,7 +698,7 @@ xmlFatalErrMsgInt(xmlParserCtxtPtr ctxt, xmlParserErrors error,
  *
  * Handle a fatal parser error, i.e. violating Well-Formedness constraints
  */
-static void
+static void LIBXML_ATTR_FORMAT(3,0)
 xmlFatalErrMsgStrIntStr(xmlParserCtxtPtr ctxt, xmlParserErrors error,
                   const char *msg, const xmlChar *str1, int val,
                  const xmlChar *str2)
@@ -719,7 +728,7 @@ xmlFatalErrMsgStrIntStr(xmlParserCtxtPtr ctxt, xmlParserErrors error,
  *
  * Handle a fatal parser error, i.e. violating Well-Formedness constraints
  */
-static void
+static void LIBXML_ATTR_FORMAT(3,0)
 xmlFatalErrMsgStr(xmlParserCtxtPtr ctxt, xmlParserErrors error,
                   const char *msg, const xmlChar * val)
 {
@@ -748,7 +757,7 @@ xmlFatalErrMsgStr(xmlParserCtxtPtr ctxt, xmlParserErrors error,
  *
  * Handle a non fatal parser error
  */
-static void
+static void LIBXML_ATTR_FORMAT(3,0)
 xmlErrMsgStr(xmlParserCtxtPtr ctxt, xmlParserErrors error,
                   const char *msg, const xmlChar * val)
 {
@@ -773,7 +782,7 @@ xmlErrMsgStr(xmlParserCtxtPtr ctxt, xmlParserErrors error,
  *
  * Handle a fatal parser error, i.e. violating Well-Formedness constraints
  */
-static void
+static void LIBXML_ATTR_FORMAT(3,0)
 xmlNsErr(xmlParserCtxtPtr ctxt, xmlParserErrors error,
          const char *msg,
          const xmlChar * info1, const xmlChar * info2,
@@ -802,7 +811,7 @@ xmlNsErr(xmlParserCtxtPtr ctxt, xmlParserErrors error,
  *
  * Handle a namespace warning error
  */
-static void
+static void LIBXML_ATTR_FORMAT(3,0)
 xmlNsWarn(xmlParserCtxtPtr ctxt, xmlParserErrors error,
          const char *msg,
          const xmlChar * info1, const xmlChar * info2,
@@ -1771,7 +1780,7 @@ nodePush(xmlParserCtxtPtr ctxt, xmlNodePtr value)
        xmlFatalErrMsgInt(ctxt, XML_ERR_INTERNAL_ERROR,
                 "Excessive depth in document: %d use XML_PARSE_HUGE option\n",
                          xmlParserMaxDepth);
-       ctxt->instate = XML_PARSER_EOF;
+       xmlHaltParser(ctxt);
        return(-1);
     }
     ctxt->nodeTab[ctxt->nodeNr] = value;
@@ -2006,6 +2015,7 @@ static int spacePop(xmlParserCtxtPtr ctxt) {
 #define CUR (*ctxt->input->cur)
 #define NXT(val) ctxt->input->cur[(val)]
 #define CUR_PTR ctxt->input->cur
+#define BASE_PTR ctxt->input->base
 
 #define CMP4( s, c1, c2, c3, c4 ) \
   ( ((unsigned char *) s)[ 0 ] == c1 && ((unsigned char *) s)[ 1 ] == c2 && \
@@ -2073,9 +2083,16 @@ static void xmlGROW (xmlParserCtxtPtr ctxt) {
          ((ctxt->input->buf) && (ctxt->input->buf->readcallback != (xmlInputReadCallback) xmlNop)) &&
         ((ctxt->options & XML_PARSE_HUGE) == 0)) {
         xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR, "Huge input lookup");
-        ctxt->instate = XML_PARSER_EOF;
+        xmlHaltParser(ctxt);
+       return;
     }
     xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
+    if ((ctxt->input->cur > ctxt->input->end) ||
+        (ctxt->input->cur < ctxt->input->base)) {
+        xmlHaltParser(ctxt);
+        xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR, "cur index out of bound");
+       return;
+    }
     if ((ctxt->input->cur != NULL) && (*ctxt->input->cur == 0) &&
         (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0))
            xmlPopInput(ctxt);
@@ -2151,7 +2168,8 @@ xmlSkipBlankChars(xmlParserCtxtPtr ctxt) {
        int cur;
        do {
            cur = CUR;
-           while (IS_BLANK_CH(cur)) { /* CHECKED tstblanks.xml */
+           while ((IS_BLANK_CH(cur) && /* CHECKED tstblanks.xml */
+                  (ctxt->instate != XML_PARSER_EOF))) {
                NEXT;
                cur = CUR;
                res++;
@@ -2165,7 +2183,8 @@ xmlSkipBlankChars(xmlParserCtxtPtr ctxt) {
             * Need to handle support of entities branching here
             */
            if (*ctxt->input->cur == '%') xmlParserHandlePEReference(ctxt);
-       } while (IS_BLANK(cur)); /* CHECKED tstblanks.xml */
+       } while ((IS_BLANK(cur)) && /* CHECKED tstblanks.xml */
+                (ctxt->instate != XML_PARSER_EOF));
     }
     return(res);
 }
@@ -2806,6 +2825,10 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
                                              0, 0, 0);
                ctxt->depth--;
 
+               if ((ctxt->lastError.code == XML_ERR_ENTITY_LOOP) ||
+                   (ctxt->lastError.code == XML_ERR_INTERNAL_ERROR))
+                   goto int_error;
+
                if (rep != NULL) {
                    current = rep;
                    while (*current != 0) { /* non input consuming loop */
@@ -2843,7 +2866,21 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
                ctxt->nbentities += ent->checked / 2;
            if (ent != NULL) {
                 if (ent->content == NULL) {
-                   xmlLoadEntityContent(ctxt, ent);
+                   /*
+                    * Note: external parsed entities will not be loaded,
+                    * it is not required for a non-validating parser to
+                    * complete external PEreferences coming from the
+                    * internal subset
+                    */
+                   if (((ctxt->options & XML_PARSE_NOENT) != 0) ||
+                       ((ctxt->options & XML_PARSE_DTDVALID) != 0) ||
+                       (ctxt->validate != 0)) {
+                       xmlLoadEntityContent(ctxt, ent);
+                   } else {
+                       xmlWarningMsg(ctxt, XML_ERR_ENTITY_PROCESSING,
+                 "not validating will not read content for PE entity %s\n",
+                                     ent->name, NULL);
+                   }
                }
                ctxt->depth++;
                rep = xmlStringDecodeEntities(ctxt, ent->content, what,
@@ -3455,7 +3492,7 @@ xmlParseNCNameComplex(xmlParserCtxtPtr ctxt) {
     int len = 0, l;
     int c;
     int count = 0;
-    const xmlChar *end; /* needed because CUR_CHAR() can move cur on \r\n */
+    size_t startPosition = 0;
 
 #ifdef DEBUG
     nbParseNCNameComplex++;
@@ -3465,7 +3502,7 @@ xmlParseNCNameComplex(xmlParserCtxtPtr ctxt) {
      * Handler for more complex cases
      */
     GROW;
-    end = ctxt->input->cur;
+    startPosition = CUR_PTR - BASE_PTR;
     c = CUR_CHAR(l);
     if ((c == ' ') || (c == '>') || (c == '/') || /* accelerators */
        (!xmlIsNameStartChar(ctxt, c) || (c == ':'))) {
@@ -3487,14 +3524,19 @@ xmlParseNCNameComplex(xmlParserCtxtPtr ctxt) {
        }
        len += l;
        NEXTL(l);
-       end = ctxt->input->cur;
        c = CUR_CHAR(l);
        if (c == 0) {
            count = 0;
+           /*
+            * when shrinking to extend the buffer we really need to preserve
+            * the part of the name we already parsed. Hence rolling back
+            * by current lenght.
+            */
+           ctxt->input->cur -= l;
            GROW;
+           ctxt->input->cur += l;
             if (ctxt->instate == XML_PARSER_EOF)
                 return(NULL);
-           end = ctxt->input->cur;
            c = CUR_CHAR(l);
        }
     }
@@ -3503,7 +3545,7 @@ xmlParseNCNameComplex(xmlParserCtxtPtr ctxt) {
         xmlFatalErr(ctxt, XML_ERR_NAME_TOO_LONG, "NCName");
         return(NULL);
     }
-    return(xmlDictLookup(ctxt->dict, end - len, len));
+    return(xmlDictLookup(ctxt->dict, (BASE_PTR + startPosition), len));
 }
 
 /**
@@ -3523,7 +3565,7 @@ xmlParseNCNameComplex(xmlParserCtxtPtr ctxt) {
 
 static const xmlChar *
 xmlParseNCName(xmlParserCtxtPtr ctxt) {
-    const xmlChar *in;
+    const xmlChar *in, *e;
     const xmlChar *ret;
     int count = 0;
 
@@ -3535,16 +3577,19 @@ xmlParseNCName(xmlParserCtxtPtr ctxt) {
      * Accelerator for simple ASCII names
      */
     in = ctxt->input->cur;
-    if (((*in >= 0x61) && (*in <= 0x7A)) ||
-       ((*in >= 0x41) && (*in <= 0x5A)) ||
-       (*in == '_')) {
+    e = ctxt->input->end;
+    if ((((*in >= 0x61) && (*in <= 0x7A)) ||
+        ((*in >= 0x41) && (*in <= 0x5A)) ||
+        (*in == '_')) && (in < e)) {
        in++;
-       while (((*in >= 0x61) && (*in <= 0x7A)) ||
-              ((*in >= 0x41) && (*in <= 0x5A)) ||
-              ((*in >= 0x30) && (*in <= 0x39)) ||
-              (*in == '_') || (*in == '-') ||
-              (*in == '.'))
+       while ((((*in >= 0x61) && (*in <= 0x7A)) ||
+               ((*in >= 0x41) && (*in <= 0x5A)) ||
+               ((*in >= 0x30) && (*in <= 0x39)) ||
+               (*in == '_') || (*in == '-') ||
+               (*in == '.')) && (in < e))
            in++;
+       if (in >= e)
+           goto complex;
        if ((*in > 0) && (*in < 0x80)) {
            count = in - ctxt->input->cur;
             if ((count > XML_MAX_NAME_LENGTH) &&
@@ -3562,6 +3607,7 @@ xmlParseNCName(xmlParserCtxtPtr ctxt) {
            return(ret);
        }
     }
+complex:
     return(xmlParseNCNameComplex(ctxt));
 }
 
@@ -3599,7 +3645,7 @@ xmlParseNameAndCompare(xmlParserCtxtPtr ctxt, xmlChar const *other) {
     }
     /* failure (or end of input buffer), check with full function */
     ret = xmlParseName (ctxt);
-    /* strings coming from the dictionnary direct compare possible */
+    /* strings coming from the dictionary direct compare possible */
     if (ret == other) {
        return (const xmlChar*) 1;
     }
@@ -3940,8 +3986,10 @@ xmlParseEntityValue(xmlParserCtxtPtr ctxt, xmlChar **orig) {
         * an entity declaration, it is bypassed and left as is.
         * so XML_SUBSTITUTE_REF is not set here.
         */
+        ++ctxt->depth;
        ret = xmlStringDecodeEntities(ctxt, buf, XML_SUBSTITUTE_PEREF,
                                      0, 0, 0);
+        --ctxt->depth;
        if (orig != NULL)
            *orig = buf;
        else
@@ -4066,9 +4114,11 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) {
                } else if ((ent != NULL) &&
                           (ctxt->replaceEntities != 0)) {
                    if (ent->etype != XML_INTERNAL_PREDEFINED_ENTITY) {
+                       ++ctxt->depth;
                        rep = xmlStringDecodeEntities(ctxt, ent->content,
                                                      XML_SUBSTITUTE_REF,
                                                      0, 0, 0);
+                       --ctxt->depth;
                        if (rep != NULL) {
                            current = rep;
                            while (*current != 0) { /* non input consuming */
@@ -4104,8 +4154,10 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) {
                        (ent->content != NULL) && (ent->checked == 0)) {
                        unsigned long oldnbent = ctxt->nbentities;
 
+                       ++ctxt->depth;
                        rep = xmlStringDecodeEntities(ctxt, ent->content,
                                                  XML_SUBSTITUTE_REF, 0, 0, 0);
+                       --ctxt->depth;
 
                        ent->checked = (ctxt->nbentities - oldnbent + 1) * 2;
                        if (rep != NULL) {
@@ -5475,7 +5527,7 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) {
            skipped = SKIP_BLANKS;
            if (skipped == 0) {
                xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
-                              "Space required after '%'\n");
+                              "Space required after '%%'\n");
            }
            isParameter = 1;
        }
@@ -5658,6 +5710,7 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) {
        if (RAW != '>') {
            xmlFatalErrMsgStr(ctxt, XML_ERR_ENTITY_NOT_FINISHED,
                    "xmlParseEntityDecl: entity %s not terminated\n", name);
+           xmlHaltParser(ctxt);
        } else {
            if (input != ctxt->input) {
                xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_BOUNDARY,
@@ -6659,6 +6712,7 @@ xmlParseElementDecl(xmlParserCtxtPtr ctxt) {
        if (!IS_BLANK_CH(CUR)) {
            xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
                           "Space required after 'ELEMENT'\n");
+           return(-1);
        }
         SKIP_BLANKS;
         name = xmlParseName(ctxt);
@@ -6769,6 +6823,8 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
        SKIP_BLANKS;
        if (RAW != '[') {
            xmlFatalErr(ctxt, XML_ERR_CONDSEC_INVALID, NULL);
+           xmlHaltParser(ctxt);
+           return;
        } else {
            if (ctxt->input->id != id) {
                xmlValidityError(ctxt, XML_ERR_ENTITY_BOUNDARY,
@@ -6808,6 +6864,7 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
 
            if ((CUR_PTR == check) && (cons == ctxt->input->consumed)) {
                xmlFatalErr(ctxt, XML_ERR_EXT_SUBSET_NOT_FINISHED, NULL);
+               xmlHaltParser(ctxt);
                break;
            }
        }
@@ -6829,6 +6886,8 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
        SKIP_BLANKS;
        if (RAW != '[') {
            xmlFatalErr(ctxt, XML_ERR_CONDSEC_INVALID, NULL);
+           xmlHaltParser(ctxt);
+           return;
        } else {
            if (ctxt->input->id != id) {
                xmlValidityError(ctxt, XML_ERR_ENTITY_BOUNDARY,
@@ -6884,6 +6943,8 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
 
     } else {
        xmlFatalErr(ctxt, XML_ERR_CONDSEC_INVALID_KEYWORD, NULL);
+       xmlHaltParser(ctxt);
+       return;
     }
 
     if (RAW == 0)
@@ -6897,7 +6958,9 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
        "All markup of the conditional section is not in the same entity\n",
                                 NULL, NULL);
        }
-        SKIP(3);
+       if ((ctxt-> instate != XML_PARSER_EOF) &&
+           ((ctxt->input->cur + 3) <= ctxt->input->end))
+           SKIP(3);
     }
 }
 
@@ -6952,6 +7015,14 @@ xmlParseMarkupDecl(xmlParserCtxtPtr ctxt) {
            xmlParsePI(ctxt);
        }
     }
+
+    /*
+     * detect requirement to exit there and act accordingly
+     * and avoid having instate overriden later on
+     */
+    if (ctxt->instate == XML_PARSER_EOF)
+        return;
+
     /*
      * This is only for internal subset. On external entities,
      * the replacement is done before parsing stage
@@ -7083,7 +7154,7 @@ xmlParseExternalSubset(xmlParserCtxtPtr ctxt, const xmlChar *ExternalID,
            /*
             * The XML REC instructs us to stop parsing right here
             */
-           ctxt->instate = XML_PARSER_EOF;
+           xmlHaltParser(ctxt);
            return;
        }
     }
@@ -7235,7 +7306,8 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
      * far more secure as the parser will only process data coming from
      * the document entity by default.
      */
-    if ((ent->checked == 0) &&
+    if (((ent->checked == 0) ||
+         ((ent->children == NULL) && (ctxt->options & XML_PARSE_NOENT))) &&
         ((ent->etype != XML_EXTERNAL_GENERAL_PARSED_ENTITY) ||
          (ctxt->options & (XML_PARSE_NOENT | XML_PARSE_DTDVALID)))) {
        unsigned long oldnbent = ctxt->nbentities;
@@ -8069,7 +8141,7 @@ xmlParsePEReference(xmlParserCtxtPtr ctxt)
                     * The XML REC instructs us to stop parsing
                     * right here
                     */
-                   ctxt->instate = XML_PARSER_EOF;
+                   xmlHaltParser(ctxt);
                    return;
                }
            }
@@ -8424,6 +8496,7 @@ xmlParseInternalSubset(xmlParserCtxtPtr ctxt) {
      */
     if (RAW != '>') {
        xmlFatalErr(ctxt, XML_ERR_DOCTYPE_NOT_FINISHED, NULL);
+       return;
     }
     NEXT;
 }
@@ -8774,7 +8847,7 @@ xmlParseEndTag(xmlParserCtxtPtr ctxt) {
  * @prefix:  the prefix to lookup
  *
  * Lookup the namespace name for the @prefix (which ca be NULL)
- * The prefix must come from the @ctxt->dict dictionnary
+ * The prefix must come from the @ctxt->dict dictionary
  *
  * Returns the namespace name or NULL if not bound
  */
@@ -9304,7 +9377,7 @@ xmlParseStartTag2(xmlParserCtxtPtr ctxt, const xmlChar **pref,
     const xmlChar **atts = ctxt->atts;
     int maxatts = ctxt->maxatts;
     int nratts, nbatts, nbdef;
-    int i, j, nbNs, attval, oldline, oldcol;
+    int i, j, nbNs, attval, oldline, oldcol, inputNr;
     const xmlChar *base;
     unsigned long cur;
     int nsNr = ctxt->nsNr;
@@ -9323,6 +9396,7 @@ reparse:
     SHRINK;
     base = ctxt->input->base;
     cur = ctxt->input->cur - ctxt->input->base;
+    inputNr = ctxt->inputNr;
     oldline = ctxt->input->line;
     oldcol = ctxt->input->col;
     nbatts = 0;
@@ -9348,7 +9422,8 @@ reparse:
      */
     SKIP_BLANKS;
     GROW;
-    if (ctxt->input->base != base) goto base_changed;
+    if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr))
+        goto base_changed;
 
     while (((RAW != '>') &&
           ((RAW != '/') || (NXT(1) != '>')) &&
@@ -9359,7 +9434,7 @@ reparse:
 
        attname = xmlParseAttribute2(ctxt, prefix, localname,
                                     &aprefix, &attvalue, &len, &alloc);
-       if (ctxt->input->base != base) {
+       if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr)) {
            if ((attvalue != NULL) && (alloc != 0))
                xmlFree(attvalue);
            attvalue = NULL;
@@ -9419,7 +9494,10 @@ reparse:
                else
                    if (nsPush(ctxt, NULL, URL) > 0) nbNs++;
 skip_default_ns:
-               if (alloc != 0) xmlFree(attvalue);
+               if ((attvalue != NULL) && (alloc != 0)) {
+                   xmlFree(attvalue);
+                   attvalue = NULL;
+               }
                if ((RAW == '>') || (((RAW == '/') && (NXT(1) == '>'))))
                    break;
                if (!IS_BLANK_CH(RAW)) {
@@ -9428,6 +9506,8 @@ skip_default_ns:
                    break;
                }
                SKIP_BLANKS;
+               if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr))
+                   goto base_changed;
                continue;
            }
             if (aprefix == ctxt->str_xmlns) {
@@ -9499,7 +9579,10 @@ skip_default_ns:
                else
                    if (nsPush(ctxt, attname, URL) > 0) nbNs++;
 skip_ns:
-               if (alloc != 0) xmlFree(attvalue);
+               if ((attvalue != NULL) && (alloc != 0)) {
+                   xmlFree(attvalue);
+                   attvalue = NULL;
+               }
                if ((RAW == '>') || (((RAW == '/') && (NXT(1) == '>'))))
                    break;
                if (!IS_BLANK_CH(RAW)) {
@@ -9508,7 +9591,8 @@ skip_ns:
                    break;
                }
                SKIP_BLANKS;
-               if (ctxt->input->base != base) goto base_changed;
+               if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr))
+                   goto base_changed;
                continue;
            }
 
@@ -9545,7 +9629,8 @@ failed:
        GROW
         if (ctxt->instate == XML_PARSER_EOF)
             break;
-       if (ctxt->input->base != base) goto base_changed;
+       if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr))
+           goto base_changed;
        if ((RAW == '>') || (((RAW == '/') && (NXT(1) == '>'))))
            break;
        if (!IS_BLANK_CH(RAW)) {
@@ -9561,7 +9646,8 @@ failed:
            break;
        }
         GROW;
-       if (ctxt->input->base != base) goto base_changed;
+       if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr))
+           goto base_changed;
     }
 
     /*
@@ -9728,6 +9814,17 @@ base_changed:
            if ((ctxt->attallocs[j] != 0) && (atts[i] != NULL))
                xmlFree((xmlChar *) atts[i]);
     }
+
+    /*
+     * We can't switch from one entity to another in the middle
+     * of a start tag
+     */
+    if (inputNr != ctxt->inputNr) {
+        xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_BOUNDARY,
+                   "Start tag doesn't start and stop in the same entity\n");
+       return(NULL);
+    }
+
     ctxt->input->cur = ctxt->input->base + cur;
     ctxt->input->line = oldline;
     ctxt->input->col = oldcol;
@@ -9756,6 +9853,7 @@ static void
 xmlParseEndTag2(xmlParserCtxtPtr ctxt, const xmlChar *prefix,
                 const xmlChar *URI, int line, int nsNr, int tlen) {
     const xmlChar *name;
+    size_t curLength;
 
     GROW;
     if ((RAW != '<') || (NXT(1) != '/')) {
@@ -9764,8 +9862,11 @@ xmlParseEndTag2(xmlParserCtxtPtr ctxt, const xmlChar *prefix,
     }
     SKIP(2);
 
-    if ((tlen > 0) && (xmlStrncmp(ctxt->input->cur, ctxt->name, tlen) == 0)) {
-        if (ctxt->input->cur[tlen] == '>') {
+    curLength = ctxt->input->end - ctxt->input->cur;
+    if ((tlen > 0) && (curLength >= (size_t)tlen) &&
+        (xmlStrncmp(ctxt->input->cur, ctxt->name, tlen) == 0)) {
+        if ((curLength >= (size_t)(tlen + 1)) &&
+           (ctxt->input->cur[tlen] == '>')) {
            ctxt->input->cur += tlen + 1;
            ctxt->input->col += tlen + 1;
            goto done;
@@ -10009,7 +10110,7 @@ xmlParseContent(xmlParserCtxtPtr ctxt) {
        if ((cons == ctxt->input->consumed) && (test == CUR_PTR)) {
            xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR,
                        "detected an error in element content\n");
-           ctxt->instate = XML_PARSER_EOF;
+           xmlHaltParser(ctxt);
             break;
        }
     }
@@ -10044,7 +10145,7 @@ xmlParseElement(xmlParserCtxtPtr ctxt) {
        xmlFatalErrMsgInt(ctxt, XML_ERR_INTERNAL_ERROR,
                 "Excessive depth in document: %d use XML_PARSE_HUGE option\n",
                          xmlParserMaxDepth);
-       ctxt->instate = XML_PARSER_EOF;
+       xmlHaltParser(ctxt);
        return;
     }
 
@@ -10396,6 +10497,8 @@ xmlParseEncodingDecl(xmlParserCtxtPtr ctxt) {
            encoding = xmlParseEncName(ctxt);
            if (RAW != '"') {
                xmlFatalErr(ctxt, XML_ERR_STRING_NOT_CLOSED, NULL);
+               xmlFree((xmlChar *) encoding);
+               return(NULL);
            } else
                NEXT;
        } else if (RAW == '\''){
@@ -10403,6 +10506,8 @@ xmlParseEncodingDecl(xmlParserCtxtPtr ctxt) {
            encoding = xmlParseEncName(ctxt);
            if (RAW != '\'') {
                xmlFatalErr(ctxt, XML_ERR_STRING_NOT_CLOSED, NULL);
+               xmlFree((xmlChar *) encoding);
+               return(NULL);
            } else
                NEXT;
        } else {
@@ -10459,7 +10564,11 @@ xmlParseEncodingDecl(xmlParserCtxtPtr ctxt) {
 
             handler = xmlFindCharEncodingHandler((const char *) encoding);
            if (handler != NULL) {
-               xmlSwitchToEncoding(ctxt, handler);
+               if (xmlSwitchToEncoding(ctxt, handler) < 0) {
+                   /* failed to convert */
+                   ctxt->errNo = XML_ERR_UNSUPPORTED_ENCODING;
+                   return(NULL);
+               }
            } else {
                xmlFatalErrMsgStr(ctxt, XML_ERR_UNSUPPORTED_ENCODING,
                        "Unsupported encoding %s\n", encoding);
@@ -10628,7 +10737,8 @@ xmlParseXMLDecl(xmlParserCtxtPtr ctxt) {
        xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED, "Blank needed here\n");
     }
     xmlParseEncodingDecl(ctxt);
-    if (ctxt->errNo == XML_ERR_UNSUPPORTED_ENCODING) {
+    if ((ctxt->errNo == XML_ERR_UNSUPPORTED_ENCODING) ||
+         (ctxt->instate == XML_PARSER_EOF)) {
        /*
         * The XML REC instructs us to stop parsing right here
         */
@@ -10752,6 +10862,7 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) {
 
     if (CUR == 0) {
        xmlFatalErr(ctxt, XML_ERR_DOCUMENT_EMPTY, NULL);
+       return(-1);
     }
 
     /*
@@ -10769,7 +10880,8 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) {
         * Note that we will switch encoding on the fly.
         */
        xmlParseXMLDecl(ctxt);
-       if (ctxt->errNo == XML_ERR_UNSUPPORTED_ENCODING) {
+       if ((ctxt->errNo == XML_ERR_UNSUPPORTED_ENCODING) ||
+           (ctxt->instate == XML_PARSER_EOF)) {
            /*
             * The XML REC instructs us to stop parsing right here
             */
@@ -11138,8 +11250,9 @@ xmlParseGetLasts(xmlParserCtxtPtr ctxt, const xmlChar **lastlt,
 }
 /**
  * xmlCheckCdataPush:
- * @cur: pointer to the bock of characters
+ * @cur: pointer to the block of characters
  * @len: length of the block in bytes
+ * @complete: 1 if complete CDATA block is passed in, 0 if partial block
  *
  * Check that the block of characters is okay as SCdata content [20]
  *
@@ -11147,7 +11260,7 @@ xmlParseGetLasts(xmlParserCtxtPtr ctxt, const xmlChar **lastlt,
  *         UTF-8 error occured otherwise
  */
 static int
-xmlCheckCdataPush(const xmlChar *utf, int len) {
+xmlCheckCdataPush(const xmlChar *utf, int len, int complete) {
     int ix;
     unsigned char c;
     int codepoint;
@@ -11165,7 +11278,7 @@ xmlCheckCdataPush(const xmlChar *utf, int len) {
            else
                return(-ix);
        } else if ((c & 0xe0) == 0xc0) {/* 2-byte code, starts with 110 */
-           if (ix + 2 > len) return(ix);
+           if (ix + 2 > len) return(complete ? -ix : ix);
            if ((utf[ix+1] & 0xc0 ) != 0x80)
                return(-ix);
            codepoint = (utf[ix] & 0x1f) << 6;
@@ -11174,7 +11287,7 @@ xmlCheckCdataPush(const xmlChar *utf, int len) {
                return(-ix);
            ix += 2;
        } else if ((c & 0xf0) == 0xe0) {/* 3-byte code, starts with 1110 */
-           if (ix + 3 > len) return(ix);
+           if (ix + 3 > len) return(complete ? -ix : ix);
            if (((utf[ix+1] & 0xc0) != 0x80) ||
                ((utf[ix+2] & 0xc0) != 0x80))
                    return(-ix);
@@ -11185,7 +11298,7 @@ xmlCheckCdataPush(const xmlChar *utf, int len) {
                return(-ix);
            ix += 3;
        } else if ((c & 0xf8) == 0xf0) {/* 4-byte code, starts with 11110 */
-           if (ix + 4 > len) return(ix);
+           if (ix + 4 > len) return(complete ? -ix : ix);
            if (((utf[ix+1] & 0xc0) != 0x80) ||
                ((utf[ix+2] & 0xc0) != 0x80) ||
                ((utf[ix+3] & 0xc0) != 0x80))
@@ -11363,7 +11476,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
                        ctxt->sax->setDocumentLocator(ctxt->userData,
                                                      &xmlDefaultSAXLocator);
                    xmlFatalErr(ctxt, XML_ERR_DOCUMENT_EMPTY, NULL);
-                   ctxt->instate = XML_PARSER_EOF;
+                   xmlHaltParser(ctxt);
 #ifdef DEBUG_PUSH
                    xmlGenericError(xmlGenericErrorContext,
                            "PP: entering EOF\n");
@@ -11396,7 +11509,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
                             * The XML REC instructs us to stop parsing right
                             * here
                             */
-                           ctxt->instate = XML_PARSER_EOF;
+                           xmlHaltParser(ctxt);
                            return(0);
                        }
                        ctxt->standalone = ctxt->input->standalone;
@@ -11452,7 +11565,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
                cur = ctxt->input->cur[0];
                if (cur != '<') {
                    xmlFatalErr(ctxt, XML_ERR_DOCUMENT_EMPTY, NULL);
-                   ctxt->instate = XML_PARSER_EOF;
+                   xmlHaltParser(ctxt);
                    if ((ctxt->sax) && (ctxt->sax->endDocument != NULL))
                        ctxt->sax->endDocument(ctxt->userData);
                    goto done;
@@ -11484,7 +11597,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
                    goto done;
                if (name == NULL) {
                    spacePop(ctxt);
-                   ctxt->instate = XML_PARSER_EOF;
+                   xmlHaltParser(ctxt);
                    if ((ctxt->sax) && (ctxt->sax->endDocument != NULL))
                        ctxt->sax->endDocument(ctxt->userData);
                    goto done;
@@ -11651,7 +11764,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
                if ((cons == ctxt->input->consumed) && (test == CUR_PTR)) {
                    xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR,
                                "detected an error in element content\n");
-                   ctxt->instate = XML_PARSER_EOF;
+                   xmlHaltParser(ctxt);
                    break;
                }
                break;
@@ -11700,7 +11813,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
                        int tmp;
 
                        tmp = xmlCheckCdataPush(ctxt->input->cur,
-                                               XML_PARSER_BIG_BUFFER_SIZE);
+                                               XML_PARSER_BIG_BUFFER_SIZE, 0);
                        if (tmp < 0) {
                            tmp = -tmp;
                            ctxt->input->cur += tmp;
@@ -11723,7 +11836,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
                } else {
                    int tmp;
 
-                   tmp = xmlCheckCdataPush(ctxt->input->cur, base);
+                   tmp = xmlCheckCdataPush(ctxt->input->cur, base, 1);
                    if ((tmp < 0) || (tmp != base)) {
                        tmp = -tmp;
                        ctxt->input->cur += tmp;
@@ -11972,7 +12085,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
                    goto done;
                } else {
                    xmlFatalErr(ctxt, XML_ERR_DOCUMENT_END, NULL);
-                   ctxt->instate = XML_PARSER_EOF;
+                   xmlHaltParser(ctxt);
 #ifdef DEBUG_PUSH
                    xmlGenericError(xmlGenericErrorContext,
                            "PP: entering EOF\n");
@@ -12336,7 +12449,7 @@ xmldecl_done:
        res = xmlParserInputBufferPush(ctxt->input->buf, size, chunk);
        if (res < 0) {
            ctxt->errNo = XML_PARSER_EOF;
-           ctxt->disableSAX = 1;
+           xmlHaltParser(ctxt);
            return (XML_PARSER_EOF);
        }
         xmlBufSetInputBaseCur(ctxt->input->buf->buffer, ctxt->input, base, cur);
@@ -12390,7 +12503,7 @@ xmldecl_done:
          ((ctxt->input->cur - ctxt->input->base) > XML_MAX_LOOKUP_LIMIT)) &&
         ((ctxt->options & XML_PARSE_HUGE) == 0)) {
         xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR, "Huge input lookup");
-        ctxt->instate = XML_PARSER_EOF;
+        xmlHaltParser(ctxt);
     }
     if ((ctxt->errNo != XML_ERR_OK) && (ctxt->disableSAX == 1))
         return(ctxt->errNo);
@@ -12578,25 +12691,47 @@ xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, void *user_data,
 #endif /* LIBXML_PUSH_ENABLED */
 
 /**
- * xmlStopParser:
+ * xmlHaltParser:
  * @ctxt:  an XML parser context
  *
- * Blocks further parser processing
+ * Blocks further parser processing don't override error
+ * for internal use
  */
-void
-xmlStopParser(xmlParserCtxtPtr ctxt) {
+static void
+xmlHaltParser(xmlParserCtxtPtr ctxt) {
     if (ctxt == NULL)
         return;
     ctxt->instate = XML_PARSER_EOF;
-    ctxt->errNo = XML_ERR_USER_STOP;
     ctxt->disableSAX = 1;
     if (ctxt->input != NULL) {
+        /*
+        * in case there was a specific allocation deallocate before
+        * overriding base
+        */
+        if (ctxt->input->free != NULL) {
+           ctxt->input->free((xmlChar *) ctxt->input->base);
+           ctxt->input->free = NULL;
+       }
        ctxt->input->cur = BAD_CAST"";
        ctxt->input->base = ctxt->input->cur;
     }
 }
 
 /**
+ * xmlStopParser:
+ * @ctxt:  an XML parser context
+ *
+ * Blocks further parser processing
+ */
+void
+xmlStopParser(xmlParserCtxtPtr ctxt) {
+    if (ctxt == NULL)
+        return;
+    xmlHaltParser(ctxt);
+    ctxt->errNo = XML_ERR_USER_STOP;
+}
+
+/**
  * xmlCreateIOParserCtxt:
  * @sax:  a SAX handler
  * @user_data:  The user data returned on SAX callbacks
@@ -13340,7 +13475,7 @@ xmlParseExternalEntityPrivate(xmlDocPtr doc, xmlParserCtxtPtr oldctxt,
     /*
      * Also record the size of the entity parsed
      */
-    if (ctxt->input != NULL) {
+    if (ctxt->input != NULL && oldctxt != NULL) {
        oldctxt->sizeentities += ctxt->input->consumed;
        oldctxt->sizeentities += (ctxt->input->cur - ctxt->input->base);
     }
@@ -13352,9 +13487,11 @@ xmlParseExternalEntityPrivate(xmlDocPtr doc, xmlParserCtxtPtr oldctxt,
 
     if (sax != NULL)
        ctxt->sax = oldsax;
-    oldctxt->node_seq.maximum = ctxt->node_seq.maximum;
-    oldctxt->node_seq.length = ctxt->node_seq.length;
-    oldctxt->node_seq.buffer = ctxt->node_seq.buffer;
+    if (oldctxt != NULL) {
+        oldctxt->node_seq.maximum = ctxt->node_seq.maximum;
+        oldctxt->node_seq.length = ctxt->node_seq.length;
+        oldctxt->node_seq.buffer = ctxt->node_seq.buffer;
+    }
     ctxt->node_seq.maximum = 0;
     ctxt->node_seq.length = 0;
     ctxt->node_seq.buffer = NULL;
@@ -14830,9 +14967,6 @@ xmlInitParser(void) {
 #ifdef LIBXML_XPATH_ENABLED
        xmlXPathInit();
 #endif
-#ifdef LIBXML_CATALOG_ENABLED
-        xmlInitializeCatalog();
-#endif
        xmlParserInitialized = 1;
 #ifdef LIBXML_THREAD_ENABLED
     }
@@ -14897,7 +15031,7 @@ xmlCleanupParser(void) {
  * DICT_FREE:
  * @str:  a string
  *
- * Free a string if it is not owned by the "dict" dictionnary in the
+ * Free a string if it is not owned by the "dict" dictionary in the
  * current scope
  */
 #define DICT_FREE(str)                                         \
index df204fd..bfc778a 100644 (file)
 #include <libxml/globals.h>
 #include <libxml/chvalid.h>
 
+#define CUR(ctxt) ctxt->input->cur
+#define END(ctxt) ctxt->input->end
+#define VALID_CTXT(ctxt) (CUR(ctxt) <= END(ctxt))
+
 #include "buf.h"
 #include "enc.h"
 
@@ -165,7 +169,7 @@ __xmlErrEncoding(xmlParserCtxtPtr ctxt, xmlParserErrors xmlerr,
  *
  * Handle an internal error
  */
-static void
+static void LIBXML_ATTR_FORMAT(2,0)
 xmlErrInternal(xmlParserCtxtPtr ctxt, const char *msg, const xmlChar * str)
 {
     if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
@@ -193,7 +197,7 @@ xmlErrInternal(xmlParserCtxtPtr ctxt, const char *msg, const xmlChar * str)
  *
  * n encoding error
  */
-static void
+static void LIBXML_ATTR_FORMAT(3,0)
 xmlErrEncodingInt(xmlParserCtxtPtr ctxt, xmlParserErrors error,
                   const char *msg, int val)
 {
@@ -294,7 +298,7 @@ xmlParserInputRead(xmlParserInputPtr in ATTRIBUTE_UNUSED, int len ATTRIBUTE_UNUS
  */
 int
 xmlParserInputGrow(xmlParserInputPtr in, int len) {
-    size_t ret;
+    int ret;
     size_t indx;
     const xmlChar *content;
 
@@ -422,103 +426,105 @@ xmlNextChar(xmlParserCtxtPtr ctxt)
         (ctxt->input == NULL))
         return;
 
-    if (ctxt->charset == XML_CHAR_ENCODING_UTF8) {
-        if ((*ctxt->input->cur == 0) &&
-            (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0) &&
-            (ctxt->instate != XML_PARSER_COMMENT)) {
-            /*
-             * If we are at the end of the current entity and
-             * the context allows it, we pop consumed entities
-             * automatically.
-             * the auto closing should be blocked in other cases
-             */
+    if (!(VALID_CTXT(ctxt))) {
+        xmlErrInternal(ctxt, "Parser input data memory error\n", NULL);
+       ctxt->errNo = XML_ERR_INTERNAL_ERROR;
+        xmlStopParser(ctxt);
+       return;
+    }
+
+    if ((*ctxt->input->cur == 0) &&
+        (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0)) {
+        if ((ctxt->instate != XML_PARSER_COMMENT))
             xmlPopInput(ctxt);
-        } else {
-            const unsigned char *cur;
-            unsigned char c;
+        return;
+    }
 
-            /*
-             *   2.11 End-of-Line Handling
-             *   the literal two-character sequence "#xD#xA" or a standalone
-             *   literal #xD, an XML processor must pass to the application
-             *   the single character #xA.
-             */
-            if (*(ctxt->input->cur) == '\n') {
-                ctxt->input->line++; ctxt->input->col = 1;
-            } else
-                ctxt->input->col++;
+    if (ctxt->charset == XML_CHAR_ENCODING_UTF8) {
+        const unsigned char *cur;
+        unsigned char c;
 
-            /*
-             * We are supposed to handle UTF8, check it's valid
-             * From rfc2044: encoding of the Unicode values on UTF-8:
-             *
-             * UCS-4 range (hex.)           UTF-8 octet sequence (binary)
-             * 0000 0000-0000 007F   0xxxxxxx
-             * 0000 0080-0000 07FF   110xxxxx 10xxxxxx
-             * 0000 0800-0000 FFFF   1110xxxx 10xxxxxx 10xxxxxx
-             *
-             * Check for the 0x110000 limit too
-             */
-            cur = ctxt->input->cur;
+        /*
+         *   2.11 End-of-Line Handling
+         *   the literal two-character sequence "#xD#xA" or a standalone
+         *   literal #xD, an XML processor must pass to the application
+         *   the single character #xA.
+         */
+        if (*(ctxt->input->cur) == '\n') {
+            ctxt->input->line++; ctxt->input->col = 1;
+        } else
+            ctxt->input->col++;
 
-            c = *cur;
-            if (c & 0x80) {
-               if (c == 0xC0)
-                   goto encoding_error;
-                if (cur[1] == 0) {
+        /*
+         * We are supposed to handle UTF8, check it's valid
+         * From rfc2044: encoding of the Unicode values on UTF-8:
+         *
+         * UCS-4 range (hex.)           UTF-8 octet sequence (binary)
+         * 0000 0000-0000 007F   0xxxxxxx
+         * 0000 0080-0000 07FF   110xxxxx 10xxxxxx
+         * 0000 0800-0000 FFFF   1110xxxx 10xxxxxx 10xxxxxx
+         *
+         * Check for the 0x110000 limit too
+         */
+        cur = ctxt->input->cur;
+
+        c = *cur;
+        if (c & 0x80) {
+        if (c == 0xC0)
+           goto encoding_error;
+            if (cur[1] == 0) {
+                xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
+                cur = ctxt->input->cur;
+            }
+            if ((cur[1] & 0xc0) != 0x80)
+                goto encoding_error;
+            if ((c & 0xe0) == 0xe0) {
+                unsigned int val;
+
+                if (cur[2] == 0) {
                     xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
                     cur = ctxt->input->cur;
                 }
-                if ((cur[1] & 0xc0) != 0x80)
+                if ((cur[2] & 0xc0) != 0x80)
                     goto encoding_error;
-                if ((c & 0xe0) == 0xe0) {
-                    unsigned int val;
-
-                    if (cur[2] == 0) {
+                if ((c & 0xf0) == 0xf0) {
+                    if (cur[3] == 0) {
                         xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
                         cur = ctxt->input->cur;
                     }
-                    if ((cur[2] & 0xc0) != 0x80)
+                    if (((c & 0xf8) != 0xf0) ||
+                        ((cur[3] & 0xc0) != 0x80))
                         goto encoding_error;
-                    if ((c & 0xf0) == 0xf0) {
-                        if (cur[3] == 0) {
-                            xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
-                            cur = ctxt->input->cur;
-                        }
-                        if (((c & 0xf8) != 0xf0) ||
-                            ((cur[3] & 0xc0) != 0x80))
-                            goto encoding_error;
-                        /* 4-byte code */
-                        ctxt->input->cur += 4;
-                        val = (cur[0] & 0x7) << 18;
-                        val |= (cur[1] & 0x3f) << 12;
-                        val |= (cur[2] & 0x3f) << 6;
-                        val |= cur[3] & 0x3f;
-                    } else {
-                        /* 3-byte code */
-                        ctxt->input->cur += 3;
-                        val = (cur[0] & 0xf) << 12;
-                        val |= (cur[1] & 0x3f) << 6;
-                        val |= cur[2] & 0x3f;
-                    }
-                    if (((val > 0xd7ff) && (val < 0xe000)) ||
-                        ((val > 0xfffd) && (val < 0x10000)) ||
-                        (val >= 0x110000)) {
-                       xmlErrEncodingInt(ctxt, XML_ERR_INVALID_CHAR,
-                                         "Char 0x%X out of allowed range\n",
-                                         val);
-                    }
-                } else
-                    /* 2-byte code */
-                    ctxt->input->cur += 2;
+                    /* 4-byte code */
+                    ctxt->input->cur += 4;
+                    val = (cur[0] & 0x7) << 18;
+                    val |= (cur[1] & 0x3f) << 12;
+                    val |= (cur[2] & 0x3f) << 6;
+                    val |= cur[3] & 0x3f;
+                } else {
+                    /* 3-byte code */
+                    ctxt->input->cur += 3;
+                    val = (cur[0] & 0xf) << 12;
+                    val |= (cur[1] & 0x3f) << 6;
+                    val |= cur[2] & 0x3f;
+                }
+                if (((val > 0xd7ff) && (val < 0xe000)) ||
+                    ((val > 0xfffd) && (val < 0x10000)) ||
+                    (val >= 0x110000)) {
+               xmlErrEncodingInt(ctxt, XML_ERR_INVALID_CHAR,
+                                 "Char 0x%X out of allowed range\n",
+                                 val);
+                }
             } else
-                /* 1-byte code */
-                ctxt->input->cur++;
+                /* 2-byte code */
+                ctxt->input->cur += 2;
+        } else
+            /* 1-byte code */
+            ctxt->input->cur++;
 
-            ctxt->nbChars++;
-            if (*ctxt->input->cur == 0)
-                xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
-        }
+        ctxt->nbChars++;
+        if (*ctxt->input->cur == 0)
+            xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
     } else {
         /*
          * Assume it's a fixed length encoding (1) with
@@ -937,6 +943,7 @@ xmlSwitchEncoding(xmlParserCtxtPtr ctxt, xmlCharEncoding enc)
 {
     xmlCharEncodingHandlerPtr handler;
     int len = -1;
+    int ret;
 
     if (ctxt == NULL) return(-1);
     switch (enc) {
@@ -1097,7 +1104,15 @@ xmlSwitchEncoding(xmlParserCtxtPtr ctxt, xmlCharEncoding enc)
     if (handler == NULL)
        return(-1);
     ctxt->charset = XML_CHAR_ENCODING_UTF8;
-    return(xmlSwitchToEncodingInt(ctxt, handler, len));
+    ret = xmlSwitchToEncodingInt(ctxt, handler, len);
+    if ((ret < 0) || (ctxt->errNo == XML_I18N_CONV_FAILED)) {
+        /*
+        * on encoding conversion errors, stop the parser
+        */
+        xmlStopParser(ctxt);
+       ctxt->errNo = XML_I18N_CONV_FAILED;
+    }
+    return(ret);
 }
 
 /**
@@ -1450,6 +1465,8 @@ xmlNewEntityInputStream(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) {
     if (entity->URI != NULL)
        input->filename = (char *) xmlStrdup((xmlChar *) entity->URI);
     input->base = entity->content;
+    if (entity->length == 0)
+        entity->length = xmlStrlen(entity->content);
     input->cur = entity->content;
     input->length = entity->length;
     input->end = &entity->content[input->length];
index 03fbd5b..5b5791f 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,9 +90,6 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = python
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(srcdir)/setup.py.in $(top_srcdir)/depcomp $(dist_docs_DATA) \
-       $(am__dist_python_DATA_DIST) README TODO
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
@@ -90,6 +97,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(dist_docs_DATA) \
+       $(am__dist_python_DATA_DIST) $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES = setup.py
@@ -217,6 +226,8 @@ am__define_uniq_tagged_files = \
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/setup.py.in \
+       $(top_srcdir)/depcomp README TODO
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -283,6 +294,7 @@ HTML_DIR = @HTML_DIR@
 HTML_OBJ = @HTML_OBJ@
 HTTP_OBJ = @HTTP_OBJ@
 ICONV_LIBS = @ICONV_LIBS@
+ICU_CFLAGS = @ICU_CFLAGS@
 ICU_LIBS = @ICU_LIBS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
@@ -304,8 +316,10 @@ LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 LZMA_CFLAGS = @LZMA_CFLAGS@
 LZMA_LIBS = @LZMA_LIBS@
+MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -511,7 +525,7 @@ all: $(BUILT_SOURCES)
 
 .SUFFIXES:
 .SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@ -523,7 +537,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign python/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --foreign python/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -536,9 +549,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 
-$(top_srcdir)/configure:  $(am__configure_deps)
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
 setup.py: $(top_builddir)/config.status $(srcdir)/setup.py.in
@@ -597,14 +610,14 @@ distclean-compile:
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
 
 .c.obj:
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 
 .c.lo:
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -951,6 +964,8 @@ uninstall-am: uninstall-dist_docsDATA uninstall-dist_pythonDATA \
        tags tags-am uninstall uninstall-am uninstall-dist_docsDATA \
        uninstall-dist_pythonDATA uninstall-pythonLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # libxml.c #includes libxml2-export.c
 @WITH_PYTHON_TRUE@libxml.$(OBJEXT): libxml2-export.c
index c2ec3e2..71b1c67 100644 (file)
@@ -44,8 +44,18 @@ if sys.version_info[0] < 3:
     __author__  = codecs.unicode_escape_decode(__author__)[0]
 
     StringTypes = (str, unicode)
+    # libxml2 returns strings as UTF8
+    _decoder = codecs.lookup("utf8")[1]
+    def _d(s):
+        if s is None:
+            return s
+        else:
+            return _decoder(s)[0]
 else:
     StringTypes = str
+    # s is Unicode `str` already
+    def _d(s):
+        return s
 
 from xml.sax._exceptions import *
 from xml.sax import xmlreader, saxutils
@@ -61,14 +71,6 @@ from xml.sax.handler import \
      property_dom_node, \
      property_xml_string
 
-# libxml2 returns strings as UTF8
-_decoder = codecs.lookup("utf8")[1]
-def _d(s):
-    if s is None:
-        return s
-    else:
-        return _decoder(s)[0]
-
 try:
     import libxml2
 except ImportError:
index 30b71f3..5b1ff6e 100644 (file)
@@ -906,7 +906,7 @@ pythonStartElement(void *user_data, const xmlChar * name,
         type = 2;
     if (type != 0) {
         /*
-         * the xmllib interface always generate a dictionnary,
+         * the xmllib interface always generates a dictionary,
          * possibly empty
          */
         if ((attrs == NULL) && (type == 1)) {
index 76b8dcd..3a5c329 100644 (file)
@@ -8006,6 +8006,7 @@ XML_BUFFER_ALLOC_EXACT = 2
 XML_BUFFER_ALLOC_IMMUTABLE = 3
 XML_BUFFER_ALLOC_IO = 4
 XML_BUFFER_ALLOC_HYBRID = 5
+XML_BUFFER_ALLOC_BOUNDED = 6
 
 # xmlParserSeverities
 XML_PARSER_SEVERITY_VALIDITY_WARNING = 1
index 4b718dc..05d02ba 100644 (file)
@@ -7218,6 +7218,7 @@ XML_BUFFER_ALLOC_EXACT = 2
 XML_BUFFER_ALLOC_IMMUTABLE = 3
 XML_BUFFER_ALLOC_IO = 4
 XML_BUFFER_ALLOC_HYBRID = 5
+XML_BUFFER_ALLOC_BOUNDED = 6
 
 # xmlParserSeverities
 XML_PARSER_SEVERITY_VALIDITY_WARNING = 1
index e504323..c44269a 100755 (executable)
@@ -226,7 +226,7 @@ else:
 setup (name = "libxml2-python",
        # On *nix, the version number is created from setup.py.in
        # On windows, it is set by configure.js
-       version = "2.9.2",
+       version = "2.9.4",
        description = descr,
        author = "Daniel Veillard",
        author_email = "veillard@redhat.com",
index ffda69b..039e8ec 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,8 +89,6 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = python/tests
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(dist_example_DATA)
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
@@ -88,6 +96,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(dist_example_DATA) \
+       $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -141,6 +151,7 @@ am__uninstall_files_from_dir = { \
 am__installdirs = "$(DESTDIR)$(exampledir)"
 DATA = $(dist_example_DATA)
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -182,6 +193,7 @@ HTML_DIR = @HTML_DIR@
 HTML_OBJ = @HTML_OBJ@
 HTTP_OBJ = @HTTP_OBJ@
 ICONV_LIBS = @ICONV_LIBS@
+ICU_CFLAGS = @ICU_CFLAGS@
 ICU_LIBS = @ICU_LIBS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
@@ -203,8 +215,10 @@ LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 LZMA_CFLAGS = @LZMA_CFLAGS@
 LZMA_LIBS = @LZMA_LIBS@
+MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -432,7 +446,7 @@ CLEANFILES = core tmp.xml *.pyc
 all: all-am
 
 .SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@ -444,7 +458,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu python/tests/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu python/tests/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -457,9 +470,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 
-$(top_srcdir)/configure:  $(am__configure_deps)
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
 
@@ -645,6 +658,8 @@ uninstall-am: uninstall-dist_exampleDATA
        mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
        uninstall-am uninstall-dist_exampleDATA
 
+.PRECIOUS: Makefile
+
 
 @WITH_PYTHON_TRUE@tests: $(PYTESTS)
 @WITH_PYTHON_TRUE@     @for f in $(XMLS) ; do test -f $$f || $(LN_S) $(srcdir)/$$f . ; done
index 8d88e95..56a3344 100644 (file)
--- a/relaxng.c
+++ b/relaxng.c
@@ -507,7 +507,7 @@ xmlRngVErrMemory(xmlRelaxNGValidCtxtPtr ctxt, const char *extra)
  *
  * Handle a Relax NG Parsing error
  */
-static void
+static void LIBXML_ATTR_FORMAT(4,0)
 xmlRngPErr(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node, int error,
            const char *msg, const xmlChar * str1, const xmlChar * str2)
 {
@@ -541,7 +541,7 @@ xmlRngPErr(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node, int error,
  *
  * Handle a Relax NG Validation error
  */
-static void
+static void LIBXML_ATTR_FORMAT(4,0)
 xmlRngVErr(xmlRelaxNGValidCtxtPtr ctxt, xmlNodePtr node, int error,
            const char *msg, const xmlChar * str1, const xmlChar * str2)
 {
@@ -2215,7 +2215,8 @@ xmlRelaxNGGetErrorString(xmlRelaxNGValidErr err, const xmlChar * arg1,
         snprintf(msg, 1000, "Unknown error code %d\n", err);
     }
     msg[1000 - 1] = 0;
-    return (xmlStrdup((xmlChar *) msg));
+    xmlChar *result = xmlCharStrdup(msg);
+    return (xmlEscapeFormatString(&result));
 }
 
 /**
@@ -3819,7 +3820,11 @@ xmlRelaxNGCompareNameClasses(xmlRelaxNGDefinePtr def1,
             return (0);
         return (1);
     } else if (def1->type == XML_RELAXNG_EXCEPT) {
-        TODO ret = 0;
+        ret = xmlRelaxNGCompareNameClasses(def1->content, def2);
+       if (ret == 0)
+           ret = 1;
+       else if (ret == 1)
+           ret = 0;
     } else {
         TODO ret = 0;
     }
@@ -9859,7 +9864,7 @@ xmlRelaxNGValidateState(xmlRelaxNGValidCtxtPtr ctxt,
     ctxt->depth++;
     switch (define->type) {
         case XML_RELAXNG_EMPTY:
-            node = xmlRelaxNGSkipIgnored(ctxt, node);
+            xmlRelaxNGSkipIgnored(ctxt, node);
             ret = 0;
             break;
         case XML_RELAXNG_NOT_ALLOWED:
diff --git a/result/HTML/758605.html b/result/HTML/758605.html
new file mode 100644 (file)
index 0000000..60b01d3
--- /dev/null
@@ -0,0 +1,3 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html><body><p>&amp;&ecirc;
+</p></body></html>
diff --git a/result/HTML/758605.html.err b/result/HTML/758605.html.err
new file mode 100644 (file)
index 0000000..2086f96
--- /dev/null
@@ -0,0 +1,3 @@
+./test/HTML/758605.html:1: HTML parser error : htmlParseEntityRef: expecting ';'
+  ^
diff --git a/result/HTML/758605.html.sax b/result/HTML/758605.html.sax
new file mode 100644 (file)
index 0000000..c6e0986
--- /dev/null
@@ -0,0 +1,14 @@
+SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.error: htmlParseEntityRef: expecting ';'
+SAX.startElement(html)
+SAX.startElement(body)
+SAX.startElement(p)
+SAX.characters(&amp;, 1)
+SAX.characters(&ecirc;, 2)
+SAX.ignorableWhitespace(
+, 1)
+SAX.endElement(p)
+SAX.endElement(body)
+SAX.endElement(html)
+SAX.endDocument()
diff --git a/result/HTML/758606.html b/result/HTML/758606.html
new file mode 100644 (file)
index 0000000..4f21f62
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE >
+
diff --git a/result/HTML/758606.html.err b/result/HTML/758606.html.err
new file mode 100644 (file)
index 0000000..060433a
--- /dev/null
@@ -0,0 +1,16 @@
+./test/HTML/758606.html:1: HTML parser error : Comment not terminated 
+<!--
+<!--\f<!doctype
+    ^
+./test/HTML/758606.html:1: HTML parser error : Invalid char in CDATA 0xC
+<!--\f<!doctype
+    ^
+./test/HTML/758606.html:1: HTML parser error : Misplaced DOCTYPE declaration
+<!--\f<!doctype
+     ^
+./test/HTML/758606.html:2: HTML parser error : htmlParseDocTypeDecl : no DOCTYPE name !
+
+^
+./test/HTML/758606.html:2: HTML parser error : DOCTYPE improperly terminated
+
+^
diff --git a/result/HTML/758606.html.sax b/result/HTML/758606.html.sax
new file mode 100644 (file)
index 0000000..d44a5cf
--- /dev/null
@@ -0,0 +1,10 @@
+SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.error: Comment not terminated 
+<!--
+SAX.error: Invalid char in CDATA 0xC
+SAX.error: Misplaced DOCTYPE declaration
+SAX.error: htmlParseDocTypeDecl : no DOCTYPE name !
+SAX.error: DOCTYPE improperly terminated
+SAX.internalSubset((null), , )
+SAX.endDocument()
diff --git a/result/HTML/758606_2.html b/result/HTML/758606_2.html
new file mode 100644 (file)
index 0000000..273816a
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE >
+<html><body><p>&#145;</p></body></html>
diff --git a/result/HTML/758606_2.html.err b/result/HTML/758606_2.html.err
new file mode 100644 (file)
index 0000000..4be039f
--- /dev/null
@@ -0,0 +1,16 @@
+./test/HTML/758606_2.html:1: HTML parser error : Comment not terminated 
+<!--
+<!--\f\91<!dOctYPE
+    ^
+./test/HTML/758606_2.html:1: HTML parser error : Invalid char in CDATA 0xC
+<!--\f\91<!dOctYPE
+    ^
+./test/HTML/758606_2.html:1: HTML parser error : Misplaced DOCTYPE declaration
+\91<!dOctYPE
+  ^
+./test/HTML/758606_2.html:2: HTML parser error : htmlParseDocTypeDecl : no DOCTYPE name !
+
+^
+./test/HTML/758606_2.html:2: HTML parser error : DOCTYPE improperly terminated
+
+^
diff --git a/result/HTML/758606_2.html.sax b/result/HTML/758606_2.html.sax
new file mode 100644 (file)
index 0000000..80ff3d7
--- /dev/null
@@ -0,0 +1,17 @@
+SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.error: Comment not terminated 
+<!--
+SAX.error: Invalid char in CDATA 0xC
+SAX.startElement(html)
+SAX.startElement(body)
+SAX.startElement(p)
+SAX.characters(&#145;, 2)
+SAX.error: Misplaced DOCTYPE declaration
+SAX.error: htmlParseDocTypeDecl : no DOCTYPE name !
+SAX.error: DOCTYPE improperly terminated
+SAX.internalSubset((null), , )
+SAX.endElement(p)
+SAX.endElement(body)
+SAX.endElement(html)
+SAX.endDocument()
index 3552866..e04346f 100644 (file)
@@ -18,3 +18,11 @@ Object is a number : 11
 ========================
 Expression: (1+2)*(3+4)
 Object is a number : 21
+
+========================
+Expression: 1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1
+Object is a number : 21
+
+========================
+Expression: self::-name
+Object is empty (NULL)
index 03c6567..e023bf0 100644 (file)
@@ -113,3 +113,13 @@ Set contains 5 nodes:
     ATTRIBUTE id
       TEXT
         content=chapter5
+
+========================
+Expression: //p[1]
+Object is a Node Set :
+Set contains 5 nodes:
+1  ELEMENT p
+2  ELEMENT p
+3  ELEMENT p
+4  ELEMENT p
+5  ELEMENT p
diff --git a/result/XPath/tests/nssimple b/result/XPath/tests/nssimple
new file mode 100644 (file)
index 0000000..8f0dd0e
--- /dev/null
@@ -0,0 +1,24 @@
+
+========================
+Expression: /doc/elem/namespace::node()/..
+Object is a Node Set :
+Set contains 1 nodes:
+1  ELEMENT elem
+    namespace ns2 href=nsuri2
+
+========================
+Expression: /doc/elem/namespace::*/self::node()[true()]
+Object is a Node Set :
+Set contains 3 nodes:
+1  namespace xml href=http://www.w3.org/XML/1998/namespace
+2  namespace ns1 href=nsuri1
+3  namespace ns2 href=nsuri2
+
+========================
+Expression: //*[namespace::ns1]
+Object is a Node Set :
+Set contains 2 nodes:
+1  ELEMENT doc
+    namespace ns1 href=nsuri1
+2  ELEMENT elem
+    namespace ns2 href=nsuri2
index 38fa144..3c32d17 100644 (file)
@@ -60,6 +60,60 @@ Set contains 3 nodes:
     content=   
 
 ========================
+Expression: /child::EXAMPLE/attribute::prop1/self::node()
+Object is a Node Set :
+Set contains 1 nodes:
+1  ATTRIBUTE prop1
+    TEXT
+      content=gnome is great
+
+========================
+Expression: /child::EXAMPLE/attribute::prop1/self::*
+Object is a Node Set :
+Set contains 0 nodes:
+
+========================
+Expression: /child::EXAMPLE/attribute::prop1/descendant-or-self::node()
+Object is a Node Set :
+Set contains 1 nodes:
+1  ATTRIBUTE prop1
+    TEXT
+      content=gnome is great
+
+========================
+Expression: /child::EXAMPLE/attribute::prop1/descendant-or-self::*
+Object is a Node Set :
+Set contains 0 nodes:
+
+========================
+Expression: /child::EXAMPLE/attribute::prop1/ancestor-or-self::node()
+Object is a Node Set :
+Set contains 3 nodes:
+1   /
+2  ELEMENT EXAMPLE
+    ATTRIBUTE prop1
+      TEXT
+        content=gnome is great
+    ATTRIBUTE prop2
+      TEXT
+        content=& linux too
+3  ATTRIBUTE prop1
+    TEXT
+      content=gnome is great
+
+========================
+Expression: /child::EXAMPLE/attribute::prop1/ancestor-or-self::*
+Object is a Node Set :
+Set contains 1 nodes:
+1  ELEMENT EXAMPLE
+    ATTRIBUTE prop1
+      TEXT
+        content=gnome is great
+    ATTRIBUTE prop2
+      TEXT
+        content=& linux too
+
+========================
 Expression: /descendant::title
 Object is a Node Set :
 Set contains 2 nodes:
diff --git a/result/cdata-2-byte-UTF-8.xml b/result/cdata-2-byte-UTF-8.xml
new file mode 100644 (file)
index 0000000..8552efc
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This tests that two-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). -->
+<doc>
+<p><![CDATA[ČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČ]]></p>
+<p><![CDATA[ ČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČ]]></p>
+</doc>
diff --git a/result/cdata-2-byte-UTF-8.xml.rde b/result/cdata-2-byte-UTF-8.xml.rde
new file mode 100644 (file)
index 0000000..2eb2940
--- /dev/null
@@ -0,0 +1,15 @@
+0 8 #comment 0 1  This tests that two-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). 
+0 1 doc 0 0
+1 14 #text 0 1 
+
+1 1 p 0 0
+2 4 #cdata-section 0 1 ČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČ
+1 15 p 0 0
+1 14 #text 0 1 
+
+1 1 p 0 0
+2 4 #cdata-section 0 1  ČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČ
+1 15 p 0 0
+1 14 #text 0 1 
+
+0 15 doc 0 0
diff --git a/result/cdata-2-byte-UTF-8.xml.rdr b/result/cdata-2-byte-UTF-8.xml.rdr
new file mode 100644 (file)
index 0000000..2eb2940
--- /dev/null
@@ -0,0 +1,15 @@
+0 8 #comment 0 1  This tests that two-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). 
+0 1 doc 0 0
+1 14 #text 0 1 
+
+1 1 p 0 0
+2 4 #cdata-section 0 1 ČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČ
+1 15 p 0 0
+1 14 #text 0 1 
+
+1 1 p 0 0
+2 4 #cdata-section 0 1  ČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČ
+1 15 p 0 0
+1 14 #text 0 1 
+
+0 15 doc 0 0
diff --git a/result/cdata-2-byte-UTF-8.xml.sax b/result/cdata-2-byte-UTF-8.xml.sax
new file mode 100644 (file)
index 0000000..f397f6a
--- /dev/null
@@ -0,0 +1,18 @@
+SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.comment( This tests that two-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). )
+SAX.startElement(doc)
+SAX.characters(
+, 1)
+SAX.startElement(p)
+SAX.pcdata(ČČČČČČČČČČ, 1200)
+SAX.endElement(p)
+SAX.characters(
+, 1)
+SAX.startElement(p)
+SAX.pcdata( Ä\8cÄ\8cÄ\8cÄ\8cÄ\8cÄ\8cÄ\8cÄ\8cÄ\8cÄ, 1201)
+SAX.endElement(p)
+SAX.characters(
+, 1)
+SAX.endElement(doc)
+SAX.endDocument()
diff --git a/result/cdata-2-byte-UTF-8.xml.sax2 b/result/cdata-2-byte-UTF-8.xml.sax2
new file mode 100644 (file)
index 0000000..2da2d50
--- /dev/null
@@ -0,0 +1,18 @@
+SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.comment( This tests that two-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). )
+SAX.startElementNs(doc, NULL, NULL, 0, 0, 0)
+SAX.characters(
+, 1)
+SAX.startElementNs(p, NULL, NULL, 0, 0, 0)
+SAX.pcdata(ČČČČČČČČČČ, 1200)
+SAX.endElementNs(p, NULL, NULL)
+SAX.characters(
+, 1)
+SAX.startElementNs(p, NULL, NULL, 0, 0, 0)
+SAX.pcdata( Ä\8cÄ\8cÄ\8cÄ\8cÄ\8cÄ\8cÄ\8cÄ\8cÄ\8cÄ, 1201)
+SAX.endElementNs(p, NULL, NULL)
+SAX.characters(
+, 1)
+SAX.endElementNs(doc, NULL, NULL)
+SAX.endDocument()
diff --git a/result/cdata-3-byte-UTF-8.xml b/result/cdata-3-byte-UTF-8.xml
new file mode 100644 (file)
index 0000000..b959a12
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This tests that three-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). -->
+<doc>
+<p><![CDATA[牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛]]></p>
+<p><![CDATA[ 牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛]]></p>
+<p><![CDATA[  牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛]]></p>
+</doc>
diff --git a/result/cdata-3-byte-UTF-8.xml.rde b/result/cdata-3-byte-UTF-8.xml.rde
new file mode 100644 (file)
index 0000000..3f4d1c5
--- /dev/null
@@ -0,0 +1,20 @@
+0 8 #comment 0 1  This tests that three-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). 
+0 1 doc 0 0
+1 14 #text 0 1 
+
+1 1 p 0 0
+2 4 #cdata-section 0 1 牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛
+1 15 p 0 0
+1 14 #text 0 1 
+
+1 1 p 0 0
+2 4 #cdata-section 0 1  牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛
+1 15 p 0 0
+1 14 #text 0 1 
+
+1 1 p 0 0
+2 4 #cdata-section 0 1   牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛
+1 15 p 0 0
+1 14 #text 0 1 
+
+0 15 doc 0 0
diff --git a/result/cdata-3-byte-UTF-8.xml.rdr b/result/cdata-3-byte-UTF-8.xml.rdr
new file mode 100644 (file)
index 0000000..3f4d1c5
--- /dev/null
@@ -0,0 +1,20 @@
+0 8 #comment 0 1  This tests that three-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). 
+0 1 doc 0 0
+1 14 #text 0 1 
+
+1 1 p 0 0
+2 4 #cdata-section 0 1 牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛
+1 15 p 0 0
+1 14 #text 0 1 
+
+1 1 p 0 0
+2 4 #cdata-section 0 1  牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛
+1 15 p 0 0
+1 14 #text 0 1 
+
+1 1 p 0 0
+2 4 #cdata-section 0 1   牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛
+1 15 p 0 0
+1 14 #text 0 1 
+
+0 15 doc 0 0
diff --git a/result/cdata-3-byte-UTF-8.xml.sax b/result/cdata-3-byte-UTF-8.xml.sax
new file mode 100644 (file)
index 0000000..2f73e7c
--- /dev/null
@@ -0,0 +1,23 @@
+SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.comment( This tests that three-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). )
+SAX.startElement(doc)
+SAX.characters(
+, 1)
+SAX.startElement(p)
+SAX.pcdata(ç\89\9bç\89\9bç\89\9bç\89\9bç\89\9bç\89\9bç\89, 1200)
+SAX.endElement(p)
+SAX.characters(
+, 1)
+SAX.startElement(p)
+SAX.pcdata( ç\89\9bç\89\9bç\89\9bç\89\9bç\89\9bç\89\9bç, 1201)
+SAX.endElement(p)
+SAX.characters(
+, 1)
+SAX.startElement(p)
+SAX.pcdata(  牛牛牛牛牛牛, 1202)
+SAX.endElement(p)
+SAX.characters(
+, 1)
+SAX.endElement(doc)
+SAX.endDocument()
diff --git a/result/cdata-3-byte-UTF-8.xml.sax2 b/result/cdata-3-byte-UTF-8.xml.sax2
new file mode 100644 (file)
index 0000000..3969579
--- /dev/null
@@ -0,0 +1,23 @@
+SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.comment( This tests that three-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). )
+SAX.startElementNs(doc, NULL, NULL, 0, 0, 0)
+SAX.characters(
+, 1)
+SAX.startElementNs(p, NULL, NULL, 0, 0, 0)
+SAX.pcdata(ç\89\9bç\89\9bç\89\9bç\89\9bç\89\9bç\89\9bç\89, 1200)
+SAX.endElementNs(p, NULL, NULL)
+SAX.characters(
+, 1)
+SAX.startElementNs(p, NULL, NULL, 0, 0, 0)
+SAX.pcdata( ç\89\9bç\89\9bç\89\9bç\89\9bç\89\9bç\89\9bç, 1201)
+SAX.endElementNs(p, NULL, NULL)
+SAX.characters(
+, 1)
+SAX.startElementNs(p, NULL, NULL, 0, 0, 0)
+SAX.pcdata(  牛牛牛牛牛牛, 1202)
+SAX.endElementNs(p, NULL, NULL)
+SAX.characters(
+, 1)
+SAX.endElementNs(doc, NULL, NULL)
+SAX.endDocument()
diff --git a/result/cdata-4-byte-UTF-8.xml b/result/cdata-4-byte-UTF-8.xml
new file mode 100644 (file)
index 0000000..4d1d9a8
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This tests that four-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). -->
+<doc>
+<p><![CDATA[🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦]]></p>
+<p><![CDATA[ 🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦]]></p>
+<p><![CDATA[  🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦]]></p>
+<p><![CDATA[   🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦]]></p>
+</doc>
diff --git a/result/cdata-4-byte-UTF-8.xml.rde b/result/cdata-4-byte-UTF-8.xml.rde
new file mode 100644 (file)
index 0000000..437b79e
--- /dev/null
@@ -0,0 +1,25 @@
+0 8 #comment 0 1  This tests that four-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). 
+0 1 doc 0 0
+1 14 #text 0 1 
+
+1 1 p 0 0
+2 4 #cdata-section 0 1 🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦
+1 15 p 0 0
+1 14 #text 0 1 
+
+1 1 p 0 0
+2 4 #cdata-section 0 1  🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦
+1 15 p 0 0
+1 14 #text 0 1 
+
+1 1 p 0 0
+2 4 #cdata-section 0 1   🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦
+1 15 p 0 0
+1 14 #text 0 1 
+
+1 1 p 0 0
+2 4 #cdata-section 0 1    🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦
+1 15 p 0 0
+1 14 #text 0 1 
+
+0 15 doc 0 0
diff --git a/result/cdata-4-byte-UTF-8.xml.rdr b/result/cdata-4-byte-UTF-8.xml.rdr
new file mode 100644 (file)
index 0000000..437b79e
--- /dev/null
@@ -0,0 +1,25 @@
+0 8 #comment 0 1  This tests that four-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). 
+0 1 doc 0 0
+1 14 #text 0 1 
+
+1 1 p 0 0
+2 4 #cdata-section 0 1 🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦
+1 15 p 0 0
+1 14 #text 0 1 
+
+1 1 p 0 0
+2 4 #cdata-section 0 1  🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦
+1 15 p 0 0
+1 14 #text 0 1 
+
+1 1 p 0 0
+2 4 #cdata-section 0 1   🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦
+1 15 p 0 0
+1 14 #text 0 1 
+
+1 1 p 0 0
+2 4 #cdata-section 0 1    🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦
+1 15 p 0 0
+1 14 #text 0 1 
+
+0 15 doc 0 0
diff --git a/result/cdata-4-byte-UTF-8.xml.sax b/result/cdata-4-byte-UTF-8.xml.sax
new file mode 100644 (file)
index 0000000..d8abcfb
--- /dev/null
@@ -0,0 +1,28 @@
+SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.comment( This tests that four-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). )
+SAX.startElement(doc)
+SAX.characters(
+, 1)
+SAX.startElement(p)
+SAX.pcdata(🍦🍦🍦🍦🍦, 1200)
+SAX.endElement(p)
+SAX.characters(
+, 1)
+SAX.startElement(p)
+SAX.pcdata( ð\9f\8d¦ð\9f\8d¦ð\9f\8d¦ð\9f\8d¦ð\9f\8d, 1201)
+SAX.endElement(p)
+SAX.characters(
+, 1)
+SAX.startElement(p)
+SAX.pcdata(  ð\9f\8d¦ð\9f\8d¦ð\9f\8d¦ð\9f\8d¦ð\9f, 1202)
+SAX.endElement(p)
+SAX.characters(
+, 1)
+SAX.startElement(p)
+SAX.pcdata(   ð\9f\8d¦ð\9f\8d¦ð\9f\8d¦ð\9f\8d¦ð, 1203)
+SAX.endElement(p)
+SAX.characters(
+, 1)
+SAX.endElement(doc)
+SAX.endDocument()
diff --git a/result/cdata-4-byte-UTF-8.xml.sax2 b/result/cdata-4-byte-UTF-8.xml.sax2
new file mode 100644 (file)
index 0000000..5e07d83
--- /dev/null
@@ -0,0 +1,28 @@
+SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.comment( This tests that four-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). )
+SAX.startElementNs(doc, NULL, NULL, 0, 0, 0)
+SAX.characters(
+, 1)
+SAX.startElementNs(p, NULL, NULL, 0, 0, 0)
+SAX.pcdata(🍦🍦🍦🍦🍦, 1200)
+SAX.endElementNs(p, NULL, NULL)
+SAX.characters(
+, 1)
+SAX.startElementNs(p, NULL, NULL, 0, 0, 0)
+SAX.pcdata( ð\9f\8d¦ð\9f\8d¦ð\9f\8d¦ð\9f\8d¦ð\9f\8d, 1201)
+SAX.endElementNs(p, NULL, NULL)
+SAX.characters(
+, 1)
+SAX.startElementNs(p, NULL, NULL, 0, 0, 0)
+SAX.pcdata(  ð\9f\8d¦ð\9f\8d¦ð\9f\8d¦ð\9f\8d¦ð\9f, 1202)
+SAX.endElementNs(p, NULL, NULL)
+SAX.characters(
+, 1)
+SAX.startElementNs(p, NULL, NULL, 0, 0, 0)
+SAX.pcdata(   ð\9f\8d¦ð\9f\8d¦ð\9f\8d¦ð\9f\8d¦ð, 1203)
+SAX.endElementNs(p, NULL, NULL)
+SAX.characters(
+, 1)
+SAX.endElementNs(doc, NULL, NULL)
+SAX.endDocument()
diff --git a/result/ent_738805.xml b/result/ent_738805.xml
new file mode 100644 (file)
index 0000000..d285eee
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE somedoc [
+<!ENTITY a "something">
+<!ENTITY b "&a;">
+]>
+<somedoc>
+
+<somebeacon someattribute="&b;"/>
+
+&a; should appear after colon: &a;
+&b; should appear after colon: &a;
+&a; should appear after colon: &b;
+&b; should appear after colon: &b;
+
+</somedoc>
diff --git a/result/ent_738805.xml.rde b/result/ent_738805.xml.rde
new file mode 100644 (file)
index 0000000..fa086fe
--- /dev/null
@@ -0,0 +1,15 @@
+0 10 somedoc 0 0
+0 1 somedoc 0 0
+1 14 #text 0 1 
+
+
+1 1 somebeacon 1 0
+1 3 #text 0 1 
+
+something should appear after colon: something
+something should appear after colon: something
+something should appear after colon: something
+something should appear after colon: something
+
+
+0 15 somedoc 0 0
diff --git a/result/ent_738805.xml.rdr b/result/ent_738805.xml.rdr
new file mode 100644 (file)
index 0000000..c52dbf1
--- /dev/null
@@ -0,0 +1,31 @@
+0 10 somedoc 0 0
+0 1 somedoc 0 0
+1 14 #text 0 1 
+
+
+1 1 somebeacon 1 0
+1 14 #text 0 1 
+
+
+1 5 a 0 0
+1 3 #text 0 1  should appear after colon: 
+1 5 a 0 0
+1 14 #text 0 1 
+
+1 5 b 0 0
+1 3 #text 0 1  should appear after colon: 
+1 5 a 0 0
+1 14 #text 0 1 
+
+1 5 a 0 0
+1 3 #text 0 1  should appear after colon: 
+1 5 b 0 0
+1 14 #text 0 1 
+
+1 5 b 0 0
+1 3 #text 0 1  should appear after colon: 
+1 5 b 0 0
+1 14 #text 0 1 
+
+
+0 15 somedoc 0 0
diff --git a/result/ent_738805.xml.sax b/result/ent_738805.xml.sax
new file mode 100644 (file)
index 0000000..2649117
--- /dev/null
@@ -0,0 +1,66 @@
+SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.internalSubset(somedoc, , )
+SAX.entityDecl(a, 1, (null), (null), something)
+SAX.getEntity(a)
+SAX.entityDecl(b, 1, (null), (null), &a;)
+SAX.getEntity(b)
+SAX.externalSubset(somedoc, , )
+SAX.startElement(somedoc)
+SAX.characters(
+
+, 2)
+SAX.getEntity(b)
+SAX.getEntity(a)
+SAX.startElement(somebeacon, someattribute='&b;')
+SAX.endElement(somebeacon)
+SAX.characters(
+
+, 2)
+SAX.getEntity(a)
+SAX.characters(something, 9)
+SAX.reference(a)
+SAX.characters( should appear after colon: , 28)
+SAX.getEntity(a)
+SAX.characters(something, 9)
+SAX.reference(a)
+SAX.characters(
+, 1)
+SAX.getEntity(b)
+SAX.getEntity(a)
+SAX.characters(something, 9)
+SAX.reference(a)
+SAX.reference(b)
+SAX.characters( should appear after colon: , 28)
+SAX.getEntity(a)
+SAX.characters(something, 9)
+SAX.reference(a)
+SAX.characters(
+, 1)
+SAX.getEntity(a)
+SAX.characters(something, 9)
+SAX.reference(a)
+SAX.characters( should appear after colon: , 28)
+SAX.getEntity(b)
+SAX.getEntity(a)
+SAX.characters(something, 9)
+SAX.reference(a)
+SAX.reference(b)
+SAX.characters(
+, 1)
+SAX.getEntity(b)
+SAX.getEntity(a)
+SAX.characters(something, 9)
+SAX.reference(a)
+SAX.reference(b)
+SAX.characters( should appear after colon: , 28)
+SAX.getEntity(b)
+SAX.getEntity(a)
+SAX.characters(something, 9)
+SAX.reference(a)
+SAX.reference(b)
+SAX.characters(
+
+, 2)
+SAX.endElement(somedoc)
+SAX.endDocument()
diff --git a/result/ent_738805.xml.sax2 b/result/ent_738805.xml.sax2
new file mode 100644 (file)
index 0000000..1eae781
--- /dev/null
@@ -0,0 +1,66 @@
+SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.internalSubset(somedoc, , )
+SAX.entityDecl(a, 1, (null), (null), something)
+SAX.getEntity(a)
+SAX.entityDecl(b, 1, (null), (null), &a;)
+SAX.getEntity(b)
+SAX.externalSubset(somedoc, , )
+SAX.startElementNs(somedoc, NULL, NULL, 0, 0, 0)
+SAX.characters(
+
+, 2)
+SAX.getEntity(b)
+SAX.getEntity(a)
+SAX.startElementNs(somebeacon, NULL, NULL, 0, 1, 0, someattribute='&b;...', 3)
+SAX.endElementNs(somebeacon, NULL, NULL)
+SAX.characters(
+
+, 2)
+SAX.getEntity(a)
+SAX.characters(something, 9)
+SAX.reference(a)
+SAX.characters( should appear after colon: , 28)
+SAX.getEntity(a)
+SAX.characters(something, 9)
+SAX.reference(a)
+SAX.characters(
+, 1)
+SAX.getEntity(b)
+SAX.getEntity(a)
+SAX.characters(something, 9)
+SAX.reference(a)
+SAX.reference(b)
+SAX.characters( should appear after colon: , 28)
+SAX.getEntity(a)
+SAX.characters(something, 9)
+SAX.reference(a)
+SAX.characters(
+, 1)
+SAX.getEntity(a)
+SAX.characters(something, 9)
+SAX.reference(a)
+SAX.characters( should appear after colon: , 28)
+SAX.getEntity(b)
+SAX.getEntity(a)
+SAX.characters(something, 9)
+SAX.reference(a)
+SAX.reference(b)
+SAX.characters(
+, 1)
+SAX.getEntity(b)
+SAX.getEntity(a)
+SAX.characters(something, 9)
+SAX.reference(a)
+SAX.reference(b)
+SAX.characters( should appear after colon: , 28)
+SAX.getEntity(b)
+SAX.getEntity(a)
+SAX.characters(something, 9)
+SAX.reference(a)
+SAX.reference(b)
+SAX.characters(
+
+, 2)
+SAX.endElementNs(somedoc, NULL, NULL)
+SAX.endDocument()
diff --git a/result/errors/754946.xml b/result/errors/754946.xml
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/errors/754946.xml.err b/result/errors/754946.xml.err
new file mode 100644 (file)
index 0000000..c03e35b
--- /dev/null
@@ -0,0 +1,19 @@
+Entity: line 1: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration
+
+ %SYSTEM; 
+         ^
+Entity: line 1: 
+A<lbbbbbbbbbbbbbbbbbbb_
+^
+Entity: line 1: parser error : DOCTYPE improperly terminated
+ %SYSTEM; 
+         ^
+Entity: line 1: 
+A<lbbbbbbbbbbbbbbbbbbb_
+^
+Entity: line 1: parser error : Start tag expected, '<' not found
+ %SYSTEM; 
+         ^
+Entity: line 1: 
+A<lbbbbbbbbbbbbbbbbbbb_
+^
diff --git a/result/errors/754946.xml.str b/result/errors/754946.xml.str
new file mode 100644 (file)
index 0000000..3b748cc
--- /dev/null
@@ -0,0 +1,4 @@
+./test/errors/754946.xml:1: parser error : Extra content at the end of the document
+<!DOCTYPEA[<!ENTITY %
+          ^
+./test/errors/754946.xml : failed to parse
diff --git a/result/errors/754947.xml b/result/errors/754947.xml
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/errors/754947.xml.err b/result/errors/754947.xml.err
new file mode 100644 (file)
index 0000000..f45cb5a
--- /dev/null
@@ -0,0 +1,7 @@
+./test/errors/754947.xml:1: parser error : Input is not proper UTF-8, indicate encoding !
+Bytes: 0xEE 0x5D 0x5D 0x3E
+<d><![CDATA[0000000000000î]]>
+                         ^
+./test/errors/754947.xml:1: parser error : Premature end of data in tag d line 1
+<d><![CDATA[0000000000000î]]>
+                             ^
diff --git a/result/errors/754947.xml.str b/result/errors/754947.xml.str
new file mode 100644 (file)
index 0000000..4d2f52e
--- /dev/null
@@ -0,0 +1,5 @@
+./test/errors/754947.xml:1: parser error : Input is not proper UTF-8, indicate encoding !
+Bytes: 0xEE 0x5D 0x5D 0x3E
+<d><![CDATA[0000000000000î]]>
+                         ^
+./test/errors/754947.xml : failed to parse
diff --git a/result/errors/758588.xml b/result/errors/758588.xml
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/errors/758588.xml.err b/result/errors/758588.xml.err
new file mode 100644 (file)
index 0000000..dfa59bc
--- /dev/null
@@ -0,0 +1,9 @@
+./test/errors/758588.xml:1: namespace error : Namespace prefix a-340282366920938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867261d on a is not defined
+63472597946867209384634725979468672093846347259794686720938463472597946867261d:a
+                                                                               ^
+./test/errors/758588.xml:1: parser error : expected '>'
+2597946867209384634725979468672093846347259794686720938463472597946867261d:a></a
+                                                                               ^
+./test/errors/758588.xml:1: parser error : Opening and ending tag mismatch: a line 1 and a
+2597946867209384634725979468672093846347259794686720938463472597946867261d:a></a
+                                                                               ^
diff --git a/result/errors/758588.xml.str b/result/errors/758588.xml.str
new file mode 100644 (file)
index 0000000..303ee0c
--- /dev/null
@@ -0,0 +1,10 @@
+./test/errors/758588.xml:1: namespace error : Namespace prefix a-340282366920938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867261d on a is not defined
+63472597946867209384634725979468672093846347259794686720938463472597946867261d:a
+                                                                               ^
+./test/errors/758588.xml:1: parser error : expected '>'
+2597946867209384634725979468672093846347259794686720938463472597946867261d:a></a
+                                                                               ^
+./test/errors/758588.xml:1: parser error : Opening and ending tag mismatch: a line 1 and a
+2597946867209384634725979468672093846347259794686720938463472597946867261d:a></a
+                                                                               ^
+./test/errors/758588.xml : failed to parse
diff --git a/result/errors/759020.xml b/result/errors/759020.xml
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/errors/759020.xml.err b/result/errors/759020.xml.err
new file mode 100644 (file)
index 0000000..a0d3051
--- /dev/null
@@ -0,0 +1,6 @@
+./test/errors/759020.xml:3: namespace warning : xmlns: URI 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 is not absolute
+0000000000000000000000000000000000000000000000000000000000000000000000000000000'
+                                                                               ^
+./test/errors/759020.xml:46: parser error : Couldn't find end of Start Tag s00 line 2
+                                                                   
+                                                                   ^
diff --git a/result/errors/759020.xml.str b/result/errors/759020.xml.str
new file mode 100644 (file)
index 0000000..998d6d2
--- /dev/null
@@ -0,0 +1,7 @@
+./test/errors/759020.xml:3: namespace warning : xmlns: URI 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 is not absolute
+0000000000000000000000000000000000000000000000000000000000000000000000000000000'
+                                                                               ^
+./test/errors/759020.xml:46: parser error : Couldn't find end of Start Tag s00
+                                                                   
+                                                                   ^
+./test/errors/759020.xml : failed to parse
diff --git a/result/errors/759398.xml b/result/errors/759398.xml
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/errors/759398.xml.err b/result/errors/759398.xml.err
new file mode 100644 (file)
index 0000000..e08d9bf
--- /dev/null
@@ -0,0 +1,9 @@
+./test/errors/759398.xml:210: parser error : StartTag: invalid element name
+need to worry about parsers whi<! don't expand PErefs finding
+                                ^
+./test/errors/759398.xml:309: parser error : Opening and ending tag mismatch: spec line 50 and termdef
+and provide access to their content and structure.</termdef> <termdef
+                                                            ^
+./test/errors/759398.xml:309: parser error : Extra content at the end of the document
+and provide access to their content and structure.</termdef> <termdef
+                                                             ^
diff --git a/result/errors/759398.xml.str b/result/errors/759398.xml.str
new file mode 100644 (file)
index 0000000..de9a28c
--- /dev/null
@@ -0,0 +1,5 @@
+./test/errors/759398.xml:210: parser error : internal error: detected an error in element content
+
+need to worry about parsers whi<! don't expand 
+                               ^
+./test/errors/759398.xml : failed to parse
diff --git a/result/errors/759573-2.xml b/result/errors/759573-2.xml
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/errors/759573-2.xml.err b/result/errors/759573-2.xml.err
new file mode 100644 (file)
index 0000000..d8773d8
--- /dev/null
@@ -0,0 +1,58 @@
+Entity: line 1: parser error : Space required after '<!ENTITY'
+ %zz; 
+     ^
+Entity: line 1: 
+<!ENTITY<?xDOCTYPEm~?>
+        ^
+Entity: line 1: parser error : xmlParseEntityDecl: no name
+ %zz; 
+     ^
+Entity: line 1: 
+<!ENTITY<?xDOCTYPEm~?>
+        ^
+Entity: line 1: parser error : ParsePI: PI xDOCTYPEm space expected
+ %zz; 
+     ^
+Entity: line 1: 
+<!ENTITY<?xDOCTYPEm~?>
+                   ^
+Entity: line 1: parser error : Space required after '<!ENTITY'
+ %zz; 
+     ^
+Entity: line 1: 
+<!ENTITY<?xDOCTYPEm~?>
+        ^
+Entity: line 1: parser error : xmlParseEntityDecl: no name
+ %zz; 
+     ^
+Entity: line 1: 
+<!ENTITY<?xDOCTYPEm~?>
+        ^
+Entity: line 1: parser error : ParsePI: PI xDOCTYPEm space expected
+ %zz; 
+     ^
+Entity: line 1: 
+<!ENTITY<?xDOCTYPEm~?>
+                   ^
+Entity: line 1: parser error : Space required after 'ELEMENT'
+ %xx; 
+     ^
+Entity: line 3: 
+%zz;<!ELEMENTD(%MENT%MENTDŹMENTD%zNMT9KENSMYSYSTEM;MENT9%zz;
+             ^
+Entity: line 1: parser error : Content error in the external subset
+ %xx; 
+     ^
+Entity: line 3: 
+%zz;<!ELEMENTD(%MENT%MENTDŹMENTD%zNMT9KENSMYSYSTEM;MENT9%zz;
+             ^
+./test/errors/759573-2.xml:6: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration
+
+%xx;\ 3ÿggKENSMYNT&#35;MENTD&#372zz;'>
+    ^
+./test/errors/759573-2.xml:6: parser error : DOCTYPE improperly terminated
+%xx;\ 3ÿggKENSMYNT&#35;MENTD&#372zz;'>
+    ^
+./test/errors/759573-2.xml:6: parser error : Start tag expected, '<' not found
+%xx;\ 3ÿggKENSMYNT&#35;MENTD&#372zz;'>
+    ^
diff --git a/result/errors/759573-2.xml.str b/result/errors/759573-2.xml.str
new file mode 100644 (file)
index 0000000..baac164
--- /dev/null
@@ -0,0 +1,4 @@
+./test/errors/759573-2.xml:2: parser error : Extra content at the end of the document
+<!DOCTYPE test [
+               ^
+./test/errors/759573-2.xml : failed to parse
diff --git a/result/errors/759573.xml b/result/errors/759573.xml
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/errors/759573.xml.err b/result/errors/759573.xml.err
new file mode 100644 (file)
index 0000000..2c21e9a
--- /dev/null
@@ -0,0 +1,31 @@
+./test/errors/759573.xml:1: parser error : Space required after '<!ENTITY'
+ELEMENT t (A)><!ENTITY % xx '&#37;<![INCLUDE[000&#37;&#3000;000&#37;z;'><!ENTITY
+                                                                               ^
+./test/errors/759573.xml:1: parser error : Space required after the entity name
+LEMENT t (A)><!ENTITY % xx '&#37;<![INCLUDE[000&#37;&#3000;000&#37;z;'><!ENTITYz
+                                                                               ^
+./test/errors/759573.xml:1: parser error : Entity value required
+LEMENT t (A)><!ENTITY % xx '&#37;<![INCLUDE[000&#37;&#3000;000&#37;z;'><!ENTITYz
+                                                                               ^
+Entity: line 1: parser error : PEReference: no name
+ %xx; 
+     ^
+Entity: line 1: 
+%<![INCLUDE[000%ஸ000%z;
+ ^
+Entity: line 1: parser error : Content error in the external subset
+ %xx; 
+     ^
+Entity: line 1: 
+%<![INCLUDE[000%ஸ000%z;
+            ^
+./test/errors/759573.xml:1: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration
+
+T t (A)><!ENTITY % xx '&#37;<![INCLUDE[000&#37;&#3000;000&#37;z;'><!ENTITYz>%xx;
+                                                                               ^
+./test/errors/759573.xml:1: parser error : DOCTYPE improperly terminated
+T t (A)><!ENTITY % xx '&#37;<![INCLUDE[000&#37;&#3000;000&#37;z;'><!ENTITYz>%xx;
+                                                                               ^
+./test/errors/759573.xml:1: parser error : Start tag expected, '<' not found
+T t (A)><!ENTITY % xx '&#37;<![INCLUDE[000&#37;&#3000;000&#37;z;'><!ENTITYz>%xx;
+                                                                               ^
diff --git a/result/errors/759573.xml.str b/result/errors/759573.xml.str
new file mode 100644 (file)
index 0000000..1b6addb
--- /dev/null
@@ -0,0 +1,4 @@
+./test/errors/759573.xml:1: parser error : Extra content at the end of the document
+<?h?><!DOCTYPEt[<!ELEMENT t (A)><!ENTITY % xx '&#37;<![INCLUDE[000&#37;&#3000;00
+               ^
+./test/errors/759573.xml : failed to parse
index e043441..cf83d2b 100644 (file)
@@ -1,5 +1,5 @@
 ./test/errors/cdata.xml:2: parser error : Input is not proper UTF-8, indicate encoding !
-Bytes: 0x5B 0x43 0xE1 0x72
+Bytes: 0xE1 0x72 0x5D 0x5D
 <A><![CDATA[Cár]]></A>
-           ^
+             ^
 ./test/errors/cdata.xml : failed to parse
index 425be39..9fcd603 100644 (file)
@@ -13,4 +13,4 @@
                          ^
 ./test/errors/content1.xml:7: parser error : Start tag expected, '<' not found
 <!ELEMENT aElement (a |b * >
-                           ^
+                         ^
diff --git a/result/noent/cdata-2-byte-UTF-8.xml b/result/noent/cdata-2-byte-UTF-8.xml
new file mode 100644 (file)
index 0000000..8552efc
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This tests that two-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). -->
+<doc>
+<p><![CDATA[ČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČ]]></p>
+<p><![CDATA[ ČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČ]]></p>
+</doc>
diff --git a/result/noent/cdata-3-byte-UTF-8.xml b/result/noent/cdata-3-byte-UTF-8.xml
new file mode 100644 (file)
index 0000000..b959a12
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This tests that three-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). -->
+<doc>
+<p><![CDATA[牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛]]></p>
+<p><![CDATA[ 牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛]]></p>
+<p><![CDATA[  牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛]]></p>
+</doc>
diff --git a/result/noent/cdata-4-byte-UTF-8.xml b/result/noent/cdata-4-byte-UTF-8.xml
new file mode 100644 (file)
index 0000000..4d1d9a8
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This tests that four-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). -->
+<doc>
+<p><![CDATA[🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦]]></p>
+<p><![CDATA[ 🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦]]></p>
+<p><![CDATA[  🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦]]></p>
+<p><![CDATA[   🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦]]></p>
+</doc>
diff --git a/result/noent/ent_738805.xml b/result/noent/ent_738805.xml
new file mode 100644 (file)
index 0000000..5e44a55
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE somedoc [
+<!ENTITY a "something">
+<!ENTITY b "&a;">
+]>
+<somedoc>
+
+<somebeacon someattribute="something"/>
+
+something should appear after colon: something
+something should appear after colon: something
+something should appear after colon: something
+something should appear after colon: something
+
+</somedoc>
diff --git a/result/relaxng/565219_0 b/result/relaxng/565219_0
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/relaxng/565219_0.err b/result/relaxng/565219_0.err
new file mode 100644 (file)
index 0000000..e3f73fa
--- /dev/null
@@ -0,0 +1,2 @@
+./test/relaxng/565219_0.xml:1: element foo: Relax-NG validity error : Element foo has wrong namespace: expecting http://bar.com/
+./test/relaxng/565219_0.xml fails to validate
diff --git a/result/relaxng/565219_1 b/result/relaxng/565219_1
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/relaxng/565219_1.err b/result/relaxng/565219_1.err
new file mode 100644 (file)
index 0000000..2999bba
--- /dev/null
@@ -0,0 +1 @@
+./test/relaxng/565219_1.xml validates
diff --git a/result/relaxng/565219_2 b/result/relaxng/565219_2
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/relaxng/565219_2.err b/result/relaxng/565219_2.err
new file mode 100644 (file)
index 0000000..7a997d3
--- /dev/null
@@ -0,0 +1,2 @@
+./test/relaxng/565219_2.xml:1: element foo: Relax-NG validity error : Element foo has wrong namespace: expecting http://bar.com/
+./test/relaxng/565219_2.xml fails to validate
diff --git a/result/relaxng/565219_err b/result/relaxng/565219_err
new file mode 100644 (file)
index 0000000..c43e67c
--- /dev/null
@@ -0,0 +1 @@
+./test/relaxng/565219.rng validates
diff --git a/result/relaxng/565219_valid b/result/relaxng/565219_valid
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/relaxng/710744_err b/result/relaxng/710744_err
new file mode 100644 (file)
index 0000000..54f0226
--- /dev/null
@@ -0,0 +1 @@
+./test/relaxng/710744.rng validates
diff --git a/result/relaxng/710744_valid b/result/relaxng/710744_valid
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/relaxng/pattern3_1 b/result/relaxng/pattern3_1
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/relaxng/pattern3_1.err b/result/relaxng/pattern3_1.err
new file mode 100644 (file)
index 0000000..b1a9803
--- /dev/null
@@ -0,0 +1 @@
+./test/relaxng/pattern3_1.xml validates
diff --git a/result/schemas/regexp-char-ref_0_0.err b/result/schemas/regexp-char-ref_0_0.err
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/schemas/regexp-char-ref_1_0.err b/result/schemas/regexp-char-ref_1_0.err
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/valid/737840.xml b/result/valid/737840.xml
new file mode 100644 (file)
index 0000000..433c6d6
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<!DOCTYPE root [
+<!ELEMENT root (elem)>
+<!ELEMENT elem (#PCDATA)>
+<!ATTLIST elem id ID #IMPLIED>
+<!ENTITY target SYSTEM "dtds/737840.ent">
+]>
+<root>
+  &target;
+</root>
diff --git a/result/valid/737840.xml.err b/result/valid/737840.xml.err
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/valid/737840.xml.err.rdr b/result/valid/737840.xml.err.rdr
new file mode 100644 (file)
index 0000000..e69de29
index d795788..1a3c006 100644 (file)
@@ -16,4 +16,4 @@ Entity: line 1: parser error : Start tag expected, '<' not found
           ^
 Entity: line 1: 
 &lt;!ELEMENT root (middle) >
- ^
+^
index d795788..1a3c006 100644 (file)
@@ -16,4 +16,4 @@ Entity: line 1: parser error : Start tag expected, '<' not found
           ^
 Entity: line 1: 
 &lt;!ELEMENT root (middle) >
- ^
+^
index 02fe09a..bb74d2a 100644 (file)
--- a/runtest.c
+++ b/runtest.c
  */
 #ifdef O_BINARY
 #define RD_FLAGS       O_RDONLY | O_BINARY
+#define WR_FLAGS       O_WRONLY | O_CREAT | O_TRUNC | O_BINARY
 #else
-#define        RD_FLAGS        O_RDONLY
+#define RD_FLAGS       O_RDONLY
+#define WR_FLAGS       O_WRONLY | O_CREAT | O_TRUNC
 #endif
 
 typedef int (*functest) (const char *filename, const char *result,
@@ -100,6 +102,7 @@ struct testDesc {
     int     options;  /* parser options for the test */
 };
 
+static int update_results = 0;
 static int checkTestFile(const char *filename);
 
 #if defined(_WIN32) && !defined(__CYGWIN__)
@@ -604,12 +607,34 @@ static int checkTestFile(const char *filename) {
     return(1);
 }
 
-static int compareFiles(const char *r1, const char *r2) {
+static int compareFiles(const char *r1 /* temp */, const char *r2 /* result */) {
     int res1, res2;
     int fd1, fd2;
     char bytes1[4096];
     char bytes2[4096];
 
+    if (update_results) {
+        fd1 = open(r1, RD_FLAGS);
+        if (fd1 < 0)
+            return(-1);
+        fd2 = open(r2, WR_FLAGS, 0644);
+        if (fd2 < 0) {
+            close(fd1);
+            return(-1);
+        }
+        do {
+            res1 = read(fd1, bytes1, 4096);
+            if (res1 <= 0)
+                break;
+            res2 = write(fd2, bytes1, res1);
+            if (res2 <= 0 || res2 != res1)
+                break;
+        } while (1);
+        close(fd2);
+        close(fd1);
+        return(res1 != 0);
+    }
+
     fd1 = open(r1, RD_FLAGS);
     if (fd1 < 0)
         return(-1);
@@ -646,13 +671,31 @@ static int compareFileMem(const char *filename, const char *mem, int size) {
     int idx = 0;
     struct stat info;
 
-    if (stat(filename, &info) < 0)
+    if (update_results) {
+        fd = open(filename, WR_FLAGS, 0644);
+        if (fd < 0) {
+           fprintf(stderr, "failed to open %s for writing", filename);
+            return(-1);
+       }
+        res = write(fd, mem, size);
+        close(fd);
+        return(res != size);
+    }
+
+    if (stat(filename, &info) < 0) {
+        fprintf(stderr, "failed to stat %s\n", filename);
        return(-1);
-    if (info.st_size != size)
+    }
+    if (info.st_size != size) {
+        fprintf(stderr, "file %s is %ld bytes, result is %d bytes\n",
+               filename, info.st_size, size);
         return(-1);
+    }
     fd = open(filename, RD_FLAGS);
-    if (fd < 0)
+    if (fd < 0) {
+       fprintf(stderr, "failed to open %s for reading", filename);
         return(-1);
+    }
     while (idx < size) {
         res = read(fd, bytes, 4096);
        if (res <= 0)
@@ -671,6 +714,9 @@ static int compareFileMem(const char *filename, const char *mem, int size) {
        idx += res;
     }
     close(fd);
+    if (idx != size) {
+       fprintf(stderr,"Compare error index %d, size %d\n", idx, size);
+    }
     return(idx != size);
 }
 
@@ -1827,7 +1873,7 @@ pushParseTest(const char *filename, const char *result,
     ctxt = xmlCreatePushParserCtxt(NULL, NULL, base + cur, 4, filename);
     xmlCtxtUseOptions(ctxt, options);
     cur += 4;
-    while (cur < size) {
+    do {
         if (cur + 1024 >= size) {
 #ifdef LIBXML_HTML_ENABLED
            if (options & XML_PARSE_HTML)
@@ -1845,7 +1891,7 @@ pushParseTest(const char *filename, const char *result,
            xmlParseChunk(ctxt, base + cur, 1024, 0);
            cur += 1024;
        }
-    }
+    } while (cur < size);
     doc = ctxt->myDoc;
 #ifdef LIBXML_HTML_ENABLED
     if (options & XML_PARSE_HTML)
@@ -1871,7 +1917,7 @@ pushParseTest(const char *filename, const char *result,
     if ((base == NULL) || (res != 0)) {
        if (base != NULL)
            xmlFree((char *)base);
-        fprintf(stderr, "Result for %s failed\n", filename);
+        fprintf(stderr, "Result for %s failed in %s\n", filename, result);
        return(-1);
     }
     xmlFree((char *)base);
@@ -1926,7 +1972,7 @@ memParseTest(const char *filename, const char *result,
     if ((base == NULL) || (res != 0)) {
        if (base != NULL)
            xmlFree((char *)base);
-        fprintf(stderr, "Result for %s failed\n", filename);
+        fprintf(stderr, "Result for %s failed in %s\n", filename, result);
        return(-1);
     }
     xmlFree((char *)base);
@@ -2037,16 +2083,16 @@ errParseTest(const char *filename, const char *result, const char *err,
            xmlDocDumpMemory(doc, (xmlChar **) &base, &size);
        }
        res = compareFileMem(result, base, size);
+       if (res != 0) {
+           fprintf(stderr, "Result for %s failed in %s\n", filename, result);
+           return(-1);
+       }
     }
     if (doc != NULL) {
        if (base != NULL)
            xmlFree((char *)base);
        xmlFreeDoc(doc);
     }
-    if (res != 0) {
-        fprintf(stderr, "Result for %s failed\n", filename);
-       return(-1);
-    }
     if (err != NULL) {
        res = compareFileMem(err, testErrors, testErrorsSize);
        if (res != 0) {
@@ -2159,7 +2205,7 @@ streamProcessTest(const char *filename, const char *result, const char *err,
             free(temp);
         }
        if (ret) {
-           fprintf(stderr, "Result for %s failed\n", filename);
+           fprintf(stderr, "Result for %s failed in %s\n", filename, result);
            return(-1);
        }
     }
@@ -2362,7 +2408,7 @@ xpathCommonTest(const char *filename, const char *result,
     if (result != NULL) {
        ret = compareFiles(temp, result);
        if (ret) {
-           fprintf(stderr, "Result for %s failed\n", filename);
+           fprintf(stderr, "Result for %s failed in %s\n", filename, result);
        }
     }
 
@@ -2533,7 +2579,7 @@ xmlidDocTest(const char *filename,
     if (result != NULL) {
        ret = compareFiles(temp, result);
        if (ret) {
-           fprintf(stderr, "Result for %s failed\n", filename);
+           fprintf(stderr, "Result for %s failed in %s\n", filename, result);
            res = 1;
        }
     }
@@ -2661,7 +2707,7 @@ uriCommonTest(const char *filename,
     if (result != NULL) {
        ret = compareFiles(temp, result);
        if (ret) {
-           fprintf(stderr, "Result for %s failed\n", filename);
+           fprintf(stderr, "Result for %s failed in %s\n", filename, result);
            res = 1;
        }
     }
@@ -3430,11 +3476,11 @@ patternTest(const char *filename,
     result[499] = 0;
     memcpy(xml + len, ".xml", 5);
 
-    if (!checkTestFile(xml)) {
+    if (!checkTestFile(xml) && !update_results) {
        fprintf(stderr, "Missing xml file %s\n", xml);
        return(-1);
     }
-    if (!checkTestFile(result)) {
+    if (!checkTestFile(result) && !update_results) {
        fprintf(stderr, "Missing result file %s\n", result);
        return(-1);
     }
@@ -3533,7 +3579,7 @@ patternTest(const char *filename,
 
     ret = compareFiles(temp, result);
     if (ret) {
-       fprintf(stderr, "Result for %s failed\n", filename);
+       fprintf(stderr, "Result for %s failed in %s\n", filename, result);
        ret = 1;
     }
     if (temp != NULL) {
@@ -3805,7 +3851,7 @@ c14nCommonTest(const char *filename, int with_comments, int mode,
     prefix[len] = 0;
 
     snprintf(buf, 499, "result/c14n/%s/%s", subdir,prefix);
-    if (!checkTestFile(buf)) {
+    if (!checkTestFile(buf) && !update_results) {
         fprintf(stderr, "Missing result file %s", buf);
        return(-1);
     }
@@ -4354,9 +4400,9 @@ launchTests(testDescPtr tst) {
            } else {
                error = NULL;
            }
-           if ((result) &&(!checkTestFile(result))) {
+           if ((result) &&(!checkTestFile(result)) && !update_results) {
                fprintf(stderr, "Missing result file %s\n", result);
-           } else if ((error) &&(!checkTestFile(error))) {
+           } else if ((error) &&(!checkTestFile(error)) && !update_results) {
                fprintf(stderr, "Missing error file %s\n", error);
            } else {
                mem = xmlMemUsed();
@@ -4440,6 +4486,8 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
     for (a = 1; a < argc;a++) {
         if (!strcmp(argv[a], "-v"))
            verbose = 1;
+        else if (!strcmp(argv[a], "-u"))
+           update_results = 1;
         else if (!strcmp(argv[a], "-quiet"))
            tests_quiet = 1;
        else {
index eb4befe..6200f2d 100644 (file)
@@ -133,7 +133,7 @@ struct _xmlSchematron {
     int flags;                 /* specific to this schematron */
 
     void *_private;            /* unused by the library */
-    xmlDictPtr dict;           /* the dictionnary used internally */
+    xmlDictPtr dict;           /* the dictionary used internally */
 
     const xmlChar *title;      /* the title if any */
 
@@ -186,7 +186,7 @@ struct _xmlSchematronParserCtxt {
     const char *buffer;
     int size;
 
-    xmlDictPtr dict;            /* dictionnary for interned string names */
+    xmlDictPtr dict;            /* dictionary for interned string names */
 
     int nberrors;
     int err;
@@ -245,7 +245,7 @@ xmlSchematronPErrMemory(xmlSchematronParserCtxtPtr ctxt,
  *
  * Handle a parser error
  */
-static void
+static void LIBXML_ATTR_FORMAT(4,0)
 xmlSchematronPErr(xmlSchematronParserCtxtPtr ctxt, xmlNodePtr node, int error,
               const char *msg, const xmlChar * str1, const xmlChar * str2)
 {
diff --git a/test/HTML/758605.html b/test/HTML/758605.html
new file mode 100644 (file)
index 0000000..9b1b3c2
--- /dev/null
@@ -0,0 +1 @@
+&:ê
diff --git a/test/HTML/758606.html b/test/HTML/758606.html
new file mode 100644 (file)
index 0000000..01a013c
--- /dev/null
@@ -0,0 +1 @@
+<!--\f<!doctype
diff --git a/test/HTML/758606_2.html b/test/HTML/758606_2.html
new file mode 100644 (file)
index 0000000..daa185b
--- /dev/null
@@ -0,0 +1 @@
+<!--\f\91<!dOctYPE
diff --git a/test/XPath/docs/ns b/test/XPath/docs/ns
new file mode 100644 (file)
index 0000000..88f4575
--- /dev/null
@@ -0,0 +1,3 @@
+<doc xmlns:ns1="nsuri1">
+  <elem xmlns:ns2="nsuri2"/>
+</doc>
index 9aaed4f..f57e4d0 100644 (file)
@@ -3,3 +3,5 @@
 2*3
 1+2*3+4
 (1+2)*(3+4)
+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1
+self::-name
index daa53b7..17638f7 100644 (file)
@@ -7,3 +7,4 @@
 /child::EXAMPLE/child::head/node()
 /descendant::title
 /descendant::p/ancestor::chapter
+//p[1]
diff --git a/test/XPath/tests/nssimple b/test/XPath/tests/nssimple
new file mode 100644 (file)
index 0000000..d2a9528
--- /dev/null
@@ -0,0 +1,3 @@
+/doc/elem/namespace::node()/..
+/doc/elem/namespace::*/self::node()[true()]
+//*[namespace::ns1]
index 7e4203a..8b2c7d1 100644 (file)
@@ -5,5 +5,11 @@
 /child::EXAMPLE/child::head/child::title
 /child::EXAMPLE/child::head/child::title/child::text()
 /child::EXAMPLE/child::head/node()
+/child::EXAMPLE/attribute::prop1/self::node()
+/child::EXAMPLE/attribute::prop1/self::*
+/child::EXAMPLE/attribute::prop1/descendant-or-self::node()
+/child::EXAMPLE/attribute::prop1/descendant-or-self::*
+/child::EXAMPLE/attribute::prop1/ancestor-or-self::node()
+/child::EXAMPLE/attribute::prop1/ancestor-or-self::*
 /descendant::title
 /descendant::p/ancestor::chapter
diff --git a/test/cdata-2-byte-UTF-8.xml b/test/cdata-2-byte-UTF-8.xml
new file mode 100644 (file)
index 0000000..8552efc
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This tests that two-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). -->
+<doc>
+<p><![CDATA[ČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČ]]></p>
+<p><![CDATA[ ČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČČ]]></p>
+</doc>
diff --git a/test/cdata-3-byte-UTF-8.xml b/test/cdata-3-byte-UTF-8.xml
new file mode 100644 (file)
index 0000000..b959a12
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This tests that three-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). -->
+<doc>
+<p><![CDATA[牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛]]></p>
+<p><![CDATA[ 牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛]]></p>
+<p><![CDATA[  牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛]]></p>
+</doc>
diff --git a/test/cdata-4-byte-UTF-8.xml b/test/cdata-4-byte-UTF-8.xml
new file mode 100644 (file)
index 0000000..4d1d9a8
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This tests that four-byte UTF-8 characters are parsed properly when split across a buffer boundary of length XML_PARSER_BIG_BUFFER_SIZE (300 bytes). -->
+<doc>
+<p><![CDATA[🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦]]></p>
+<p><![CDATA[ 🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦]]></p>
+<p><![CDATA[  🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦]]></p>
+<p><![CDATA[   🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦🍦]]></p>
+</doc>
diff --git a/test/ent_738805.xml b/test/ent_738805.xml
new file mode 100644 (file)
index 0000000..9ec70b1
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE  somedoc [
+  <!ENTITY a   "something">
+  <!ENTITY b   "&a;">
+]>
+
+<somedoc>
+
+<somebeacon someattribute="&b;"/>
+
+&a; should appear after colon: &a;
+&b; should appear after colon: &a;
+&a; should appear after colon: &b;
+&b; should appear after colon: &b;
+
+</somedoc>
diff --git a/test/errors/754946.xml b/test/errors/754946.xml
new file mode 100644 (file)
index 0000000..6b5f9b0
--- /dev/null
@@ -0,0 +1 @@
+<!DOCTYPEA[<!ENTITY %\r\rSYSTEM "A<lbbbbbbbbbbbbbbbbbbb_"\r>%SYSTEM;<![
\ No newline at end of file
diff --git a/test/errors/754947.xml b/test/errors/754947.xml
new file mode 100644 (file)
index 0000000..bd9997e
--- /dev/null
@@ -0,0 +1 @@
+<d><![CDATA[0000000000000î]]>
\ No newline at end of file
diff --git a/test/errors/758588.xml b/test/errors/758588.xml
new file mode 100644 (file)
index 0000000..bec7e93
--- /dev/null
@@ -0,0 +1 @@
+<a-340282366920938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867209384634725979468672093846347259794686720938463472597946867261d:a></a
\ No newline at end of file
diff --git a/test/errors/759020.xml b/test/errors/759020.xml
new file mode 100644 (file)
index 0000000..db23275
--- /dev/null
@@ -0,0 +1,46 @@
+<?l 00000000000000000000000000000?>
+<s00 w0000="000" h00000="000"
+ xmlns = '00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'       
+                                                                              
+                                                                              
+                                                                              
+           
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                              
+                                                                   
\ No newline at end of file
diff --git a/test/errors/759398.xml b/test/errors/759398.xml
new file mode 100755 (executable)
index 0000000..132e029
--- /dev/null
@@ -0,0 +1,326 @@
+<?xml version='1.0' encoding='ISO-8859-5' standalone='no'?>
+<!DOCTYPE spec SYSTEM "dtds/spec.dtd" [
+
+<!-- LAST TOUCHED BY: Tim Bray, 8 February 1997 -->
+
+<!-- The words 'FINAL EDIT' in comments mark places where changes
+need to be made after approval of the document by the ERB, before
+publication.  -->
+
+<!ENTITY XML.version "1.0">
+<!ENTITY doc.date "10 February 1998">
+<!ENTITY iso6.doc.date "19980210">
+<!ENTITY w3c.doc.date "02-Feb-1998">
+<!ENTITY draft.day '10'>
+<!ENTITY draft.month 'February'>
+<!ENTITY draft.year '1998'>
+
+<!ENTITY WebSGML 
+ 'WebSGML Adaptations Annex to ISO 8879'>
+
+<!ENTITY lt     "<"> 
+<!ENTITY gt     ">"> 
+<!ENTITY xmlpio "'&lt;?xml'">
+<!ENTITY pic    "'?>'">
+<!ENTITY br     "\n">
+<!ENTITY cellback '#c0d9c0'>
+<!ENTITY mdash  "--"> <!-- &#x2014, but nsgmls doesn't grok hex -->
+<!ENTITY com    "--">
+<!ENTITY como   "--">
+<!ENTITY comc   "--">
+<!ENTITY hcro   "&amp;#x">
+<!-- <!ENTITY nbsp " "> -->
+<!ENTITY nbsp   "&#160;">
+<!ENTITY magicents "<code>amp</code>,
+<code>lt</code>,
+<code>gt</code>,
+<code>apos</code>,
+<code>quot</code>">
+<!-- audience and distribution status:  for use at publication time -->
+<!ENTITY doc.audience "public review and discussion">
+<!ENTITY doc.distribution "may be dislributed freely, as long as
+all text and legal notices remain intact">
+
+]>
+
+<!-- for Panorama *-->
+<?VERBATIM "eg" ?>
+
+<spec>
+<header>
+<title>Extensible Markup Language (XML) 1.0</title>
+<version></version>
+<w3c-designation>REC-xml-&iso6.doc.date;</w3c-designation>
+<w3c-doctype>W3C Recommendation</w3c-doctype>
+<pubdate><day>&draft.day;</day><month>&draft.month;</month><year>&draft.year;</year></pubdate>
+
+<publoc>
+<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;">
+http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;</loc>
+<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.xml">
+http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.xml</loc>
+<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.html">
+http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.html</loc>
+<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.pdf">
+http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.pdf</loc>
+<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.ps">
+http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.ps</loc>
+</publoc>
+<latestloc>
+<loc  href="http://www.w3.org/TR/REC-xml">
+httÿÿÿ\80www.w3.org/TR/REC-xml</loc>
+</latestloc>
+<prevlocs>
+<loc  href="http://www.w3.org/TR/PR-xml-971208">
+http://www.w3.org/TR/PR-xml-971208</loc>
+<!--
+<loc  href='http://www.w3.org/TR/WD-xml-961114'>
+http://www.w3.org/TR/WD-xml-961114</loc>
+<loc  href='http://www.w3.org/TR/WD-xml-lang-970331'>
+http://www.w3.org/TR/WD-xml-lang-970331</loc>
+<loc  href='http://www.w3.org/TR/WD-xml-lang-970630'>
+http://www.w3.org/TR/WD-xml-lang-970630</loc>
+<loc  href='http://www.w3.org/TR/WD-xml-970807'>
+http://www.w3.org/TR/WD-xml-970807</loc>
+<loc  href='http://www.w3.org/TR/WD-xml-971117'>
+http://www.w3.org/TR/WD-xml-971117</loc>-->
+</prevlocs>
+<authlist>
+<author><name>Tim Bray</name>
+<affiliation>Textuality and Netscape</affiliation>
+<email 
+href="mailto:tbray@textuality.com">tbray@textuality.com</email></author>
+<author><name>Jean Paoli</name>
+<affiliation>Microsoft</affiliation>
+<email href="mailto:jeanpa@microsoft.com">jeanpa@microsoft.com</email></author>
+<author><name>C. M. Sperberg-McQueen</name>
+<affiliation>University of Illinois at Chicago</affiliation>
+<email href="mailto:cmsmcq@uic.edu">cmsmcq@uic.edu</email></author>
+</authlist>
+<abstract>
+<p>The Extensible Markup Language (XML) is a subset of
+SGML that is completely described in this document. Its goal is to
+enable generic SGML to be served, received, and processed on the Web
+in the way that is now possible with HTML. XML has been designed for
+ease of implementation and for interoperability with both SGML and
+HTML.</p>
+</abstract>
+<status>
+<p>This document has been reviewed by W3C Members and
+other interested parties and has been endorsed by the
+Director as a W3C Recommendation. It is a stable
+document and may be used as reference material or cited
+as a normative reference from another document. W3C's
+role in making the Recommendation is to draw attention
+to the spPcification and to promote its widespread
+deployment. This enhances the functionality and
+interoperability of the Web.</p>
+<p>
+This document specifies a syntax created by subsetting an existing,
+widely used international text processing standard (Standard
+Generalized Markup Language, ISO 8879:1986(E) as amended and
+corrected) for use on the World Wide Web.  It is a product of the W3C
+XML Activity, details of which can be found at <loc
+href='http://www.w3.org/XML'>http://www.w3.org/XML</loc>.  A list of
+current W3C Recommendations and other technical documents can be found
+at <loc href='http://www.w3.org/TR'>http://www.w3.org/TR</loc>.
+</p>
+<p>This specification uses the term URI, which is defined by <bibref
+ref="Berners-Lee"/>, a work in progress expected to update <bibref
+ref="RFC1738"/> and <bibref ref="RFC1808"/>. 
+</p>
+<p>The list of known errors in this specification is 
+available at 
+<loc href='http://www.w3.org/XML/xml-19980210-errata'>http://www.w3.org/XML/xml-19980210-errata</loc>.</p>
+<p>Please report errors in this document to 
+<loc href='mailto:xml-editor@w3.org'>xml-editor@w3.org</loc>.
+</p>
+</status>
+
+
+<pubstmt>
+<p>Chicago, Vancouver, Mountain View, et al.:
+World-Wide Web Consortium, XML Working Group, 1996, 1997.</p>
+</pubstmt>
+<sourcedesc>
+<p>Created in electronic form.</p>
+</sourcedesc>
+<langusage>
+<language id='EN'>English</language>
+<language id='ebnf'>Extended Backus-Naur Form (formal grammar)</language>
+</langusage>
+<revisiondesc>
+<slist>
+<sitem>1997-12-03 : CMSMcQ : yet further changes</sitem>
+<sitem>1997-12-02 : TB : further changes (see TB to XML WG,
+2 December 1997)</sitem>
+<sitem>1997-12-02 : CMSMcQ : deal with as many corrections and
+comments from the proofreaders as possible:
+entify hard-coded document date in pubdate element,
+change expansion of entity WebSGML,
+update status description as per Dan Connolly (am not sure
+about refernece to Berners-Lee et al.),
+add 'The' to abstract as per WG decision,
+move Relationship to Existing Standards to back matter and
+combine with References,
+re-order back matter so normative appendices come first,
+re-tag back matter so informative appendices are tagged informdiv1,
+remove XXX XXX from list of 'normative' specs in prose,
+move some references from Other References to Normative References,
+add RFC 1738, 1808, and 2141 to Other References (they are not
+normative since we do not require the processor to enforce any 
+rules based on them),
+add reference to 'Fielding draft' (Berners-Lee et al.),
+move notation section to end of body,
+drop URIchar non-terminal and use SkipLit instead,
+lose stray reference to defunct nonterminal 'markupdecls',
+move reference to Aho et al. into appendix (Tim's right),
+add prose note saying that hash marks and fragment identifiers are
+NOT part of the URI formally speaking, and are NOT legal in 
+system identifiers (processor 'may' signal an error).
+Work through:
+Tim Bray reacting to James Clark,
+Tim Bray on his own,
+Eve Maler,
+
+NOT DONE YET:
+change binary / text to unparsed / parsed.
+handle James's suggestion about &lt; in attriubte values
+uppercase hex characters,
+namechar list,
+</sitem>
+<sitem>1997-12-01 : JB : add some column-width parameters</sitem>
+<sitem>1997-12-01 : CMSMcQ : begin round of changes to incorporate
+recent WG decisions and other corrections:
+binding sources of character encoding info (27 Aug / 3 Sept),
+correct wording of Faust quotation (restore dropped line),
+drop SDD from EncodingDecl,
+change text at version number 1.0,
+drop misleading (wrong!) sentence about ignorables and extenders,
+modify definÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙxamples with Byte Order Mark.
+Add content model as a term and clarify that it applies to both
+mixed and element content.
+</sitem>
+<sitem>1997-06-30 : CMSMcQ : change date, some cosmetic changes,
+changes to productions for choice, seq, Mixed, NotationType,
+Enumeration.  Follow James Clark's suggestion and prohibit 
+conditional sections in internal subset.  TO DO:  simplify
+production for ignored sections as a result, since we don't 
+need to worry about parsers whi<! don't expand PErefs finding
+a conditional section.</sitem>
+<sitem>1997-06-29 : TB : various edits</sitem>
+<sitem>1997-06-29 : CMSMcQ : further changes:
+Suppress old FINAL EDIT comments and some dead material.
+Revise occurrences of % in grammar to exploit Henry Thompson's pun,
+especially markupdecl and attdef.
+Remove RMD requirement relating to element content (?).
+</sitem>
+<sitem>1997-06-28 : CMSMcQ : Various changes for 1 July draft:
+Add text for draconian error handling (introduce
+the term Fatal Error).
+RE deleta est (changing wording from 
+original announcement to restrict the requirement to validating
+parsers).
+Tag definition of validawwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww it meant 'may or may not'.</sitem>
+<sitem>1997-03-21 : TB : massive changes on plane flight from Chicago
+to Vancouver</sitem>
+<sitem>1997-03-21 : CMSMcQ : correct as many reported errors as possible.
+</sitem>
+<sitem>1997-03-20 : CMSMcQ : correct typos listed in CMSMcQ hand copy of spec.</sitem>
+<sitem>1997 James Clark:
+Define the set of characters from which [^abc] subtracts.
+Charref should use just [0-9] not Digit.
+Location info needs cleaner treatment:  remove?  (ERB
+question).
+One example of a PI has wrong pic.
+Clarify discussion of encoding names.
+Encoding failure should lead to unspecified results; don't
+prescribe error recovery.
+Don't require exposure of entity boundaries.
+Ignore white space in element content.
+Reserve entity names of the form u-NNNN.
+Clarify relative URLs.
+And some of my own:
+Correct productions for content model:  model cannot
+consist of a name, so "elements ::= cp" is no good.
+</sitem>
+<sitem>1996-11-11 : CMSMcQ : revise for style.
+Add new rhs to entity declaration, for parameter entities.</sitem>
+<sitem>1996-11-10 : CMSMcQ : revise for style.
+Fix / complete section on names, characters.
+Add sections on parameter entities, conditional sections.
+Still to do:  Add compatibility note on deterministic content models.
+Finish stylistic revision.</sitem>
+<sitem>1996-10-31 : TB : Add Entity Handling section</sitem>
+<sitem>1996-10-30 : TB : Clean up term &amp; termdef.  Slip in
+ERB decision re EMPTY.</sitem>
+<sitem>1996-10-28 : TB : Change DTD.  Implement some of Michael's
+suggestions.  Change comments back to //.  Introduce language for
+XML namespace reservation.  Add section on white-space handling.
+Lots more cleanup.</sitem>
+<sitem>1996-10-24 : CMSMcQ : quick tweaks, implement some ERB
+decisions.  Characters are not integers.  Comments are /* */ not //.
+Add bibliographic refs to 10646, HyTime, Unicode.
+Rename old Cdata as MsData since it's <emph>only</emph> seen
+in marked sections.  Call them attribute-value pairs not
+name-value pairs, except once.  Internal subset is optional, needs
+'?'.  Implied attributes should be signaled to the app, not
+have values supplied by processor.</sitem>
+<sitem>1996-10-16 : TB : track down &amp; excise all DSD references;
+introduce some EBNF for entity declarations.</sitem>
+<sitem>1996-10-?? nsistency check, fix up scraps so
+they all parse, get formatter working, correct a few productions.</sitem>
+<sitem>1996-10-10/11 : CMSMcQ : various maintenance, stylistic, and
+organizational changes:
+Replace a few literals with xmlpio and
+pi""entities, to make them consistent and ensure we can change pic
+reliably when the ERB votes.
+Drop paragraph on recognizers from notation section.
+Add match, exact match to terminology.
+Move old 2.2 XML Processors and Apps into intro.
+Mention comments, PIs, and marked sections in discussion of
+delimiter escaping.
+Streamline discussion of doctype decl syntax.
+Drop old section of 'PI syntax' for doctype decl, and add
+section on partial-DTD summary PIs to end of Logical Structures
+section.
+Revise DSD syntax section to use Tim's subset-in-a-PI
+mechanism.</sitem>
+<sitem>1996-10-10 : TB : eliminate name recognizers (and more?)</sitem>
+<sitem>1996-10-09 : CMSMcQ : revise for style, consistency through 2.3
+(Characters)</sitem>
+<sitem>1996-10-09 : CMSMcQ : re-unite everything for convenience,
+at least temporarily, and revise quickly</sitem>
+<sitem>1996-10-08 : TB : first major homogenization pass</sitem>
+<sitem>1996-10-08 : TB : turn "current" attribute on div type into 
+CDATA</sitem>
+<sitem>1996-10-02 : TB : remould into skeleton + entities</sitem>
+<sitem>1996-09-30 : CMSMcQ : add a few more sections prior to exchange
+                            with Tim.</sitem>
+<sitem>1996-09-20 : CMSMcQ : finish transcribing notes.</sitem>
+<sitem>1996-09-19 : CMSMcQ : begin transcribing notes for draft.</sitem>
+<sitem>1996-09-13 : CMSMcQ : made outline from notes of 09-06,
+do some housekeeping</sitem>
+</slist>
+</revisiondesc>
+</header>
+<ðððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððððm> is used to read XML documents
+and provide access to their content and structure.</termdef> <termdef
+id="dt-app" term="Application">It is @ssumed that an XML processor is
+doing its work on behalf of another module, called the
+<term>application</term>.</termdef> This specification describes the
+required beh\vior of an XML processor in terms of how it must read XML
+data and the information it must provide to the application.</p>
+<div2 id='sec-origin-goals'>
+<head>Origin and Goals</head>
+<p>XML was developed by an XML Working Group (orisable over the
+Internet.</p></item>
+<item><p>XML shall support a wide varie\8fy of applications.</p></item>
+<item><p>XML shall be compatible with SGML.</p></item>
+<item><p>It shall be easy to write programs which process XML
+documents.</p></item>
+<item><p>The number of optional features in XML is to be kept to the
+absolute minimum, ideally zero.</p></item>
+<item><p>XML documents shou
\ No newline at end of file
diff --git a/test/errors/759573-2.xml b/test/errors/759573-2.xml
new file mode 100644 (file)
index 0000000..5ad655f
--- /dev/null
@@ -0,0 +1,9 @@
+<?xmh ven="1.0"?>
+<!DOCTYPE test [
+<!ELEMENT test (#PCDATA) >
+<!ENTITY % xx '&#37;zz;\r<![INCLUDE[\r&#37;zz;<!ELEMENTD(&#37;MENT&#37;MENTD&#377;MENTD&#37;zNMT9KENSMYSYSTEM;MENT9&#37;zz;'>
+<!ENTITY % zz '&#60;!ENTITY<?xDOCTYPEm~?>' >
+%xx;\ 3ÿggKENSMYNT&#35;MENTD&#372zz;'>
+<!ENBITY % zz '&#60;!EN#3&##37;z ';!EY'#x;g
+<!ENTent ref="bè\ 3:b>r.B"/>                             
+e\1c             </
\ No newline at end of file
diff --git a/test/errors/759573.xml b/test/errors/759573.xml
new file mode 100644 (file)
index 0000000..69ebb57
--- /dev/null
@@ -0,0 +1 @@
+<?h?><!DOCTYPEt[<!ELEMENT t (A)><!ENTITY % xx '&#37;<![INCLUDE[000&#37;&#3000;000&#37;z;'><!ENTITYz>%xx;
\ No newline at end of file
diff --git a/test/relaxng/565219.rng b/test/relaxng/565219.rng
new file mode 100644 (file)
index 0000000..087ed95
--- /dev/null
@@ -0,0 +1,14 @@
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+  <start>
+   <element>
+      <anyName>
+        <except>
+          <nsName ns="http://bar.com/"/>
+          <nsName ns="http://foo.com/"/>
+        </except>
+      </anyName>
+      <empty/>
+   </element>
+  </start>
+</grammar>
+
diff --git a/test/relaxng/565219_0.xml b/test/relaxng/565219_0.xml
new file mode 100644 (file)
index 0000000..a964a07
--- /dev/null
@@ -0,0 +1 @@
+<foo xmlns="http://foo.com/"/>
diff --git a/test/relaxng/565219_1.xml b/test/relaxng/565219_1.xml
new file mode 100644 (file)
index 0000000..f1999f8
--- /dev/null
@@ -0,0 +1 @@
+<foo/>
diff --git a/test/relaxng/565219_2.xml b/test/relaxng/565219_2.xml
new file mode 100644 (file)
index 0000000..a964a07
--- /dev/null
@@ -0,0 +1 @@
+<foo xmlns="http://foo.com/"/>
diff --git a/test/relaxng/pattern3.rng b/test/relaxng/pattern3.rng
new file mode 100644 (file)
index 0000000..fa4434f
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<grammar xmlns="http://relaxng.org/ns/structure/1.0"
+datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+  <start>
+    <element name="test">
+    <data type="token">
+    <param name="pattern">[a-z]+</param>
+    </data>
+    </element>
+  </start>
+</grammar>
diff --git a/test/relaxng/pattern3_1.xml b/test/relaxng/pattern3_1.xml
new file mode 100644 (file)
index 0000000..f559cd3
--- /dev/null
@@ -0,0 +1 @@
+<test> ooo </test>
diff --git a/test/valid/737840.xml b/test/valid/737840.xml
new file mode 100644 (file)
index 0000000..2d27b73
--- /dev/null
@@ -0,0 +1,10 @@
+<!DOCTYPE root [
+<!ELEMENT root (elem)>
+<!ELEMENT elem (#PCDATA)>
+<!ATTLIST elem id ID #IMPLIED>
+<!ENTITY target SYSTEM "dtds/737840.ent">
+]>
+
+<root>
+  &target;
+</root>
diff --git a/test/valid/dtds/737840.ent b/test/valid/dtds/737840.ent
new file mode 100644 (file)
index 0000000..e972132
--- /dev/null
@@ -0,0 +1 @@
+<elem id="id0"/>
\ No newline at end of file
index e399f5c..77b7ba1 100644 (file)
@@ -47,7 +47,7 @@ int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
 
     /* build the module filename, and confirm the module exists */
     xmlStrPrintf(filename, sizeof(filename),
-                 (const xmlChar*) "%s/testdso%s",
+                 "%s/testdso%s",
                  (const xmlChar*)MODULE_PATH,
                 (const xmlChar*)LIBXML_MODULE_EXTENSION);
 
index 0367ffd..60f4bdd 100644 (file)
--- a/testapi.c
+++ b/testapi.c
@@ -1034,10 +1034,10 @@ static void des_xmlAttributeType(int no ATTRIBUTE_UNUSED, xmlAttributeType val A
 
 #define gen_nb_xmlBufferAllocationScheme 4
 static xmlBufferAllocationScheme gen_xmlBufferAllocationScheme(int no, int nr ATTRIBUTE_UNUSED) {
-    if (no == 1) return(XML_BUFFER_ALLOC_DOUBLEIT);
-    if (no == 2) return(XML_BUFFER_ALLOC_EXACT);
-    if (no == 3) return(XML_BUFFER_ALLOC_HYBRID);
-    if (no == 4) return(XML_BUFFER_ALLOC_IMMUTABLE);
+    if (no == 1) return(XML_BUFFER_ALLOC_BOUNDED);
+    if (no == 2) return(XML_BUFFER_ALLOC_DOUBLEIT);
+    if (no == 3) return(XML_BUFFER_ALLOC_EXACT);
+    if (no == 4) return(XML_BUFFER_ALLOC_HYBRID);
     return(0);
 }
 
@@ -8175,7 +8175,7 @@ test_xmlDictCreateSub(void) {
 
     int mem_base;
     xmlDictPtr ret_val;
-    xmlDictPtr sub; /* an existing dictionnary */
+    xmlDictPtr sub; /* an existing dictionary */
     int n_sub;
 
     for (n_sub = 0;n_sub < gen_nb_xmlDictPtr;n_sub++) {
@@ -8207,7 +8207,7 @@ test_xmlDictExists(void) {
 
     int mem_base;
     const xmlChar * ret_val;
-    xmlDictPtr dict; /* the dictionnary */
+    xmlDictPtr dict; /* the dictionary */
     int n_dict;
     xmlChar * name; /* the name of the userdata */
     int n_name;
@@ -8263,7 +8263,7 @@ test_xmlDictLookup(void) {
 
     int mem_base;
     const xmlChar * ret_val;
-    xmlDictPtr dict; /* the dictionnary */
+    xmlDictPtr dict; /* the dictionary */
     int n_dict;
     xmlChar * name; /* the name of the userdata */
     int n_name;
@@ -8309,7 +8309,7 @@ test_xmlDictOwns(void) {
 
     int mem_base;
     int ret_val;
-    xmlDictPtr dict; /* the dictionnary */
+    xmlDictPtr dict; /* the dictionary */
     int n_dict;
     xmlChar * str; /* the string */
     int n_str;
@@ -8348,7 +8348,7 @@ test_xmlDictQLookup(void) {
 
     int mem_base;
     const xmlChar * ret_val;
-    xmlDictPtr dict; /* the dictionnary */
+    xmlDictPtr dict; /* the dictionary */
     int n_dict;
     xmlChar * prefix; /* the prefix */
     int n_prefix;
@@ -8394,7 +8394,7 @@ test_xmlDictReference(void) {
 
     int mem_base;
     int ret_val;
-    xmlDictPtr dict; /* the dictionnary */
+    xmlDictPtr dict; /* the dictionary */
     int n_dict;
 
     for (n_dict = 0;n_dict < gen_nb_xmlDictPtr;n_dict++) {
@@ -8437,7 +8437,7 @@ test_xmlDictSize(void) {
 
     int mem_base;
     int ret_val;
-    xmlDictPtr dict; /* the dictionnary */
+    xmlDictPtr dict; /* the dictionary */
     int n_dict;
 
     for (n_dict = 0;n_dict < gen_nb_xmlDictPtr;n_dict++) {
index 4e8581f..40bebd0 100644 (file)
@@ -277,7 +277,7 @@ static int run_test2(xmlDictPtr parent) {
        cur++;
        *pref = 0;
        tmp = xmlDictQLookup(dict, &prefix[0], cur);
-       if (xmlDictQLookup(dict, &prefix[0], cur) != test2[i]) {
+       if (tmp != test2[i]) {
            fprintf(stderr, "Failed lookup check for '%s':'%s'\n",
                    &prefix[0], cur);
             ret = 1;
@@ -408,7 +408,7 @@ static int run_test1(void) {
        cur++;
        *pref = 0;
        tmp = xmlDictQLookup(dict, &prefix[0], cur);
-       if (xmlDictQLookup(dict, &prefix[0], cur) != test1[i]) {
+       if (tmp != test1[i]) {
            fprintf(stderr, "Failed lookup check for '%s':'%s'\n",
                    &prefix[0], cur);
             ret = 1;
index 8921204..b9d6cae 100644 (file)
--- a/threads.c
+++ b/threads.c
@@ -47,7 +47,7 @@
 #ifdef HAVE_PTHREAD_H
 
 static int libxml_is_threaded = -1;
-#ifdef __GNUC__
+#if defined(__GNUC__) && defined(__GLIBC__)
 #ifdef linux
 #if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3)
 extern int pthread_once (pthread_once_t *__once_control,
@@ -89,7 +89,7 @@ extern int pthread_cond_signal ()
           __attribute((weak));
 #endif
 #endif /* linux */
-#endif /* __GNUC__ */
+#endif /* defined(__GNUC__) && defined(__GLIBC__) */
 #endif /* HAVE_PTHREAD_H */
 
 /*
@@ -415,8 +415,8 @@ xmlRMutexUnlock(xmlRMutexPtr tok ATTRIBUTE_UNUSED)
     pthread_mutex_unlock(&tok->lock);
 #elif defined HAVE_WIN32_THREADS
     if (tok->count > 0) {
-        LeaveCriticalSection(&tok->cs);
        tok->count--;
+        LeaveCriticalSection(&tok->cs);
     }
 #elif defined HAVE_BEOS_THREADS
     if (tok->lock->tid == find_thread(NULL)) {
index efa3aab..795f272 100644 (file)
--- a/timsort.h
+++ b/timsort.h
@@ -392,62 +392,66 @@ static void TIM_SORT_MERGE(SORT_TYPE *dst, const TIM_SORT_RUN_T *stack, const in
 
 static int TIM_SORT_COLLAPSE(SORT_TYPE *dst, TIM_SORT_RUN_T *stack, int stack_curr, TEMP_STORAGE_T *store, const size_t size)
 {
-  while (1)
-  {
-    int64_t A, B, C;
+  while (1) {
+    int64_t A, B, C, D;
+    int ABC, BCD, BD, CD;
+
     /* if the stack only has one thing on it, we are done with the collapse */
-    if (stack_curr <= 1) break;
+    if (stack_curr <= 1) {
+      break;
+    }
+
     /* if this is the last merge, just do it */
-    if ((stack_curr == 2) &&
-        (stack[0].length + stack[1].length == (int64_t) size))
-    {
+    if ((stack_curr == 2) && (stack[0].length + stack[1].length == size)) {
       TIM_SORT_MERGE(dst, stack, stack_curr, store);
       stack[0].length += stack[1].length;
       stack_curr--;
       break;
     }
     /* check if the invariant is off for a stack of 2 elements */
-    else if ((stack_curr == 2) && (stack[0].length <= stack[1].length))
-    {
+    else if ((stack_curr == 2) && (stack[0].length <= stack[1].length)) {
       TIM_SORT_MERGE(dst, stack, stack_curr, store);
       stack[0].length += stack[1].length;
       stack_curr--;
       break;
-    }
-    else if (stack_curr == 2)
+    } else if (stack_curr == 2) {
       break;
+    }
 
-    A = stack[stack_curr - 3].length;
-    B = stack[stack_curr - 2].length;
-    C = stack[stack_curr - 1].length;
+    B = stack[stack_curr - 3].length;
+    C = stack[stack_curr - 2].length;
+    D = stack[stack_curr - 1].length;
 
-    /* check first invariant */
-    if (A <= B + C)
-    {
-      if (A < C)
-      {
-        TIM_SORT_MERGE(dst, stack, stack_curr - 1, store);
-        stack[stack_curr - 3].length += stack[stack_curr - 2].length;
-        stack[stack_curr - 2] = stack[stack_curr - 1];
-        stack_curr--;
-      }
-      else
-      {
-        TIM_SORT_MERGE(dst, stack, stack_curr, store);
-        stack[stack_curr - 2].length += stack[stack_curr - 1].length;
-        stack_curr--;
-      }
+    if (stack_curr >= 4) {
+      A = stack[stack_curr - 4].length;
+      ABC = (A <= B + C);
+    } else {
+      ABC = 0;
     }
-    /* check second invariant */
-    else if (B <= C)
-    {
+
+    BCD = (B <= C + D) || ABC;
+    CD = (C <= D);
+    BD = (B < D);
+
+    /* Both invariants are good */
+    if (!BCD && !CD) {
+      break;
+    }
+
+    /* left merge */
+    if (BCD && !CD) {
+      TIM_SORT_MERGE(dst, stack, stack_curr - 1, store);
+      stack[stack_curr - 3].length += stack[stack_curr - 2].length;
+      stack[stack_curr - 2] = stack[stack_curr - 1];
+      stack_curr--;
+    } else {
+      /* right merge */
       TIM_SORT_MERGE(dst, stack, stack_curr, store);
       stack[stack_curr - 2].length += stack[stack_curr - 1].length;
       stack_curr--;
     }
-    else
-      break;
   }
+
   return stack_curr;
 }
 
diff --git a/tree.c b/tree.c
index 307782c..9d330b8 100644 (file)
--- a/tree.c
+++ b/tree.c
@@ -1044,7 +1044,7 @@ xmlCreateIntSubset(xmlDocPtr doc, const xmlChar *name,
  * DICT_FREE:
  * @str:  a string
  *
- * Free a string if it is not owned by the "dict" dictionnary in the
+ * Free a string if it is not owned by the "dict" dictionary in the
  * current scope
  */
 #define DICT_FREE(str)                                         \
@@ -1057,7 +1057,7 @@ xmlCreateIntSubset(xmlDocPtr doc, const xmlChar *name,
  * DICT_COPY:
  * @str:  a string
  *
- * Copy a string using a "dict" dictionnary in the current scope,
+ * Copy a string using a "dict" dictionary in the current scope,
  * if availabe.
  */
 #define DICT_COPY(str, cpy) \
@@ -1074,7 +1074,7 @@ xmlCreateIntSubset(xmlDocPtr doc, const xmlChar *name,
  * DICT_CONST_COPY:
  * @str:  a string
  *
- * Copy a string using a "dict" dictionnary in the current scope,
+ * Copy a string using a "dict" dictionary in the current scope,
  * if availabe.
  */
 #define DICT_CONST_COPY(str, cpy) \
@@ -1451,9 +1451,9 @@ xmlStringLenGetNodeList(const xmlDoc *doc, const xmlChar *value, int len) {
        node->content = xmlBufDetach(buf);
 
        if (last == NULL) {
-           last = ret = node;
+           ret = node;
        } else {
-           last = xmlAddNextSibling(last, node);
+           xmlAddNextSibling(last, node);
        }
     } else if (ret == NULL) {
         ret = xmlNewDocText(doc, BAD_CAST "");
@@ -1593,6 +1593,7 @@ xmlStringGetNodeList(const xmlDoc *doc, const xmlChar *value) {
                        else if ((ent != NULL) && (ent->children == NULL)) {
                            xmlNodePtr temp;
 
+                           ent->children = (xmlNodePtr) -1;
                            ent->children = xmlStringGetNodeList(doc,
                                    (const xmlChar*)node->content);
                            ent->owner = 1;
@@ -1639,9 +1640,9 @@ xmlStringGetNodeList(const xmlDoc *doc, const xmlChar *value) {
        node->content = xmlBufDetach(buf);
 
        if (last == NULL) {
-           last = ret = node;
+           ret = node;
        } else {
-           last = xmlAddNextSibling(last, node);
+           xmlAddNextSibling(last, node);
        }
     }
 
@@ -2270,7 +2271,7 @@ xmlNewNodeEatName(xmlNsPtr ns, xmlChar *name) {
     cur = (xmlNodePtr) xmlMalloc(sizeof(xmlNode));
     if (cur == NULL) {
        xmlTreeErrMemory("building node");
-       /* we can't check here that name comes from the doc dictionnary */
+       /* we can't check here that name comes from the doc dictionary */
        return(NULL);
     }
     memset(cur, 0, sizeof(xmlNode));
@@ -2350,7 +2351,7 @@ xmlNewDocNodeEatName(xmlDocPtr doc, xmlNsPtr ns,
            UPDATE_LAST_CHILD_AND_PARENT(cur)
        }
     } else {
-        /* if name don't come from the doc dictionnary free it here */
+        /* if name don't come from the doc dictionary free it here */
         if ((name != NULL) && (doc != NULL) &&
            (!(xmlDictOwns(doc->dict, name))))
            xmlFree(name);
@@ -2799,8 +2800,27 @@ xmlSetTreeDoc(xmlNodePtr tree, xmlDocPtr doc) {
        if(tree->type == XML_ELEMENT_NODE) {
            prop = tree->properties;
            while (prop != NULL) {
+                if (prop->atype == XML_ATTRIBUTE_ID) {
+                    xmlRemoveID(tree->doc, prop);
+                }
+
                prop->doc = doc;
                xmlSetListDoc(prop->children, doc);
+
+                /*
+                 * TODO: ID attributes should be also added to the new
+                 * document, but this breaks things like xmlReplaceNode.
+                 * The underlying problem is that xmlRemoveID is only called
+                 * if a node is destroyed, not if it's unlinked.
+                 */
+#if 0
+                if (xmlIsID(doc, tree, prop)) {
+                    xmlChar *idVal = xmlNodeListGetString(doc, prop->children,
+                                                          1);
+                    xmlAddID(NULL, doc, idVal, prop);
+                }
+#endif
+
                prop = prop->next;
            }
        }
@@ -3682,7 +3702,7 @@ xmlFreeNodeList(xmlNodePtr cur) {
             * When a node is a text node or a comment, it uses a global static
             * variable for the name of the node.
             * Otherwise the node name might come from the document's
-            * dictionnary
+            * dictionary
             */
            if ((cur->name != NULL) &&
                (cur->type != XML_TEXT_NODE) &&
@@ -3751,7 +3771,7 @@ xmlFreeNode(xmlNodePtr cur) {
     /*
      * When a node is a text node or a comment, it uses a global static
      * variable for the name of the node.
-     * Otherwise the node name might come from the document's dictionnary
+     * Otherwise the node name might come from the document's dictionary
      */
     if ((cur->name != NULL) &&
         (cur->type != XML_TEXT_NODE) &&
diff --git a/uri.c b/uri.c
index ff47abb..2bd5720 100644 (file)
--- a/uri.c
+++ b/uri.c
@@ -314,7 +314,7 @@ xmlParse3986Query(xmlURIPtr uri, const char **str)
  * @uri:  pointer to an URI structure
  * @str:  the string to analyze
  *
- * Parse a port  part and fills in the appropriate fields
+ * Parse a port part and fills in the appropriate fields
  * of the @uri structure
  *
  * port          = *DIGIT
@@ -325,15 +325,16 @@ static int
 xmlParse3986Port(xmlURIPtr uri, const char **str)
 {
     const char *cur = *str;
+    unsigned port = 0; /* unsigned for defined overflow behavior */
 
     if (ISA_DIGIT(cur)) {
-       if (uri != NULL)
-           uri->port = 0;
        while (ISA_DIGIT(cur)) {
-           if (uri != NULL)
-               uri->port = uri->port * 10 + (*cur - '0');
+           port = port * 10 + (*cur - '0');
+
            cur++;
        }
+       if (uri != NULL)
+           uri->port = port & INT_MAX; /* port value modulo INT_MAX+1 */
        *str = cur;
        return(0);
     }
diff --git a/valid.c b/valid.c
index 409aa81..19f84b8 100644 (file)
--- a/valid.c
+++ b/valid.c
@@ -93,7 +93,7 @@ xmlVErrMemory(xmlValidCtxtPtr ctxt, const char *extra)
  *
  * Handle a validation error
  */
-static void
+static void LIBXML_ATTR_FORMAT(3,0)
 xmlErrValid(xmlValidCtxtPtr ctxt, xmlParserErrors error,
             const char *msg, const char *extra)
 {
@@ -137,7 +137,7 @@ xmlErrValid(xmlValidCtxtPtr ctxt, xmlParserErrors error,
  *
  * Handle a validation error, provide contextual informations
  */
-static void
+static void LIBXML_ATTR_FORMAT(4,0)
 xmlErrValidNode(xmlValidCtxtPtr ctxt,
                 xmlNodePtr node, xmlParserErrors error,
                 const char *msg, const xmlChar * str1,
@@ -180,7 +180,7 @@ xmlErrValidNode(xmlValidCtxtPtr ctxt,
  *
  * Handle a validation error, provide contextual informations
  */
-static void
+static void LIBXML_ATTR_FORMAT(4,0)
 xmlErrValidNodeNr(xmlValidCtxtPtr ctxt,
                 xmlNodePtr node, xmlParserErrors error,
                 const char *msg, const xmlChar * str1,
@@ -221,7 +221,7 @@ xmlErrValidNodeNr(xmlValidCtxtPtr ctxt,
  *
  * Handle a validation error, provide contextual information
  */
-static void
+static void LIBXML_ATTR_FORMAT(4,0)
 xmlErrValidWarning(xmlValidCtxtPtr ctxt,
                 xmlNodePtr node, xmlParserErrors error,
                 const char *msg, const xmlChar * str1,
@@ -2532,7 +2532,7 @@ xmlDumpNotationTable(xmlBufferPtr buf, xmlNotationTablePtr table) {
  * DICT_FREE:
  * @str:  a string
  *
- * Free a string if it is not owned by the "dict" dictionnary in the
+ * Free a string if it is not owned by the "dict" dictionary in the
  * current scope
  */
 #define DICT_FREE(str)                                         \
@@ -2634,8 +2634,10 @@ xmlAddID(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value,
        /*
         * The id is already defined in this DTD.
         */
-       xmlErrValidNode(ctxt, attr->parent, XML_DTD_ID_REDEFINED,
-                       "ID %s already defined\n", value, NULL, NULL);
+       if (ctxt != NULL) {
+           xmlErrValidNode(ctxt, attr->parent, XML_DTD_ID_REDEFINED,
+                           "ID %s already defined\n", value, NULL, NULL);
+       }
 #endif /* LIBXML_VALID_ENABLED */
        xmlFreeID(ret);
        return(NULL);
index 8629944..891b57e 100644 (file)
@@ -96,7 +96,9 @@ static int isnan (double d) {
 
 #if defined(_MSC_VER)
 #define mkdir(p,m) _mkdir(p)
+#if _MSC_VER < 1900 // Cannot define this in VS 2015 and above!
 #define snprintf _snprintf
+#endif
 #if _MSC_VER < 1500
 #define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
 #endif
index edd943a..92b9ba0 100644 (file)
@@ -14,7 +14,7 @@ var srcDirUtils = "..";
 var baseName = "libxml2";
 /* Configure file which contains the version and the output file where
    we can store our build configuration. */
-var configFile = srcDirXml + "\\configure.in";
+var configFile = srcDirXml + "\\configure.ac";
 var versionFile = ".\\config.msvc";
 /* Input and output files regarding the libxml features. */
 var optsFileIn = srcDirXml + "\\include\\libxml\\xmlversion.h.in";
index ff3dafb..e3bb43e 100644 (file)
@@ -125,7 +125,7 @@ xmlXIncludeErrMemory(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node,
  *
  * Handle an XInclude error
  */
-static void
+static void LIBXML_ATTR_FORMAT(4,0)
 xmlXIncludeErr(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node, int error,
                const char *msg, const xmlChar *extra)
 {
@@ -147,7 +147,7 @@ xmlXIncludeErr(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node, int error,
  *
  * Emit an XInclude warning.
  */
-static void
+static void LIBXML_ATTR_FORMAT(4,0)
 xmlXIncludeWarn(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node, int error,
                const char *msg, const xmlChar *extra)
 {
diff --git a/xmlIO.c b/xmlIO.c
index e628ab0..1a79c09 100644 (file)
--- a/xmlIO.c
+++ b/xmlIO.c
@@ -1334,7 +1334,7 @@ xmlGzfileClose (void * context) {
 }
 #endif /* HAVE_ZLIB_H */
 
-#ifdef HAVE_LZMA_H
+#ifdef LIBXML_LZMA_ENABLED
 /************************************************************************
  *                                                                     *
  *             I/O for compressed file accesses                        *
@@ -1451,7 +1451,7 @@ xmlXzfileClose (void * context) {
     if (ret < 0) xmlIOErr(0, "xzclose()");
     return(ret);
 }
-#endif /* HAVE_LZMA_H */
+#endif /* LIBXML_LZMA_ENABLED */
 
 #ifdef LIBXML_HTTP_ENABLED
 /************************************************************************
@@ -1604,7 +1604,7 @@ xmlCreateZMemBuff( int compression ) {
        xmlFreeZMemBuff( buff );
        buff = NULL;
        xmlStrPrintf(msg, 500,
-                   (const xmlChar *) "xmlCreateZMemBuff:  %s %d\n",
+                   "xmlCreateZMemBuff:  %s %d\n",
                    "Error initializing compression context.  ZLIB error:",
                    z_err );
        xmlIOErr(XML_IO_WRITE, (const char *) msg);
@@ -1672,7 +1672,7 @@ xmlZMemBuffExtend( xmlZMemBuffPtr buff, size_t ext_amt ) {
     else {
        xmlChar msg[500];
        xmlStrPrintf(msg, 500,
-                   (const xmlChar *) "xmlZMemBuffExtend:  %s %lu bytes.\n",
+                   "xmlZMemBuffExtend:  %s %lu bytes.\n",
                    "Allocation failure extending output buffer to",
                    new_size );
        xmlIOErr(XML_IO_WRITE, (const char *) msg);
@@ -1718,7 +1718,7 @@ xmlZMemBuffAppend( xmlZMemBuffPtr buff, const char * src, int len ) {
        if ( z_err != Z_OK ) {
            xmlChar msg[500];
            xmlStrPrintf(msg, 500,
-                       (const xmlChar *) "xmlZMemBuffAppend:  %s %d %s - %d",
+                       "xmlZMemBuffAppend:  %s %d %s - %d",
                        "Compression error while appending",
                        len, "bytes to buffer.  ZLIB error", z_err );
            xmlIOErr(XML_IO_WRITE, (const char *) msg);
@@ -1791,7 +1791,7 @@ xmlZMemBuffGetContent( xmlZMemBuffPtr buff, char ** data_ref ) {
     else {
        xmlChar msg[500];
        xmlStrPrintf(msg, 500,
-                   (const xmlChar *) "xmlZMemBuffGetContent:  %s - %d\n",
+                   "xmlZMemBuffGetContent:  %s - %d\n",
                    "Error flushing zlib buffers.  Error code", z_err );
        xmlIOErr(XML_IO_WRITE, (const char *) msg);
     }
@@ -1996,7 +1996,7 @@ xmlIOHTTPWrite( void * context, const char * buffer, int len ) {
        if ( len < 0 ) {
            xmlChar msg[500];
            xmlStrPrintf(msg, 500,
-                       (const xmlChar *) "xmlIOHTTPWrite:  %s\n%s '%s'.\n",
+                       "xmlIOHTTPWrite:  %s\n%s '%s'.\n",
                        "Error appending to internal buffer.",
                        "Error sending document to URI",
                        ctxt->uri );
@@ -2068,7 +2068,7 @@ xmlIOHTTPCloseWrite( void * context, const char * http_mthd ) {
     if ( http_content == NULL ) {
        xmlChar msg[500];
        xmlStrPrintf(msg, 500,
-                    (const xmlChar *) "xmlIOHTTPCloseWrite:  %s '%s' %s '%s'.\n",
+                    "xmlIOHTTPCloseWrite:  %s '%s' %s '%s'.\n",
                     "Error retrieving content.\nUnable to",
                     http_mthd, "data to URI", ctxt->uri );
        xmlIOErr(XML_IO_WRITE, (const char *) msg);
@@ -2140,7 +2140,7 @@ xmlIOHTTPCloseWrite( void * context, const char * http_mthd ) {
            else {
                 xmlChar msg[500];
                 xmlStrPrintf(msg, 500,
-    (const xmlChar *) "xmlIOHTTPCloseWrite: HTTP '%s' of %d %s\n'%s' %s %d\n",
+                      "xmlIOHTTPCloseWrite: HTTP '%s' of %d %s\n'%s' %s %d\n",
                            http_mthd, content_lgth,
                            "bytes to URI", ctxt->uri,
                            "failed.  HTTP return code:", http_rtn );
@@ -2328,10 +2328,10 @@ xmlRegisterDefaultInputCallbacks(void) {
     xmlRegisterInputCallbacks(xmlGzfileMatch, xmlGzfileOpen,
                              xmlGzfileRead, xmlGzfileClose);
 #endif /* HAVE_ZLIB_H */
-#ifdef HAVE_LZMA_H
+#ifdef LIBXML_LZMA_ENABLED
     xmlRegisterInputCallbacks(xmlXzfileMatch, xmlXzfileOpen,
                              xmlXzfileRead, xmlXzfileClose);
-#endif /* HAVE_ZLIB_H */
+#endif /* LIBXML_LZMA_ENABLED */
 
 #ifdef LIBXML_HTTP_ENABLED
     xmlRegisterInputCallbacks(xmlIOHTTPMatch, xmlIOHTTPOpen,
@@ -2683,7 +2683,7 @@ __xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc) {
 #endif
        }
 #endif
-#ifdef HAVE_LZMA_H
+#ifdef LIBXML_LZMA_ENABLED
        if ((xmlInputCallbackTable[i].opencallback == xmlXzfileOpen) &&
                (strcmp(URI, "-") != 0)) {
             ret->compressed = __libxml2_xzcompressed(context);
@@ -3350,7 +3350,7 @@ xmlParserInputBufferGrow(xmlParserInputBufferPtr in, int len) {
      * try to establish compressed status of input if not done already
      */
     if (in->compressed == -1) {
-#ifdef HAVE_LZMA_H
+#ifdef LIBXML_LZMA_ENABLED
        if (in->readcallback == xmlXzfileRead)
             in->compressed = __libxml2_xzcompressed(in->context);
 #endif
index b9ed6a4..006f0cc 100644 (file)
@@ -80,6 +80,7 @@ xmlShellReadline(const char *prompt) {
 
     if (prompt != NULL)
        fprintf(stdout, "%s", prompt);
+    fflush(stdout);
     if (!fgets(line_read, 500, stdin))
         return(NULL);
     line_read[500] = 0;
index b297ded..67f7adb 100644 (file)
--- a/xmllint.c
+++ b/xmllint.c
@@ -449,7 +449,7 @@ startTimer(void)
  *           message about the timing performed; format is a printf
  *           type argument
  */
-static void XMLCDECL
+static void XMLCDECL LIBXML_ATTR_FORMAT(1,2)
 endTimer(const char *fmt, ...)
 {
     long msec;
@@ -485,7 +485,7 @@ startTimer(void)
 {
     begin = clock();
 }
-static void XMLCDECL
+static void XMLCDECL LIBXML_ATTR_FORMAT(1,2)
 endTimer(const char *fmt, ...)
 {
     long msec;
@@ -514,7 +514,7 @@ startTimer(void)
      * Do nothing
      */
 }
-static void XMLCDECL
+static void XMLCDECL LIBXML_ATTR_FORMAT(1,2)
 endTimer(char *format, ...)
 {
     /*
@@ -634,7 +634,7 @@ xmlHTMLPrintFileContext(xmlParserInputPtr input) {
  * Display and format an error messages, gives file, line, position and
  * extra parameters.
  */
-static void XMLCDECL
+static void XMLCDECL LIBXML_ATTR_FORMAT(2,3)
 xmlHTMLError(void *ctx, const char *msg, ...)
 {
     xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
@@ -671,7 +671,7 @@ xmlHTMLError(void *ctx, const char *msg, ...)
  * Display and format a warning messages, gives file, line, position and
  * extra parameters.
  */
-static void XMLCDECL
+static void XMLCDECL LIBXML_ATTR_FORMAT(2,3)
 xmlHTMLWarning(void *ctx, const char *msg, ...)
 {
     xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
@@ -709,7 +709,7 @@ xmlHTMLWarning(void *ctx, const char *msg, ...)
  * Display and format an validity error messages, gives file,
  * line, position and extra parameters.
  */
-static void XMLCDECL
+static void XMLCDECL LIBXML_ATTR_FORMAT(2,3)
 xmlHTMLValidityError(void *ctx, const char *msg, ...)
 {
     xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
@@ -746,7 +746,7 @@ xmlHTMLValidityError(void *ctx, const char *msg, ...)
  * Display and format a validity warning messages, gives file, line,
  * position and extra parameters.
  */
-static void XMLCDECL
+static void XMLCDECL LIBXML_ATTR_FORMAT(2,3)
 xmlHTMLValidityWarning(void *ctx, const char *msg, ...)
 {
     xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
@@ -809,6 +809,7 @@ xmlShellReadline(char *prompt) {
 
     if (prompt != NULL)
        fprintf(stdout, "%s", prompt);
+    fflush(stdout);
     if (!fgets(line_read, 500, stdin))
         return(NULL);
     line_read[500] = 0;
@@ -1410,7 +1411,7 @@ commentDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *value)
  * Display and format a warning messages, gives file, line, position and
  * extra parameters.
  */
-static void XMLCDECL
+static void XMLCDECL LIBXML_ATTR_FORMAT(2,3)
 warningDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)
 {
     va_list args;
@@ -1433,7 +1434,7 @@ warningDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)
  * Display and format a error messages, gives file, line, position and
  * extra parameters.
  */
-static void XMLCDECL
+static void XMLCDECL LIBXML_ATTR_FORMAT(2,3)
 errorDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)
 {
     va_list args;
@@ -1456,7 +1457,7 @@ errorDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)
  * Display and format a fatalError messages, gives file, line, position and
  * extra parameters.
  */
-static void XMLCDECL
+static void XMLCDECL LIBXML_ATTR_FORMAT(2,3)
 fatalErrorDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)
 {
     va_list args;
@@ -2001,6 +2002,12 @@ static void walkDoc(xmlDocPtr doc) {
     xmlNsPtr ns;
 
     root = xmlDocGetRootElement(doc);
+    if (root == NULL ) {
+        xmlGenericError(xmlGenericErrorContext,
+                "Document does not have a root element");
+        progresult = XMLLINT_ERR_UNCLASS;
+        return;
+    }
     for (ns = root->nsDef, i = 0;ns != NULL && i < 20;ns=ns->next) {
         namespaces[i++] = ns->href;
         namespaces[i++] = ns->prefix;
@@ -2967,6 +2974,7 @@ static void showVersion(const char *name) {
     if (xmlHasFeature(XML_WITH_XPTR)) fprintf(stderr, "XPointer ");
     if (xmlHasFeature(XML_WITH_XINCLUDE)) fprintf(stderr, "XInclude ");
     if (xmlHasFeature(XML_WITH_ICONV)) fprintf(stderr, "Iconv ");
+    if (xmlHasFeature(XML_WITH_ICU)) fprintf(stderr, "ICU ");
     if (xmlHasFeature(XML_WITH_ISO8859X)) fprintf(stderr, "ISO8859X ");
     if (xmlHasFeature(XML_WITH_UNICODE)) fprintf(stderr, "Unicode ");
     if (xmlHasFeature(XML_WITH_REGEXP)) fprintf(stderr, "Regexps ");
@@ -3046,7 +3054,7 @@ static void usage(const char *name) {
     printf("\t--noblanks : drop (ignorable?) blanks spaces\n");
     printf("\t--nocdata : replace cdata section with text nodes\n");
 #ifdef LIBXML_OUTPUT_ENABLED
-    printf("\t--format : reformat/reindent the input\n");
+    printf("\t--format : reformat/reindent the output\n");
     printf("\t--encode encoding : output in the given encoding\n");
     printf("\t--dropdtd : remove the DOCTYPE of the input docs\n");
     printf("\t--pretty STYLE : pretty-print in a particular style\n");
index a3dc737..f08c8c3 100644 (file)
@@ -109,6 +109,7 @@ typedef struct memnod {
 #define RESERVE_SIZE (((HDR_SIZE + (ALIGN_SIZE-1)) \
                      / ALIGN_SIZE ) * ALIGN_SIZE)
 
+#define MAX_SIZE_T ((size_t)-1)
 
 #define CLIENT_2_HDR(a) ((MEMHDR *) (((char *) (a)) - RESERVE_SIZE))
 #define HDR_2_CLIENT(a)    ((void *) (((char *) (a)) + RESERVE_SIZE))
@@ -217,7 +218,7 @@ xmlMallocLoc(size_t size, const char * file, int line)
 
 /**
  * xmlMallocAtomicLoc:
- * @size:  an int specifying the size in byte to allocate.
+ * @size:  an unsigned int specifying the size in byte to allocate.
  * @file:  the file name or NULL
  * @line:  the line number
  *
@@ -240,11 +241,18 @@ xmlMallocAtomicLoc(size_t size, const char * file, int line)
 
     TEST_POINT
 
+    if (size > (MAX_SIZE_T - RESERVE_SIZE)) {
+       xmlGenericError(xmlGenericErrorContext,
+               "xmlMallocAtomicLoc : Unsigned overflow prevented\n");
+       xmlMemoryDump();
+       return(NULL);
+    }
+
     p = (MEMHDR *) malloc(RESERVE_SIZE+size);
 
     if (!p) {
        xmlGenericError(xmlGenericErrorContext,
-               "xmlMallocLoc : Out of free space\n");
+               "xmlMallocAtomicLoc : Out of free space\n");
        xmlMemoryDump();
        return(NULL);
     }
@@ -554,7 +562,12 @@ xmlMemoryStrdup(const char *str) {
 
 int
 xmlMemUsed(void) {
-     return(debugMemSize);
+    int res;
+
+    xmlMutexLock(xmlMemMutex);
+    res = debugMemSize;
+    xmlMutexUnlock(xmlMemMutex);
+    return(res);
 }
 
 /**
@@ -567,7 +580,12 @@ xmlMemUsed(void) {
 
 int
 xmlMemBlocks(void) {
-     return(debugMemBlocks);
+    int res;
+
+    xmlMutexLock(xmlMemMutex);
+    res = debugMemBlocks;
+    xmlMutexUnlock(xmlMemMutex);
+    return(res);
 }
 
 #ifdef MEM_LIST
index f19e123..f285790 100644 (file)
@@ -142,7 +142,7 @@ struct _xmlTextReader {
     xmlNodePtr                 faketext;/* fake xmlNs chld */
     int                                preserve;/* preserve the resulting document */
     xmlBufPtr                  buffer; /* used to return const xmlChar * */
-    xmlDictPtr                 dict;   /* the context dictionnary */
+    xmlDictPtr                 dict;   /* the context dictionary */
 
     /* entity stack when traversing entities content */
     xmlNodePtr         ent;          /* Current Entity Ref Node */
@@ -210,7 +210,7 @@ static int xmlTextReaderNextTree(xmlTextReaderPtr reader);
  * DICT_FREE:
  * @str:  a string
  *
- * Free a string if it is not owned by the "dict" dictionnary in the
+ * Free a string if it is not owned by the "dict" dictionary in the
  * current scope
  */
 #define DICT_FREE(str)                                         \
@@ -2091,6 +2091,9 @@ xmlNewTextReader(xmlParserInputBufferPtr input, const char *URI) {
                "xmlNewTextReader : malloc failed\n");
        return(NULL);
     }
+    /* no operation on a reader should require a huge buffer */
+    xmlBufSetAllocationScheme(ret->buffer,
+                             XML_BUFFER_ALLOC_BOUNDED);
     ret->sax = (xmlSAXHandler *) xmlMalloc(sizeof(xmlSAXHandler));
     if (ret->sax == NULL) {
        xmlBufFree(ret->buffer);
@@ -2155,7 +2158,7 @@ xmlNewTextReader(xmlParserInputBufferPtr input, const char *URI) {
     ret->ctxt->dictNames = 1;
     ret->allocs = XML_TEXTREADER_CTXT;
     /*
-     * use the parser dictionnary to allocate all elements and attributes names
+     * use the parser dictionary to allocate all elements and attributes names
      */
     ret->ctxt->docdict = 1;
     ret->dict = ret->ctxt->dict;
@@ -3616,6 +3619,7 @@ xmlTextReaderConstValue(xmlTextReaderPtr reader) {
            return(((xmlNsPtr) node)->href);
         case XML_ATTRIBUTE_NODE:{
            xmlAttrPtr attr = (xmlAttrPtr) node;
+           const xmlChar *ret;
 
            if ((attr->children != NULL) &&
                (attr->children->type == XML_TEXT_NODE) &&
@@ -3629,10 +3633,21 @@ xmlTextReaderConstValue(xmlTextReaderPtr reader) {
                                         "xmlTextReaderSetup : malloc failed\n");
                         return (NULL);
                     }
+                   xmlBufSetAllocationScheme(reader->buffer,
+                                             XML_BUFFER_ALLOC_BOUNDED);
                 } else
                     xmlBufEmpty(reader->buffer);
                xmlBufGetNodeContent(reader->buffer, node);
-               return(xmlBufContent(reader->buffer));
+               ret = xmlBufContent(reader->buffer);
+               if (ret == NULL) {
+                   /* error on the buffer best to reallocate */
+                   xmlBufFree(reader->buffer);
+                   reader->buffer = xmlBufCreateSize(100);
+                   xmlBufSetAllocationScheme(reader->buffer,
+                                             XML_BUFFER_ALLOC_BOUNDED);
+                   ret = BAD_CAST "";
+               }
+               return(ret);
            }
            break;
        }
@@ -4035,13 +4050,19 @@ xmlTextReaderCurrentDoc(xmlTextReaderPtr reader) {
 }
 
 #ifdef LIBXML_SCHEMAS_ENABLED
-static char *xmlTextReaderBuildMessage(const char *msg, va_list ap);
+static char *xmlTextReaderBuildMessage(const char *msg, va_list ap) LIBXML_ATTR_FORMAT(1,0);
+
+static void XMLCDECL
+xmlTextReaderValidityError(void *ctxt, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
 
 static void XMLCDECL
-xmlTextReaderValidityError(void *ctxt, const char *msg, ...);
+xmlTextReaderValidityWarning(void *ctxt, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
 
 static void XMLCDECL
-xmlTextReaderValidityWarning(void *ctxt, const char *msg, ...);
+xmlTextReaderValidityErrorRelay(void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+
+static void XMLCDECL
+xmlTextReaderValidityWarningRelay(void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
 
 static void XMLCDECL
 xmlTextReaderValidityErrorRelay(void *ctx, const char *msg, ...)
@@ -4835,7 +4856,7 @@ xmlTextReaderStructuredError(void *ctxt, xmlErrorPtr error)
     }
 }
 
-static void XMLCDECL
+static void XMLCDECL LIBXML_ATTR_FORMAT(2,3)
 xmlTextReaderError(void *ctxt, const char *msg, ...)
 {
     va_list ap;
@@ -4848,7 +4869,7 @@ xmlTextReaderError(void *ctxt, const char *msg, ...)
 
 }
 
-static void XMLCDECL
+static void XMLCDECL LIBXML_ATTR_FORMAT(2,3)
 xmlTextReaderWarning(void *ctxt, const char *msg, ...)
 {
     va_list ap;
@@ -5131,6 +5152,9 @@ xmlTextReaderSetup(xmlTextReaderPtr reader,
                         "xmlTextReaderSetup : malloc failed\n");
         return (-1);
     }
+    /* no operation on a reader should require a huge buffer */
+    xmlBufSetAllocationScheme(reader->buffer,
+                             XML_BUFFER_ALLOC_BOUNDED);
     if (reader->sax == NULL)
        reader->sax = (xmlSAXHandler *) xmlMalloc(sizeof(xmlSAXHandler));
     if (reader->sax == NULL) {
@@ -5231,7 +5255,7 @@ xmlTextReaderSetup(xmlTextReaderPtr reader,
     reader->ctxt->linenumbers = 1;
     reader->ctxt->dictNames = 1;
     /*
-     * use the parser dictionnary to allocate all elements and attributes names
+     * use the parser dictionary to allocate all elements and attributes names
      */
     reader->ctxt->docdict = 1;
     reader->ctxt->parseMode = XML_PARSE_READER;
index 3e912ab..ca3b4f4 100644 (file)
@@ -1544,6 +1544,7 @@ static int
 xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from,
                         xmlRegStatePtr to, xmlRegAtomPtr atom) {
     xmlRegStatePtr end;
+    int nullable = 0;
 
     if (atom == NULL) {
        ERROR("genrate transition: atom == NULL");
@@ -1730,6 +1731,13 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from,
     if (xmlRegAtomPush(ctxt, atom) < 0) {
        return(-1);
     }
+    if ((atom->quant == XML_REGEXP_QUANT_RANGE) &&
+        (atom->min == 0) && (atom->max > 0)) {
+       nullable = 1;
+       atom->min = 1;
+        if (atom->max == 1)
+           atom->quant = XML_REGEXP_QUANT_OPT;
+    }
     xmlRegStateAddTrans(ctxt, from, atom, to, -1, -1);
     ctxt->state = end;
     switch (atom->quant) {
@@ -1747,11 +1755,8 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from,
            xmlRegStateAddTrans(ctxt, to, atom, to, -1, -1);
            break;
        case XML_REGEXP_QUANT_RANGE:
-#if DV_test
-           if (atom->min == 0) {
+           if (nullable)
                xmlFAGenerateEpsilonTransition(ctxt, from, to);
-           }
-#endif
            break;
        default:
            break;
@@ -5052,11 +5057,12 @@ xmlFAParseCharRange(xmlRegParserCtxtPtr ctxt) {
        ERROR("Expecting the end of a char range");
        return;
     }
-    NEXTL(len);
+
     /* TODO check that the values are acceptable character ranges for XML */
     if (end < start) {
        ERROR("End of range is before start of range");
     } else {
+        NEXTL(len);
         xmlRegAtomAddRange(ctxt, ctxt->atom, ctxt->neg,
                           XML_REGEXP_CHARVAL, start, end, NULL);
     }
@@ -6345,7 +6351,7 @@ struct _xmlExpCtxt {
 /**
  * xmlExpNewCtxt:
  * @maxNodes:  the maximum number of nodes
- * @dict:  optional dictionnary to use internally
+ * @dict:  optional dictionary to use internally
  *
  * Creates a new context for manipulating expressions
  *
@@ -7204,7 +7210,7 @@ xmlExpStringDerive(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp,
         return(NULL);
     }
     /*
-     * check the string is in the dictionnary, if yes use an interned
+     * check the string is in the dictionary, if yes use an interned
      * copy, otherwise we know it's not an acceptable input
      */
     input = xmlDictExists(ctxt->dict, str, len);
index 774404b..4a8e3f3 100644 (file)
--- a/xmlsave.c
+++ b/xmlsave.c
@@ -2097,8 +2097,8 @@ xmlBufAttrSerializeTxtContent(xmlBufPtr buf, xmlDocPtr doc,
             xmlBufAdd(buf, BAD_CAST "&amp;", 5);
             cur++;
             base = cur;
-        } else if ((*cur >= 0x80) && ((doc == NULL) ||
-                                      (doc->encoding == NULL))) {
+        } else if ((*cur >= 0x80) && (cur[1] != 0) &&
+                  ((doc == NULL) || (doc->encoding == NULL))) {
             /*
              * We assume we have UTF-8 content.
              */
@@ -2121,14 +2121,14 @@ xmlBufAttrSerializeTxtContent(xmlBufPtr buf, xmlDocPtr doc,
                 val <<= 6;
                 val |= (cur[1]) & 0x3F;
                 l = 2;
-            } else if (*cur < 0xF0) {
+            } else if ((*cur < 0xF0) && (cur [2] != 0)) {
                 val = (cur[0]) & 0x0F;
                 val <<= 6;
                 val |= (cur[1]) & 0x3F;
                 val <<= 6;
                 val |= (cur[2]) & 0x3F;
                 l = 3;
-            } else if (*cur < 0xF8) {
+            } else if ((*cur < 0xF8) && (cur [2] != 0) && (cur[3] != 0)) {
                 val = (cur[0]) & 0x07;
                 val <<= 6;
                 val |= (cur[1]) & 0x3F;
index 0657b66..e1b3a4f 100644 (file)
@@ -617,7 +617,7 @@ struct _xmlSchemaParserCtxt {
     xmlAutomataStatePtr end;
     xmlAutomataStatePtr state;
 
-    xmlDictPtr dict;           /* dictionnary for interned string names */
+    xmlDictPtr dict;           /* dictionary for interned string names */
     xmlSchemaTypePtr ctxtType; /* The current context simple/complex type */
     int options;
     xmlSchemaValidCtxtPtr vctxt;
@@ -1085,7 +1085,7 @@ xmlSchemaGetUnionSimpleTypeMemberTypes(xmlSchemaTypePtr type);
 static void
 xmlSchemaInternalErr(xmlSchemaAbstractCtxtPtr actxt,
                     const char *funcName,
-                    const char *message);
+                    const char *message) LIBXML_ATTR_FORMAT(3,0);
 static int
 xmlSchemaCheckCOSSTDerivedOK(xmlSchemaAbstractCtxtPtr ctxt,
                             xmlSchemaTypePtr type,
@@ -1769,7 +1769,7 @@ xmlSchemaFormatItemForReport(xmlChar **buf,
     }
     FREE_AND_NULL(str)
 
-    return (*buf);
+    return (xmlEscapeFormatString(buf));
 }
 
 /**
@@ -1889,7 +1889,7 @@ xmlSchemaPErrMemory(xmlSchemaParserCtxtPtr ctxt,
  *
  * Handle a parser error
  */
-static void
+static void LIBXML_ATTR_FORMAT(4,0)
 xmlSchemaPErr(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node, int error,
               const char *msg, const xmlChar * str1, const xmlChar * str2)
 {
@@ -1922,7 +1922,7 @@ xmlSchemaPErr(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node, int error,
  *
  * Handle a parser error
  */
-static void
+static void LIBXML_ATTR_FORMAT(5,0)
 xmlSchemaPErr2(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node,
                xmlNodePtr child, int error,
                const char *msg, const xmlChar * str1, const xmlChar * str2)
@@ -1951,7 +1951,7 @@ xmlSchemaPErr2(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node,
  *
  * Handle a parser error
  */
-static void
+static void LIBXML_ATTR_FORMAT(7,0)
 xmlSchemaPErrExt(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node, int error,
                const xmlChar * strData1, const xmlChar * strData2,
                const xmlChar * strData3, const char *msg, const xmlChar * str1,
@@ -2002,7 +2002,7 @@ xmlSchemaVErrMemory(xmlSchemaValidCtxtPtr ctxt,
                      extra);
 }
 
-static void
+static void LIBXML_ATTR_FORMAT(2,0)
 xmlSchemaPSimpleInternalErr(xmlNodePtr node,
                            const char *msg, const xmlChar *str)
 {
@@ -2013,18 +2013,21 @@ xmlSchemaPSimpleInternalErr(xmlNodePtr node,
 #define WXS_ERROR_TYPE_ERROR 1
 #define WXS_ERROR_TYPE_WARNING 2
 /**
- * xmlSchemaErr3:
+ * xmlSchemaErr4Line:
  * @ctxt: the validation context
- * @node: the context node
+ * @errorLevel: the error level
  * @error: the error code
+ * @node: the context node
+ * @line: the line number
  * @msg: the error message
  * @str1: extra data
  * @str2: extra data
  * @str3: extra data
+ * @str4: extra data
  *
  * Handle a validation error
  */
-static void
+static void LIBXML_ATTR_FORMAT(6,0)
 xmlSchemaErr4Line(xmlSchemaAbstractCtxtPtr ctxt,
                  xmlErrorLevel errorLevel,
                  int error, xmlNodePtr node, int line, const char *msg,
@@ -2139,7 +2142,7 @@ xmlSchemaErr4Line(xmlSchemaAbstractCtxtPtr ctxt,
  *
  * Handle a validation error
  */
-static void
+static void LIBXML_ATTR_FORMAT(4,0)
 xmlSchemaErr3(xmlSchemaAbstractCtxtPtr actxt,
              int error, xmlNodePtr node, const char *msg,
              const xmlChar *str1, const xmlChar *str2, const xmlChar *str3)
@@ -2148,7 +2151,7 @@ xmlSchemaErr3(xmlSchemaAbstractCtxtPtr actxt,
        msg, str1, str2, str3, NULL);
 }
 
-static void
+static void LIBXML_ATTR_FORMAT(4,0)
 xmlSchemaErr4(xmlSchemaAbstractCtxtPtr actxt,
              int error, xmlNodePtr node, const char *msg,
              const xmlChar *str1, const xmlChar *str2,
@@ -2158,7 +2161,7 @@ xmlSchemaErr4(xmlSchemaAbstractCtxtPtr actxt,
        msg, str1, str2, str3, str4);
 }
 
-static void
+static void LIBXML_ATTR_FORMAT(4,0)
 xmlSchemaErr(xmlSchemaAbstractCtxtPtr actxt,
             int error, xmlNodePtr node, const char *msg,
             const xmlChar *str1, const xmlChar *str2)
@@ -2181,7 +2184,7 @@ xmlSchemaFormatNodeForError(xmlChar ** msg,
        /*
        * Don't try to format other nodes than element and
        * attribute nodes.
-       * Play save and return an empty string.
+       * Play safe and return an empty string.
        */
        *msg = xmlStrdup(BAD_CAST "");
        return(*msg);
@@ -2246,6 +2249,13 @@ xmlSchemaFormatNodeForError(xmlChar ** msg,
        TODO
        return (NULL);
     }
+
+    /*
+     * xmlSchemaFormatItemForReport() also returns an escaped format
+     * string, so do this before calling it below (in the future).
+     */
+    xmlEscapeFormatString(msg);
+
     /*
     * VAL TODO: The output of the given schema component is currently
     * disabled.
@@ -2262,7 +2272,7 @@ xmlSchemaFormatNodeForError(xmlChar ** msg,
     return (*msg);
 }
 
-static void
+static void LIBXML_ATTR_FORMAT(3,0)
 xmlSchemaInternalErr2(xmlSchemaAbstractCtxtPtr actxt,
                     const char *funcName,
                     const char *message,
@@ -2273,24 +2283,21 @@ xmlSchemaInternalErr2(xmlSchemaAbstractCtxtPtr actxt,
 
     if (actxt == NULL)
         return;
-    msg = xmlStrdup(BAD_CAST "Internal error: ");
-    msg = xmlStrcat(msg, BAD_CAST funcName);
-    msg = xmlStrcat(msg, BAD_CAST ", ");
+    msg = xmlStrdup(BAD_CAST "Internal error: %s, ");
     msg = xmlStrcat(msg, BAD_CAST message);
     msg = xmlStrcat(msg, BAD_CAST ".\n");
 
     if (actxt->type == XML_SCHEMA_CTXT_VALIDATOR)
-       xmlSchemaErr(actxt, XML_SCHEMAV_INTERNAL, NULL,
-           (const char *) msg, str1, str2);
-
+       xmlSchemaErr3(actxt, XML_SCHEMAV_INTERNAL, NULL,
+           (const char *) msg, (const xmlChar *) funcName, str1, str2);
     else if (actxt->type == XML_SCHEMA_CTXT_PARSER)
-       xmlSchemaErr(actxt, XML_SCHEMAP_INTERNAL, NULL,
-           (const char *) msg, str1, str2);
+       xmlSchemaErr3(actxt, XML_SCHEMAP_INTERNAL, NULL,
+           (const char *) msg, (const xmlChar *) funcName, str1, str2);
 
     FREE_AND_NULL(msg)
 }
 
-static void
+static void LIBXML_ATTR_FORMAT(3,0)
 xmlSchemaInternalErr(xmlSchemaAbstractCtxtPtr actxt,
                     const char *funcName,
                     const char *message)
@@ -2299,7 +2306,7 @@ xmlSchemaInternalErr(xmlSchemaAbstractCtxtPtr actxt,
 }
 
 #if 0
-static void
+static void LIBXML_ATTR_FORMAT(3,0)
 xmlSchemaPInternalErr(xmlSchemaParserCtxtPtr pctxt,
                     const char *funcName,
                     const char *message,
@@ -2311,7 +2318,7 @@ xmlSchemaPInternalErr(xmlSchemaParserCtxtPtr pctxt,
 }
 #endif
 
-static void
+static void LIBXML_ATTR_FORMAT(5,0)
 xmlSchemaCustomErr4(xmlSchemaAbstractCtxtPtr actxt,
                   xmlParserErrors error,
                   xmlNodePtr node,
@@ -2336,7 +2343,7 @@ xmlSchemaCustomErr4(xmlSchemaAbstractCtxtPtr actxt,
     FREE_AND_NULL(msg)
 }
 
-static void
+static void LIBXML_ATTR_FORMAT(5,0)
 xmlSchemaCustomErr(xmlSchemaAbstractCtxtPtr actxt,
                   xmlParserErrors error,
                   xmlNodePtr node,
@@ -2351,7 +2358,7 @@ xmlSchemaCustomErr(xmlSchemaAbstractCtxtPtr actxt,
 
 
 
-static void
+static void LIBXML_ATTR_FORMAT(5,0)
 xmlSchemaCustomWarning(xmlSchemaAbstractCtxtPtr actxt,
                   xmlParserErrors error,
                   xmlNodePtr node,
@@ -2376,7 +2383,7 @@ xmlSchemaCustomWarning(xmlSchemaAbstractCtxtPtr actxt,
 
 
 
-static void
+static void LIBXML_ATTR_FORMAT(5,0)
 xmlSchemaKeyrefErr(xmlSchemaValidCtxtPtr vctxt,
                   xmlParserErrors error,
                   xmlSchemaPSVIIDCNodePtr idcNode,
@@ -2476,11 +2483,13 @@ xmlSchemaSimpleTypeErr(xmlSchemaAbstractCtxtPtr actxt,
        msg = xmlStrcat(msg, BAD_CAST " '");
        if (type->builtInType != 0) {
            msg = xmlStrcat(msg, BAD_CAST "xs:");
-           msg = xmlStrcat(msg, type->name);
-       } else
-           msg = xmlStrcat(msg,
-               xmlSchemaFormatQName(&str,
-                   type->targetNamespace, type->name));
+           str = xmlStrdup(type->name);
+       } else {
+           const xmlChar *qName = xmlSchemaFormatQName(&str, type->targetNamespace, type->name);
+           if (!str)
+               str = xmlStrdup(qName);
+       }
+       msg = xmlStrcat(msg, xmlEscapeFormatString(&str));
        msg = xmlStrcat(msg, BAD_CAST "'");
        FREE_AND_NULL(str);
     }
@@ -2525,7 +2534,7 @@ xmlSchemaIllegalAttrErr(xmlSchemaAbstractCtxtPtr actxt,
     FREE_AND_NULL(msg)
 }
 
-static void
+static void LIBXML_ATTR_FORMAT(5,0)
 xmlSchemaComplexTypeErr(xmlSchemaAbstractCtxtPtr actxt,
                        xmlParserErrors error,
                        xmlNodePtr node,
@@ -2617,7 +2626,7 @@ xmlSchemaComplexTypeErr(xmlSchemaAbstractCtxtPtr actxt,
                str = xmlStrcat(str, BAD_CAST ", ");
        }
        str = xmlStrcat(str, BAD_CAST " ).\n");
-       msg = xmlStrcat(msg, BAD_CAST str);
+       msg = xmlStrcat(msg, xmlEscapeFormatString(&str));
        FREE_AND_NULL(str)
     } else
       msg = xmlStrcat(msg, BAD_CAST "\n");
@@ -2625,7 +2634,7 @@ xmlSchemaComplexTypeErr(xmlSchemaAbstractCtxtPtr actxt,
     xmlFree(msg);
 }
 
-static void
+static void LIBXML_ATTR_FORMAT(8,0)
 xmlSchemaFacetErr(xmlSchemaAbstractCtxtPtr actxt,
                  xmlParserErrors error,
                  xmlNodePtr node,
@@ -2916,7 +2925,7 @@ xmlSchemaPIllegalAttrErr(xmlSchemaParserCtxtPtr ctxt,
  *
  * Reports an error during parsing.
  */
-static void
+static void LIBXML_ATTR_FORMAT(5,0)
 xmlSchemaPCustomErrExt(xmlSchemaParserCtxtPtr ctxt,
                    xmlParserErrors error,
                    xmlSchemaBasicItemPtr item,
@@ -2952,7 +2961,7 @@ xmlSchemaPCustomErrExt(xmlSchemaParserCtxtPtr ctxt,
  *
  * Reports an error during parsing.
  */
-static void
+static void LIBXML_ATTR_FORMAT(5,0)
 xmlSchemaPCustomErr(xmlSchemaParserCtxtPtr ctxt,
                    xmlParserErrors error,
                    xmlSchemaBasicItemPtr item,
@@ -2977,7 +2986,7 @@ xmlSchemaPCustomErr(xmlSchemaParserCtxtPtr ctxt,
  *
  * Reports an attribute use error during parsing.
  */
-static void
+static void LIBXML_ATTR_FORMAT(6,0)
 xmlSchemaPAttrUseErr4(xmlSchemaParserCtxtPtr ctxt,
                    xmlParserErrors error,
                    xmlNodePtr node,
@@ -3099,7 +3108,7 @@ xmlSchemaPMutualExclAttrErr(xmlSchemaParserCtxtPtr ctxt,
  * Reports a simple type validation error.
  * TODO: Should this report the value of an element as well?
  */
-static void
+static void LIBXML_ATTR_FORMAT(8,0)
 xmlSchemaPSimpleTypeErr(xmlSchemaParserCtxtPtr ctxt,
                        xmlParserErrors error,
                        xmlSchemaBasicItemPtr ownerItem ATTRIBUTE_UNUSED,
@@ -3141,11 +3150,13 @@ xmlSchemaPSimpleTypeErr(xmlSchemaParserCtxtPtr ctxt,
                msg = xmlStrcat(msg, BAD_CAST " '");
                if (type->builtInType != 0) {
                    msg = xmlStrcat(msg, BAD_CAST "xs:");
-                   msg = xmlStrcat(msg, type->name);
-               } else
-                   msg = xmlStrcat(msg,
-                       xmlSchemaFormatQName(&str,
-                           type->targetNamespace, type->name));
+                   str = xmlStrdup(type->name);
+               } else {
+                   const xmlChar *qName = xmlSchemaFormatQName(&str, type->targetNamespace, type->name);
+                   if (!str)
+                       str = xmlStrdup(qName);
+               }
+               msg = xmlStrcat(msg, xmlEscapeFormatString(&str));
                msg = xmlStrcat(msg, BAD_CAST "'.");
                FREE_AND_NULL(str);
            }
@@ -3158,7 +3169,9 @@ xmlSchemaPSimpleTypeErr(xmlSchemaParserCtxtPtr ctxt,
        }
        if (expected) {
            msg = xmlStrcat(msg, BAD_CAST " Expected is '");
-           msg = xmlStrcat(msg, BAD_CAST expected);
+           xmlChar *expectedEscaped = xmlCharStrdup(expected);
+           msg = xmlStrcat(msg, xmlEscapeFormatString(&expectedEscaped));
+           FREE_AND_NULL(expectedEscaped);
            msg = xmlStrcat(msg, BAD_CAST "'.\n");
        } else
            msg = xmlStrcat(msg, BAD_CAST "\n");
@@ -24186,6 +24199,7 @@ xmlSchemaValidateFacets(xmlSchemaAbstractCtxtPtr actxt,
        else
            goto pattern_and_enum;
     }
+
     /*
     * Whitespace handling is only of importance for string-based
     * types.
@@ -24196,14 +24210,13 @@ xmlSchemaValidateFacets(xmlSchemaAbstractCtxtPtr actxt,
        ws = xmlSchemaGetWhiteSpaceFacetValue(type);
     } else
        ws = XML_SCHEMA_WHITESPACE_COLLAPSE;
+
     /*
     * If the value was not computed (for string or
     * anySimpleType based types), then use the provided
     * type.
     */
-    if (val == NULL)
-       valType = valType;
-    else
+    if (val != NULL)
        valType = xmlSchemaGetValType(val);
 
     ret = 0;
@@ -25546,7 +25559,7 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt)
                    if (xmlNewProp(defAttrOwnerElem,
                        iattr->localName, value) == NULL) {
                        VERROR_INT("xmlSchemaVAttributesComplex",
-                           "callling xmlNewProp()");
+                           "calling xmlNewProp()");
                        if (normValue != NULL)
                            xmlFree(normValue);
                        goto internal_error;
@@ -27382,10 +27395,17 @@ xmlSchemaSAXHandleStartElementNs(void *ctx,
 
         for (j = 0, i = 0; i < nb_attributes; i++, j += 5) {
            /*
-           * Duplicate the value.
+           * Duplicate the value, changing any &#38; to a literal ampersand.
+           *
+           * libxml2 differs from normal SAX here in that it escapes all ampersands
+           * as &#38; instead of delivering the raw converted string. Changing the
+           * behavior at this point would break applications that use this API, so
+           * we are forced to work around it. There is no danger of accidentally
+           * decoding some entity other than &#38; in this step because without
+           * unescaped ampersands there can be no other entities in the string.
            */
-           value = xmlStrndup(attributes[j+3],
-               attributes[j+4] - attributes[j+3]);
+           value = xmlStringLenDecodeEntities(vctxt->parserCtxt, attributes[j+3],
+               attributes[j+4] - attributes[j+3], XML_SUBSTITUTE_REF, 0, 0, 0);
            /*
            * TODO: Set the node line.
            */
index ff64f50..5f38599 100644 (file)
@@ -62,7 +62,7 @@ struct _xmlSchemaValDate {
     long               year;
     unsigned int       mon     :4;     /* 1 <=  mon    <= 12   */
     unsigned int       day     :5;     /* 1 <=  day    <= 31   */
-    unsigned int       hour    :5;     /* 0 <=  hour   <= 23   */
+    unsigned int       hour    :5;     /* 0 <=  hour   <= 24   */
     unsigned int       min     :6;     /* 0 <=  min    <= 59   */
     double             sec;
     unsigned int       tz_flag :1;     /* is tzo explicitely set? */
@@ -1139,9 +1139,13 @@ static const unsigned int daysInMonthLeap[12] =
 #define VALID_DATE(dt)                                         \
        (VALID_YEAR(dt->year) && VALID_MONTH(dt->mon) && VALID_MDAY(dt))
 
+#define VALID_END_OF_DAY(dt)                                   \
+       ((dt)->hour == 24 && (dt)->min == 0 && (dt)->sec == 0)
+
 #define VALID_TIME(dt)                                         \
-       (VALID_HOUR(dt->hour) && VALID_MIN(dt->min) &&          \
-        VALID_SEC(dt->sec) && VALID_TZO(dt->tzo))
+       (((VALID_HOUR(dt->hour) && VALID_MIN(dt->min) &&        \
+         VALID_SEC(dt->sec)) || VALID_END_OF_DAY(dt)) &&       \
+        VALID_TZO(dt->tzo))
 
 #define VALID_DATETIME(dt)                                     \
        (VALID_DATE(dt) && VALID_TIME(dt))
@@ -1355,7 +1359,7 @@ _xmlSchemaParseTime (xmlSchemaValDatePtr dt, const xmlChar **str) {
        return ret;
     if (*cur != ':')
        return 1;
-    if (!VALID_HOUR(value))
+    if (!VALID_HOUR(value) && value != 24 /* Allow end-of-day hour */)
        return 2;
     cur++;
 
@@ -1377,7 +1381,7 @@ _xmlSchemaParseTime (xmlSchemaValDatePtr dt, const xmlChar **str) {
     if (ret != 0)
        return ret;
 
-    if ((!VALID_SEC(dt->sec)) || (!VALID_TZO(dt->tzo)))
+    if (!VALID_TIME(dt))
        return 2;
 
     *str = cur;
@@ -5303,6 +5307,7 @@ xmlSchemaValidateFacetInternal(xmlSchemaFacetPtr facet,
                               xmlSchemaWhitespaceValueType ws)
 {
     int ret;
+    int stringType;
 
     if (facet == NULL)
        return(-1);
@@ -5315,7 +5320,15 @@ xmlSchemaValidateFacetInternal(xmlSchemaFacetPtr facet,
            */
            if (value == NULL)
                return(-1);
-           ret = xmlRegexpExec(facet->regexp, value);
+           /*
+           * If string-derived type, regexp must be tested on the value space of
+           * the datatype.
+           * See https://www.w3.org/TR/xmlschema-2/#rf-pattern
+           */
+           stringType = val && ((val->type >= XML_SCHEMAS_STRING && val->type <= XML_SCHEMAS_NORMSTRING)
+                             || (val->type >= XML_SCHEMAS_TOKEN && val->type <= XML_SCHEMAS_NCNAME));
+           ret = xmlRegexpExec(facet->regexp,
+                               (stringType && val->value.str) ? val->value.str : value);
            if (ret == 1)
                return(0);
            if (ret == 0)
index a37220d..cc85777 100644 (file)
@@ -457,6 +457,8 @@ xmlStrncat(xmlChar *cur, const xmlChar *add, int len) {
         return(xmlStrndup(add, len));
 
     size = xmlStrlen(cur);
+    if (size < 0)
+        return(NULL);
     ret = (xmlChar *) xmlRealloc(cur, (size + len + 1) * sizeof(xmlChar));
     if (ret == NULL) {
         xmlErrMemory(NULL, NULL);
@@ -484,14 +486,19 @@ xmlStrncatNew(const xmlChar *str1, const xmlChar *str2, int len) {
     int size;
     xmlChar *ret;
 
-    if (len < 0)
+    if (len < 0) {
         len = xmlStrlen(str2);
+        if (len < 0)
+            return(NULL);
+    }
     if ((str2 == NULL) || (len == 0))
         return(xmlStrdup(str1));
     if (str1 == NULL)
         return(xmlStrndup(str2, len));
 
     size = xmlStrlen(str1);
+    if (size < 0)
+        return(NULL);
     ret = (xmlChar *) xmlMalloc((size + len + 1) * sizeof(xmlChar));
     if (ret == NULL) {
         xmlErrMemory(NULL, NULL);
@@ -538,7 +545,7 @@ xmlStrcat(xmlChar *cur, const xmlChar *add) {
  * Returns the number of characters written to @buf or -1 if an error occurs.
  */
 int XMLCDECL
-xmlStrPrintf(xmlChar *buf, int len, const xmlChar *msg, ...) {
+xmlStrPrintf(xmlChar *buf, int len, const char *msg, ...) {
     va_list args;
     int ret;
 
@@ -566,7 +573,7 @@ xmlStrPrintf(xmlChar *buf, int len, const xmlChar *msg, ...) {
  * Returns the number of characters written to @buf or -1 if an error occurs.
  */
 int
-xmlStrVPrintf(xmlChar *buf, int len, const xmlChar *msg, va_list ap) {
+xmlStrVPrintf(xmlChar *buf, int len, const char *msg, va_list ap) {
     int ret;
 
     if((buf == NULL) || (msg == NULL)) {
@@ -837,8 +844,8 @@ xmlUTF8Strsize(const xmlChar *utf, int len) {
             break;
         if ( (ch = *ptr++) & 0x80)
             while ((ch<<=1) & 0x80 ) {
-                ptr++;
                if (*ptr == 0) break;
+                ptr++;
            }
     }
     return (ptr - utf);
@@ -980,5 +987,60 @@ xmlUTF8Strsub(const xmlChar *utf, int start, int len) {
     return(xmlUTF8Strndup(utf, len));
 }
 
+/**
+ * xmlEscapeFormatString:
+ * @msg:  a pointer to the string in which to escape '%' characters.
+ * Must be a heap-allocated buffer created by libxml2 that may be
+ * returned, or that may be freed and replaced.
+ *
+ * Replaces the string pointed to by 'msg' with an escaped string.
+ * Returns the same string with all '%' characters escaped.
+ */
+xmlChar *
+xmlEscapeFormatString(xmlChar **msg)
+{
+    xmlChar *msgPtr = NULL;
+    xmlChar *result = NULL;
+    xmlChar *resultPtr = NULL;
+    size_t count = 0;
+    size_t msgLen = 0;
+    size_t resultLen = 0;
+
+    if (!msg || !*msg)
+        return(NULL);
+
+    for (msgPtr = *msg; *msgPtr != '\0'; ++msgPtr) {
+        ++msgLen;
+        if (*msgPtr == '%')
+            ++count;
+    }
+
+    if (count == 0)
+        return(*msg);
+
+    resultLen = msgLen + count + 1;
+    result = (xmlChar *) xmlMallocAtomic(resultLen * sizeof(xmlChar));
+    if (result == NULL) {
+        /* Clear *msg to prevent format string vulnerabilities in
+           out-of-memory situations. */
+        xmlFree(*msg);
+        *msg = NULL;
+        xmlErrMemory(NULL, NULL);
+        return(NULL);
+    }
+
+    for (msgPtr = *msg, resultPtr = result; *msgPtr != '\0'; ++msgPtr, ++resultPtr) {
+        *resultPtr = *msgPtr;
+        if (*msgPtr == '%')
+            *(++resultPtr) = '%';
+    }
+    result[resultLen - 1] = '\0';
+
+    xmlFree(*msg);
+    *msg = result;
+
+    return *msg;
+}
+
 #define bottom_xmlstring
 #include "elfgcchack.h"
index fac20ac..69541b8 100644 (file)
@@ -113,7 +113,7 @@ static int xmlTextWriterWriteDocCallback(void *context,
                                          const xmlChar * str, int len);
 static int xmlTextWriterCloseDocCallback(void *context);
 
-static xmlChar *xmlTextWriterVSprintf(const char *format, va_list argptr);
+static xmlChar *xmlTextWriterVSprintf(const char *format, va_list argptr) LIBXML_ATTR_FORMAT(1,0);
 static int xmlOutputBufferWriteBase64(xmlOutputBufferPtr out, int len,
                                       const unsigned char *data);
 static void xmlTextWriterStartDocumentCallback(void *ctx);
@@ -153,7 +153,7 @@ xmlWriterErrMsg(xmlTextWriterPtr ctxt, xmlParserErrors error,
  *
  * Handle a writer error
  */
-static void
+static void LIBXML_ATTR_FORMAT(3,0)
 xmlWriterErrMsgInt(xmlTextWriterPtr ctxt, xmlParserErrors error,
                const char *msg, int val)
 {
diff --git a/xpath.c b/xpath.c
index dc41ce6..113bce6 100644 (file)
--- a/xpath.c
+++ b/xpath.c
@@ -361,14 +361,14 @@ turtle_comparison:
     /*
      * compute depth to root
      */
-    for (depth2 = 0, cur = node2;cur->parent != NULL;cur = cur->parent) {
-       if (cur == node1)
+    for (depth2 = 0, cur = node2; cur->parent != NULL; cur = cur->parent) {
+       if (cur->parent == node1)
            return(1);
        depth2++;
     }
     root = cur;
-    for (depth1 = 0, cur = node1;cur->parent != NULL;cur = cur->parent) {
-       if (cur == node2)
+    for (depth1 = 0, cur = node1; cur->parent != NULL; cur = cur->parent) {
+       if (cur->parent == node2)
            return(-1);
        depth1++;
     }
@@ -639,7 +639,7 @@ xmlXPathErrMemory(xmlXPathContextPtr ctxt, const char *extra)
             xmlChar buf[200];
 
             xmlStrPrintf(buf, 200,
-                         BAD_CAST "Memory allocation failed : %s\n",
+                         "Memory allocation failed : %s\n",
                          extra);
             ctxt->lastError.message = (char *) xmlStrdup(buf);
         } else {
@@ -945,7 +945,7 @@ struct _xmlXPathCompExpr {
     xmlXPathStepOp *steps;     /* ops for computation of this expression */
     int last;                  /* index of last step in expression */
     xmlChar *expr;             /* the expression being computed */
-    xmlDictPtr dict;           /* the dictionnary to use if any */
+    xmlDictPtr dict;           /* the dictionary to use if any */
 #ifdef DEBUG_EVAL_COUNTS
     int nb;
     xmlChar *string;
@@ -3706,7 +3706,7 @@ xmlXPathNodeSetAdd(xmlNodeSetPtr cur, xmlNodePtr val) {
 
     /* @@ with_ns to check whether namespace nodes should be looked at @@ */
     /*
-     * prevent duplcates
+     * prevent duplicates
      */
     for (i = 0;i < cur->nodeNr;i++)
         if (cur->nodeTab[i] == val) return(0);
@@ -7933,14 +7933,14 @@ xmlXPathNextDescendant(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
 xmlNodePtr
 xmlXPathNextDescendantOrSelf(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
     if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);
-    if (cur == NULL) {
-       if (ctxt->context->node == NULL)
-           return(NULL);
-       if ((ctxt->context->node->type == XML_ATTRIBUTE_NODE) ||
-           (ctxt->context->node->type == XML_NAMESPACE_DECL))
-           return(NULL);
+    if (cur == NULL)
         return(ctxt->context->node);
-    }
+
+    if (ctxt->context->node == NULL)
+        return(NULL);
+    if ((ctxt->context->node->type == XML_ATTRIBUTE_NODE) ||
+        (ctxt->context->node->type == XML_NAMESPACE_DECL))
+        return(NULL);
 
     return(xmlXPathNextDescendant(ctxt, cur));
 }
@@ -8390,7 +8390,7 @@ xmlNodePtr
 xmlXPathNextNamespace(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
     if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);
     if (ctxt->context->node->type != XML_ELEMENT_NODE) return(NULL);
-    if (ctxt->context->tmpNsList == NULL && cur != (xmlNodePtr) xmlXPathXMLNamespace) {
+    if (cur == NULL) {
         if (ctxt->context->tmpNsList != NULL)
            xmlFree(ctxt->context->tmpNsList);
        ctxt->context->tmpNsList =
@@ -9996,7 +9996,7 @@ xmlXPathParseNameComplex(xmlXPathParserContextPtr ctxt, int qualified) {
         (c == '[') || (c == ']') || (c == '@') || /* accelerators */
         (c == '*') || /* accelerators */
        (!IS_LETTER(c) && (c != '_') &&
-         ((qualified) && (c != ':')))) {
+         ((!qualified) || (c != ':')))) {
        return(NULL);
     }
 
@@ -12379,11 +12379,6 @@ xmlXPathNodeCollectAndTest(xmlXPathParserContextPtr ctxt,
                     STRANGE
                    goto error;
                 case NODE_TEST_TYPE:
-                   /*
-                   * TODO: Don't we need to use
-                   *  xmlXPathNodeSetAddNs() for namespace nodes here?
-                   *  Surprisingly, some c14n tests fail, if we do this.
-                   */
                    if (type == NODE_TYPE_NODE) {
                        switch (cur->type) {
                            case XML_DOCUMENT_NODE:
@@ -12397,9 +12392,17 @@ xmlXPathNodeCollectAndTest(xmlXPathParserContextPtr ctxt,
                            case XML_COMMENT_NODE:
                            case XML_CDATA_SECTION_NODE:
                            case XML_TEXT_NODE:
-                           case XML_NAMESPACE_DECL:
                                XP_TEST_HIT
                                break;
+                           case XML_NAMESPACE_DECL: {
+                               if (axis == AXIS_NAMESPACE) {
+                                   XP_TEST_HIT_NS
+                               } else {
+                                   hasNsNodes = 1;
+                                   XP_TEST_HIT
+                               }
+                               break;
+                            }
                            default:
                                break;
                        }
@@ -12691,6 +12694,14 @@ error:
     * Reset the context node.
     */
     xpctxt->node = oldContextNode;
+    /*
+    * When traversing the namespace axis in "toBool" mode, it's
+    * possible that tmpNsList wasn't freed.
+    */
+    if (xpctxt->tmpNsList != NULL) {
+        xmlFree(xpctxt->tmpNsList);
+        xpctxt->tmpNsList = NULL;
+    }
 
 #ifdef DEBUG_STEP
     xmlGenericError(xmlGenericErrorContext,
@@ -14784,6 +14795,10 @@ xmlXPathOptimizeExpression(xmlXPathCompExprPtr comp, xmlXPathStepOpPtr op)
        }
     }
 
+    /* OP_VALUE has invalid ch1. */
+    if (op->op == XPATH_OP_VALUE)
+        return;
+
     /* Recurse */
     if (op->ch1 != -1)
         xmlXPathOptimizeExpression(comp, &comp->steps[op->ch1]);
index 4b4ac2e..676c510 100644 (file)
@@ -85,7 +85,7 @@ xmlXPtrErrMemory(const char *extra)
  *
  * Handle a redefinition of attribute error
  */
-static void
+static void LIBXML_ATTR_FORMAT(3,0)
 xmlXPtrErr(xmlXPathParserContextPtr ctxt, int error,
            const char * msg, const xmlChar *extra)
 {
index 2a9f034..f33abdf 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -78,7 +88,6 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = xstc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
@@ -86,6 +95,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -110,6 +120,7 @@ am__can_run_installinfo = \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -151,6 +162,7 @@ HTML_DIR = @HTML_DIR@
 HTML_OBJ = @HTML_OBJ@
 HTTP_OBJ = @HTTP_OBJ@
 ICONV_LIBS = @ICONV_LIBS@
+ICU_CFLAGS = @ICU_CFLAGS@
 ICU_LIBS = @ICU_LIBS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
@@ -172,8 +184,10 @@ LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 LZMA_CFLAGS = @LZMA_CFLAGS@
 LZMA_LIBS = @LZMA_LIBS@
+MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -366,7 +380,7 @@ CLEANFILES = $(PYSCRIPTS) test.log
 all: all-am
 
 .SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@ -378,7 +392,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu xstc/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu xstc/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -391,9 +404,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 
-$(top_srcdir)/configure:  $(am__configure_deps)
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
 
@@ -554,6 +567,8 @@ uninstall-am:
        mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
        tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 #
 # Nothing is done by make, only make tests and
 # only if Python and Schemas are enabled.
diff --git a/xzlib.c b/xzlib.c
index 0dcb9f4..782957f 100644 (file)
--- a/xzlib.c
+++ b/xzlib.c
@@ -8,7 +8,7 @@
  */
 #define IN_LIBXML
 #include "libxml.h"
-#ifdef HAVE_LZMA_H
+#ifdef LIBXML_LZMA_ENABLED
 
 #include <string.h>
 #ifdef HAVE_ERRNO_H
@@ -34,7 +34,9 @@
 #ifdef HAVE_ZLIB_H
 #include <zlib.h>
 #endif
+#ifdef HAVE_LZMA_H
 #include <lzma.h>
+#endif
 
 #include "xzlib.h"
 #include <libxml/xmlmemory.h>
@@ -581,6 +583,10 @@ xz_decomp(xz_statep state)
             xz_error(state, LZMA_DATA_ERROR, "compressed data error");
             return -1;
         }
+        if (ret == LZMA_PROG_ERROR) {
+            xz_error(state, LZMA_PROG_ERROR, "compression error");
+            return -1;
+        }
     } while (strm->avail_out && ret != LZMA_STREAM_END);
 
     /* update available output and crc check value */
@@ -795,4 +801,4 @@ __libxml2_xzclose(xzFile file)
     xmlFree(state);
     return ret ? ret : LZMA_OK;
 }
-#endif /* HAVE_LZMA_H */
+#endif /* LIBXML_LZMA_ENABLED */