test for maximum errno value, since Solaris has no sys_nerr

This commit is contained in:
Igor Sysoev 2010-12-06 14:51:20 +00:00
parent 2369c149b8
commit adc7083411

View File

@ -134,6 +134,29 @@ if [ $ngx_found = no ]; then
fi
if [ $ngx_found = no ]; then
# Solaris has no sys_nerr
ngx_feature='maximum errno'
ngx_feature_name=NGX_SYS_NERR
ngx_feature_run=value
ngx_feature_incs='#include <errno.h>
#include <stdio.h>'
ngx_feature_path=
ngx_feature_libs=
ngx_feature_test='int n;
for (n = 1; n < 1000; n++) {
errno = 0;
strerror(n);
if (errno == EINVAL) {
printf("%d", n);
return 0;
}
}'
. auto/feature
fi
ngx_feature="localtime_r()"
ngx_feature_name="NGX_HAVE_LOCALTIME_R"
ngx_feature_run=no