Жук в 0.5.24

Igor Sysoev is at rambler-co.ru
Fri Jun 8 16:52:25 MSD 2007


On Fri, Jun 08, 2007 at 04:48:14PM +0400, Anton Noginov wrote:

> 		Коллеги, это я криворукий, или действительно 0.5.24 не собирается? 
> 
> 	./configure --prefix=/home/toxa/nginx  --without-http_rewrite_module
> 
> 
> gcc -c -O -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter 
> -Wno-unused-function -Wunused-variable -Wunused-value -Werror -g  -I src/core 
> -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I 
> src/http/modules \
>         -o objs/src/http/ngx_http_core_module.o \
>         src/http/ngx_http_core_module.c
> src/http/ngx_http_core_module.c: In function `ngx_http_core_server':
> src/http/ngx_http_core_module.c:1649: structure has no member named `regex'
> src/http/ngx_http_core_module.c: In function `ngx_http_core_location':
> src/http/ngx_http_core_module.c:1835: structure has no member named `regex'
> make[1]: *** [objs/src/http/ngx_http_core_module.o] Ошибка 1
> make[1]: Выход из каталог `/home/toxa/build/nginx-0.5.24'
> make: *** [build] Ошибка 2

Это 0.5.25 в этом месте сломался. Патч прилагается.


-- 
Игорь Сысоев
http://sysoev.ru
-------------- next part --------------
Index: src/http/ngx_http_core_module.c
===================================================================
--- src/http/ngx_http_core_module.c	(revision 564)
+++ src/http/ngx_http_core_module.c	(working copy)
@@ -1552,13 +1552,15 @@
 {
     char                        *rv;
     void                        *mconf;
-    ngx_uint_t                   i, m;
+    ngx_uint_t                   i;
     ngx_conf_t                   pcf;
     ngx_http_module_t           *module;
     ngx_http_conf_ctx_t         *ctx, *http_ctx;
     ngx_http_core_srv_conf_t    *cscf, **cscfp;
+    ngx_http_core_main_conf_t   *cmcf;
+#if (NGX_PCRE)
     ngx_http_core_loc_conf_t   **clcfp;
-    ngx_http_core_main_conf_t   *cmcf;
+#endif
 
     ctx = ngx_pcalloc(cf->pool, sizeof(ngx_http_conf_ctx_t));
     if (ctx == NULL) {
@@ -1582,12 +1584,12 @@
         return NGX_CONF_ERROR;
     }
 
-    for (m = 0; ngx_modules[m]; m++) {
-        if (ngx_modules[m]->type != NGX_HTTP_MODULE) {
+    for (i = 0; ngx_modules[i]; i++) {
+        if (ngx_modules[i]->type != NGX_HTTP_MODULE) {
             continue;
         }
 
-        module = ngx_modules[m]->ctx;
+        module = ngx_modules[i]->ctx;
 
         if (module->create_srv_conf) {
             mconf = module->create_srv_conf(cf);
@@ -1595,7 +1597,7 @@
                 return NGX_CONF_ERROR;
             }
 
-            ctx->srv_conf[ngx_modules[m]->ctx_index] = mconf;
+            ctx->srv_conf[ngx_modules[i]->ctx_index] = mconf;
         }
 
         if (module->create_loc_conf) {
@@ -1604,7 +1606,7 @@
                 return NGX_CONF_ERROR;
             }
 
-            ctx->loc_conf[ngx_modules[m]->ctx_index] = mconf;
+            ctx->loc_conf[ngx_modules[i]->ctx_index] = mconf;
         }
     }
 
@@ -1642,6 +1644,8 @@
     ngx_sort(cscf->locations.elts, (size_t) cscf->locations.nelts,
              sizeof(ngx_http_core_loc_conf_t *), ngx_http_core_cmp_locations);
 
+#if (NGX_PCRE)
+
     cscf->regex_start = cscf->locations.nelts;
     clcfp = cscf->locations.elts;
 
@@ -1652,6 +1656,8 @@
         }
     }
 
+#endif
+
     return rv;
 }
 
@@ -1660,7 +1666,7 @@
 ngx_http_core_location(ngx_conf_t *cf, ngx_command_t *cmd, void *dummy)
 {
     char                      *rv;
-    ngx_uint_t                 i, m;
+    ngx_uint_t                 i;
     ngx_str_t                 *value;
     ngx_conf_t                 save;
     ngx_http_module_t         *module;
@@ -1686,17 +1692,17 @@
         return NGX_CONF_ERROR;
     }
 
-    for (m = 0; ngx_modules[m]; m++) {
-        if (ngx_modules[m]->type != NGX_HTTP_MODULE) {
+    for (i = 0; ngx_modules[i]; i++) {
+        if (ngx_modules[i]->type != NGX_HTTP_MODULE) {
             continue;
         }
 
-        module = ngx_modules[m]->ctx;
+        module = ngx_modules[i]->ctx;
 
         if (module->create_loc_conf) {
-            ctx->loc_conf[ngx_modules[m]->ctx_index] =
+            ctx->loc_conf[ngx_modules[i]->ctx_index] =
                                                    module->create_loc_conf(cf);
-            if (ctx->loc_conf[ngx_modules[m]->ctx_index] == NULL) {
+            if (ctx->loc_conf[ngx_modules[i]->ctx_index] == NULL) {
                  return NGX_CONF_ERROR;
             }
         }
@@ -1828,6 +1834,8 @@
     ngx_sort(clcf->locations->elts, (size_t) clcf->locations->nelts,
              sizeof(ngx_http_core_loc_conf_t *), ngx_http_core_cmp_locations);
 
+#if (NGX_PCRE)
+
     clcf->regex_start = clcf->locations->nelts;
     clcfp = clcf->locations->elts;
 
@@ -1838,6 +1846,8 @@
         }
     }
 
+#endif
+
     return rv;
 }
 


More information about the nginx-ru mailing list