diff options
Diffstat (limited to 'gcc/ada/rtinit.c')
-rw-r--r-- | gcc/ada/rtinit.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/ada/rtinit.c b/gcc/ada/rtinit.c index 97582db..dcd0903 100644 --- a/gcc/ada/rtinit.c +++ b/gcc/ada/rtinit.c @@ -6,7 +6,7 @@ * * * C Implementation File * * * - * Copyright (C) 2014-2015, Free Software Foundation, Inc. * + * Copyright (C) 2014-2016, Free Software Foundation, Inc. * * * * GNAT is free software; you can redistribute it and/or modify it under * * terms of the GNU General Public License as published by the Free Soft- * @@ -86,6 +86,9 @@ extern HANDLE ProcListEvt; #define EXPAND_ARGV_RATE 128 +int __gnat_do_argv_expansion = 1; +#pragma weak __gnat_do_argv_expansion + static void append_arg (int *index, LPWSTR dir, LPWSTR value, char ***argv, int *last, int quoted) @@ -238,7 +241,7 @@ __gnat_runtime_initialize(int install_handler) quoted = (wargv[k][0] == _T('\'')); /* Check for wildcard expansion if the argument is not quoted. */ - if (!quoted + if (!quoted && __gnat_do_argv_expansion && (_tcsstr (wargv[k], _T("?")) != 0 || _tcsstr (wargv[k], _T("*")) != 0)) { @@ -289,7 +292,8 @@ __gnat_runtime_initialize(int install_handler) /* No wildcard. Store parameter as-is. Remove quote if needed. */ append_arg (&argc_expanded, NULL, wargv[k], - &gnat_argv, &last, quoted); + &gnat_argv, &last, + quoted && __gnat_do_argv_expansion); } } |