diff options
author | Ron Yorston <rmy@pobox.com> | 2020-08-13 11:36:29 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2020-08-13 14:58:01 +0100 |
commit | 258ad6a1d52f1811f9de1d6b976f3797f5b31a2b (patch) | |
tree | e195bfa9eccb187e3e83ef797f516a92b539787e /include | |
parent | 5a48290d9bdb827657114c24aa75c67bb1bd0ea7 (diff) | |
download | busybox-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.h | 2 |
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 | ||
506 | int kill_SIGTERM_by_handle(HANDLE process); | 505 | int kill_SIGTERM_by_handle(HANDLE process); |
507 | 506 | ||
@@ -554,3 +553,4 @@ char *get_drive_cwd(const char *path, char *buffer, int size); | |||
554 | void fix_path_case(char *path); | 553 | void fix_path_case(char *path); |
555 | void make_sparse(int fd, off_t start, off_t end); | 554 | void make_sparse(int fd, off_t start, off_t end); |
556 | int skip_ansi_emulation(int reset); | 555 | int skip_ansi_emulation(int reset); |
556 | int has_path(const char *file); | ||