summaryrefslogtreecommitdiff
path: root/debianutils
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2012-05-09 15:16:44 +0100
committerRon Yorston <rmy@pobox.com>2012-05-09 15:16:44 +0100
commit4066aff5e481941585c5958460c39a1b1399ce88 (patch)
tree87f3996a592298e744faa6b17b0af17c3786510a /debianutils
parentf2459f232790aab0434d1cc6471ea62bc193e636 (diff)
downloadbusybox-w32-4066aff5e481941585c5958460c39a1b1399ce88.tar.gz
busybox-w32-4066aff5e481941585c5958460c39a1b1399ce88.tar.bz2
busybox-w32-4066aff5e481941585c5958460c39a1b1399ce88.zip
Use win32_execable_file() in test, which and execable.c
Diffstat (limited to 'debianutils')
-rw-r--r--debianutils/which.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/debianutils/which.c b/debianutils/which.c
index 2b5804e00..bcca95331 100644
--- a/debianutils/which.c
+++ b/debianutils/which.c
@@ -21,29 +21,6 @@
21 21
22#include "libbb.h" 22#include "libbb.h"
23 23
24#if ENABLE_PLATFORM_MINGW32
25static char *win32_execable_file(const char *p)
26{
27 char *path;
28 int len = strlen(p) + 5;
29
30 if ( (path=malloc(len)) != NULL ) {
31 memcpy(path, p, len);
32 memcpy(path+len, ".exe", 5);
33 if (execable_file(path)) {
34 return path;
35 }
36 memcpy(path+len, ".com", 5);
37 if (execable_file(path)) {
38 return path;
39 }
40 free(path);
41 }
42
43 return NULL;
44}
45#endif
46
47int which_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 24int which_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
48int which_main(int argc UNUSED_PARAM, char **argv) 25int which_main(int argc UNUSED_PARAM, char **argv)
49{ 26{