summaryrefslogtreecommitdiff
path: root/ext/tk
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-15 12:58:23 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-15 12:58:23 +0000
commit3e7b91eebd1e30ba0cc12e35757ac3abba75c2ce (patch)
tree614069c56a1aaa800ba5faaea46a8878b191a7ec /ext/tk
parente3cc2ee1ed8d16f7920459641ad66f0f1afbb8d9 (diff)
* ext/tk/{,tkutil/}extconf.rb: ruby/ruby.h no longer needs to be
checked. * ext/tk/{tcltklib.c,tkutil/tkutil.c}: check macros for each headers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk')
-rw-r--r--ext/tk/extconf.rb2
-rw-r--r--ext/tk/tcltklib.c7
-rw-r--r--ext/tk/tkutil/extconf.rb1
-rw-r--r--ext/tk/tkutil/tkutil.c7
4 files changed, 8 insertions, 9 deletions
diff --git a/ext/tk/extconf.rb b/ext/tk/extconf.rb
index ec0a12eac2..be3781251e 100644
--- a/ext/tk/extconf.rb
+++ b/ext/tk/extconf.rb
@@ -5,8 +5,6 @@ require 'mkmf'
is_win32 = (/mswin|mingw|cygwin|bccwin|wince/ =~ RUBY_PLATFORM)
#is_macosx = (/darwin/ =~ RUBY_PLATFORM)
-have_header("ruby/signal.h")
-have_header("ruby/encoding.h")
have_func("ruby_native_thread_p", "ruby.h")
have_func("rb_errinfo", "ruby.h")
have_func("rb_safe_level", "ruby.h")
diff --git a/ext/tk/tcltklib.c b/ext/tk/tcltklib.c
index db31846e61..00a3256a82 100644
--- a/ext/tk/tcltklib.c
+++ b/ext/tk/tcltklib.c
@@ -10,12 +10,13 @@
#ifdef HAVE_RUBY_SIGNAL_H
#include "ruby/signal.h"
+#else
+#include "rubysig.h"
+#endif
#ifdef HAVE_RUBY_ENCODING_H
#include "ruby/encoding.h"
#endif
-#else
-/* #include "ruby.h" */
-#include "rubysig.h"
+#ifndef HAVE_RUBY_RUBY_H
#include "version.h"
#endif
diff --git a/ext/tk/tkutil/extconf.rb b/ext/tk/tkutil/extconf.rb
index ed5de0ee64..34b91632eb 100644
--- a/ext/tk/tkutil/extconf.rb
+++ b/ext/tk/tkutil/extconf.rb
@@ -7,7 +7,6 @@ end
if has_tk
require 'mkmf'
- have_header("ruby/ruby.h")
have_func("rb_obj_instance_exec", "ruby.h")
have_func("rb_sym_to_s", "ruby.h")
have_func("strndup", "string.h")
diff --git a/ext/tk/tkutil/tkutil.c b/ext/tk/tkutil/tkutil.c
index 98197ee7b8..6f35e195df 100644
--- a/ext/tk/tkutil/tkutil.c
+++ b/ext/tk/tkutil/tkutil.c
@@ -13,11 +13,12 @@
#ifdef HAVE_RUBY_SIGNAL_H
#include "ruby/signal.h"
-#include "ruby/st.h"
#else
-/* #include "ruby.h" */
#include "rubysig.h"
-#include "version.h"
+#endif
+#ifdef HAVE_RUBY_ST_H
+#include "ruby/st.h"
+#else
#include "st.h"
#endif