clang: Depend on ndk-stl and remove triplet mess
[termux-packages] / packages / mc / lib-shell.c.patch
CommitLineData
478c8f9e
FF
1diff -u -r ../mc-4.8.16/lib/shell.c ./lib/shell.c
2--- ../mc-4.8.16/lib/shell.c 2016-03-12 10:45:47.000000000 -0500
3+++ ./lib/shell.c 2016-03-14 20:31:50.981985797 -0400
4@@ -64,18 +64,14 @@
5 mc_shell = g_new0 (mc_shell_t, 1);
6
7 /* 3rd choice: look for existing shells supported as MC subshells. */
8- if (access ("/bin/bash", X_OK) == 0)
9+ if (access ("@TERMUX_PREFIX@/bin/bash", X_OK) == 0)
10 mc_shell->path = g_strdup ("/bin/bash");
11- else if (access ("/bin/ash", X_OK) == 0)
12+ else if (access ("@TERMUX_PREFIX@/bin/applets/ash", X_OK) == 0)
13 mc_shell->path = g_strdup ("/bin/ash");
14- else if (access ("/bin/dash", X_OK) == 0)
15+ else if (access ("@TERMUX_PREFIX@/bin/dash", X_OK) == 0)
16 mc_shell->path = g_strdup ("/bin/dash");
17- else if (access ("/bin/busybox", X_OK) == 0)
18- mc_shell->path = g_strdup ("/bin/busybox");
19- else if (access ("/bin/zsh", X_OK) == 0)
20+ else if (access ("@TERMUX_PREFIX/bin/zsh", X_OK) == 0)
21 mc_shell->path = g_strdup ("/bin/zsh");
22- else if (access ("/bin/tcsh", X_OK) == 0)
23- mc_shell->path = g_strdup ("/bin/tcsh");
24 /* No fish as fallback because it is so much different from other shells and
25 * in a way exotic (even though user-friendly by name) that we should not
26 * present it as a subshell without the user's explicit intention. We rather
27@@ -85,7 +81,7 @@
28 */
29 else
30 /* Fallback and last resort: system default shell */
31- mc_shell->path = g_strdup ("/bin/sh");
32+ mc_shell->path = g_strdup ("@TERMUX_PREFIX@/bin/sh");
33
34 return mc_shell;
35 }