--- ./test-driver-wrapper.sh	Sun Sep  3 16:47:40 2017
+++ ./test-driver-wrapper.sh	Sat Oct  6 10:05:37 2018
@@ -1,4 +1,4 @@
-#! /bin/bash
+#! /bin/ksh
 #                          __  __            _
 #                       ___\ \/ /_ __   __ _| |_
 #                      / _ \\  /| '_ \ / _` | __|
@@ -29,15 +29,16 @@
 # USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 set -e
-top_srcdir="$(dirname "$(type -p "$0")")"
+#top_srcdir="$(dirname "$(type -p "$0")")"
+top_srcdir=/home/frank/src/expat-2.2.6
 top_builddir=..
 
 # Suck up all dash-dash test-driver arguments
-test_driver_args=()
-while [[ ${1} != '--' ]]; do
-    test_driver_args=( "${test_driver_args[@]}" "${1}" )
-    shift
-done
-shift  # drop "--"
+#test_driver_args=()
+#while [[ ${1} != '--' ]]; do
+#    test_driver_args=( "${test_driver_args[@]}" "${1}" )
+#    shift
+#done
+#shift  # drop "--"
 
-exec "${top_srcdir}"/conftools/test-driver "${test_driver_args[@]}" "${top_builddir}"/run.sh "$@"
+exec "${top_srcdir}"/conftools/test-driver "${1}" "${top_builddir}"/run.sh "$@"
--- ./tests/runtests.c	Sun Aug 12 21:40:00 2018
+++ ./tests/runtests.c	Thu Oct 11 21:18:46 2018
@@ -56,7 +56,11 @@
  #endif
     typedef unsigned __int64 uint64_t;
 #else
- #include <stdint.h> /* intptr_t uint64_t */
+ #if defined(__sgi) && !defined(__GNUC__) && defined(_LANGUAGE_C_PLUS_PLUS)
+  #include <inttypes.h>
+ #else
+  #include <stdint.h> /* intptr_t uint64_t */
+ #endif
 #endif
 
 
@@ -498,9 +502,9 @@
 START_TEST(test_siphash_spec)
 {
     /* https://131002.net/siphash/siphash.pdf (page 19, "Test values") */
-    const char message[] = "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09"
+    const char *message = "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09"
             "\x0a\x0b\x0c\x0d\x0e";
-    const size_t len = sizeof(message) - 1;
+    const size_t len = 15;
     const uint64_t expected = _SIP_ULL(0xa129ca61U, 0x49be45e5U);
     struct siphash state;
     struct sipkey key;
@@ -851,7 +855,7 @@
      *
      * where {A} is U+FF21, FULLWIDTH LATIN CAPITAL LETTER A
      */
-    char text[] =
+    char *text =
         "\000<\000?\000x\000m\000\154\000 \000v\000e\000r\000s\000i\000o"
         "\000n\000=\000'\0001\000.\000\060\000'\000 \000e\000n\000c\000o"
         "\000d\000i\000n\000g\000=\000'\000U\000T\000F\000-\0001\000\066"
@@ -859,6 +863,7 @@
         "\000<\000d\000o\000c\000 \000a\000=\000'\0001\0002\0003\000'\000>"
         "\000s\000o\000m\000e\000 \xff\x21\000 \000t\000e\000x\000t\000"
         "<\000/\000d\000o\000c\000>";
+    const size_t len = 140;
 #ifdef XML_UNICODE
     const XML_Char *expected = XCS("some \xff21 text");
 #else
@@ -869,7 +874,7 @@
     CharData_Init(&storage);
     XML_SetUserData(parser, &storage);
     XML_SetCharacterDataHandler(parser, accumulate_characters);
-    if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1, XML_TRUE) == XML_STATUS_ERROR)
+    if (_XML_Parse_SINGLE_BYTES(parser, text, len, XML_TRUE) == XML_STATUS_ERROR)
         xml_failure(parser);
     CharData_CheckXMLChars(&storage, expected);
 }
@@ -2316,12 +2321,13 @@
      *   <?xml version='1.0' encoding='utf-16'?>
      *   <a><![CDATA[hello]]></a>
      */
