mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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/trunk@6368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6988d86035
commit
41e4c5de36
2 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
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 23:45:43 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed May 19 23:45:43 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* test/inlinetest.rb (InlineTest::loadtest): requiring library with
|
* test/inlinetest.rb (InlineTest::loadtest): requiring library with
|
||||||
|
|
|
@ -574,7 +574,7 @@ end
|
||||||
def have_type(type, header = nil, opt = "", &b)
|
def have_type(type, header = nil, opt = "", &b)
|
||||||
checking_for type do
|
checking_for type do
|
||||||
header = cpp_include(header)
|
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}
|
#{COMMON_HEADERS}
|
||||||
#{header}
|
#{header}
|
||||||
/*top*/
|
/*top*/
|
||||||
|
@ -585,7 +585,7 @@ SRC
|
||||||
/*top*/
|
/*top*/
|
||||||
static #{type} *t;
|
static #{type} *t;
|
||||||
SRC
|
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
|
true
|
||||||
else
|
else
|
||||||
false
|
false
|
||||||
|
|
Loading…
Reference in a new issue