[pypy-commit] pypy fast-gil: PYPY_USE_ASMGCC should be declared systematically, which requires -D.
arigo
noreply at buildbot.pypy.org
Wed Jun 25 11:30:47 CEST 2014
Author: Armin Rigo <arigo at tunes.org>
Branch: fast-gil
Changeset: r72209:5af5fbca3235
Date: 2014-06-25 11:30 +0200
http://bitbucket.org/pypy/pypy/changeset/5af5fbca3235/
Log: PYPY_USE_ASMGCC should be declared systematically, which requires
-D.
diff --git a/rpython/memory/gctransform/asmgcroot.py b/rpython/memory/gctransform/asmgcroot.py
--- a/rpython/memory/gctransform/asmgcroot.py
+++ b/rpython/memory/gctransform/asmgcroot.py
@@ -782,7 +782,7 @@
gcrootanchor.next = gcrootanchor
c_gcrootanchor = Constant(gcrootanchor, ASM_FRAMEDATA_HEAD_PTR)
-eci = ExternalCompilationInfo(pre_include_bits=['#define PYPY_USE_ASMGCC'])
+eci = ExternalCompilationInfo(compile_extra=['-DPYPY_USE_ASMGCC'])
pypy_asm_stackwalk = rffi.llexternal('pypy_asm_stackwalk',
[ASM_CALLBACK_PTR,
diff --git a/rpython/translator/c/src/thread.c b/rpython/translator/c/src/thread.c
--- a/rpython/translator/c/src/thread.c
+++ b/rpython/translator/c/src/thread.c
@@ -9,9 +9,14 @@
#include "common_header.h"
#endif
+#ifdef PYPY_USE_ASMGCC
+# include "common_header.h"
+# include "structdef.h"
+# include "forwarddecl.h"
+#endif
+
#ifdef _WIN32
#include "src/thread_nt.c"
#else
#include "src/thread_pthread.c"
#endif
-
diff --git a/rpython/translator/c/src/thread.h b/rpython/translator/c/src/thread.h
--- a/rpython/translator/c/src/thread.h
+++ b/rpython/translator/c/src/thread.h
@@ -1,7 +1,6 @@
#ifndef __PYPY_THREAD_H
#define __PYPY_THREAD_H
#include <assert.h>
-#include "common_header.h"
#define RPY_TIMEOUT_T long long
diff --git a/rpython/translator/c/src/thread_gil.c b/rpython/translator/c/src/thread_gil.c
--- a/rpython/translator/c/src/thread_gil.c
+++ b/rpython/translator/c/src/thread_gil.c
@@ -1,7 +1,3 @@
-#ifdef PYPY_USE_ASMGCC
-# include "structdef.h"
-# include "forwarddecl.h"
-#endif
/* Idea:
More information about the pypy-commit
mailing list