summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-05-20 03:22:20 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-05-20 03:22:20 +0000
commit60d8e03c331861dd237b37ab7ac927069b804535 (patch)
treed8eb87f07d0b2cddc33e2f31429031b9770381dd
parent72042f956f6958832eb3da22c0a66d6938a1e1be (diff)
* lib/mkmf.rb (have_type): do not check pointer to incomplete type,
which always get compiled. [ruby-list:39683] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--lib/mkmf.rb4
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index ac6fc1a2e1..d494675340 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,12 @@
+Thu May 20 12:22:13 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/mkmf.rb (have_type): do not check pointer to incomplete type,
+ which always get compiled.
+ [ruby-list:39683]
+
Wed May 19 11:09:00 2004 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
- * ext/tk/lib/tk.rb: change permition of TkObject#tk_send from
+ * ext/tk/lib/tk.rb: change permition of TkObject#tk_send from
private to public
Tue May 18 14:00:46 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index a6d1413b1e..3f4dcd8148 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -553,7 +553,7 @@ end
def have_type(type, header = nil, opt = "", &b)
checking_for type do
header = cpp_include(header)
- if try_compile(<<"SRC", opt, &b) or try_compile(<<"SRC", opt, &b)
+ if try_compile(<<"SRC", opt, &b) or (/\A\w+\z/n =~ type && try_compile(<<"SRC", opt, &b))
#{COMMON_HEADERS}
#{header}
/*top*/
@@ -564,7 +564,7 @@ SRC
/*top*/
static #{type} *t;
SRC
- $defs.push(format("-DHAVE_TYPE_%s", type.upcase.tr_s("^A-Z0-9_", "_")))
+ $defs.push(format("-DHAVE_TYPE_%s", type.strip.upcase.tr_s("^A-Z0-9_", "_")))
true
else
false