Skip to content

Commit 1ecedf1

Browse files
committed
Corrected patch for 3.8.1
1 parent 80fa438 commit 1ecedf1

File tree

1 file changed

+7
-60
lines changed

1 file changed

+7
-60
lines changed

patch/Python/Python.patch

Lines changed: 7 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -32006,7 +32006,7 @@ index 4e97337811..bb8d8f9590 100644
3200632006
sin(pi*x), giving accurate results for all finite x (especially x
3200732007
integral or close to an integer). This is here for use in the
3200832008
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
32009-
index 850769fd95..10fab7d8a5 100644
32009+
index 850769fd95..4e8c32c4fd 100644
3201032010
--- a/Modules/posixmodule.c
3201132011
+++ b/Modules/posixmodule.c
3201232012
@@ -20,6 +20,8 @@
@@ -32044,52 +32044,7 @@ index 850769fd95..10fab7d8a5 100644
3204432044

3204532045
/*[clinic input]
3204632046
# one of the few times we lie about this name!
32047-
@@ -442,27 +463,33 @@
32048-
}
32049-
}
32050-
}
32051-
+#endif
32052-
32053-
void
32054-
PyOS_BeforeFork(void)
32055-
{
32056-
+#ifdef HAVE_FORK
32057-
run_at_forkers(_PyInterpreterState_Get()->before_forkers, 1);
32058-
32059-
_PyImport_AcquireLock();
32060-
+#endif
32061-
}
32062-
32063-
void
32064-
PyOS_AfterFork_Parent(void)
32065-
{
32066-
+#ifdef HAVE_FORK
32067-
if (_PyImport_ReleaseLock() <= 0)
32068-
Py_FatalError("failed releasing import lock after fork");
32069-
32070-
run_at_forkers(_PyInterpreterState_Get()->after_forkers_parent, 0);
32071-
+#endif
32072-
}
32073-
32074-
void
32075-
PyOS_AfterFork_Child(void)
32076-
{
32077-
+#ifdef HAVE_FORK
32078-
_PyRuntimeState *runtime = &_PyRuntime;
32079-
_PyGILState_Reinit(runtime);
32080-
_PyEval_ReInitThreads(runtime);
32081-
@@ -472,8 +499,10 @@
32082-
_PyInterpreterState_DeleteExceptMain(runtime);
32083-
32084-
run_at_forkers(_PyInterpreterState_Get()->after_forkers_child, 0);
32085-
+#endif
32086-
}
32087-
32088-
+#ifdef HAVE_FORK
32089-
static int
32090-
register_at_forker(PyObject **lst, PyObject *func)
32091-
{
32092-
@@ -1373,7 +1402,9 @@
32047+
@@ -1373,7 +1394,9 @@
3209332048
*/
3209432049
#include <crt_externs.h>
3209532050
#elif !defined(_MSC_VER) && (!defined(__WATCOMC__) || defined(__QNX__) || defined(__VXWORKS__))
@@ -32099,15 +32054,7 @@ index 850769fd95..10fab7d8a5 100644
3209932054
#endif /* !_MSC_VER */
3210032055

3210132056
static PyObject *
32102-
@@ -1444,6 +1475,7 @@
32103-
Py_DECREF(k);
32104-
Py_DECREF(v);
32105-
}
32106-
+#endif
32107-
return d;
32108-
}
32109-
32110-
@@ -4348,7 +4380,12 @@
32057+
@@ -4348,7 +4371,12 @@
3211132058
}
3211232059

3211332060
Py_BEGIN_ALLOW_THREADS
@@ -32120,7 +32067,7 @@ index 850769fd95..10fab7d8a5 100644
3212032067
Py_END_ALLOW_THREADS
3212132068
return result;
3212232069
}
32123-
@@ -4625,7 +4662,7 @@
32070+
@@ -4625,7 +4653,7 @@
3212432071
static int
3212532072
utime_dir_fd(utime_t *ut, int dir_fd, const char *path, int follow_symlinks)
3212632073
{
@@ -32129,7 +32076,7 @@ index 850769fd95..10fab7d8a5 100644
3212932076
int flags = follow_symlinks ? 0 : AT_SYMLINK_NOFOLLOW;
3213032077
UTIME_TO_TIMESPEC;
3213132078
return utimensat(dir_fd, path, time, flags);
32132-
@@ -4651,7 +4688,7 @@
32079+
@@ -4651,7 +4679,7 @@
3213332080
static int
3213432081
utime_fd(utime_t *ut, int fd)
3213532082
{
@@ -32138,7 +32085,7 @@ index 850769fd95..10fab7d8a5 100644
3213832085
UTIME_TO_TIMESPEC;
3213932086
return futimens(fd, time);
3214032087
#else
32141-
@@ -4674,7 +4711,7 @@
32088+
@@ -4674,7 +4702,7 @@
3214232089
static int
3214332090
utime_nofollow_symlinks(utime_t *ut, const char *path)
3214432091
{
@@ -32147,7 +32094,7 @@ index 850769fd95..10fab7d8a5 100644
3214732094
UTIME_TO_TIMESPEC;
3214832095
return utimensat(DEFAULT_DIR_FD, path, time, AT_SYMLINK_NOFOLLOW);
3214932096
#else
32150-
@@ -4690,7 +4727,7 @@
32097+
@@ -4690,7 +4718,7 @@
3215132098
static int
3215232099
utime_default(utime_t *ut, const char *path)
3215332100
{

0 commit comments

Comments
 (0)