diff options
author | Ron Yorston <rmy@pobox.com> | 2023-12-12 11:18:57 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2023-12-12 11:18:57 +0000 |
commit | e4ab8fe064745abd57e3238f1ae29067e6ea8a22 (patch) | |
tree | e4cba3db0b58db7fae5b0ee883bf53aad6d001f7 /libbb/appletlib.c | |
parent | 70bf64f8d4dd688f0d1bafb587a8c664392d27da (diff) | |
download | busybox-w32-e4ab8fe064745abd57e3238f1ae29067e6ea8a22.tar.gz busybox-w32-e4ab8fe064745abd57e3238f1ae29067e6ea8a22.tar.bz2 busybox-w32-e4ab8fe064745abd57e3238f1ae29067e6ea8a22.zip |
win32: tidy up conditional compilation of applet override
This doesn't affect the generated binary, at least in the default
configuration.
Diffstat (limited to 'libbb/appletlib.c')
-rw-r--r-- | libbb/appletlib.c | 13 |
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) | ||
104 | static int really_find_applet_by_name(const char *name); | 105 | static 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) | ||
198 | static int really_find_applet_by_name(const char *name) | 200 | static int really_find_applet_by_name(const char *name) |
199 | #else | 201 | #else |
200 | int FAST_FUNC find_applet_by_name(const char *name) | 202 | int 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) |
268 | int FAST_FUNC find_applet_by_name_with_path(const char *name, const char *path) | 270 | int 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) | ||
282 | static int external_exists(const char *name, const char *path) | 281 | static 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")); |