-    const char text[] =
+    const char *text =
             "\0<\0?\0x\0m\0l\0"
                 " \0v\0e\0r\0s\0i\0o\0n\0=\0'\0\x31\0.\0\x30\0'\0"
                 " \0e\0n\0c\0o\0d\0i\0n\0g\0=\0'\0u\0t\0f\0-\0""1\0""6\0'"
                 "\0?\0>\0\n"
             "\0<\0a\0>\0<\0!\0[\0C\0D\0A\0T\0A\0[\0h\0e\0l\0l\0o\0]\0]\0>\0<\0/\0a\0>";
+    size_t len = 128;
     const XML_Char *expected = XCS("hello");
 
     CharData storage;
@@ -2329,7 +2335,7 @@
     XML_SetUserData(parser, &storage);
     XML_SetCharacterDataHandler(parser, accumulate_characters);
 
-    if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text) - 1, XML_TRUE) == XML_STATUS_ERROR)
+    if (_XML_Parse_SINGLE_BYTES(parser, text, len, XML_TRUE) == XML_STATUS_ERROR)
         xml_failure(parser);
     CharData_CheckXMLChars(&storage, expected);
 }
@@ -2368,12 +2374,12 @@
 START_TEST(test_long_cdata_utf16)
 {
     /* Test data is:
-     * <?xlm version='1.0' encoding='utf-16'?>
+     * <?xml version='1.0' encoding='utf-16'?>
      * <a><![CDATA[
      * ABCDEFGHIJKLMNOP
      * ]]></a>
      */
-    const char text[] =
+    const char *text =
         "\0<\0?\0x\0m\0l\0 "
         "\0v\0e\0r\0s\0i\0o\0n\0=\0'\0\x31\0.\0\x30\0'\0 "
         "\0e\0n\0c\0o\0d\0i\0n\0g\0=\0'\0u\0t\0f\0-\0\x31\0\x36\0'\0?\0>"
@@ -2397,6 +2403,7 @@
         A_TO_P_IN_UTF16  A_TO_P_IN_UTF16  A_TO_P_IN_UTF16  A_TO_P_IN_UTF16
         A_TO_P_IN_UTF16
         "\0]\0]\0>\0<\0/\0a\0>";
+    size_t len = 2196;
     const XML_Char *expected =
         XCS("ABCDEFGHIJKLMNOPABCDEFGHIJKLMNOPABCDEFGHIJKLMNOPABCDEFGHIJKLMNOP")
         XCS("ABCDEFGHIJKLMNOPABCDEFGHIJKLMNOPABCDEFGHIJKLMNOPABCDEFGHIJKLMNOP")
@@ -2421,12 +2428,12 @@
     CharData_Init(&storage);
     XML_SetUserData(parser, &storage);
     XML_SetCharacterDataHandler(parser, accumulate_characters);
-    buffer = XML_GetBuffer(parser, sizeof(text) - 1);
+    buffer = XML_GetBuffer(parser, len);
     if (buffer == NULL)
         fail("Could not allocate parse buffer");
-    memcpy(buffer, text, sizeof(text) - 1);
+    memcpy(buffer, text, len);
     if (XML_ParseBuffer(parser,
-                        sizeof(text) - 1,
+                        len,
                         XML_TRUE) == XML_STATUS_ERROR)
         xml_failure(parser);
     CharData_CheckXMLChars(&storage, expected);
@@ -2447,7 +2454,7 @@
      *   UTF-16: 0xd834 0xdd5f
      *   UTF-8:  0xf0 0x9d 0x85 0x9f
      */
-    const char text[] =
+    const char *text =
         "\0<\0?\0x\0m\0l\0"
         " \0v\0e\0r\0s\0i\0o\0n\0=\0'\0\x31\0.\0\x30\0'\0"
         " \0e\0n\0c\0o\0d\0i\0n\0g\0=\0'\0u\0t\0f\0-\0""1\0""6\0'"
@@ -2455,6 +2462,7 @@
         "\0<\0a\0>\0<\0!\0[\0C\0D\0A\0T\0A\0["
         "\xd8\x34\xdd\x5e\xd8\x34\xdd\x5f"
         "\0]\0]\0>\0<\0/\0a\0>";
+    size_t len = 126;
 #ifdef XML_UNICODE
     const XML_Char *expected = XCS("\xd834\xdd5e\xd834\xdd5f");
 #else
@@ -2466,7 +2474,7 @@
     XML_SetUserData(parser, &storage);
     XML_SetCharacterDataHandler(parser, accumulate_characters);
 
-    if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text) - 1, XML_TRUE) == XML_STATUS_ERROR)
+    if (_XML_Parse_SINGLE_BYTES(parser, text, len, XML_TRUE) == XML_STATUS_ERROR)
         xml_failure(parser);
     CharData_CheckXMLChars(&storage, expected);
 }
