K 10
svn:author
V 6
iulius
K 8
svn:date
V 27
2014-09-05T19:32:31.667494Z
K 7
svn:log
V 1072
sync the xmalloc library with its latest upstream version

Changes are:
- Add xreallocarray to the xmalloc library, which is a checked version of
reallocarray similar to what xrealloc is for realloc.

- Prefer reallocarray to realloc for multiplied sizes in vector
manipulations.

- Also change the memory thresholds so that the xmalloc test works on
amd64 Debian Linux again.

- xasprintf and xvasprintf are now void functions and always call the
xmalloc failure handler on any error, not just on ENOMEM errors.  The
faint chance that the underlying asprintf function could return some
other error isn't worth the additional code complexity of still having
to check the return status and then probably abort anyway.

- In xasprintf and xvasprintf, distinguish between failure to allocate
memory and failure to format the output.  Report the latter by passing
0 to the failure handler, and special-case that in the default failure
handler to report a different error message.

- Avoid excessive memory allocation when duplicating short
nul-terminated strings in xstrndup.

END
