summaryrefslogtreecommitdiff
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
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
-rw-r--r--ChangeLog6
-rw-r--r--ext/win32ole/win32ole.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 07520339edf..038d1372a71 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri Jan 25 19:14:24 2013 Masaki Suketa <masaki.suketa@nifty.ne.jp>
+
+ * ext/win32ole/win32ole.c: use TlsAlloc instead of __declspec(thread)
+ to avoid SEGV if win32ole.so loaded with LoadLibrary in Windows
+ Vista or earlier.
+
Fri Jan 25 16:47:31 2013 Shugo Maeda <shugo@ruby-lang.org>
* ext/socket/raddrinfo.c (rsock_unixpath_len, init_unix_addrinfo),
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))