blob: 72a9db5d9b1b30d5b7871330e8e723ecb15680bc [file] [log] [blame]
Sadaf Ebrahimib02792c2023-03-31 18:17:33 +00001diff -u mksh-R59c/mksh/funcs.c src/funcs.c
2--- mksh-R59c/mksh/funcs.c 2020-08-27 19:53:11.000000000 +0000
3+++ src/funcs.c 2023-03-31 18:02:12.376044783 +0000
4@@ -98,7 +98,9 @@
Elliott Hughes23925bb2017-09-22 16:04:20 -07005 {Tsgbreak, c_brkcont},
6 {T__builtin, c_builtin},
7 {Tbuiltin, c_builtin},
8+#if !defined(__ANDROID__)
9 {Tbcat, c_cat},
10+#endif
11 {Tcd, c_cd},
12 /* dash compatibility hack */
13 {"chdir", c_cd},
Sadaf Ebrahimib02792c2023-03-31 18:17:33 +000014@@ -119,7 +121,9 @@
Elliott Hughes23925bb2017-09-22 16:04:20 -070015 {"pwd", c_pwd},
16 {Tread, c_read},
17 {Tdsgreadonly, c_typeset},
18+#if !defined(__ANDROID__)
19 {"!realpath", c_realpath},
20+#endif
21 {"~rename", c_rename},
22 {"*=return", c_exitreturn},
Elliott Hughes2e465942020-05-15 16:16:59 -070023 {Tsghset, c_set},
Sadaf Ebrahimib02792c2023-03-31 18:17:33 +000024@@ -153,8 +157,10 @@
Elliott Hughes23925bb2017-09-22 16:04:20 -070025 {"~printf", c_printf},
26 #endif
27 #if HAVE_SELECT
28+#if !defined(__ANDROID__)
29 {"sleep", c_sleep},
30 #endif
31+#endif
32 #ifdef __MirBSD__
33 /* alias to "true" for historical reasons */
34 {"domainname", c_true},
Sadaf Ebrahimib02792c2023-03-31 18:17:33 +000035diff -u mksh-R59c/mksh/main.c src/main.c
36--- mksh-R59c/mksh/main.c 2020-10-01 20:29:21.000000000 +0000
37+++ src/main.c 2023-03-31 18:09:32.827660886 +0000
38@@ -413,6 +413,12 @@
39
Elliott Hughes47086262019-03-26 12:34:31 -070040 /* import environment */
41 init_environ();
Sadaf Ebrahimib02792c2023-03-31 18:17:33 +000042+
Elliott Hughes23925bb2017-09-22 16:04:20 -070043+ /* override default PATH regardless of environment */
44+#ifdef MKSH_DEFPATH_OVERRIDE
45+ vp = global(TPATH);
46+ setstr(vp, MKSH_DEFPATH_OVERRIDE, KSH_RETURN_ERROR);
47+#endif
Sadaf Ebrahimib02792c2023-03-31 18:17:33 +000048
Elliott Hughes23925bb2017-09-22 16:04:20 -070049 /* for security */
50 typeset(TinitIFS, 0, 0, 0, 0);
Sadaf Ebrahimib02792c2023-03-31 18:17:33 +000051Only in src/: rlimits.gen
52Only in src/: sh_flags.gen
53Only in src/: ulimits.gen