aboutsummaryrefslogtreecommitdiffstats
path: root/ext/win32ole/extconf.rb
diff options
context:
space:
mode:
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 1a17524d0a..52c3d6bdfb 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