diff options
author | Ron Yorston <rmy@pobox.com> | 2017-08-28 19:04:26 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2017-08-30 17:17:14 +0100 |
commit | 862e1bd8d6117d5b44e3ab431b3a6837d8e44040 (patch) | |
tree | 925f6a6e2f9d676fe20a63f00bbcd1595a895c3e /include | |
parent | 0599746d9bcf513c4898cbd1a46ef1d5b3478627 (diff) | |
download | busybox-w32-862e1bd8d6117d5b44e3ab431b3a6837d8e44040.tar.gz busybox-w32-862e1bd8d6117d5b44e3ab431b3a6837d8e44040.tar.bz2 busybox-w32-862e1bd8d6117d5b44e3ab431b3a6837d8e44040.zip |
win32: shrink code to detect .exe files
Add a function (has_exe_suffix) to replace explicit code to check
if a filename ends with '.exe. or '.com'.
Also shrink code that checks for '.exe' or '.com' on PATH in shell's
find_command function.
Diffstat (limited to 'include')
-rw-r--r-- | include/mingw.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/mingw.h b/include/mingw.h index d7dabacaf..dd676bf2c 100644 --- a/include/mingw.h +++ b/include/mingw.h | |||
@@ -471,6 +471,7 @@ char **env_setenv(char **env, const char *name); | |||
471 | const char *get_busybox_exec_path(void); | 471 | const char *get_busybox_exec_path(void); |
472 | void init_winsock(void); | 472 | void init_winsock(void); |
473 | 473 | ||
474 | int has_exe_suffix(const char *p); | ||
474 | char *file_is_win32_executable(const char *p); | 475 | char *file_is_win32_executable(const char *p); |
475 | 476 | ||
476 | int err_win_to_posix(DWORD winerr); | 477 | int err_win_to_posix(DWORD winerr); |