K 10
svn:author
V 6
iulius
K 8
svn:date
V 27
2014-09-06T08:07:27.733184Z
K 7
svn:log
V 1292
Sync the xwrite library with upstream rra-c-util

- New inn/macros.h, inn/xwrite.h and portable/macros.h headers (extracted
from inn/defines.h and inn/libinn.h).

- New portable/uio.h header.

- Update include headers in several files to reflect these changes.

- clibrary.h now guarantees the inclusion of limits.h (to ensure the
availability of SIZE_TYPE on older systems).

- Switch to bmalloc where the other xmalloc infrastructure is not
required.  Don't bother converting tests that use xasprintf or
concat for the time being.

- Use calloc in preference to calculating a malloc size with
multiplication everywhere.  In most places this caution was probably
not necessary, but uniformity is easier to audit and no one will ever
notice the speed difference between malloc and calloc.

- Add bail or conditionals so that clang --analyze isn't worried about
NULL pointer dereferences in our tests.

- Also make xwritev more robust by doing range checking on iovcnt
early.  It's unlikely this would have caused a real problem anywhere,
but this is more obviously correct.

- The number of iovs remaining can't actually be zero unless the
system writev call is buggy, but the math is complex enough that
clang --analyze can't figure that out.  Add an assert to make the
assumption explicit.

END