@@ -2483,7 +2491,7 @@
      * with the UTF-16 surrogate pair in the wrong order, i.e.
      *   0xdc00 0xd800
      */
-    const char text[] =
+    const char *text =
         "\0<\0?\0x\0m\0l\0"
         " \0v\0e\0r\0s\0i\0o\0n\0=\0'\0\x31\0.\0\x30\0'\0"
         " \0e\0n\0c\0o\0d\0i\0n\0g\0=\0'\0u\0t\0f\0-\0""1\0""6\0'"
@@ -2491,8 +2499,9 @@
         "\0<\0a\0>\0<\0!\0[\0C\0D\0A\0T\0A\0["
         "\xdc\x00\xd8\x00"
         "\0]\0]\0>\0<\0/\0a\0>";
+    size_t len = 120;
 
-    if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text) - 1,
+    if (_XML_Parse_SINGLE_BYTES(parser, text, len,
                                 XML_TRUE) != XML_STATUS_ERROR)
         fail("Reversed UTF-16 surrogate pair not faulted");
     if (XML_GetErrorCode(parser) != XML_ERROR_INVALID_TOKEN)
@@ -2564,12 +2573,13 @@
         enum XML_Error expected_error;
     };
 
-    const char prolog[] =
+    const char *prolog =
         "\0<\0?\0x\0m\0l\0"
         " \0v\0e\0r\0s\0i\0o\0n\0=\0'\0\x31\0.\0\x30\0'\0"
         " \0e\0n\0c\0o\0d\0i\0n\0g\0=\0'\0u\0t\0f\0-\0""1\0""6\0'"
         "\0?\0>\0\n"
         "\0<\0a\0>";
