ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: а проект nginx-ctpp похоже уже забросили ?


  • To: nginx-ru@xxxxxxxxx
  • Subject: Re: а проект nginx-ctpp похоже уже забросили ?
  • From: Валентин Бартенев <ne@xxxxxxxx>
  • Date: Thu, 17 May 2012 12:15:19 +0400
  • Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=vbart.ru; s=mail; h=Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:In-Reply-To:References:Date:Subject:To:From; bh=xes/e5yVAY8HKO0PlmLRJXi4eRC2pxbSD5sHqHB9ryc=; b=oBP1JjEo2FkI50ZFvS/cGLOP96aNFEKa86t7W8sERlXitlyIVOyKFYfgm2ZbVOxkcmYMh+jbFmQk1XInG2eX7u4rGkaEERe5xOHUlQqZZwxSJVnFq1O8lu4YOIoZVoiDKquFNkeHSrOb5kEQDQXMbuUO188NJSzIjXpC8nfNdaqtr27QttGgOl2A1kO49qwzF3c7+RQRcGYwKYH33zy/5qBJJfCnGT3qJ3UjfA1K9AbKp62hSW6QTSj3a1V0GPadQlFjeezgxIsFa4zGEwC4OZ9g7rUVvZbD+3xckPvl+HPj6HrTUG99kq2U6DOEK7jWQsfdPkDWGRp12iZT3CsZhQ==;
  • In-reply-to: <E1SUvNf-0005Va-QW.bdfy-mail-ru@f171.mail.ru>
  • References: <201205170328.12168.ne@vbart.ru> <E1SUuHF-0004Ru-Mt.vladsm-mail-ru@f51.mail.ru> <E1SUvNf-0005Va-QW.bdfy-mail-ru@f171.mail.ru>

On Thursday 17 May 2012 11:44:15 Ivan wrote:
> тк багтрекер не работает поясню в чем заключ баг:
> 
> gcc 4.4.6,  ctpp2-2.7.5. nginx-1.2. Был наложен патч на nginx:
> 
> --- auto/cc/gcc 2012-02-23 20:06:39.000000000 -0600
> +++ auto/cc/gcc.fixed 2012-02-23 20:07:08.000000000 -0600
> @@ -170,7 +170,7 @@
> 
> 
> # stop on warning
> -CFLAGS="$CFLAGS -Werror"
> +# CFLAGS="$CFLAGS -Werror"
> 
> ошибка при сборке nginx с параметрами:
> ./configure --add-module=./../nginx-ctpp/
> In file included from src/core/ngx_core.h:64,
>                  from ./../nginx-ctpp//sources/ctpp2_process.h:12,
>                  from ./../nginx-ctpp//sources/ctpp2_process.cpp:7:
> src/core/ngx_regex.h:24: error: declaration of ?pcre* <anonymous
> struct>::pcre? /usr/include/pcre.h:200: error: changes meaning of ?pcre?
> from ?typedef struct real_pcre pcre? make[1]: ***
> [objs/addon/sources/ctpp2_process.o] Error 1
> make[1]: Leaving directory `/home/isiyanko/rpmbuild/BUILDROOT/nginx-1.2.0'
> make: *** [build] Error 2
> 

Держите патч на nginx. С ним должно собираться без проблем. Патч нужен только 
для версий 1.1.12 и выше.

Index: src/core/ngx_regex.h
===================================================================
--- src/core/ngx_regex.h        (revision 4638)
+++ src/core/ngx_regex.h        (working copy)
@@ -21,7 +21,7 @@
 
 
 typedef struct {
-    pcre        *pcre;
+    pcre        *expression;
     pcre_extra  *extra;
 } ngx_regex_t;
 
@@ -50,8 +50,8 @@
 ngx_int_t ngx_regex_compile(ngx_regex_compile_t *rc);
 
 #define ngx_regex_exec(re, s, captures, size)                                -    pcre_exec(re->pcre, re->extra, (const char *) (s)->data, (s)->len, 0, 0, -              captures, size)
+    pcre_exec(re->expression, re->extra, (const char *) (s)->data, (s)->len, +              0, 0, captures, size)
 #define ngx_regex_exec_n      "pcre_exec()"
 
 ngx_int_t ngx_regex_exec_array(ngx_array_t *a, ngx_str_t *s, ngx_log_t *log);
Index: src/core/ngx_regex.c
===================================================================
--- src/core/ngx_regex.c        (revision 4638)
+++ src/core/ngx_regex.c        (working copy)
@@ -152,7 +152,7 @@
         return NGX_ERROR;
     }
 
-    rc->regex->pcre = re;
+    rc->regex->expression = re;
 
     /* do not study at runtime */
 
@@ -367,8 +367,8 @@
             i = 0;
         }
 
-        elts[i].regex->extra = pcre_study(elts[i].regex->pcre, opt, &errstr);
-
+        elts[i].regex->extra = pcre_study(elts[i].regex->expression, opt,
+                                          &errstr);
         if (errstr != NULL) {
             ngx_log_error(NGX_LOG_ALERT, cycle->log, 0,
                           "pcre_study() failed: %s in \"%s\"",
@@ -380,7 +380,7 @@
             int jit, n;
 
             jit = 0;
-            n = pcre_fullinfo(elts[i].regex->pcre, elts[i].regex->extra,
+            n = pcre_fullinfo(elts[i].regex->expression, elts[i].regex->extra,
                               PCRE_INFO_JIT, &jit);
 
             if (n != 0 || jit != 1) {

_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.