[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Wed, 27 Apr 2016 12:52:02 +0000 (14:52 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 27 Apr 2016 12:52:02 +0000 (14:52 +0200)
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

gcc/ada/ChangeLog
gcc/ada/exp_ch3.adb
gcc/ada/lib-xref.adb
gcc/ada/rtinit.c

index 62f41b7c932128412943767402c89f01661edb3b..49106b90e1c48b3be7e63bc93439149f59f9e804 100644 (file)
@@ -1,3 +1,11 @@
+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
index 05f8a6c51052823e4f0e3de210408dcfa7069056..f0213ff7480ed8b08a7da8871e90aeec864f2847 100644 (file)
@@ -6351,7 +6351,7 @@ package body Exp_Ch3 is
          --  would otherwise make two copies. The RM allows removing redunant
          --  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 -- ???
              and then Nkind (Expr_Q) = N_Explicit_Dereference
index c3039cd7a8b53cdf9de738adda8ef0e946598b65..3b489e521c648690afade1bab1fe825de067f66d 100644 (file)
@@ -1478,10 +1478,10 @@ package body Lib.Xref is
                   begin
                      if Nkind (Decl) = N_Object_Declaration
                        and then Is_Entity_Name
-                         (Original_Node ((Object_Definition (Decl))))
+                                  (Original_Node (Object_Definition (Decl)))
                      then
                         Tref :=
-                         Entity ((Original_Node ((Object_Definition (Decl)))));
+                          Entity (Original_Node (Object_Definition (Decl)));
                      end if;
                   end;
                end if;
index 97582db3a0f20e3ef10c13f43847199aa115aa82..dcd0903db5df91fea3ac74386cad8c91a6388403 100644 (file)
@@ -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);
               }
           }