aboutsummaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2015-04-12 13:07:19 +0100
committerRon Yorston <rmy@pobox.com>2015-04-12 13:20:38 +0100
commit32f8610c8978673aa5d4f51097f955cdd14c13d8 (patch)
tree86406ab1ea0aa0dd1a1f30c3ac84320831df505a /win32
parentf030c24257d48c71fd11eb2bc4c00224d2970d34 (diff)
downloadbusybox-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.c21
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
6int _CRT_glob = 0; 6int _dowildcard = -1;
7#else
8int _dowildcard = 0;
7#endif 9#endif
8 10
9#if !defined(__MINGW64_VERSION_MAJOR)
10unsigned int _CRT_fmode = _O_BINARY;
11#else
12#undef _fmode 11#undef _fmode
13int _fmode = _O_BINARY; 12int _fmode = _O_BINARY;
14#endif 13#endif
15 14
15#if !defined(__MINGW64_VERSION_MAJOR)
16#if ENABLE_GLOBBING
17int _CRT_glob = 1;
18#else
19int _CRT_glob = 0;
20#endif
21
22unsigned int _CRT_fmode = _O_BINARY;
23#endif
24
16smallint bb_got_signal; 25smallint bb_got_signal;
17 26
18static int err_win_to_posix(DWORD winerr) 27static int err_win_to_posix(DWORD winerr)