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 ([EMAIL PROTECTED])
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to