tool_main: turn off MinGW CRT's globbing

By default, the MinGW CRT globs command-line arguments. This prevents
getting a single asterisk into an argument as test 1299 does. Turn off
globbing by setting the global variable _CRT_glob to 0 for MinGW.

Fixes https://github.com/curl/curl/issues/1751
Closes https://github.com/curl/curl/pull/1813
This commit is contained in:
Marcel Raad 2017-08-21 21:35:46 +02:00
Родитель 43fb867a58
Коммит 88220adb72
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 33C416EFAE4D6F02
1 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -62,6 +62,15 @@
int vms_show = 0;
#endif
#ifdef __MINGW32__
/*
* There seems to be no way to escape "*" in command-line arguments with MinGW
* when command-line argument globbing is enabled under the MSYS shell, so turn
* it off.
*/
int _CRT_glob = 0;
#endif /* __MINGW32__ */
/* if we build a static library for unit tests, there is no main() function */
#ifndef UNITTESTS