aboutsummaryrefslogtreecommitdiff
path: root/debianutils
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2020-08-04 08:46:13 +0100
committerRon Yorston <rmy@pobox.com>2020-08-04 08:46:13 +0100
commitb5fb54b4ac78c801dc4fa7a5b12dd6e296e52f3f (patch)
tree10b7ed9d84991680a9820fc116f86fe9faac64b9 /debianutils
parent597dc43c9c8dad0daf9d4d0648e3e83c352b4ffd (diff)
downloadbusybox-w32-b5fb54b4ac78c801dc4fa7a5b12dd6e296e52f3f.tar.gz
busybox-w32-b5fb54b4ac78c801dc4fa7a5b12dd6e296e52f3f.tar.bz2
busybox-w32-b5fb54b4ac78c801dc4fa7a5b12dd6e296e52f3f.zip
which: rearrange conditional compilation
The code for standalone shell mode should only be built for WIN32.
Diffstat (limited to 'debianutils')
-rw-r--r--debianutils/which.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/debianutils/which.c b/debianutils/which.c
index 715bd8d5e..d749a2c7e 100644
--- a/debianutils/which.c
+++ b/debianutils/which.c
@@ -45,9 +45,10 @@ int which_main(int argc UNUSED_PARAM, char **argv)
45 45
46 do { 46 do {
47 int missing = 1; 47 int missing = 1;
48#if ENABLE_PLATFORM_MINGW32
48 char *p; 49 char *p;
49 50
50#if ENABLE_FEATURE_SH_STANDALONE 51# if ENABLE_FEATURE_SH_STANDALONE
51 if (strcmp(*argv, "busybox") == 0 && 52 if (strcmp(*argv, "busybox") == 0 &&
52 is_suffixed_with(bb_busybox_exec_path, "busybox.exe")) { 53 is_suffixed_with(bb_busybox_exec_path, "busybox.exe")) {
53 missing = 0; 54 missing = 0;
@@ -62,6 +63,7 @@ int which_main(int argc UNUSED_PARAM, char **argv)
62 if (!option_mask32) /* -a not set */ 63 if (!option_mask32) /* -a not set */
63 break; 64 break;
64 } 65 }
66# endif
65#endif 67#endif
66 68
67 /* If file contains a slash don't use PATH */ 69 /* If file contains a slash don't use PATH */
@@ -83,6 +85,9 @@ int which_main(int argc UNUSED_PARAM, char **argv)
83 } 85 }
84 } else { 86 } else {
85 char *path; 87 char *path;
88#if !ENABLE_PLATFORM_MINGW32
89 char *p;
90#endif
86 91
87 path = env_path; 92 path = env_path;
88 /* NOFORK NB: xmalloc inside find_executable(), must have no allocs above! */ 93 /* NOFORK NB: xmalloc inside find_executable(), must have no allocs above! */