nginx-0.8.30

Denis F. Latypoff denis на gostats.ru
Пн Дек 21 13:43:48 MSK 2009


Hello Maxim,

Monday, December 21, 2009, 4:28:37 PM, you wrote:

> Hello!

> On Mon, Dec 21, 2009 at 03:36:32PM +0600, Denis F. Latypoff wrote:

>> Hello Andrew,
>> 
>> Monday, December 21, 2009, 3:01:36 PM, you wrote:
>> 
>> > Hello Igor,
>> 
>> IS>> Изменения в nginx 0.8.30                                          15.12.2009
>> > у меня не собирается
>> 
>> > CentOS 5.x / x64 / gcc (GCC) 4.1.2 20071124 (Red Hat 4.1.2-42)
>> 
>> > ./configure \
>> >  --with-cc-opt="-Os" \                                             
>> >  --with-md5=../md5 \                                               
>> >  --with-md5-opt="-Os" \                                            
>> >  --with-md5-asm \                                                  
>> >  --with-http_stub_status_module \                                  
>> >  --with-rtsig_module \                                             
>> >  --with-select_module \                                            
>> >  --with-poll_module \                                              
>> >  --with-http_ssl_module \                                          
>> >  --with-http_realip_module \                                       
>> >  --with-mail \                                                     
>> >  --with-mail_ssl_module \                                          
>> >  --user=wwwrun \                                                   
>> >  --group=www
>> 
>> 
>> > gcc -c -O -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter
>> > -Wunused-function -Wunused-variable -Wunused-value -Werror -g -Os -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_request.o \
>> >                 src/http/ngx_http_request.c
>> > cc1: warnings being treated as errors
>> > src/http/ngx_http_request.c: In function 'ngx_http_terminate_request':
>> > src/http/ngx_http_request.c:2064: warning: dereferencing
>> > type-punned pointer will break strict-aliasing rules
>> 
>> > и похоже что дело в --with-cc-opt="-Os"
>> 
>> 
>> patch attached.
>> 
>> -- 
>> Best regards,
>>  Denis                            mailto:denis at gostats.ru

>> diff -ru nginx-0.8.30/src/http/ngx_http.h nginx-0.8.30.new/src/http/ngx_http.h
>> --- nginx-0.8.30/src/http/ngx_http.h  2009-11-30 19:15:10.000000000 +0600
>> +++ nginx-0.8.30.new/src/http/ngx_http.h      2009-12-21 15:34:54.000000000 +0600
>> @@ -94,7 +94,8 @@
>>  void ngx_http_request_empty_handler(ngx_http_request_t *r);
>>  
>>  
>> -#define ngx_http_ephemeral(r)  (ngx_http_ephemeral_t *) (&r->uri_start)
>> +#define ngx_http_ephemeral(r)                                                 \
>> +    (ngx_http_ephemeral_t *) (u_char *) (&r->uri_start)

> IMHO, cast в (void *) тут был бы логичнее.  Но у меня нет шанса 
> проверить помогает он или нет, за неимением gcc 4.1.

Вот так:

#define ngx_http_ephemeral(r)  (void *) (&r->uri_start)

?

Да, помогает.

> Maxim Dounin


-- 
Best regards,
 Denis                            mailto:denis at gostats.ru




Подробная информация о списке рассылки nginx-ru