diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-02-13 23:25:41 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-02-13 23:25:41 +0300 |
commit | 9f7edcab2b1e4bd2c8bd7abc6284bfb7dca86ed2 (patch) | |
tree | 26817970d9db7efd2a5af1231a98eaf038a73aae | |
parent | 78910e3cb0b9cc215e53142c28f8b9f52c30af60 (diff) |
Disable wildcards test driver arguments globbing performed by MinGW runtime
-rw-r--r-- | tests/wildcard/driver.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/wildcard/driver.cxx b/tests/wildcard/driver.cxx index 7df5556..b3aae62 100644 --- a/tests/wildcard/driver.cxx +++ b/tests/wildcard/driver.cxx @@ -16,6 +16,17 @@ using namespace std; using namespace butl; +// Disable arguments globbing that may be enabled by default for MinGW runtime. +// +// Note that if _CRT_glob symbol is not defined explicitly, then runtime will +// be bound to the one defined in the implicitly linked libmingw32.a library. +// Yet another (but more troublesome) way is to link CRT_noglob.o (from MinGW +// libraries directory) that provides exactly the same symbol definition. +// +#ifdef __MINGW32__ +int _CRT_glob = 0; +#endif + // Usage: argv[0] (-m <pattern> <name> | -s [-n] <pattern> [<dir>]) // // Execute actions specified by -m or -s options. Exit with code 0 if succeed, |