aboutsummaryrefslogtreecommitdiff
path: root/libbb/appletlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/appletlib.c')
-rw-r--r--libbb/appletlib.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index 5cd2bbcc2..34082ad94 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -100,7 +100,8 @@ static const char packed_scripts[] ALIGN1 = { PACKED_SCRIPTS };
100# define ENABLE_FEATURE_COMPRESS_USAGE 0 100# define ENABLE_FEATURE_COMPRESS_USAGE 0
101#endif 101#endif
102 102
103#if ENABLE_PLATFORM_MINGW32 103#if ENABLE_PLATFORM_MINGW32 && NUM_APPLETS > 1 && \
104 (ENABLE_FEATURE_PREFER_APPLETS || ENABLE_FEATURE_SH_STANDALONE)
104static int really_find_applet_by_name(const char *name); 105static int really_find_applet_by_name(const char *name);
105#else 106#else
106#define really_find_applet_by_name(n) find_applet_by_name(n) 107#define really_find_applet_by_name(n) find_applet_by_name(n)
@@ -194,7 +195,8 @@ void FAST_FUNC bb_show_usage(void)
194 xfunc_die(); 195 xfunc_die();
195} 196}
196 197
197#if ENABLE_PLATFORM_MINGW32 198#if ENABLE_PLATFORM_MINGW32 && NUM_APPLETS > 1 && \
199 (ENABLE_FEATURE_PREFER_APPLETS || ENABLE_FEATURE_SH_STANDALONE)
198static int really_find_applet_by_name(const char *name) 200static int really_find_applet_by_name(const char *name)
199#else 201#else
200int FAST_FUNC find_applet_by_name(const char *name) 202int FAST_FUNC find_applet_by_name(const char *name)
@@ -263,8 +265,8 @@ int FAST_FUNC find_applet_by_name(const char *name)
263 return -1; 265 return -1;
264} 266}
265 267
266#if ENABLE_PLATFORM_MINGW32 268#if ENABLE_PLATFORM_MINGW32 && NUM_APPLETS > 1 && \
267# undef find_applet_by_name_with_path 269 (ENABLE_FEATURE_PREFER_APPLETS || ENABLE_FEATURE_SH_STANDALONE)
268int FAST_FUNC find_applet_by_name_with_path(const char *name, const char *path) 270int FAST_FUNC find_applet_by_name_with_path(const char *name, const char *path)
269{ 271{
270 int applet_no = really_find_applet_by_name(name); 272 int applet_no = really_find_applet_by_name(name);
@@ -275,10 +277,7 @@ int FAST_FUNC find_applet_by_name(const char *name)
275{ 277{
276 return find_applet_by_name_with_path(name, NULL); 278 return find_applet_by_name_with_path(name, NULL);
277} 279}
278#endif
279 280
280#if ENABLE_PLATFORM_MINGW32 && NUM_APPLETS > 1 && \
281 (ENABLE_FEATURE_PREFER_APPLETS || ENABLE_FEATURE_SH_STANDALONE)
282static int external_exists(const char *name, const char *path) 281static int external_exists(const char *name, const char *path)
283{ 282{
284 char *path1 = xstrdup(path ?: getenv("PATH")); 283 char *path1 = xstrdup(path ?: getenv("PATH"));