diff options
Diffstat (limited to 'ruby_1_9_3/ext/-test-/wait_for_single_fd')
-rw-r--r-- | ruby_1_9_3/ext/-test-/wait_for_single_fd/depend | 2 | ||||
-rw-r--r-- | ruby_1_9_3/ext/-test-/wait_for_single_fd/extconf.rb | 1 | ||||
-rw-r--r-- | ruby_1_9_3/ext/-test-/wait_for_single_fd/wait_for_single_fd.c | 30 |
3 files changed, 0 insertions, 33 deletions
diff --git a/ruby_1_9_3/ext/-test-/wait_for_single_fd/depend b/ruby_1_9_3/ext/-test-/wait_for_single_fd/depend deleted file mode 100644 index d9cd50a542..0000000000 --- a/ruby_1_9_3/ext/-test-/wait_for_single_fd/depend +++ /dev/null @@ -1,2 +0,0 @@ -wait_for_single_fd.o: $(top_srcdir)/thread.c \ - $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/io.h diff --git a/ruby_1_9_3/ext/-test-/wait_for_single_fd/extconf.rb b/ruby_1_9_3/ext/-test-/wait_for_single_fd/extconf.rb deleted file mode 100644 index 1a28b23da3..0000000000 --- a/ruby_1_9_3/ext/-test-/wait_for_single_fd/extconf.rb +++ /dev/null @@ -1 +0,0 @@ -create_makefile("-test-/wait_for_single_fd/wait_for_single_fd") diff --git a/ruby_1_9_3/ext/-test-/wait_for_single_fd/wait_for_single_fd.c b/ruby_1_9_3/ext/-test-/wait_for_single_fd/wait_for_single_fd.c deleted file mode 100644 index d406724a3f..0000000000 --- a/ruby_1_9_3/ext/-test-/wait_for_single_fd/wait_for_single_fd.c +++ /dev/null @@ -1,30 +0,0 @@ -#include "ruby/ruby.h" -#include "ruby/io.h" - -static VALUE -wait_for_single_fd(VALUE ign, VALUE fd, VALUE events, VALUE timeout) -{ - struct timeval tv; - struct timeval *tvp = NULL; - int rc; - - if (!NIL_P(timeout)) { - tv = rb_time_timeval(timeout); - tvp = &tv; - } - - rc = rb_wait_for_single_fd(NUM2INT(fd), NUM2INT(events), tvp); - if (rc == -1) - rb_sys_fail("rb_wait_for_single_fd"); - return INT2NUM(rc); -} - -void -Init_wait_for_single_fd(void) -{ - rb_define_const(rb_cObject, "RB_WAITFD_IN", INT2NUM(RB_WAITFD_IN)); - rb_define_const(rb_cObject, "RB_WAITFD_OUT", INT2NUM(RB_WAITFD_OUT)); - rb_define_const(rb_cObject, "RB_WAITFD_PRI", INT2NUM(RB_WAITFD_PRI)); - rb_define_singleton_method(rb_cIO, "wait_for_single_fd", - wait_for_single_fd, 3); -} |