Skip to content

Commit f778b92

Browse files
committed
Updated patch against 3.7.5 to resolve build problems.
1 parent 2310d87 commit f778b92

File tree

2 files changed

+101
-47
lines changed

2 files changed

+101
-47
lines changed

patch/Python/Python.patch

Lines changed: 92 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -31917,39 +31917,6 @@ index 5861042398..38ff0ab8b9 100644
3191731917
+
3191831918
+#endif
3191931919
\ 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.
3195331920
diff --git a/Modules/_ctypes/malloc_closure.c b/Modules/_ctypes/malloc_closure.c
3195431921
index 8ad76497c7..5857c68301 100644
3195531922
--- a/Modules/_ctypes/malloc_closure.c
@@ -32103,7 +32070,7 @@ index 8eedca8a30..ad70499c82 100644
3210332070
PyFPE_START_PROTECT("in math_hypot", return 0);
3210432071
r = hypot(x, y);
3210532072
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
32106-
index 58cb9b0d46..4a2ae3f024 100644
32073+
index 58cb9b0d46..f258f9d445 100644
3210732074
--- a/Modules/posixmodule.c
3210832075
+++ b/Modules/posixmodule.c
3210932076
@@ -20,6 +20,8 @@
@@ -32139,7 +32106,51 @@ index 58cb9b0d46..4a2ae3f024 100644
3213932106

3214032107
/*[clinic input]
3214132108
# 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 @@
3214332154
#include <crt_externs.h>
3214432155
static char **environ;
3214532156
#elif !defined(_MSC_VER) && ( !defined(__WATCOMC__) || defined(__QNX__) )
@@ -32149,7 +32160,7 @@ index 58cb9b0d46..4a2ae3f024 100644
3214932160
#endif /* !_MSC_VER */
3215032161

3215132162
static PyObject *
32152-
@@ -1360,7 +1381,7 @@
32163+
@@ -1360,7 +1389,7 @@
3215332164
Py_DECREF(k);
3215432165
Py_DECREF(v);
3215532166
}
@@ -32158,7 +32169,7 @@ index 58cb9b0d46..4a2ae3f024 100644
3215832169
if (environ == NULL)
3215932170
return d;
3216032171
/* This part ignores errors */
32161-
@@ -4221,7 +4242,12 @@
32172+
@@ -4221,7 +4250,12 @@
3216232173
long result;
3216332174
const char *bytes = PyBytes_AsString(command);
3216432175
Py_BEGIN_ALLOW_THREADS
@@ -32171,7 +32182,7 @@ index 58cb9b0d46..4a2ae3f024 100644
3217132182
Py_END_ALLOW_THREADS
3217232183
return result;
3217332184
}
32174-
@@ -4498,7 +4524,7 @@
32185+
@@ -4498,7 +4532,7 @@
3217532186
static int
3217632187
utime_dir_fd(utime_t *ut, int dir_fd, const char *path, int follow_symlinks)
3217732188
{
@@ -32180,7 +32191,7 @@ index 58cb9b0d46..4a2ae3f024 100644
3218032191
int flags = follow_symlinks ? 0 : AT_SYMLINK_NOFOLLOW;
3218132192
UTIME_TO_TIMESPEC;
3218232193
return utimensat(dir_fd, path, time, flags);
32183-
@@ -4524,7 +4550,7 @@
32194+
@@ -4524,7 +4558,7 @@
3218432195
static int
3218532196
utime_fd(utime_t *ut, int fd)
3218632197
{
@@ -32189,7 +32200,7 @@ index 58cb9b0d46..4a2ae3f024 100644
3218932200
UTIME_TO_TIMESPEC;
3219032201
return futimens(fd, time);
3219132202
#else
32192-
@@ -4547,7 +4573,7 @@
32203+
@@ -4547,7 +4581,7 @@
3219332204
static int
3219432205
utime_nofollow_symlinks(utime_t *ut, const char *path)
3219532206
{
@@ -32198,7 +32209,7 @@ index 58cb9b0d46..4a2ae3f024 100644
3219832209
UTIME_TO_TIMESPEC;
3219932210
return utimensat(DEFAULT_DIR_FD, path, time, AT_SYMLINK_NOFOLLOW);
3220032211
#else
32201-
@@ -4563,7 +4589,7 @@
32212+
@@ -4563,7 +4597,7 @@
3220232213
static int
3220332214
utime_default(utime_t *ut, const char *path)
3220432215
{
@@ -32268,7 +32279,7 @@ index 810427a229..66b2afc098 100644
3226832279
"getpwnam(): name not found: %R", arg);
3226932280
goto out;
3227032281
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
32271-
index 0ae4fcc323..8fc09b9cd7 100644
32282+
index 0ae4fcc323..bf1f9bedd7 100644
3227232283
--- a/Modules/timemodule.c
3227332284
+++ b/Modules/timemodule.c
3227432285
@@ -50,6 +50,11 @@
@@ -32297,6 +32308,45 @@ index 0ae4fcc323..8fc09b9cd7 100644
3229732308
Py_RETURN_NONE;
3229832309
}
3229932310

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():
3230032350
diff --git a/Python/marshal.c b/Python/marshal.c
3230132351
index 7d60614e71..89362ef971 100644
3230232352
--- a/Python/marshal.c

patch/Python/Setup.embedded

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ _opcode _opcode.c
3737
_operator _operator.c
3838
_pickle _pickle.c
3939
_posixsubprocess _posixsubprocess.c
40+
_queue _queuemodule.c
4041
_random _randommodule.c
4142
_sha1 sha1module.c
4243
_sha3 _sha3/sha3module.c
@@ -62,6 +63,7 @@ _symtable symtablemodule.c
6263
_thread -DPy_BUILD_CORE _threadmodule.c
6364
_tracemalloc _tracemalloc.c hashtable.c
6465
_weakref _weakref.c
66+
_uuid _uuidmodule.c
6567
atexit atexitmodule.c
6668
array arraymodule.c
6769
audioop audioop.c
@@ -87,18 +89,19 @@ resource resource.c
8789
select selectmodule.c
8890
syslog syslogmodule.c
8991
termios termios.c
90-
time timemodule.c
92+
time -DPy_BUILD_CORE timemodule.c
9193
unicodedata unicodedata.c
9294
zipimport -DPy_BUILD_CORE zipimport.c
9395
zlib zlibmodule.c -I$(prefix)/include -lz
9496

9597
#####################################################################
9698
# Testing modules
9799
#####################################################################
98-
_ctypes_test _ctypes/_ctypes_test.c
99-
_testbuffer _testbuffer.c
100-
_testcapi _testcapimodule.c
101-
_testimportmultiple _testimportmultiple.c
100+
#_ctypes_test _ctypes/_ctypes_test.c
101+
#_testbuffer _testbuffer.c
102+
#_testcapi _testcapimodule.c
103+
#_testimportmultiple _testimportmultiple.c
104+
#_testmultiphase _testmultiphase.c
102105

103106
#####################################################################
104107
# Modules that require additional frameworks
@@ -107,6 +110,7 @@ _testimportmultiple _testimportmultiple.c
107110
#_curses_panel _curses_panel.c -lpanel -lncurses
108111
#_dbm _dbmmodule.c
109112
#_gdbm _gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm
113+
#_scproxy _scproxy.c -framework SystemConfiguration -framework CoreFoundation
110114
#_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT -I... -L...
111115
#nis nismodule.c -lnsl
112116
#ossaudiodev

0 commit comments

Comments
 (0)