[pypy-commit] pypy py3k: Reduce diff with cpython. (thanks for pointing this out, David\!)
marky1991
pypy.commits at gmail.com
Thu Aug 11 11:49:29 EDT 2016
Author: Mark Young <marky1991 at gmail.com>
Branch: py3k
Changeset: r86150:51fa15119324
Date: 2016-08-04 11:08 -0400
http://bitbucket.org/pypy/pypy/changeset/51fa15119324/
Log: Reduce diff with cpython. (thanks for pointing this out, David\!)
diff --git a/pypy/module/_posixsubprocess/_posixsubprocess.c b/pypy/module/_posixsubprocess/_posixsubprocess.c
--- a/pypy/module/_posixsubprocess/_posixsubprocess.c
+++ b/pypy/module/_posixsubprocess/_posixsubprocess.c
@@ -12,7 +12,7 @@
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
-#if defined(__FreeBSD__)
+#if defined(HAVE_SYS_STAT_H) && defined(__FreeBSD__)
#include <sys/stat.h>
#endif
#ifdef HAVE_SYS_SYSCALL_H
diff --git a/pypy/module/_posixsubprocess/interp_subprocess.py b/pypy/module/_posixsubprocess/interp_subprocess.py
--- a/pypy/module/_posixsubprocess/interp_subprocess.py
+++ b/pypy/module/_posixsubprocess/interp_subprocess.py
@@ -15,8 +15,9 @@
class CConfig:
_compilation_info_ = ExternalCompilationInfo(
- includes=['unistd.h', 'sys/syscall.h'])
+ includes=['unistd.h', 'sys/syscall.h', 'sys/stat.h'])
HAVE_SYS_SYSCALL_H = platform.Has("syscall")
+ HAVE_SYS_STAT_H = platform.Has("stat")
HAVE_SETSID = platform.Has("setsid")
config = platform.configure(CConfig)
@@ -29,6 +30,8 @@
compile_extra = []
if config['HAVE_SYS_SYSCALL_H']:
compile_extra.append("-DHAVE_SYS_SYSCALL_H")
+if config['HAVE_SYS_STAT_H']:
+ compile_extra.append("-DHAVE_SYS_STAT_H")
if config['HAVE_SETSID']:
compile_extra.append("-DHAVE_SETSID")
More information about the pypy-commit
mailing list