ruby-changes:26888
From: suke <ko1@a...>
Date: Fri, 25 Jan 2013 19:18:36 +0900 (JST)
Subject: [ruby-changes:26888] suke:r38940 (trunk): * ext/win32ole/win32ole.c: use TlsAlloc instead of __declspec(thread)
suke 2013-01-25 19:17:59 +0900 (Fri, 25 Jan 2013) New Revision: 38940 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38940 Log: * ext/win32ole/win32ole.c: use TlsAlloc instead of __declspec(thread) to avoid SEGV if win32ole.so loaded with LoadLibrary in Windows Vista or earlier. Modified files: trunk/ChangeLog trunk/ext/win32ole/win32ole.c Index: ChangeLog =================================================================== --- ChangeLog (revision 38939) +++ ChangeLog (revision 38940) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri Jan 25 19:14:24 2013 Masaki Suketa <masaki.suketa@n...> + + * 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@r...> * ext/socket/raddrinfo.c (rsock_unixpath_len, init_unix_addrinfo), Index: ext/win32ole/win32ole.c =================================================================== --- ext/win32ole/win32ole.c (revision 38939) +++ ext/win32ole/win32ole.c (revision 38940) @@ -214,7 +214,7 @@ VALUE cWIN32OLE_PROPERTY; https://github.com/ruby/ruby/blob/trunk/ext/win32ole/win32ole.c#L214 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)) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/