gawk: Update from 4.1.4 to 4.2.0
[termux-packages] / packages / gawk / io.c.patch
CommitLineData
522ec400
FF
1diff -u -r ../gawk-4.2.0/io.c ./io.c
2--- ../gawk-4.2.0/io.c 2017-09-28 20:41:20.000000000 +0200
3+++ ./io.c 2017-10-20 12:05:39.159861304 +0200
4@@ -2134,7 +2134,7 @@
951e2f60 5
522ec400 6 set_sigpipe_to_default();
951e2f60
FF
7
8- execl("/bin/sh", "sh", "-c", str, NULL);
9+ execl("@TERMUX_PREFIX@/bin/sh", "sh", "-c", str, NULL);
10 _exit(errno == ENOENT ? 127 : 126);
11
12 case -1:
522ec400
FF
13@@ -2252,7 +2252,7 @@
14
15 /* stderr does NOT get dup'ed onto child's stdout */
16 #ifdef __EMX__
17- pid = spawnl(P_NOWAIT, "/bin/sh", "sh", "-c", str, NULL);
18+ pid = spawnl(P_NOWAIT, "@TERMUX_PREFIX@/bin/sh", "sh", "-c", str, NULL);
19 #else /* __MINGW32__ */
20 pid = spawnl(P_NOWAIT, getenv("ComSpec"), "cmd.exe", "/c",
21 qcmd = quote_cmd(str), NULL);
22@@ -2310,7 +2310,7 @@
951e2f60
FF
23 fatal(_("close of pipe failed (%s)"), strerror(errno));
24 /* stderr does NOT get dup'ed onto child's stdout */
522ec400 25 set_sigpipe_to_default();
951e2f60
FF
26- execl("/bin/sh", "sh", "-c", str, NULL);
27+ execl("@TERMUX_PREFIX@/bin/sh", "sh", "-c", str, NULL);
28 _exit(errno == ENOENT ? 127 : 126);
29 }
30 #endif /* NOT __EMX__, NOT __MINGW32__ */
522ec400
FF
31@@ -2522,7 +2522,7 @@
32 os_close_on_exec(save_stdout, cmd, "pipe", "from"); /* saved stdout of the parent process */
33
34 #ifdef __EMX__
35- pid = spawnl(P_NOWAIT, "/bin/sh", "sh", "-c", cmd, NULL);
36+ pid = spawnl(P_NOWAIT, "@TERMUX_PREFIX@/bin/sh", "sh", "-c", cmd, NULL);
37 #else /* __MINGW32__ */
38 pid = spawnl(P_NOWAIT, getenv("ComSpec"), "cmd.exe", "/c",
39 qcmd = quote_cmd(cmd), NULL);
40@@ -2547,7 +2547,7 @@
951e2f60
FF
41 if (close(p[0]) == -1 || close(p[1]) == -1)
42 fatal(_("close of pipe failed (%s)"), strerror(errno));
522ec400 43 set_sigpipe_to_default();
951e2f60
FF
44- execl("/bin/sh", "sh", "-c", cmd, NULL);
45+ execl("@TERMUX_PREFIX@/bin/sh", "sh", "-c", cmd, NULL);
46 _exit(errno == ENOENT ? 127 : 126);
47 }
48 #endif /* NOT __EMX__, NOT __MINGW32__ */