aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2012-12-10 13:52:11 +0000
committerRon Yorston <rmy@pobox.com>2012-12-10 13:52:11 +0000
commit494dc899fd1b3b5fbac1c47bc5a604aed99654c8 (patch)
treebd78c7c33d5cfc89de25099375ff4554400a27b2
parent7e6a84d77b53451498d31c4b621a7ba55a8f7db6 (diff)
downloadbusybox-w32-494dc899fd1b3b5fbac1c47bc5a604aed99654c8.tar.gz
busybox-w32-494dc899fd1b3b5fbac1c47bc5a604aed99654c8.tar.bz2
busybox-w32-494dc899fd1b3b5fbac1c47bc5a604aed99654c8.zip
Add a build option to turn MSVCRT globbing on or off
-rw-r--r--Config.in11
-rw-r--r--applets/applets.c2
-rw-r--r--configs/mingw32_defconfig3
-rw-r--r--libbb/appletlib.c2
4 files changed, 15 insertions, 3 deletions
diff --git a/Config.in b/Config.in
index cd51e2b45..def0c2c32 100644
--- a/Config.in
+++ b/Config.in
@@ -610,6 +610,17 @@ config LFS
610 cp, mount, tar, and many others. If you want to access files larger 610 cp, mount, tar, and many others. If you want to access files larger
611 than 2 Gigabytes, enable this option. Otherwise, leave it set to 'N'. 611 than 2 Gigabytes, enable this option. Otherwise, leave it set to 'N'.
612 612
613config NOGLOB
614 bool "Turn off MSVCRT argument processing"
615 default y
616 depends on PLATFORM_MINGW32
617 help
618 The Microsoft C Runtime handles the expansion of wildcards on the
619 command line while the BusyBox shell does its own wildcard expansion.
620 For best results when using the shell MSVCRT globbing should be
621 turned off. If you want the BusyBox binary to handle wildcard
622 expansion using the Microsoft C Runtime set this to 'N'.
623
613config CROSS_COMPILER_PREFIX 624config CROSS_COMPILER_PREFIX
614 string "Cross Compiler prefix" 625 string "Cross Compiler prefix"
615 default "" 626 default ""
diff --git a/applets/applets.c b/applets/applets.c
index 7ffa7a896..0e2f94f40 100644
--- a/applets/applets.c
+++ b/applets/applets.c
@@ -9,7 +9,7 @@
9#include "busybox.h" 9#include "busybox.h"
10 10
11#if ENABLE_BUILD_LIBBUSYBOX 11#if ENABLE_BUILD_LIBBUSYBOX
12#if ENABLE_PLATFORM_MINGW32 12#if ENABLE_NOGLOB
13/* disable MSVCRT command line globbing */ 13/* disable MSVCRT command line globbing */
14int _CRT_glob = 0; 14int _CRT_glob = 0;
15#endif 15#endif
diff --git a/configs/mingw32_defconfig b/configs/mingw32_defconfig
index 7ed14c40b..b7e7594c5 100644
--- a/configs/mingw32_defconfig
+++ b/configs/mingw32_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Busybox version: 1.21.0.git 3# Busybox version: 1.21.0.git
4# Thu Nov 29 10:22:19 2012 4# Mon Dec 10 13:44:07 2012
5# 5#
6CONFIG_HAVE_DOT_CONFIG=y 6CONFIG_HAVE_DOT_CONFIG=y
7# CONFIG_PLATFORM_POSIX is not set 7# CONFIG_PLATFORM_POSIX is not set
@@ -64,6 +64,7 @@ CONFIG_BUSYBOX_EXEC_PATH=""
64# CONFIG_FEATURE_INDIVIDUAL is not set 64# CONFIG_FEATURE_INDIVIDUAL is not set
65# CONFIG_FEATURE_SHARED_BUSYBOX is not set 65# CONFIG_FEATURE_SHARED_BUSYBOX is not set
66# CONFIG_LFS is not set 66# CONFIG_LFS is not set
67CONFIG_NOGLOB=y
67CONFIG_CROSS_COMPILER_PREFIX="i686-pc-mingw32-" 68CONFIG_CROSS_COMPILER_PREFIX="i686-pc-mingw32-"
68CONFIG_SYSROOT="" 69CONFIG_SYSROOT=""
69CONFIG_EXTRA_CFLAGS="-g -O0" 70CONFIG_EXTRA_CFLAGS="-g -O0"
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index 9f3584755..63ec010dd 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -773,7 +773,7 @@ void FAST_FUNC run_applet_and_exit(const char *name, char **argv)
773#if ENABLE_BUILD_LIBBUSYBOX 773#if ENABLE_BUILD_LIBBUSYBOX
774int lbb_main(char **argv) 774int lbb_main(char **argv)
775#else 775#else
776#if ENABLE_PLATFORM_MINGW32 776#if ENABLE_NOGLOB
777/* disable MSVCRT command line globbing */ 777/* disable MSVCRT command line globbing */
778int _CRT_glob = 0; 778int _CRT_glob = 0;
779#endif 779#endif