mirror of
https://github.com/nginx/nginx.git
synced 2025-02-25 18:55:26 -06:00
use copied strerror() messages and autoconfigured sys_nerr value
This commit is contained in:
34
auto/unix
34
auto/unix
@@ -109,37 +109,13 @@ ngx_feature_test="char buf[1]; ssize_t n; n = pwrite(1, buf, 1, 0)"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="strerror_r()"
|
||||
ngx_feature_name="NGX_HAVE_STRERROR_R"
|
||||
ngx_feature_run=yes
|
||||
ngx_feature_incs="#include <string.h>"
|
||||
ngx_feature="sys_nerr"
|
||||
ngx_feature_name="NGX_SYS_NERR"
|
||||
ngx_feature_run=value
|
||||
ngx_feature_incs='#include <stdio.h>'
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="char buf[1024]; long n; n = strerror_r(1, buf, 1024);
|
||||
if (n < 0 || n > 1024) return 1;"
|
||||
. auto/feature
|
||||
|
||||
|
||||
# GNU style strerror_r() returns not length, but pointer
|
||||
|
||||
ngx_feature="gnu style strerror_r()"
|
||||
ngx_feature_name="NGX_HAVE_GNU_STRERROR_R"
|
||||
ngx_feature_run=yes
|
||||
ngx_feature_incs="#include <string.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="char buf[1024]; long n; n = strerror_r(1, buf, 1024);
|
||||
if (n >= 0 && n < 1024) return 1;"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="sys_errlist[]"
|
||||
ngx_feature_name="NGX_HAVE_SYS_ERRLIST"
|
||||
ngx_feature_run=yes
|
||||
ngx_feature_incs="#include <stdio.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="int n = sys_nerr; const char *p = sys_errlist[1];"
|
||||
ngx_feature_test='printf("%d", sys_nerr);'
|
||||
. auto/feature
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user