aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2022-05-06 12:31:21 +0100
committerRon Yorston <rmy@pobox.com>2022-05-06 12:31:21 +0100
commitecdc5b3ffabb58e3a9fc3a55a2a44323644995fc (patch)
tree7a394f48dea0e8e5f47c4ab0eba84d2fb04a00b0 /include
parent26ba73098e714459e3294679228a1d54eed14799 (diff)
downloadbusybox-w32-ecdc5b3ffabb58e3a9fc3a55a2a44323644995fc.tar.gz
busybox-w32-ecdc5b3ffabb58e3a9fc3a55a2a44323644995fc.tar.bz2
busybox-w32-ecdc5b3ffabb58e3a9fc3a55a2a44323644995fc.zip
win32: allow preference for applets to be disabled at runtime
The default busybox-w32 configuration enables the PREFER_APPLETS and SH_STANDALONE features. Sometimes it may be desirable to override the default preference for applets, for example, if an applet needs to be replaced by an external program with additional features. Add support for the environment variable BB_OVERRIDE_APPLETS. Its value may be: - a single dash ('-'): all applets are overridden; - a space-separated list of names: only the specified applets are overridden.
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 740c25528..482fcce0c 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -1320,6 +1320,14 @@ void run_noexec_applet_and_exit(int a, const char *name, char **argv) NORETURN F
1320#ifndef BUILD_INDIVIDUAL 1320#ifndef BUILD_INDIVIDUAL
1321int find_applet_by_name(const char *name) FAST_FUNC; 1321int find_applet_by_name(const char *name) FAST_FUNC;
1322void run_applet_no_and_exit(int a, const char *name, char **argv) NORETURN FAST_FUNC; 1322void run_applet_no_and_exit(int a, const char *name, char **argv) NORETURN FAST_FUNC;
1323int find_preferred_applet_by_name(const char *name) FAST_FUNC;
1324int is_applet_preferred(const char *name) FAST_FUNC;
1325# if ENABLE_PLATFORM_MINGW32 && \
1326 (ENABLE_FEATURE_PREFER_APPLETS || ENABLE_FEATURE_SH_STANDALONE)
1327# define find_applet_by_name(n) find_preferred_applet_by_name(n)
1328# else
1329# define is_applet_preferred(n) (1)
1330# endif
1323#endif 1331#endif
1324void show_usage_if_dash_dash_help(int applet_no, char **argv) FAST_FUNC; 1332void show_usage_if_dash_dash_help(int applet_no, char **argv) FAST_FUNC;
1325#if defined(__linux__) 1333#if defined(__linux__)