From 9f7edcab2b1e4bd2c8bd7abc6284bfb7dca86ed2 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 13 Feb 2017 23:25:41 +0300 Subject: Disable wildcards test driver arguments globbing performed by MinGW runtime --- tests/wildcard/driver.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/wildcard') 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 | -s [-n] []) // // Execute actions specified by -m or -s options. Exit with code 0 if succeed, -- cgit v1.1