vim: Fix suspending with `Ctrl+Z`

Effectively reverts commit 17b1dff42b.
This commit is contained in:
Tee KOBAYASHI 2022-02-27 03:55:13 +09:00 committed by xtkoba
parent 0581e6a22a
commit 17daad4316
8 changed files with 46 additions and 56 deletions

View File

@ -7,7 +7,7 @@ TERMUX_PKG_RECOMMENDS="diffutils"
# vim should only be updated every 50 releases on multiples of 50.
# Update both vim and vim-python to the same version in one PR.
TERMUX_PKG_VERSION=8.2.4450
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL="https://github.com/vim/vim/archive/v${TERMUX_PKG_VERSION}.tar.gz"
TERMUX_PKG_SHA256=b0a5acbe83bbdd4b1412abd9dc2ae2e3593c6cff8ff11c551fda3e6e2a87ec81
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="

View File

@ -1,13 +0,0 @@
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -157,9 +157,9 @@
#endif
#if defined(SIGTSTP)
static RETSIGTYPE sig_tstp SIGPROTOARG;
+#endif
// volatile because it is used in signal handler sig_tstp() and sigcont_handler().
static volatile sig_atomic_t in_mch_suspend = FALSE;
-#endif
#if defined(SIGINT)
static RETSIGTYPE catch_sigint SIGPROTOARG;
#endif

View File

@ -1,17 +1,7 @@
--- a/src/os_unix.h
+++ b/src/os_unix.h
@@ -138,6 +138,10 @@
#include <signal.h>
+#ifdef __ANDROID__
+#undef SIGTSTP
+#endif
+
#if defined(DIRSIZ) && !defined(MAXNAMLEN)
# define MAXNAMLEN DIRSIZ
#endif
@@ -356,7 +360,7 @@
diff -uNr vim-8.2.0000/src/os_unix.h vim-8.2.0000.mod/src/os_unix.h
--- vim-8.2.0000/src/os_unix.h 2019-12-12 15:18:35.000000000 +0200
+++ vim-8.2.0000.mod/src/os_unix.h 2019-12-20 19:27:51.141441414 +0200
@@ -350,7 +350,7 @@
# ifdef VMS
# define DFLT_DIR "./,sys$login:,tmp:"
# else

View File

@ -0,0 +1,18 @@
https://github.com/vim/vim/commit/cbef12e60b2c5a4f026172ab9873deaab2e70cf2
diff --git a/src/os_unix.c b/src/os_unix.c
index d36eb46a2c47..58f8276fb595 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -887,8 +887,10 @@ sig_tstp SIGDEFARG(sigarg)
else
got_tstp = TRUE;
- // this is not required on all systems, but it doesn't hurt anybody
+#ifndef __ANDROID__
+ // this is not required on all systems
signal(SIGTSTP, (RETSIGTYPE (*)())sig_tstp);
+#endif
SIGRETURN;
}
#endif

View File

@ -7,7 +7,7 @@ TERMUX_PKG_RECOMMENDS="diffutils"
# vim should only be updated every 50 releases on multiples of 50.
# Update both vim and vim-python to the same version in one PR.
TERMUX_PKG_VERSION=8.2.4450
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL="https://github.com/vim/vim/archive/v${TERMUX_PKG_VERSION}.tar.gz"
TERMUX_PKG_SHA256=b0a5acbe83bbdd4b1412abd9dc2ae2e3593c6cff8ff11c551fda3e6e2a87ec81
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="

View File

@ -1,13 +0,0 @@
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -157,9 +157,9 @@
#endif
#if defined(SIGTSTP)
static RETSIGTYPE sig_tstp SIGPROTOARG;
+#endif
// volatile because it is used in signal handler sig_tstp() and sigcont_handler().
static volatile sig_atomic_t in_mch_suspend = FALSE;
-#endif
#if defined(SIGINT)
static RETSIGTYPE catch_sigint SIGPROTOARG;
#endif

View File

@ -1,17 +1,7 @@
--- a/src/os_unix.h
+++ b/src/os_unix.h
@@ -138,6 +138,10 @@
#include <signal.h>
+#ifdef __ANDROID__
+#undef SIGTSTP
+#endif
+
#if defined(DIRSIZ) && !defined(MAXNAMLEN)
# define MAXNAMLEN DIRSIZ
#endif
@@ -356,7 +360,7 @@
diff -uNr vim-8.2.0000/src/os_unix.h vim-8.2.0000.mod/src/os_unix.h
--- vim-8.2.0000/src/os_unix.h 2019-12-12 15:18:35.000000000 +0200
+++ vim-8.2.0000.mod/src/os_unix.h 2019-12-20 19:27:51.141441414 +0200
@@ -350,7 +350,7 @@
# ifdef VMS
# define DFLT_DIR "./,sys$login:,tmp:"
# else

View File

@ -0,0 +1,18 @@
https://github.com/vim/vim/commit/cbef12e60b2c5a4f026172ab9873deaab2e70cf2
diff --git a/src/os_unix.c b/src/os_unix.c
index d36eb46a2c47..58f8276fb595 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -887,8 +887,10 @@ sig_tstp SIGDEFARG(sigarg)
else
got_tstp = TRUE;
- // this is not required on all systems, but it doesn't hurt anybody
+#ifndef __ANDROID__
+ // this is not required on all systems
signal(SIGTSTP, (RETSIGTYPE (*)())sig_tstp);
+#endif
SIGRETURN;
}
#endif