diff options
-rw-r--r-- | Config.in | 17 | ||||
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | configs/mingw32_defconfig | 4 | ||||
-rw-r--r-- | win32/mingw.c | 21 |
4 files changed, 27 insertions, 16 deletions
@@ -630,16 +630,17 @@ config LFS | |||
630 | cp, mount, tar, and many others. If you want to access files larger | 630 | cp, mount, tar, and many others. If you want to access files larger |
631 | than 2 Gigabytes, enable this option. Otherwise, leave it set to 'N'. | 631 | than 2 Gigabytes, enable this option. Otherwise, leave it set to 'N'. |
632 | 632 | ||
633 | config NOGLOB | 633 | config GLOBBING |
634 | bool "Turn off MSVCRT argument processing" | 634 | bool "Allow busybox.exe to expand wildcards" |
635 | default y | 635 | default n |
636 | depends on PLATFORM_MINGW32 | 636 | depends on PLATFORM_MINGW32 |
637 | help | 637 | help |
638 | The Microsoft C Runtime handles the expansion of wildcards on the | 638 | In Microsoft Windows expansion of wildcards on the command line |
639 | command line while the BusyBox shell does its own wildcard expansion. | 639 | ('globbing') is handled by the C runtime while the BusyBox shell |
640 | For best results when using the shell MSVCRT globbing should be | 640 | does its own wildcard expansion. For best results when using the |
641 | turned off. If you want the BusyBox binary to handle wildcard | 641 | shell globbing by the C runtime should be turned off. If you want |
642 | expansion using the Microsoft C Runtime set this to 'N'. | 642 | the BusyBox binary to handle wildcard expansion using the C runtime |
643 | set this to 'Y'. | ||
643 | 644 | ||
644 | config CROSS_COMPILER_PREFIX | 645 | config CROSS_COMPILER_PREFIX |
645 | string "Cross Compiler prefix" | 646 | string "Cross Compiler prefix" |
@@ -17,3 +17,4 @@ Then just `make`. | |||
17 | - Use forward slashes in paths: Windows doesn't mind and the shell will be happier. | 17 | - Use forward slashes in paths: Windows doesn't mind and the shell will be happier. |
18 | - Don't do wild things with Windows drive or UNC notation. | 18 | - Don't do wild things with Windows drive or UNC notation. |
19 | - tar doesn't support seamless compression/decompression: use a pipeline to a compressor/decompressor. | 19 | - tar doesn't support seamless compression/decompression: use a pipeline to a compressor/decompressor. |
20 | - Wildcard expansion is disabled by default, though it can be turned on at compile time. This only affects command line arguments to the binary: the BusyBox shell has full support for wildcards. | ||
diff --git a/configs/mingw32_defconfig b/configs/mingw32_defconfig index b42a1a3cc..0608a8692 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.24.0.git | 3 | # Busybox version: 1.24.0.git |
4 | # Mon Mar 23 13:58:33 2015 | 4 | # Sun Apr 12 13:04:19 2015 |
5 | # | 5 | # |
6 | CONFIG_HAVE_DOT_CONFIG=y | 6 | CONFIG_HAVE_DOT_CONFIG=y |
7 | # CONFIG_PLATFORM_POSIX is not set | 7 | # CONFIG_PLATFORM_POSIX is not set |
@@ -66,7 +66,7 @@ CONFIG_BUSYBOX_EXEC_PATH="" | |||
66 | # CONFIG_FEATURE_INDIVIDUAL is not set | 66 | # CONFIG_FEATURE_INDIVIDUAL is not set |
67 | # CONFIG_FEATURE_SHARED_BUSYBOX is not set | 67 | # CONFIG_FEATURE_SHARED_BUSYBOX is not set |
68 | CONFIG_LFS=y | 68 | CONFIG_LFS=y |
69 | CONFIG_NOGLOB=y | 69 | # CONFIG_GLOBBING is not set |
70 | CONFIG_CROSS_COMPILER_PREFIX="i686-w64-mingw32-" | 70 | CONFIG_CROSS_COMPILER_PREFIX="i686-w64-mingw32-" |
71 | CONFIG_SYSROOT="" | 71 | CONFIG_SYSROOT="" |
72 | CONFIG_EXTRA_CFLAGS="" | 72 | CONFIG_EXTRA_CFLAGS="" |
diff --git a/win32/mingw.c b/win32/mingw.c index d76f17820..514d00692 100644 --- a/win32/mingw.c +++ b/win32/mingw.c | |||
@@ -1,18 +1,27 @@ | |||
1 | #include "libbb.h" | 1 | #include "libbb.h" |
2 | #include <userenv.h> | 2 | #include <userenv.h> |
3 | 3 | ||
4 | #if ENABLE_NOGLOB | 4 | #if defined(__MINGW64_VERSION_MAJOR) |
5 | /* disable MSVCRT command line globbing */ | 5 | #if ENABLE_GLOBBING |
6 | int _CRT_glob = 0; | 6 | int _dowildcard = -1; |
7 | #else | ||
8 | int _dowildcard = 0; | ||
7 | #endif | 9 | #endif |
8 | 10 | ||
9 | #if !defined(__MINGW64_VERSION_MAJOR) | ||
10 | unsigned int _CRT_fmode = _O_BINARY; | ||
11 | #else | ||
12 | #undef _fmode | 11 | #undef _fmode |
13 | int _fmode = _O_BINARY; | 12 | int _fmode = _O_BINARY; |
14 | #endif | 13 | #endif |
15 | 14 | ||
15 | #if !defined(__MINGW64_VERSION_MAJOR) | ||
16 | #if ENABLE_GLOBBING | ||
17 | int _CRT_glob = 1; | ||
18 | #else | ||
19 | int _CRT_glob = 0; | ||
20 | #endif | ||
21 | |||
22 | unsigned int _CRT_fmode = _O_BINARY; | ||
23 | #endif | ||
24 | |||
16 | smallint bb_got_signal; | 25 | smallint bb_got_signal; |
17 | 26 | ||
18 | static int err_win_to_posix(DWORD winerr) | 27 | static int err_win_to_posix(DWORD winerr) |