Mercurial > hg > nginx
diff auto/unix @ 6301:b5a87b51be24
Used the pwritev() syscall for writing files where possible.
It is more effective, because it doesn't require a separate lseek().
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Tue, 17 Nov 2015 19:01:41 +0300 |
parents | acba1656c474 |
children | 7142b04337d6 |
line wrap: on
line diff
--- a/auto/unix Tue Nov 17 19:01:41 2015 +0300 +++ b/auto/unix Tue Nov 17 19:01:41 2015 +0300 @@ -589,6 +589,22 @@ . auto/feature +# pwritev() was introduced in FreeBSD 6 and Linux 2.6.30, glibc 2.10 + +ngx_feature="pwritev()" +ngx_feature_name="NGX_HAVE_PWRITEV" +ngx_feature_run=no +ngx_feature_incs='#include <sys/uio.h>' +ngx_feature_path= +ngx_feature_libs= +ngx_feature_test="char buf[1]; struct iovec vec[1]; ssize_t n; + vec[0].iov_base = buf; + vec[0].iov_len = 1; + n = pwritev(1, vec, 1, 0); + if (n == -1) return 1" +. auto/feature + + ngx_feature="sys_nerr" ngx_feature_name="NGX_SYS_NERR" ngx_feature_run=value