32-bit android uses 32-bit off_t by default. When building with
-D_FILE_OFFSET_BITS=64 with unified headers off_t are promoted
to 64-bit, but there are bugs in the toolchain and spotty support
for it in the platform (not all functions are available until
android-24, and the platform zlib is compiled with 32-bit off_t).
Also, unless every library&program is rebuilt with 64-bit off_t,
including user-built ones, we risk a mismatch between programs and
libraries which can cause serious (but sometimes subtle) runtime
failures.
As -D_FILE_OFFSET_BITS=64 is not that important for most users
(with mariadb requiring it as an exception), we drop the support
for now by patching it away in <sys/cdefs.h>.
- Put everything into shell functions.
- Start fixing shellcheck warnings.
- Run a hostbuild before setting up an android toolchain (fixes#657).
It was quite a hasty rewrite, so things could be broken. Let me know!
The previous patched session.c just took the existing environment
and kept it. The new copies over a few specific variables needed
but otherwise does the normal setup.
Fixes#341 (TERM being ignored).
Fixes#290 (SSH_CONNECTION/SSH_CLIENT/SSH_TTY not setup).
Fixes https://github.com/termux/termux-app/issues/108 (SSH agent
forwarding not working).
The ControlMaster feature for multiplexing used hard links, which
does not work on Android starting in Android 6.0. Replace this
with a non-atomic check-then-rename for now. Fixes#91.