quipu mercurial repository
Revisão | cee131b9ae2c00151fdc9b10826ef610d153c8dc (tree) |
---|---|
Hora | 2020-03-27 10:26:35 |
Autor | Agustina Arzille <avarzille@rise...> |
Commiter | Agustina Arzille |
Fix for clang+mingw
@@ -116,10 +116,7 @@ | ||
116 | 116 | } |
117 | 117 | } |
118 | 118 | |
119 | -#ifndef QP_NO_THREADS | |
120 | -thread_local | |
121 | -#endif | |
122 | -interpreter *interpreter::self_interp; | |
119 | +QP_TLS_INTERP interpreter *interpreter::self_interp; | |
123 | 120 | |
124 | 121 | #ifndef QP_NO_THREADS |
125 | 122 |
@@ -236,12 +236,16 @@ | ||
236 | 236 | } |
237 | 237 | }; |
238 | 238 | |
239 | -#ifndef QP_NO_THREADS | |
240 | - static thread_local interpreter *self_interp; | |
239 | +#ifdef QP_NO_THREADS | |
240 | +# define QP_TLS_INTERP | |
241 | +#elif defined (__clang__) && (defined (__MINGW32__) || defined (__MINGW64__)) | |
242 | +# define QP_TLS_INTERP __thread | |
241 | 243 | #else |
242 | - static interpreter *self_interp; | |
244 | +# define QP_TLS_INTERP thread_local | |
243 | 245 | #endif |
244 | 246 | |
247 | + static QP_TLS_INTERP interpreter *self_interp; | |
248 | + | |
245 | 249 | static interpreter* self () __attribute__ ((const)) |
246 | 250 | { |
247 | 251 | return (interpreter::self_interp); |
@@ -597,9 +597,9 @@ | ||
597 | 597 | err_stream = ensure_mask(p, TYPE_SHIFT)->as_obj (); |
598 | 598 | |
599 | 599 | #ifdef QP_PLATFORM_WINDOWS |
600 | - if (!osfd_valid_p (std_streams[0].cookie) || | |
601 | - !osfd_valid_p (std_streams[1].cookie) || | |
602 | - !osfd_valid_p (std_streams[2].cookie) || | |
600 | + if (!osfd_valid_p (std_streams[0].strm.cookie) || | |
601 | + !osfd_valid_p (std_streams[1].strm.cookie) || | |
602 | + !osfd_valid_p (std_streams[2].strm.cookie) || | |
603 | 603 | !osfd_valid_p (interp->io_event = CreateEventW (nullptr, |
604 | 604 | true, false, nullptr))) |
605 | 605 | return (init_op::result_failed); |