diff auto/unix @ 4354:cdb2e95bd3d0 stable-1.0

Merge of r4231, r4300, r4303, r4304: Configure/build changes and fixes: *) Revamped "configure --help" text. *) FreeBSD 10-current has recently gotten POSIX_FADV_* macros. A fix for the broken build applied. *) AIX 7 defines sys_nerr in errno.h, therefore <errno.h> included in the sys_nerr test. When sys_nerr and _sys_nerr are missed on a particular platform and our euristic for a maximum errno detection applied always print the maximum errno number we reached instead of printing void. This makes possible to build nginx on AIX 7.1. *) Made it possible to build/install from the SVN checkout.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 14 Dec 2011 13:34:16 +0000
parents 997651ba1871
children c4513d4dd024 4919fb357a5d
line wrap: on
line diff
--- a/auto/unix
+++ b/auto/unix
@@ -496,7 +496,8 @@ ngx_feature_test="char buf[1]; ssize_t n
 ngx_feature="sys_nerr"
 ngx_feature_name="NGX_SYS_NERR"
 ngx_feature_run=value
-ngx_feature_incs='#include <stdio.h>'
+ngx_feature_incs='#include <errno.h>
+                  #include <stdio.h>'
 ngx_feature_path=
 ngx_feature_libs=
 ngx_feature_test='printf("%d", sys_nerr);'
@@ -538,10 +539,10 @@ if [ $ngx_found = no ]; then
                               || p == NULL
                               || strncmp(p, "Unknown error", 13) == 0)
                           {
-                              printf("%d", n);
-                              return 0;
+                              break;
                           }
-                     }'
+                      }
+                      printf("%d", n);'
     . auto/feature
 fi