From: Aman Gupta <redmine@...> Date: 2009-02-08T20:24:12+09:00 Subject: [ruby-core:21934] [Bug #1130] [PATCH] extern rb_thread_blocking_region_begin/end Issue #1130 has been updated by Aman Gupta. Still having issues with g++: /tmp/ruby19/include/ruby-1.9.1/ruby/backward/rubysig.h:14:2: warning: #warning rubysig.h is obsolete g++ -I. -I/tmp/ruby19/include/ruby-1.9.1/x86_64-linux -I/tmp/ruby19/include/ruby-1.9.1/ruby/backward -I/tmp/ruby19/include/ruby-1.9.1 -I. -DBUILD_FOR_RUBY -DHAVE_RB_THREAD_BLOCKING_REGION_BEGIN -DHAVE_TBR_BEGIN -DHAVE_RB_THREAD_BLOCKING_REGION -DOS_UNIX -DHAVE_SYS_EPOLL_H -DHAVE_EPOLL -DWITH_SSL -fPIC -O2 -g -Wall -Wno-parentheses -o em.o -c em.cpp In file included from em.h:38, from project.h:106, from em.cpp:24: /tmp/ruby19/include/ruby-1.9.1/ruby/backward/rubysig.h:14:2: warning: #warning rubysig.h is obsolete em.cpp: In member function 'bool EventMachine_t::_RunEpollOnce()': em.cpp:432: error: expected primary-expression before 'void' em.cpp:436: error: invalid conversion from 'void*' to 'rb_blocking_region_buffer*' em.cpp:436: error: initializing argument 1 of 'void rb_thread_blocking_region_end(rb_blocking_region_buffer*)' em.cpp:515: warning: comparison between signed and unsigned integer expressions make: *** [em.o] Error 1 make: Leaving directory `/home/aman/code/em/ext' I used the following patch: diff --git a/include/ruby/backward/rubysig.h b/include/ruby/backward/rubysig.h index 9f40f19..a645ea5 100644 --- a/include/ruby/backward/rubysig.h +++ b/include/ruby/backward/rubysig.h @@ -23,7 +23,7 @@ struct rb_blocking_region_buffer; RUBY_EXTERN struct rb_blocking_region_buffer *rb_thread_blocking_region_begin(void); RUBY_EXTERN void rb_thread_blocking_region_end(struct rb_blocking_region_buffer *); -#define TRAP_BEG do {void *__region = rb_thread_blocking_region_begin(void); +#define TRAP_BEG do {struct rb_blocking_region_buffer *__region = rb_thread_blocking_region_begin(); #define TRAP_END rb_thread_blocking_region_end(__region);} while (0) #define RUBY_CRITICAL(statements) do {statements;} while (0) #define DEFER_INTS (0) ---------------------------------------- http://redmine.ruby-lang.org/issues/show/1130 ---------------------------------------- http://redmine.ruby-lang.org