diff options
author | Ron Yorston <rmy@pobox.com> | 2015-04-12 13:07:19 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2015-04-12 13:20:38 +0100 |
commit | 32f8610c8978673aa5d4f51097f955cdd14c13d8 (patch) | |
tree | 86406ab1ea0aa0dd1a1f30c3ac84320831df505a /win32 | |
parent | f030c24257d48c71fd11eb2bc4c00224d2970d34 (diff) | |
download | busybox-w32-32f8610c8978673aa5d4f51097f955cdd14c13d8.tar.gz busybox-w32-32f8610c8978673aa5d4f51097f955cdd14c13d8.tar.bz2 busybox-w32-32f8610c8978673aa5d4f51097f955cdd14c13d8.zip |
Allow globbing to be enabled with mingw64
mingw64 handles globbing differently from mingw32. Add code to allow
globbing to be enabled. (By default mingw64 has globbing disabled,
though the default can be changed when it's compiled.)
Also change the configuration option from ENABLE_NOGLOB to
ENABLE_GLOBBING, because double negatives make me think too much.
The default is still for globbing to be disabled.
Diffstat (limited to 'win32')
-rw-r--r-- | win32/mingw.c | 21 |
1 files changed, 15 insertions, 6 deletions
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) |