mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/mkmf.rb (try_func): accept variable address.
* ext/win32ole/extconf.rb: libuuid is needed on cygwin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8a7aad9952
commit
59a666a25f
3 changed files with 23 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
Thu Nov 11 21:32:09 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/mkmf.rb (try_func): accept variable address.
|
||||
|
||||
* ext/win32ole/extconf.rb: libuuid is needed on cygwin.
|
||||
|
||||
Thu Nov 11 21:24:36 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* file.c (file_expand_path): use cygwin_conv_path on cygwin 1.7 or
|
||||
|
|
|
@ -4,7 +4,13 @@
|
|||
#----------------------------------
|
||||
require 'mkmf'
|
||||
|
||||
dir_config("win32")
|
||||
case RUBY_PLATFORM
|
||||
when /cygwin/
|
||||
inc = nil
|
||||
lib = '/usr/lib/w32api'
|
||||
end
|
||||
|
||||
dir_config("win32", inc, lib)
|
||||
|
||||
SRCFILES=<<SRC
|
||||
win32ole.c
|
||||
|
@ -19,7 +25,7 @@ end
|
|||
def create_win32ole_makefile
|
||||
if have_library("ole32") and
|
||||
have_library("oleaut32") and
|
||||
have_library("uuid") and
|
||||
have_library("uuid", "&CLSID_CMultiLanguage", "mlang.h") and
|
||||
have_library("user32") and
|
||||
have_library("kernel32") and
|
||||
have_library("advapi32") and
|
||||
|
|
11
lib/mkmf.rb
11
lib/mkmf.rb
|
@ -583,13 +583,20 @@ end
|
|||
# names of header files.
|
||||
def try_func(func, libs, headers = nil, &b)
|
||||
headers = cpp_include(headers)
|
||||
case func
|
||||
when /^&/
|
||||
decltype = proc {|x|"const volatile void *#{x}"}
|
||||
else
|
||||
call = true
|
||||
decltype = proc {|x| "void ((*#{x})())"}
|
||||
end
|
||||
try_link(<<"SRC", libs, &b) or
|
||||
#{headers}
|
||||
/*top*/
|
||||
#{MAIN_DOES_NOTHING}
|
||||
int t() { void ((*volatile p)()); p = (void ((*)()))#{func}; return 0; }
|
||||
int t() { #{decltype["volatile p"]}; p = (#{decltype[]})#{func}; return 0; }
|
||||
SRC
|
||||
try_link(<<"SRC", libs, &b)
|
||||
call && try_link(<<"SRC", libs, &b)
|
||||
#{headers}
|
||||
/*top*/
|
||||
#{MAIN_DOES_NOTHING}
|
||||
|
|
Loading…
Reference in a new issue