[PATCH] Fix ./configure script for less error-forgiving compilers

Piotr Sikora piotr.sikora at frickle.com
Mon Mar 5 21:26:35 UTC 2012


Maxim,
any chances this will ever get committed?

Best regards,
Piotr Sikora < piotr.sikora at frickle.com >


--- auto/types/sizeof.orig      Thu Aug 12 04:08:09 2010
+++ auto/types/sizeof   Thu Aug 12 04:17:26 2010
@@ -19,12 +19,13 @@
#include <sys/time.h>
$NGX_INCLUDE_UNISTD_H
#include <signal.h>
+#include <stdio.h>
#include <sys/resource.h>
$NGX_INCLUDE_INTTYPES_H
$NGX_INCLUDE_AUTO_CONFIG_H

int main() {
-    printf("%d", sizeof($ngx_type));
+    printf("%zu", sizeof($ngx_type));
     return 0;
}

--- auto/types/typedef.orig     Wed Aug 30 10:39:17 2006
+++ auto/types/typedef  Tue Aug 24 19:38:06 2010
@@ -27,7 +27,8 @@
$NGX_INCLUDE_INTTYPES_H

int main() {
-    $ngx_try i = 0;
+    $ngx_try i;
+    i = 0;
     return 0;
}

--- auto/types/uintptr_t.orig   Sun Jul 29 18:24:53 2007
+++ auto/types/uintptr_t        Tue Aug 24 19:38:17 2010
@@ -14,7 +14,8 @@
$NGX_INTTYPES_H

int main() {
-    uintptr_t i = 0;
+    uintptr_t i;
+    i = 0;
     return 0;
}

--- auto/unix.orig      Thu Aug 12 04:33:51 2010
+++ auto/unix   Thu Aug 12 04:34:20 2010
@@ -82,7 +82,7 @@
ngx_feature="setproctitle()"
ngx_feature_name="NGX_HAVE_SETPROCTITLE"
ngx_feature_run=no
-ngx_feature_incs=
+ngx_feature_incs="#include <stdlib.h>"
ngx_feature_path=
ngx_feature_libs=$NGX_SETPROCTITLE_LIB
ngx_feature_test="setproctitle(\"test\");"



More information about the nginx-devel mailing list