Selaa lähdekoodia

Ports: Update Python patches for the recent signal changes

The old patch to define `HAVE_SIGSET_T` is no longer needed, as we now
have implementations for `sigwaitinfo` and `sigtimedwait`.

Instead, for the same reason, we now have to remove a reference to
`si_errno`, which we haven't implemented yet but is just assumed to be
there.
Tim Schumacher 3 vuotta sitten
vanhempi
commit
48dc28996d

+ 2 - 2
Ports/python3/patches/ReadMe.md

@@ -1,8 +1,8 @@
 # Patches for Python 3.9 on SerenityOS
 
-## `define-have-sigset-t.patch`
+## `remove-missing-si-errno.patch`
 
-Ensures `HAVE_SIGSET_T` is defined, as we *do* have `sigset_t` but it's not detected properly due to some related functions being missing.
+Removes a reference to `si_errno` in `siginfo_t`, as we currently don't have that implemented.
 
 ## `include-sys-uio.patch`
 

+ 0 - 12
Ports/python3/patches/define-have-sigset-t.patch

@@ -1,12 +0,0 @@
---- Python-3.10.1/Modules/posixmodule.h	2021-08-03 19:01:36.368000000 +0100
-+++ Python-3.10.1/Modules/posixmodule.h	2021-08-03 19:01:54.120205211 +0100
-@@ -19,7 +19,8 @@
- #endif /* MS_WINDOWS */
- 
- #if defined(PYPTHREAD_SIGMASK) || defined(HAVE_SIGWAIT) || \
--        defined(HAVE_SIGWAITINFO) || defined(HAVE_SIGTIMEDWAIT)
-+        defined(HAVE_SIGWAITINFO) || defined(HAVE_SIGTIMEDWAIT) || \
-+        defined(__serenity__)
- # define HAVE_SIGSET_T
- #endif
- 

+ 12 - 0
Ports/python3/patches/remove-missing-si-errno.patch

@@ -0,0 +1,12 @@
+diff -ur a/Modules/signalmodule.c b/Modules/signalmodule.c
+--- a/Modules/signalmodule.c	2021-12-06 19:23:39.000000000 +0100
++++ b/Modules/signalmodule.c	2021-12-22 03:37:56.097759703 +0100
+@@ -1151,7 +1151,7 @@
+     PyStructSequence_SET_ITEM(result, 4, PyLong_FromLong(0L));
+     PyStructSequence_SET_ITEM(result, 5, PyLong_FromLong(0L));
+ #else
+-    PyStructSequence_SET_ITEM(result, 2, PyLong_FromLong((long)(si->si_errno)));
++    PyStructSequence_SET_ITEM(result, 2, PyLong_FromLong(0L));
+     PyStructSequence_SET_ITEM(result, 3, PyLong_FromPid(si->si_pid));
+     PyStructSequence_SET_ITEM(result, 4, _PyLong_FromUid(si->si_uid));
+     PyStructSequence_SET_ITEM(result, 5,