aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2020-08-13 14:27:56 +0100
committerRon Yorston <rmy@pobox.com>2020-08-13 14:58:01 +0100
commit41ef232fc522d91f29931ea4ee547432ca8899ee (patch)
treed2acfdc43839b68b569debb4494d5c7fbd8bc66b /include
parent16e5930a65f3c7c570b8a0dda8daa19ab4792fa2 (diff)
downloadbusybox-w32-41ef232fc522d91f29931ea4ee547432ca8899ee.tar.gz
busybox-w32-41ef232fc522d91f29931ea4ee547432ca8899ee.tar.bz2
busybox-w32-41ef232fc522d91f29931ea4ee547432ca8899ee.zip
win32: use built-in applets for non-existent binaries with Unix-style paths
Shell scripts moved from Unix may contain hard-coded paths to binaries such as /bin/sh. A recent commit made it possible to execute such binaries reliably, but that does require them to be installed. As an alternative solution: if a binary with a standard Unix path prefix can't be found but is available as a built-in applet, run the applet. Add the function unix_path() to detect paths starting with /bin, /usr/bin, /sbin or /usr/sbin. Use this function in: - the 'which' applet - shellexec(), describe_command() and find_command() in ash - mingw_spawn_1() See GitHub issue #195.
Diffstat (limited to 'include')
-rw-r--r--include/mingw.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/mingw.h b/include/mingw.h
index 434f3a474..b34d8772c 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -555,4 +555,5 @@ char *get_drive_cwd(const char *path, char *buffer, int size);
555void fix_path_case(char *path); 555void fix_path_case(char *path);
556void make_sparse(int fd, off_t start, off_t end); 556void make_sparse(int fd, off_t start, off_t end);
557int skip_ansi_emulation(int reset); 557int skip_ansi_emulation(int reset);
558int unix_path(const char *path);
558int has_path(const char *file); 559int has_path(const char *file);