Mercurial > hg > nginx
changeset 3821:573cd56f006b
test for maximum errno value, since Solaris has no sys_nerr
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 06 Dec 2010 14:51:20 +0000 |
parents | af202ffad952 |
children | 75ffcfc700f3 |
files | auto/unix |
diffstat | 1 files changed, 23 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/auto/unix Mon Dec 06 14:50:27 2010 +0000 +++ b/auto/unix Mon Dec 06 14:51:20 2010 +0000 @@ -134,6 +134,29 @@ 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