hi,

seems like version.h is gone as with the recent ruby1.9 release, see attached
mail by akira for an alternative solution to this issue.

----- Forwarded message from akira yamada <[EMAIL PROTECTED]> -----

From: akira yamada <[EMAIL PROTECTED]>
Date: Wed, 12 Sep 2007 18:02:48 +0900
To: Michael Ablassmeier <[EMAIL PROTECTED]>
Subject: Re: reassign 441489 to libinotify-ruby

Hi,

> do you have a explanation whos at fault here and how to fix this issue in
> libinotfy-ruby in a proper way?

The version.h issue is in ruby-core list.
<http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/12068>

On current ruby1.9, the following patch brought me the debs.

--- libinotify-ruby-0.0.1.orig/extconf.rb
+++ libinotify-ruby-0.0.1/extconf.rb
@@ -1,4 +1,6 @@
 require 'mkmf'
 
 have_header('linux/inotify.h')
+have_header("version.h")
+have_type("OpenFile", ["ruby.h", "rubyio.h"])
 create_makefile('inotify', 'ext')
--- libinotify-ruby-0.0.1.orig/ext/inotify.c
+++ libinotify-ruby-0.0.1/ext/inotify.c
@@ -1,6 +1,8 @@
 #include <ruby.h>
 #include <rubyio.h>
+#ifdef HAVE_VERSION_H
 #include <version.h>
+#endif
 
 #ifdef HAVE_LINUX_INOTIFY_H
 #include <asm/unistd.h>
@@ -77,7 +79,7 @@
  */
 
 static VALUE rb_inotify_add_watch(VALUE self, VALUE filename, VALUE mask) {
-#if RUBY_VERSION_CODE >= 190
+#ifndef HAVE_TYPE_OPENFILE
        rb_io_t *fptr;
 #else
        OpenFile *fptr;
@@ -113,7 +115,7 @@
  */
 
 static VALUE rb_inotify_each_event(VALUE self) {
-#if RUBY_VERSION_CODE >= 190
+#ifndef HAVE_TYPE_OPENFILE
        rb_io_t *fptr;
 #else
        OpenFile *fptr;


Thank you.
-- 
ay

----- End forwarded message -----



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to