Portable implementation of snprintf(3), vsnprintf(3), asprintf(3), and vasprintf(3)