summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-29 02:44:37 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-29 02:44:37 +0000
commitd846e10d73bfaf64fbf4f42576d63392e34f9a2c (patch)
tree536242ea45dc9d606e00ed3f9b6efe4e1ff377e7 /lib
parentc643593b204470ca5e74c07b18c8499e709b96df (diff)
* lib/mkmf.rb (try_func): revert fallback checking undeclared function.
fixed: [ruby-core:08949] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/mkmf.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 0e2b5829a5..1e8033b919 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -410,13 +410,18 @@ end
def try_func(func, libs, headers = nil, &b)
headers = cpp_include(headers)
- try_link(<<"SRC", libs, &b) or macro_defined?(func, COMMON_HEADERS+headers, &b)
+ try_link(<<"SRC", libs, &b) or try_link(<<"SRC", libs, &b)
#{COMMON_HEADERS}
#{headers}
/*top*/
int main() { return 0; }
int t() { void ((*volatile p)()); p = (void ((*)()))#{func}; return 0; }
SRC
+#{headers}
+/*top*/
+int main() { return 0; }
+int t() { #{func}(); return 0; }
+SRC
end
def try_var(var, headers = nil, &b)