diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/mkmf.rb | 7 |
2 files changed, 11 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Fri Sep 29 11:43:40 2006 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * lib/mkmf.rb (try_func): revert fallback checking undeclared function. + fixed: [ruby-core:08949] + Fri Sep 29 09:56:56 2006 Nobuyoshi Nakada <nobu@ruby-lang.org> * ext/extmk.rb: extout is needed for also clean. diff --git a/lib/mkmf.rb b/lib/mkmf.rb index d68eb8b060..a64729576c 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) |