[pypy-commit] pypy py3k: fix -Ojit translation
pjenvey
noreply at buildbot.pypy.org
Mon Oct 27 06:19:32 CET 2014
Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3k
Changeset: r74254:94fb5a72c276
Date: 2014-10-26 22:16 -0700
http://bitbucket.org/pypy/pypy/changeset/94fb5a72c276/
Log: fix -Ojit translation
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
@@ -1,6 +1,5 @@
/* This file is mostly a copy of CPython's Module/_posixsubprocess.c */
/* modified for PyPy: Removed dependency on Python API. */
-#include "src/precommondefs.h"
/* Authors: Gregory P. Smith & Jeffrey Yasskin */
#if defined(HAVE_PIPE2) && !defined(_GNU_SOURCE)
@@ -20,6 +19,7 @@
#include <sys/syscall.h>
#endif
#include <dirent.h>
+#include "_posixsubprocess.h"
#if defined(sun)
/* readdir64 is used to work around Solaris 9 bug 6395699. */
@@ -311,7 +311,7 @@
* This restriction is documented at
* http://www.opengroup.org/onlinepubs/009695399/functions/fork.html.
*/
-RPY_EXPORTED_FOR_TESTS void
+void
pypy_subprocess_child_exec(
char *const exec_array[],
char *const argv[],
@@ -476,7 +476,7 @@
}
-RPY_EXPORTED_FOR_TESTS int
+int
pypy_subprocess_cloexec_pipe(int *fds)
{
int res;
@@ -518,7 +518,7 @@
}
-RPY_EXPORTED_FOR_TESTS void
+void
pypy_subprocess_init(void)
{
#ifdef _SC_OPEN_MAX
diff --git a/pypy/module/_posixsubprocess/_posixsubprocess.h b/pypy/module/_posixsubprocess/_posixsubprocess.h
new file mode 100644
--- /dev/null
+++ b/pypy/module/_posixsubprocess/_posixsubprocess.h
@@ -0,0 +1,24 @@
+#include "src/precommondefs.h"
+
+RPY_EXPORTED_FOR_TESTS void
+pypy_subprocess_child_exec(
+ char *const exec_array[],
+ char *const argv[],
+ char *const envp[],
+ const char *cwd,
+ int p2cread, int p2cwrite,
+ int c2pread, int c2pwrite,
+ int errread, int errwrite,
+ int errpipe_read, int errpipe_write,
+ int close_fds, int restore_signals,
+ int call_setsid,
+ long *py_fds_to_keep,
+ ssize_t num_fds_to_keep,
+ int (*preexec_fn)(void*),
+ void *preexec_fn_arg);
+
+RPY_EXPORTED_FOR_TESTS int
+pypy_subprocess_cloexec_pipe(int *fds);
+
+RPY_EXPORTED_FOR_TESTS void
+pypy_subprocess_init(void);
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
@@ -22,6 +22,7 @@
config = platform.configure(CConfig)
eci = ExternalCompilationInfo(
+ includes=[thisdir.join('_posixsubprocess.h')],
include_dirs=[str(thisdir), cdir],
separate_module_files=[thisdir.join('_posixsubprocess.c')])
More information about the pypy-commit
mailing list