这将我的“最坏情况”长度设置为ARG_MAX + some max errno string length + size of a few other small strings)。我查阅过的每一个*nix文档似乎都表明,如果writev值之和超过了SSIZE_MAX,那么errno设置为EINVAL时,EINVAL将出错(或者“可能”,这种差异对此没有什么好处)。
If malloc fails, or if the link value is longer than SSIZE_MAX :-), free (buffer); /*Check whether increase is possible*/
if (SSIZE_MAX< buf_size || (SIZE_MAX