aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2023-12-10 11:47:45 +0000
committerRon Yorston <rmy@pobox.com>2023-12-10 11:47:45 +0000
commit5ff2bfefb4db527b201fa3059de2aa6e2139d9f9 (patch)
tree6744c26a14d7d01380bd88aad95af41a000174a9 /include
parent6bb25c4493268d24a3b82d3268b2adf624de88bd (diff)
downloadbusybox-w32-5ff2bfefb4db527b201fa3059de2aa6e2139d9f9.tar.gz
busybox-w32-5ff2bfefb4db527b201fa3059de2aa6e2139d9f9.tar.bz2
busybox-w32-5ff2bfefb4db527b201fa3059de2aa6e2139d9f9.zip
win32: code shrink applet overrides
Pass the PATH to be used to look up executables down from the shell to the applet override code. This replaces the use of a static variable and a function to fetch its value. Saves 16-32 bytes.
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 0682e34ea..a3611abc3 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -1329,11 +1329,11 @@ int find_applet_by_name(const char *name) FAST_FUNC;
1329void run_applet_no_and_exit(int a, const char *name, char **argv) NORETURN FAST_FUNC; 1329void run_applet_no_and_exit(int a, const char *name, char **argv) NORETURN FAST_FUNC;
1330# if ENABLE_PLATFORM_MINGW32 && \ 1330# if ENABLE_PLATFORM_MINGW32 && \
1331 (ENABLE_FEATURE_PREFER_APPLETS || ENABLE_FEATURE_SH_STANDALONE) 1331 (ENABLE_FEATURE_PREFER_APPLETS || ENABLE_FEATURE_SH_STANDALONE)
1332int is_applet_preferred(const char *name) FAST_FUNC; 1332int is_applet_preferred(const char *name, const char *path) FAST_FUNC;
1333const char *get_ash_path(void); 1333int find_applet_by_name_with_path(const char *name, const char *path) FAST_FUNC;
1334# else 1334# else
1335# define is_applet_preferred(n) (1) 1335# define is_applet_preferred(n, p) (1)
1336# define get_ash_path() (NULL) 1336# define find_applet_by_name_with_path(n, p) find_applet_by_name(n)
1337# endif 1337# endif
1338#endif 1338#endif
1339void show_usage_if_dash_dash_help(int applet_no, char **argv) FAST_FUNC; 1339void show_usage_if_dash_dash_help(int applet_no, char **argv) FAST_FUNC;