gawk: Update from 4.1.4 to 4.2.0
[termux-packages] / packages / gawk / io.c.patch
1 diff -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 @@
5
6 set_sigpipe_to_default();
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:
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 @@
23 fatal(_("close of pipe failed (%s)"), strerror(errno));
24 /* stderr does NOT get dup'ed onto child's stdout */
25 set_sigpipe_to_default();
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__ */
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 @@
41 if (close(p[0]) == -1 || close(p[1]) == -1)
42 fatal(_("close of pipe failed (%s)"), strerror(errno));
43 set_sigpipe_to_default();
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__ */