aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2020-08-13 11:36:29 +0100
committerRon Yorston <rmy@pobox.com>2020-08-13 14:58:01 +0100
commit258ad6a1d52f1811f9de1d6b976f3797f5b31a2b (patch)
treee195bfa9eccb187e3e83ef797f516a92b539787e /include
parent5a48290d9bdb827657114c24aa75c67bb1bd0ea7 (diff)
downloadbusybox-w32-258ad6a1d52f1811f9de1d6b976f3797f5b31a2b.tar.gz
busybox-w32-258ad6a1d52f1811f9de1d6b976f3797f5b31a2b.tar.bz2
busybox-w32-258ad6a1d52f1811f9de1d6b976f3797f5b31a2b.zip
win32: code shrink
Add a new function, has_path(), to detect that an executable name doesn't require a path look-up. Also, since is_absolute_path() is now only used in shell/ash.c move its definition there from include/mingw.h. Saves 128 bytes.
Diffstat (limited to 'include')
-rw-r--r--include/mingw.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/mingw.h b/include/mingw.h
index 16f0396db..5c0b0a7f4 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -501,7 +501,6 @@ int mingw_execve(const char *cmd, char *const *argv, char *const *envp);
501#define execv mingw_execv 501#define execv mingw_execv
502 502
503#define has_dos_drive_prefix(path) (isalpha(*(path)) && (path)[1] == ':') 503#define has_dos_drive_prefix(path) (isalpha(*(path)) && (path)[1] == ':')
504#define is_absolute_path(path) ((path)[0] == '/' || (path)[0] == '\\' || has_dos_drive_prefix(path))
505 504
506int kill_SIGTERM_by_handle(HANDLE process); 505int kill_SIGTERM_by_handle(HANDLE process);
507 506
@@ -554,3 +553,4 @@ char *get_drive_cwd(const char *path, char *buffer, int size);
554void fix_path_case(char *path); 553void fix_path_case(char *path);
555void make_sparse(int fd, off_t start, off_t end); 554void make_sparse(int fd, off_t start, off_t end);
556int skip_ansi_emulation(int reset); 555int skip_ansi_emulation(int reset);
556int has_path(const char *file);