summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-25 10:17:59 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-25 10:17:59 +0000
commit57408cb1d1c56a85ff72e6cc192e72d37cfbbe7e (patch)
tree3e8bb7bd4ece02ba804b7625ffa92f8b8acfbda3 /ext
parentad55d141ebd0922be310b66c8e4c0e81e94521d1 (diff)
* ext/win32ole/win32ole.c: use TlsAlloc instead of __declspec(thread)
to avoid SEGV if win32ole.so loaded with LoadLibrary in Windows Vista or earlier. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/win32ole/win32ole.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c
index bebe115406f..5310cbfae1f 100644
--- a/ext/win32ole/win32ole.c
+++ b/ext/win32ole/win32ole.c
@@ -214,7 +214,7 @@ VALUE cWIN32OLE_PROPERTY;
static VALUE ary_ole_event;
static ID id_events;
-#ifdef RB_THREAD_SPECIFIC
+#if defined(RB_THREAD_SPECIFIC) && (defined(__CYGWIN__) || defined(__MINGW32__))
static RB_THREAD_SPECIFIC BOOL g_ole_initialized;
# define g_ole_initialized_init() ((void)0)
# define g_ole_initialized_set(val) (g_ole_initialized = (val))