[pypy-commit] pypy release-2.3.x: fix translation on msvc after 3484aaa1e858

mattip noreply at buildbot.pypy.org
Wed May 7 11:02:08 CEST 2014


Author: mattip <matti.picus at gmail.com>
Branch: release-2.3.x
Changeset: r71362:e4ba3ae84e97
Date: 2014-05-07 09:26 +0300
http://bitbucket.org/pypy/pypy/changeset/e4ba3ae84e97/

Log:	fix translation on msvc after 3484aaa1e858

diff --git a/rpython/translator/c/genc.py b/rpython/translator/c/genc.py
--- a/rpython/translator/c/genc.py
+++ b/rpython/translator/c/genc.py
@@ -751,6 +751,8 @@
 
 def add_extra_files(eci):
     srcdir = py.path.local(__file__).join('..', 'src')
+    _MSVC = eci.platform.name == 'msvc'
+
     files = [
         srcdir / 'entrypoint.c',       # ifdef PYPY_STANDALONE
         srcdir / 'allocator.c',        # ifdef PYPY_STANDALONE
@@ -767,6 +769,8 @@
     ]
     if _CYGWIN:
         files.append(srcdir / 'cygwin_wait.c')
+    if _MSVC:
+        files.append(srcdir / 'asm_msvc.c')
     return eci.merge(ExternalCompilationInfo(separate_module_files=files))
 
 
diff --git a/rpython/translator/c/src/asm_msvc.c b/rpython/translator/c/src/asm_msvc.c
--- a/rpython/translator/c/src/asm_msvc.c
+++ b/rpython/translator/c/src/asm_msvc.c
@@ -1,5 +1,6 @@
 #ifdef PYPY_X86_CHECK_SSE2
 #include <intrin.h>
+#include <stdio.h>
 void pypy_x86_check_sse2(void)
 {
     int features;


More information about the pypy-commit mailing list