mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
* gnu/packages/gawk.scm (gawk): Update to 5.3.2. [arguments]: In ‘set-shell-file-name’ phase, also modify ‘builtin.c’. Change pager substitution to honor $PAGER. * gnu/packages/commencement.scm (gawk-boot0)[arguments]: Inherit arguments from gawk. * gnu/packages/patches/gawk-shell.patch: Update for gawk 5.3.2. Change-Id: Icb398e0a72bcdf9cd371514d1ca486dc8781b7e5 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
63 lines
2.1 KiB
Diff
63 lines
2.1 KiB
Diff
As for libc's `system', change Awk to look for `sh' in $PATH. This patch is
|
|
only meant to be used during bootstrapping, where we don't know in advance the
|
|
absolute file name of `sh'.
|
|
|
|
--- gawk-5.3.2/builtin.c
|
|
+++ gawk-5.3.2/builtin.c
|
|
@@ -3341,7 +3341,7 @@ gawk_system(const char *command)
|
|
if ((childpid = fork()) == 0) {
|
|
// child
|
|
set_sigpipe_to_default();
|
|
- execl("/bin/sh", "sh", "-c", command, NULL);
|
|
+ execlp("sh", "sh", "-c", command, NULL);
|
|
_exit(errno == ENOENT ? 127 : 126);
|
|
} else {
|
|
// parent
|
|
--- gawk-5.3.2/io.c
|
|
+++ gawk-5.3.2/io.c
|
|
@@ -2084,7 +2084,7 @@ fork_and_open_slave_pty(const char *slavenam, int master, const char *command, p
|
|
|
|
set_sigpipe_to_default();
|
|
|
|
- execl("/bin/sh", "sh", "-c", command, NULL);
|
|
+ execlp("sh", "sh", "-c", command, NULL);
|
|
_exit(errno == ENOENT ? 127 : 126);
|
|
|
|
case -1:
|
|
@@ -2136,7 +2136,7 @@ fork_and_open_slave_pty(const char *slavenam, int master, const char *command, p
|
|
|
|
signal(SIGPIPE, SIG_DFL);
|
|
|
|
- execl("/bin/sh", "sh", "-c", command, NULL);
|
|
+ execlp("sh", "sh", "-c", command, NULL);
|
|
_exit(errno == ENOENT ? 127 : 126);
|
|
|
|
case -1:
|
|
@@ -2475,7 +2475,7 @@ use_pipes:
|
|
fatal(_("close of pipe failed: %s"), strerror(errno));
|
|
/* stderr does NOT get dup'ed onto child's stdout */
|
|
set_sigpipe_to_default();
|
|
- execl("/bin/sh", "sh", "-c", str, NULL);
|
|
+ execlp("sh", "sh", "-c", str, NULL);
|
|
_exit(errno == ENOENT ? 127 : 126);
|
|
}
|
|
#endif /* NOT __MINGW32__ */
|
|
@@ -2706,7 +2706,7 @@ gawk_popen(const char *cmd, struct redirect *rp)
|
|
if (close(p[0]) == -1 || close(p[1]) == -1)
|
|
fatal(_("close of pipe failed: %s"), strerror(errno));
|
|
set_sigpipe_to_default();
|
|
- execl("/bin/sh", "sh", "-c", cmd, NULL);
|
|
+ execlp("sh", "sh", "-c", cmd, NULL);
|
|
_exit(errno == ENOENT ? 127 : 126);
|
|
}
|
|
#endif /* NOT __MINGW32__ */
|
|
@@ -4642,7 +4642,7 @@ gawk_popen_write(const char *cmd)
|
|
fatal(_("gawk_popen_write: failed to move pipe fd to standard input"));
|
|
(void) close(pipefds[0]);
|
|
set_sigpipe_to_default();
|
|
- execl("/bin/sh", "sh", "-c", cmd, NULL);
|
|
+ execlp("sh", "sh", "-c", cmd, NULL);
|
|
_exit(errno == ENOENT ? 127 : 126);
|
|
} else if (childpid < 0) {
|
|
(void) close(pipefds[0]);
|