summaryrefslogtreecommitdiff
path: root/ext/win32ole/extconf.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-18 02:23:37 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-18 02:23:37 +0000
commit588504b20f5cc880ad51827b93e571e32446e5db (patch)
tree7aa1d8e9a5e5ce06e48ff6857ae58f4204e65b56 /ext/win32ole/extconf.rb
parent6a052813d013679a75469762d290e63d2efbc61c (diff)
win32ole: OLE initialize per threads
* ext/win32ole/win32ole.c (ole_initialize): initialize OLE for each threads. [Bug #2618] [ruby-core:27634] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/win32ole/extconf.rb')
-rw-r--r--ext/win32ole/extconf.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/win32ole/extconf.rb b/ext/win32ole/extconf.rb
index 1a17524..52c3d6b 100644
--- a/ext/win32ole/extconf.rb
+++ b/ext/win32ole/extconf.rb
@@ -23,6 +23,14 @@ def create_win32ole_makefile
unless have_type("IMultiLanguage2", "mlang.h")
have_type("IMultiLanguage", "mlang.h")
end
+ spec = nil
+ checking_for('thread_specific', '%s') do
+ spec = %w[__declspec(thread) __thread].find {|th|
+ try_compile("#{th} int foo;", "", :werror => true)
+ }
+ spec or 'no'
+ end
+ $defs << "-DRB_THREAD_SPECIFIC=#{spec}" if spec
create_makefile("win32ole")
end
end