Commit c6c8d059 by Arnaud Charlet

[multiple changes]

2016-04-27  Hristian Kirtchev  <kirtchev@adacore.com>

	* lib-xref.adb, exp_ch3.adb: Minor reformatting.

2016-04-27  Nicolas Roche  <roche@adacore.com>

	* rtinit.c: Add weak symbol __gnat_do_argv_expansion.

From-SVN: r235496
parent caa64a44
2016-04-27 Hristian Kirtchev <kirtchev@adacore.com> 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
* lib-xref.adb, exp_ch3.adb: Minor reformatting.
2016-04-27 Nicolas Roche <roche@adacore.com>
* rtinit.c: Add weak symbol __gnat_do_argv_expansion.
2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Code * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Code
cleanup. Check the original node when trying to determine the node kind cleanup. Check the original node when trying to determine the node kind
of pragma Volatile's argument to account for untagged derivations of pragma Volatile's argument to account for untagged derivations
......
...@@ -6351,7 +6351,7 @@ package body Exp_Ch3 is ...@@ -6351,7 +6351,7 @@ package body Exp_Ch3 is
-- would otherwise make two copies. The RM allows removing redunant -- would otherwise make two copies. The RM allows removing redunant
-- Adjust/Finalize calls, but does not allow insertion of extra ones. -- Adjust/Finalize calls, but does not allow insertion of extra ones.
-- This part is disabled for now, because it breaks GPS builds. -- This part is disabled for now, because it breaks GPS builds
return (False -- ??? return (False -- ???
and then Nkind (Expr_Q) = N_Explicit_Dereference and then Nkind (Expr_Q) = N_Explicit_Dereference
......
...@@ -1478,10 +1478,10 @@ package body Lib.Xref is ...@@ -1478,10 +1478,10 @@ package body Lib.Xref is
begin begin
if Nkind (Decl) = N_Object_Declaration if Nkind (Decl) = N_Object_Declaration
and then Is_Entity_Name and then Is_Entity_Name
(Original_Node ((Object_Definition (Decl)))) (Original_Node (Object_Definition (Decl)))
then then
Tref := Tref :=
Entity ((Original_Node ((Object_Definition (Decl))))); Entity (Original_Node (Object_Definition (Decl)));
end if; end if;
end; end;
end if; end if;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* * * *
* C Implementation File * * 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 * * 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- * * terms of the GNU General Public License as published by the Free Soft- *
...@@ -86,6 +86,9 @@ extern HANDLE ProcListEvt; ...@@ -86,6 +86,9 @@ extern HANDLE ProcListEvt;
#define EXPAND_ARGV_RATE 128 #define EXPAND_ARGV_RATE 128
int __gnat_do_argv_expansion = 1;
#pragma weak __gnat_do_argv_expansion
static void static void
append_arg (int *index, LPWSTR dir, LPWSTR value, append_arg (int *index, LPWSTR dir, LPWSTR value,
char ***argv, int *last, int quoted) char ***argv, int *last, int quoted)
...@@ -238,7 +241,7 @@ __gnat_runtime_initialize(int install_handler) ...@@ -238,7 +241,7 @@ __gnat_runtime_initialize(int install_handler)
quoted = (wargv[k][0] == _T('\'')); quoted = (wargv[k][0] == _T('\''));
/* Check for wildcard expansion if the argument is not quoted. */ /* 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 ||
_tcsstr (wargv[k], _T("*")) != 0)) _tcsstr (wargv[k], _T("*")) != 0))
{ {
...@@ -289,7 +292,8 @@ __gnat_runtime_initialize(int install_handler) ...@@ -289,7 +292,8 @@ __gnat_runtime_initialize(int install_handler)
/* No wildcard. Store parameter as-is. Remove quote if /* No wildcard. Store parameter as-is. Remove quote if
needed. */ needed. */
append_arg (&argc_expanded, NULL, wargv[k], append_arg (&argc_expanded, NULL, wargv[k],
&gnat_argv, &last, quoted); &gnat_argv, &last,
quoted && __gnat_do_argv_expansion);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment