summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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))