From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1914) id E7463398B43F; Tue, 15 Jun 2021 10:21:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E7463398B43F MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Pierre-Marie de Rodat To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-1459] [Ada] Remove const qualifier on a couple of pointed-to types X-Act-Checkin: gcc X-Git-Author: Eric Botcazou X-Git-Refname: refs/heads/master X-Git-Oldrev: b2339160162e80fd854a9caaaf0d3dd0207ede8e X-Git-Newrev: 86347b2d8d48fa2d18658d241f2df54665dac627 Message-Id: <20210615102126.E7463398B43F@sourceware.org> Date: Tue, 15 Jun 2021 10:21:26 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2021 10:21:27 -0000 https://gcc.gnu.org/g:86347b2d8d48fa2d18658d241f2df54665dac627 commit r12-1459-g86347b2d8d48fa2d18658d241f2df54665dac627 Author: Eric Botcazou Date: Mon Feb 8 12:00:19 2021 +0100 [Ada] Remove const qualifier on a couple of pointed-to types gcc/ada/ * argv.c: Add include of for the runtime. (gnat_argv): Change type to char ** and initialize to NULL. (gnat_envp): Likewise. * argv-lynxos178-raven-cert.c: Add include of . (gnat_argv): Change type to char ** and initialize to NULL. (gnat_envp): Likewise. Diff: --- gcc/ada/argv-lynxos178-raven-cert.c | 5 +++-- gcc/ada/argv.c | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gcc/ada/argv-lynxos178-raven-cert.c b/gcc/ada/argv-lynxos178-raven-cert.c index 64850f163ba..21cead39a3e 100644 --- a/gcc/ada/argv-lynxos178-raven-cert.c +++ b/gcc/ada/argv-lynxos178-raven-cert.c @@ -41,6 +41,7 @@ minimal support for Ada.Command_Line.Command_Name */ #include +#include #include #ifdef __cplusplus @@ -53,8 +54,8 @@ extern "C" { the binder-generated file so they need to be defined here */ int gnat_argc = 0; -const char **gnat_argv = (const char **) 0; -const char **gnat_envp = (const char **) 0; +char **gnat_argv = NULL; +char **gnat_envp = NULL; int __gnat_len_arg (int arg_num) diff --git a/gcc/ada/argv.c b/gcc/ada/argv.c index b5ec0df4477..4734415960d 100644 --- a/gcc/ada/argv.c +++ b/gcc/ada/argv.c @@ -44,6 +44,7 @@ #ifdef IN_RTS #include "runtime.h" +#include #include #else #include "config.h" @@ -60,14 +61,13 @@ extern "C" { envp of the main program is saved under gnat_envp. */ int gnat_argc = 0; -const char **gnat_argv = (const char **) 0; -const char **gnat_envp = (const char **) 0; +char **gnat_argv = NULL; +char **gnat_envp = NULL; #if defined (_WIN32) && !defined (RTX) /* Note that on Windows environment the environ point to a buffer that could be reallocated if needed. It means that gnat_envp needs to be updated before using gnat_envp to point to the right environment space */ -#include /* for the environ variable definition */ #define gnat_envp (environ) #endif