Re: [xml] Tru64 UNIX 5.1/IRIX 6.5 test suite errors



On Wed, Oct 26, 2005 at 01:48:03PM -0500, Albert Chin wrote:
On Wed, Oct 26, 2005 at 01:27:43PM -0500, Albert Chin wrote:

I replaced vsnprintf() with trio_vsnprintf() on these platforms in
error.c and:
  ./runtest "Error cases regression tests"
  ## Error cases regression tests
  Total 8 tests, no errors

Does libxml assume a C99 vsnprintf() in error.c?

All tests pass with trio_vsnprintf() on these two platforms.

On IRIX and Tru64 UNIX, vsnprintf() returns the number of characters
transmitted, _not_ the number of characters that would have been
transmitted if the buffer were large enough. From error.c:
        va_start(ap, msg);                                      \
        chars = vsnprintf(str, size, msg, ap);                  \
        va_end(ap);                                             \
        if ((chars > -1) && (chars < size))                     \
            break;                                              \
        if (chars > -1)                                         \
            size += chars + 1;                                  \
        else                                                    \
            size += 100;                                        \

This definitely assumes a C99 vsnprintf().

-- 
albert chin (china thewrittenword com)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]