Kouhei Sutou
kous****@users*****
Tue Apr 4 23:41:59 JST 2006
Index: kazehakase/ext/ruby/kz-rb-ext.c diff -u kazehakase/ext/ruby/kz-rb-ext.c:1.8 kazehakase/ext/ruby/kz-rb-ext.c:1.9 --- kazehakase/ext/ruby/kz-rb-ext.c:1.8 Sun Feb 12 00:29:53 2006 +++ kazehakase/ext/ruby/kz-rb-ext.c Tue Apr 4 23:41:59 2006 @@ -22,6 +22,12 @@ #include <glib/gi18n.h> #include "kz-rb-ext.h" +#ifdef POSIX_SIGNAL +#define ruby_signal(sig, handle) posix_signal((sig), (handle)) +#else +#define ruby_signal(sig, handle) signal((sig), (handle)) +#endif + #define INIT_PRE_RB "kazehakase-init-pre" #define INIT_RB "kazehakase-init" @@ -59,8 +65,12 @@ VALUE stack_start; gchar *dirname; char *argv[] = {"kazehakase"}; + RETSIGTYPE (*sigint_handler)_((int)); + sigint_handler = signal(SIGINT, SIG_DFL); ruby_init(); + ruby_signal(SIGINT, sigint_handler); + Init_stack(&stack_start); ruby_init_loadpath();