@@ -31917,39 +31917,6 @@ index 5861042398..38ff0ab8b9 100644
31917
31917
+
31918
31918
+#endif
31919
31919
\ No newline at end of file
31920
- diff --git a/Modules/_ctypes/libffi_osx/LICENSE b/Modules/_ctypes/libffi_osx/LICENSE
31921
- index f591795152..a66fab4f25 100644
31922
- --- a/Modules/_ctypes/libffi_osx/LICENSE
31923
- +++ b/Modules/_ctypes/libffi_osx/LICENSE
31924
- @@ -1,4 +1,5 @@
31925
- -libffi - Copyright (c) 1996-2003 Red Hat, Inc.
31926
- +libffi - Copyright (c) 1996-2014 Anthony Green, Red Hat, Inc and others.
31927
- +See source files for details.
31928
-
31929
- Permission is hereby granted, free of charge, to any person obtaining
31930
- a copy of this software and associated documentation files (the
31931
- @@ -8,13 +9,13 @@
31932
- permit persons to whom the Software is furnished to do so, subject to
31933
- the following conditions:
31934
-
31935
- -The above copyright notice and this permission notice shall be included
31936
- -in all copies or substantial portions of the Software.
31937
- +The above copyright notice and this permission notice shall be
31938
- +included in all copies or substantial portions of the Software.
31939
-
31940
- -THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
31941
- -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
31942
- +THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
31943
- +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
31944
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
31945
- -IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
31946
- -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
31947
- -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
31948
- -OTHER DEALINGS IN THE SOFTWARE.
31949
- +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
31950
- +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
31951
- +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31952
- +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31953
31920
diff --git a/Modules/_ctypes/malloc_closure.c b/Modules/_ctypes/malloc_closure.c
31954
31921
index 8ad76497c7..5857c68301 100644
31955
31922
--- a/Modules/_ctypes/malloc_closure.c
@@ -32103,7 +32070,7 @@ index 8eedca8a30..ad70499c82 100644
32103
32070
PyFPE_START_PROTECT("in math_hypot", return 0);
32104
32071
r = hypot(x, y);
32105
32072
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
32106
- index 58cb9b0d46..4a2ae3f024 100644
32073
+ index 58cb9b0d46..f258f9d445 100644
32107
32074
--- a/Modules/posixmodule.c
32108
32075
+++ b/Modules/posixmodule.c
32109
32076
@@ -20,6 +20,8 @@
@@ -32139,7 +32106,51 @@ index 58cb9b0d46..4a2ae3f024 100644
32139
32106
32140
32107
/*[clinic input]
32141
32108
# one of the few times we lie about this name!
32142
- @@ -1309,7 +1328,9 @@
32109
+ @@ -429,35 +448,43 @@
32110
+ }
32111
+ }
32112
+ }
32113
+ +#endif
32114
+
32115
+ void
32116
+ PyOS_BeforeFork(void)
32117
+ {
32118
+ +#ifdef HAVE_FORK
32119
+ run_at_forkers(PyThreadState_Get()->interp->before_forkers, 1);
32120
+
32121
+ _PyImport_AcquireLock();
32122
+ +#endif
32123
+ }
32124
+
32125
+ void
32126
+ PyOS_AfterFork_Parent(void)
32127
+ {
32128
+ +#ifdef HAVE_FORK
32129
+ if (_PyImport_ReleaseLock() <= 0)
32130
+ Py_FatalError("failed releasing import lock after fork");
32131
+
32132
+ run_at_forkers(PyThreadState_Get()->interp->after_forkers_parent, 0);
32133
+ +#endif
32134
+ }
32135
+
32136
+ void
32137
+ PyOS_AfterFork_Child(void)
32138
+ {
32139
+ +#ifdef HAVE_FORK
32140
+ _PyGILState_Reinit();
32141
+ PyEval_ReInitThreads();
32142
+ _PyImport_ReInitLock();
32143
+ _PySignal_AfterFork();
32144
+
32145
+ run_at_forkers(PyThreadState_Get()->interp->after_forkers_child, 0);
32146
+ +#endif
32147
+ }
32148
+
32149
+ +#ifdef HAVE_FORK
32150
+ static int
32151
+ register_at_forker(PyObject **lst, PyObject *func)
32152
+ {
32153
+ @@ -1309,7 +1336,9 @@
32143
32154
#include <crt_externs.h>
32144
32155
static char **environ;
32145
32156
#elif !defined(_MSC_VER) && ( !defined(__WATCOMC__) || defined(__QNX__) )
@@ -32149,7 +32160,7 @@ index 58cb9b0d46..4a2ae3f024 100644
32149
32160
#endif /* !_MSC_VER */
32150
32161
32151
32162
static PyObject *
32152
- @@ -1360,7 +1381 ,7 @@
32163
+ @@ -1360,7 +1389 ,7 @@
32153
32164
Py_DECREF(k);
32154
32165
Py_DECREF(v);
32155
32166
}
@@ -32158,7 +32169,7 @@ index 58cb9b0d46..4a2ae3f024 100644
32158
32169
if (environ == NULL)
32159
32170
return d;
32160
32171
/* This part ignores errors */
32161
- @@ -4221,7 +4242 ,12 @@
32172
+ @@ -4221,7 +4250 ,12 @@
32162
32173
long result;
32163
32174
const char *bytes = PyBytes_AsString(command);
32164
32175
Py_BEGIN_ALLOW_THREADS
@@ -32171,7 +32182,7 @@ index 58cb9b0d46..4a2ae3f024 100644
32171
32182
Py_END_ALLOW_THREADS
32172
32183
return result;
32173
32184
}
32174
- @@ -4498,7 +4524 ,7 @@
32185
+ @@ -4498,7 +4532 ,7 @@
32175
32186
static int
32176
32187
utime_dir_fd(utime_t *ut, int dir_fd, const char *path, int follow_symlinks)
32177
32188
{
@@ -32180,7 +32191,7 @@ index 58cb9b0d46..4a2ae3f024 100644
32180
32191
int flags = follow_symlinks ? 0 : AT_SYMLINK_NOFOLLOW;
32181
32192
UTIME_TO_TIMESPEC;
32182
32193
return utimensat(dir_fd, path, time, flags);
32183
- @@ -4524,7 +4550 ,7 @@
32194
+ @@ -4524,7 +4558 ,7 @@
32184
32195
static int
32185
32196
utime_fd(utime_t *ut, int fd)
32186
32197
{
@@ -32189,7 +32200,7 @@ index 58cb9b0d46..4a2ae3f024 100644
32189
32200
UTIME_TO_TIMESPEC;
32190
32201
return futimens(fd, time);
32191
32202
#else
32192
- @@ -4547,7 +4573 ,7 @@
32203
+ @@ -4547,7 +4581 ,7 @@
32193
32204
static int
32194
32205
utime_nofollow_symlinks(utime_t *ut, const char *path)
32195
32206
{
@@ -32198,7 +32209,7 @@ index 58cb9b0d46..4a2ae3f024 100644
32198
32209
UTIME_TO_TIMESPEC;
32199
32210
return utimensat(DEFAULT_DIR_FD, path, time, AT_SYMLINK_NOFOLLOW);
32200
32211
#else
32201
- @@ -4563,7 +4589 ,7 @@
32212
+ @@ -4563,7 +4597 ,7 @@
32202
32213
static int
32203
32214
utime_default(utime_t *ut, const char *path)
32204
32215
{
@@ -32268,7 +32279,7 @@ index 810427a229..66b2afc098 100644
32268
32279
"getpwnam(): name not found: %R", arg);
32269
32280
goto out;
32270
32281
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
32271
- index 0ae4fcc323..8fc09b9cd7 100644
32282
+ index 0ae4fcc323..bf1f9bedd7 100644
32272
32283
--- a/Modules/timemodule.c
32273
32284
+++ b/Modules/timemodule.c
32274
32285
@@ -50,6 +50,11 @@
@@ -32297,6 +32308,45 @@ index 0ae4fcc323..8fc09b9cd7 100644
32297
32308
Py_RETURN_NONE;
32298
32309
}
32299
32310
32311
+ @@ -289,11 +296,13 @@
32312
+ return NULL;
32313
+ }
32314
+
32315
+ +#if !TARGET_OS_IPHONE
32316
+ ret = clock_settime((clockid_t)clk_id, &ts);
32317
+ if (ret != 0) {
32318
+ PyErr_SetFromErrno(PyExc_OSError);
32319
+ return NULL;
32320
+ }
32321
+ +#endif
32322
+ Py_RETURN_NONE;
32323
+ }
32324
+
32325
+ diff --git a/Python/bootstrap_hash.c b/Python/bootstrap_hash.c
32326
+ index 58b0802f46..75cb4843d0 100644
32327
+ --- a/Python/bootstrap_hash.c
32328
+ +++ b/Python/bootstrap_hash.c
32329
+ @@ -24,6 +24,10 @@
32330
+ # include <sanitizer/msan_interface.h>
32331
+ #endif
32332
+
32333
+ +#ifdef __APPLE__
32334
+ +# include "TargetConditionals.h"
32335
+ +#endif /* __APPLE__ */
32336
+ +
32337
+ #ifdef Py_DEBUG
32338
+ int _Py_HashSecret_Initialized = 0;
32339
+ #else
32340
+ @@ -196,6 +200,9 @@
32341
+ }
32342
+
32343
+ #elif defined(HAVE_GETENTROPY)
32344
+ +// iOS, tvOS and watchOS have an incomplete definitions of getentropy
32345
+ +// so it is *found* by configure, but doesn't actually exist.
32346
+ +#elif defined(HAVE_GETENTROPY) && !TARGET_OS_IPHONE
32347
+ #define PY_GETENTROPY 1
32348
+
32349
+ /* Fill buffer with size pseudo-random bytes generated by getentropy():
32300
32350
diff --git a/Python/marshal.c b/Python/marshal.c
32301
32351
index 7d60614e71..89362ef971 100644
32302
32352
--- a/Python/marshal.c
0 commit comments