[pypy-commit] pypy nogil-unsafe-2: (fijal, arigo) minimal hacks on OS X to make the test pass
fijal
pypy.commits at gmail.com
Tue Jul 11 08:41:24 EDT 2017
Author: fijal
Branch: nogil-unsafe-2
Changeset: r91854:30bf6b54473f
Date: 2017-07-11 14:26 +0200
http://bitbucket.org/pypy/pypy/changeset/30bf6b54473f/
Log: (fijal, arigo) minimal hacks on OS X to make the test pass
diff --git a/rpython/config/translationoption.py b/rpython/config/translationoption.py
--- a/rpython/config/translationoption.py
+++ b/rpython/config/translationoption.py
@@ -25,9 +25,9 @@
IS_64_BITS = sys.maxint > 2147483647
SUPPORT__THREAD = ( # whether the particular C compiler supports __thread
- sys.platform.startswith("linux")) # Linux works
- # OS/X doesn't work, because we still target 10.5/10.6 and the
- # minimum required version is 10.7. Windows doesn't work. Please
+ sys.platform.startswith("linux") or sys.platform == 'darwin')
+ # Linux and OS/X works.
+ # Windows doesn't work. Please
# add other platforms here if it works on them.
MAINDIR = os.path.dirname(os.path.dirname(__file__))
diff --git a/rpython/translator/c/src/threadlocal.c b/rpython/translator/c/src/threadlocal.c
--- a/rpython/translator/c/src/threadlocal.c
+++ b/rpython/translator/c/src/threadlocal.c
@@ -211,7 +211,7 @@
/* ------------------------------------------------------------ */
-/* #ifdef USE___THREAD XXX */
+#ifdef USE___THREAD
/* ------------------------------------------------------------ */
@@ -239,8 +239,9 @@
/* /\* ------------------------------------------------------------ *\/ */
-/* #else */
+ #else
/* /\* ------------------------------------------------------------ *\/ */
+#error "redo this part"
/* /\* this is the case where the 'struct pypy_threadlocal_s' is allocated */
@@ -272,5 +273,5 @@
/* /\* ------------------------------------------------------------ *\/ */
-/* #endif */
+#endif
/* /\* ------------------------------------------------------------ *\/ */
diff --git a/rpython/translator/c/test/test_standalone.py b/rpython/translator/c/test/test_standalone.py
--- a/rpython/translator/c/test/test_standalone.py
+++ b/rpython/translator/c/test/test_standalone.py
@@ -1253,9 +1253,8 @@
data = cbuilder.cmdexec('')
assert data == 'ok\n'
- if SUPPORT__THREAD:
- runme(no__thread=False)
- runme(no__thread=True)
+ assert SUPPORT__THREAD
+ runme(no__thread=False)
def test_thread_and_gc(self):
More information about the pypy-commit
mailing list