• R/O
  • SSH

quipu: 提交

quipu mercurial repository


Commit MetaInfo

修订版cee131b9ae2c00151fdc9b10826ef610d153c8dc (tree)
时间2020-03-27 10:26:35
作者Agustina Arzille <avarzille@rise...>
CommiterAgustina Arzille

Log Message

Fix for clang+mingw

更改概述

差异

diff -r 925ba01bc87b -r cee131b9ae2c interp.cpp
--- a/interp.cpp Thu Mar 26 22:03:03 2020 -0300
+++ b/interp.cpp Thu Mar 26 22:26:35 2020 -0300
@@ -116,10 +116,7 @@
116116 }
117117 }
118118
119-#ifndef QP_NO_THREADS
120-thread_local
121-#endif
122-interpreter *interpreter::self_interp;
119+QP_TLS_INTERP interpreter *interpreter::self_interp;
123120
124121 #ifndef QP_NO_THREADS
125122
diff -r 925ba01bc87b -r cee131b9ae2c interp.h
--- a/interp.h Thu Mar 26 22:03:03 2020 -0300
+++ b/interp.h Thu Mar 26 22:26:35 2020 -0300
@@ -236,12 +236,16 @@
236236 }
237237 };
238238
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
241243 #else
242- static interpreter *self_interp;
244+# define QP_TLS_INTERP thread_local
243245 #endif
244246
247+ static QP_TLS_INTERP interpreter *self_interp;
248+
245249 static interpreter* self () __attribute__ ((const))
246250 {
247251 return (interpreter::self_interp);
diff -r 925ba01bc87b -r cee131b9ae2c stream.cpp
--- a/stream.cpp Thu Mar 26 22:03:03 2020 -0300
+++ b/stream.cpp Thu Mar 26 22:26:35 2020 -0300
@@ -597,9 +597,9 @@
597597 err_stream = ensure_mask(p, TYPE_SHIFT)->as_obj ();
598598
599599 #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) ||
603603 !osfd_valid_p (interp->io_event = CreateEventW (nullptr,
604604 true, false, nullptr)))
605605 return (init_op::result_failed);
Show on old repository browser