aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2010-12-06 14:51:20 +0000
committerIgor Sysoev <igor@sysoev.ru>2010-12-06 14:51:20 +0000
commitadc70834116d4cba15c3ae4f1054c262b8b3a31c (patch)
treea0aef510d32329edfe132a301b11abb8900d95b2
parent2369c149b86e69999bc9a3c23f0416c63c6275f9 (diff)
downloadnginx-adc70834116d4cba15c3ae4f1054c262b8b3a31c.tar.gz
nginx-adc70834116d4cba15c3ae4f1054c262b8b3a31c.zip
test for maximum errno value, since Solaris has no sys_nerr
-rwxr-xr-xauto/unix23
1 files changed, 23 insertions, 0 deletions
diff --git a/auto/unix b/auto/unix
index a1c11628c..ee284e1d1 100755
--- a/auto/unix
+++ b/auto/unix
@@ -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