forked from WHC/Hermit
Termux: build with make, install to $PREFIX, no nl_langinfo on Android
- bootstrap_termux.sh installs pkg-config/binutils, builds with make, runs the tests and installs into Termux's $PREFIX/bin. - Makefile drops -lpthread on Android (pthreads are in bionic libc). - TUI assumes UTF-8 on Android: nl_langinfo needs API 26, Termux targets 24. All sources compile for aarch64-linux-android24 (NDK 27).
This commit is contained in:
@@ -369,7 +369,9 @@ static void theme_init(void) {
|
||||
const char *nc = getenv("NO_COLOR");
|
||||
g_nocolor = nc && nc[0];
|
||||
const char *asc = getenv("CST_ASCII");
|
||||
#ifndef _WIN32
|
||||
#if defined(__ANDROID__)
|
||||
g_utf8 = 1; /* bionic is UTF-8 only; nl_langinfo needs API 26 */
|
||||
#elif !defined(_WIN32)
|
||||
const char *cs = nl_langinfo(CODESET);
|
||||
g_utf8 = cs && (strcasecmp(cs, "UTF-8") == 0 || strcasecmp(cs, "utf8") == 0);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user