+    size_t len = 86;
     struct CaseData cases[] = {
         {1, "\0", XML_ERROR_UNCLOSED_TOKEN},
         {2, "\0<", XML_ERROR_UNCLOSED_TOKEN},
@@ -2610,7 +2620,7 @@
         enum XML_Status actual_status;
         enum XML_Error actual_error;
 
-        if (_XML_Parse_SINGLE_BYTES(parser, prolog, (int)sizeof(prolog)-1,
+        if (_XML_Parse_SINGLE_BYTES(parser, prolog, len,
                                     XML_FALSE) == XML_STATUS_ERROR)
             xml_failure(parser);
         actual_status = _XML_Parse_SINGLE_BYTES(parser,
@@ -4451,17 +4461,18 @@
                                      const XML_Char *UNUSED_P(systemId),
                                      const XML_Char *UNUSED_P(publicId))
 {
-    const char text[] =
+    const char *text =
         /* <![IGNORE[<!ELEMENT e (#PCDATA)*>]]> */
         "\0<\0!\0[\0I\0G\0N\0O\0R\0E\0["
         "\0<\0!\0E\0L\0E\0M\0E\0N\0T\0 \0e\0 "
         "\0(\0#\0P\0C\0D\0A\0T\0A\0)\0*\0>\0]\0]\0>";
+    size_t len = 72;
     XML_Parser ext_parser;
 
     ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL);
     if (ext_parser == NULL)
         fail("Could not create external entity parser");
-    if (_XML_Parse_SINGLE_BYTES(ext_parser, text, (int)sizeof(text)-1,
+    if (_XML_Parse_SINGLE_BYTES(ext_parser, text, len,
                                 XML_TRUE) == XML_STATUS_ERROR)
         xml_failure(parser);
 
@@ -4471,12 +4482,13 @@
 
 START_TEST(test_ignore_section_utf16_be)
 {
-    const char text[] =
+    const char *text =
         /* <!DOCTYPE d SYSTEM 's'> */
         "\0<\0!\0D\0O\0C\0T\0Y\0P\0E\0 \0d\0 "
         "\0S\0Y\0S\0T\0E\0M\0 \0'\0s\0'\0>\0\n"
         /* <d><e>&en;</e></d> */
         "\0<\0d\0>\0<\0e\0>\0&\0e\0n\0;\0<\0/\0e\0>\0<\0/\0d\0>";
+    size_t len = 84;
     const XML_Char *expected =
         XCS("<![IGNORE[<!ELEMENT e (#PCDATA)*>]]>\n&en;");
     CharData storage;
@@ -4492,7 +4504,7 @@
     XML_SetElementDeclHandler(parser, dummy_element_decl_handler);
     XML_SetStartElementHandler(parser, dummy_start_element);
     XML_SetEndElementHandler(parser, dummy_end_element);
-    if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
+    if (_XML_Parse_SINGLE_BYTES(parser, text, len,
                                 XML_TRUE) == XML_STATUS_ERROR)
         xml_failure(parser);
     CharData_CheckXMLChars(&storage, expected);
@@ -5609,7 +5621,7 @@
 
 START_TEST(test_invalid_character_entity_3)
 {
-    const char text[] =
+    const char *text =
         /* <!DOCTYPE doc [\n */
         "\0<\0!\0D\0O\0C\0T\0Y\0P\0E\0 \0d\0o\0c\0 \0[\0\n"
         /* U+0E04 = KHO KHWAI
@@ -5621,8 +5633,8 @@
         "\0]\0>\0\n"
         /* <doc>&entity;</doc> */
         "\0<\0d\0o\0c\0>\0&\0e\0n\0t\0i\0t\0y\0;\0<\0/\0d\0o\0c\0>";
-
-    if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
+    size_t len = 126;
+    if (_XML_Parse_SINGLE_BYTES(parser, text, len,
                                 XML_TRUE) != XML_STATUS_ERROR)
         fail("Invalid start of entity name not faulted");
     if (XML_GetErrorCode(parser) != XML_ERROR_UNDEFINED_ENTITY)
@@ -5770,7 +5782,7 @@
 
 START_TEST(test_utf16_be_pi)
 {
-    const char text[] =
+    const char *text =
         /* <?{KHO KHWAI}{CHO CHAN}?>
          * where {KHO KHWAI} = U+0E04
          * and   {CHO CHAN}  = U+0E08
@@ -5778,6 +5790,7 @@
         "\0<\0?\x0e\x04\x0e\x08\0?\0>"
         /* <q/> */
         "\0<\0q\0/\0>";
+    size_t len = 20;
 #ifdef XML_UNICODE
     const XML_Char *expected = XCS("\x0e04\x0e08: \n");
 #else
@@ -5788,7 +5801,7 @@
     CharData_Init(&storage);
     XML_SetProcessingInstructionHandler(parser, accumulate_pi_characters);
     XML_SetUserData(parser, &storage);
-    if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
+    if (_XML_Parse_SINGLE_BYTES(parser, text, len,
                                 XML_TRUE) == XML_STATUS_ERROR)
         xml_failure(parser);
     CharData_CheckXMLChars(&storage, expected);
@@ -5807,11 +5820,12 @@
 
 START_TEST(test_utf16_be_comment)
 {
-    const char text[] =
+    const char *text =
         /* <!-- Comment A --> */
         "\0<\0!\0-\0-\0 \0C\0o\0m\0m\0e\0n\0t\0 \0A\0 \0-\0-\0>\0\n"
         /* <doc/> */
         "\0<\0d\0o\0c\0/\0>";
+    size_t len = 50;
     const XML_Char *expected = XCS(" Comment A ");
     CharData storage;
 
@@ -5818,7 +5832,7 @@
     CharData_Init(&storage);
     XML_SetCommentHandler(parser, accumulate_comment);
     XML_SetUserData(parser, &storage);
-    if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
+    if (_XML_Parse_SINGLE_BYTES(parser, text, len,
                                 XML_TRUE) == XML_STATUS_ERROR)
         xml_failure(parser);
     CharData_CheckXMLChars(&storage, expected);
@@ -6666,7 +6680,7 @@
      * where {KHO KHWAI} = U+0E04 = 0xe0 0xb8 0x84 in UTF-8
      * and   {CHO CHAN}  = U+0E08 = 0xe0 0xb8 0x88 in UTF-8
      */
-    const char text[] =
+    const char *text =
         "\0<\0!\0D\0O\0C\0T\0Y\0P\0E\0 \0d\0o\0c\0 \0[\0\n"
         "\0<\0!\0E\0N\0T\0I\0T\0Y\0 \0%\0 \x0e\x04\x0e\x08\0 "
         "\0'\0<\0!\0E\0L\0E\0M\0E\0N\0T\0 "
@@ -6674,6 +6688,7 @@
         "\0%\x0e\x04\x0e\x08\0;\0\n"
         "\0]\0>\0\n"
         "\0<\0d\0o\0c\0>\0<\0/\0d\0o\0c\0>";
+    size_t len = 154;
 #ifdef XML_UNICODE
     const XML_Char *expected =
         XCS("\x0e04\x0e08=<!ELEMENT doc (#PCDATA)>\n");
@@ -6686,7 +6701,7 @@
     CharData_Init(&storage);
     XML_SetUserData(parser, &storage);
     XML_SetEntityDeclHandler(parser, accumulate_entity_decl);
-    if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
+    if (_XML_Parse_SINGLE_BYTES(parser, text, len,
                                 XML_TRUE) == XML_STATUS_ERROR)
         xml_failure(parser);
     CharData_CheckXMLChars(&storage, expected);
@@ -6720,13 +6735,13 @@
      * where {KHO KHWAI} = U+0E04 = 0xe0 0xb8 0x84 in UTF-8
      * and   {CHO CHAN}  = U+0E08 = 0xe0 0xb8 0x88 in UTF-8
      */
-    const char text[] =
+    const char *text =
         "\0<\0!\0D\0O\0C\0T\0Y\0P\0E\0 \0d\0 \0[\0\n"
         "\0<\0!\0A\0T\0T\0L\0I\0S\0T\0 \0d\0 \0a\0 \0C\0D\0A\0T\0A\0 "
         "\0#\x0e\x04\x0e\x08\0>\0\n"
         "\0]\0>\0<\0d\0/\0>";
-
-    if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
+    size_t len = 90;
+    if (_XML_Parse_SINGLE_BYTES(parser, text, len,
                                 XML_TRUE) != XML_STATUS_ERROR)
         fail("Invalid UTF16 attribute keyword not faulted");
     if (XML_GetErrorCode(parser) != XML_ERROR_SYNTAX)
@@ -6751,7 +6766,7 @@
 
 START_TEST(test_bad_doctype_utf16)
 {
-    const char text[] =
+    const char *text =
         /* <!DOCTYPE doc [ \x06f2 ]><doc/>
          *
          * U+06F2 = EXTENDED ARABIC-INDIC DIGIT TWO, a valid number
@@ -6760,8 +6775,9 @@
         "\0<\0!\0D\0O\0C\0T\0Y\0P\0E\0 \0d\0o\0c\0 \0[\0 "
         "\x06\xf2"
         "\0 \0]\0>\0<\0d\0o\0c\0/\0>";
+    size_t len = 52;
 
-    if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
+    if (_XML_Parse_SINGLE_BYTES(parser, text, len,
                                 XML_TRUE) != XML_STATUS_ERROR)
         fail("Invalid bytes in DOCTYPE not faulted");
     if (XML_GetErrorCode(parser) != XML_ERROR_SYNTAX)
@@ -6826,10 +6842,11 @@
 
 START_TEST(test_entity_in_utf16_be_attr)
 {
-    const char text[] =
+    const char *text =
         /* <e a='&#228; &#x00E4;'></e> */
         "\0<\0e\0 \0a\0=\0'\0&\0#\0\x32\0\x32\0\x38\0;\0 "
         "\0&\0#\0x\0\x30\0\x30\0E\0\x34\0;\0'\0>\0<\0/\0e\0>";
+    size_t len = 54;
 #ifdef XML_UNICODE
     const XML_Char *expected = XCS("\x00e4 \x00e4");
 #else
@@ -6840,7 +6857,7 @@
     CharData_Init(&storage);
     XML_SetUserData(parser, &storage);
     XML_SetStartElementHandler(parser, accumulate_attribute);
-    if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
+    if (_XML_Parse_SINGLE_BYTES(parser, text, len,
                                 XML_TRUE) == XML_STATUS_ERROR)
         xml_failure(parser);
     CharData_CheckXMLChars(&storage, expected);
@@ -6872,7 +6889,7 @@
 
 START_TEST(test_entity_public_utf16_be)
 {
-    const char text[] =
+    const char *text =
         /* <!DOCTYPE d [ */
         "\0<\0!\0D\0O\0C\0T\0Y\0P\0E\0 \0d\0 \0[\0\n"
         /* <!ENTITY % e PUBLIC 'foo' 'bar.ent'> */
@@ -6884,6 +6901,7 @@
         "\0]\0>\0\n"
         /* <d>&j;</d> */
         "\0<\0d\0>\0&\0j\0;\0<\0/\0d\0>";
+    size_t len = 136;
     ExtTest2 test_data = {
         /* <!ENTITY j 'baz'> */
         "\0<\0!\0E\0N\0T\0I\0T\0Y\0 \0j\0 \0'\0b\0a\0z\0'\0>",
@@ -6901,7 +6919,7 @@
     XML_SetExternalEntityRefHandler(parser, external_entity_loader2);
     XML_SetUserData(parser, &test_data);
     XML_SetCharacterDataHandler(parser, ext2_accumulate_characters);
-    if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
+    if (_XML_Parse_SINGLE_BYTES(parser, text, len,
                                 XML_TRUE) == XML_STATUS_ERROR)
         xml_failure(parser);
     CharData_CheckXMLChars(&storage, expected);
@@ -7826,11 +7844,12 @@
 
 START_TEST(test_ns_utf16_element_leafname)
 {
-    const char text[] =
+    const char *text =
         /* <n:{KHO KHWAI} xmlns:n='URI'/>
          * where {KHO KHWAI} = U+0E04 = 0xe0 0xb8 0x84 in UTF-8
          */
         "\0<\0n\0:\x0e\x04\0 \0x\0m\0l\0n\0s\0:\0n\0=\0'\0U\0R\0I\0'\0/\0>";
+    size_t len = 40;
 #ifdef XML_UNICODE
     const XML_Char *expected = XCS("URI \x0e04");
 #else
@@ -7841,7 +7860,7 @@
     CharData_Init(&storage);
     XML_SetStartElementHandler(parser, start_element_event_handler);
     XML_SetUserData(parser, &storage);
-    if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
+    if (_XML_Parse_SINGLE_BYTES(parser, text, len,
                                 XML_TRUE) == XML_STATUS_ERROR)
         xml_failure(parser);
     CharData_CheckXMLChars(&storage, expected);
@@ -7850,7 +7869,7 @@
 
 START_TEST(test_ns_utf16_doctype)
 {
-    const char text[] =
+    const char *text =
         /* <!DOCTYPE foo:{KHO KHWAI} [ <!ENTITY bar 'baz'> ]>\n
          * where {KHO KHWAI} = U+0E04 = 0xe0 0xb8 0x84 in UTF-8
          */
@@ -7862,6 +7881,7 @@
         "\0x\0m\0l\0n\0s\0:\0f\0o\0o\0=\0'\0U\0R\0I\0'\0>"
         "\0&\0b\0a\0r\0;"
         "\0<\0/\0f\0o\0o\0:\x0e\x04\0>";
+    size_t len = 154;
 #ifdef XML_UNICODE
     const XML_Char *expected = XCS("URI \x0e04");
 #else
@@ -7873,7 +7893,7 @@
     XML_SetUserData(parser, &storage);
     XML_SetStartElementHandler(parser, start_element_event_handler);
     XML_SetUnknownEncodingHandler(parser, MiscEncodingHandler, NULL);
-    if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
+    if (_XML_Parse_SINGLE_BYTES(parser, text, len,
                                 XML_TRUE) == XML_STATUS_ERROR)
         xml_failure(parser);
     CharData_CheckXMLChars(&storage, expected);
--- lib/siphash.h	Fri Oct 12 15:51:49 2018
+++ lib/siphash.h	Fri Oct 12 15:52:06 2018
@@ -99,7 +99,11 @@
   typedef unsigned __int32 uint32_t;
   typedef unsigned __int64 uint64_t;
 #else
- #include <stdint.h> /* uint64_t uint32_t uint8_t */
+ #if defined(__sgi) && !defined(__GNUC__) && defined(_LANGUAGE_C_PLUS_PLUS)
+  #include <inttypes.h>
+ #else
+  #include <stdint.h> /* uint64_t uint32_t uint8_t */
+ #endif
 #endif
 
 
