summaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorkraai <kraai@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-03 21:49:54 +0000
committerkraai <kraai@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-03 21:49:54 +0000
commitffe0b5db85587494d40e0091a00096bcdfc5e78a (patch)
tree01537e5524663e8048e83abb22e9d1c74a9444e9 /gcc/ada
parent277f8dd25eda8b28d1f12a4c7426383be5e16e7a (diff)
downloadgcc-ffe0b5db85587494d40e0091a00096bcdfc5e78a.tar.gz
* misc.c (gnat_argv): Revert last change.
(gnat_handle_option, gnat_init_options): Copy arguments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68904 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog7
-rw-r--r--gcc/ada/misc.c6
2 files changed, 9 insertions, 4 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 488ba9899c7..ca6573c44fd 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,6 +1,11 @@
+2003-07-04 Matt Kraai <kraai@alumni.cmu.edu>
+
+ * misc.c (gnat_argv): Revert last change.
+ (gnat_handle_option, gnat_init_options): Copy arguments.
+
2003-07-03 Neil Booth <neil@daikokuya.co.uk>
- * misc.c (save_argv): Make const.
+ * misc.c (gnat_argv): Make const.
2003-07-02 Neil Booth <neil@daikokuya.co.uk>
diff --git a/gcc/ada/misc.c b/gcc/ada/misc.c
index 54c34549472..ca9a0361492 100644
--- a/gcc/ada/misc.c
+++ b/gcc/ada/misc.c
@@ -186,7 +186,7 @@ const char **save_argv;
/* gnat standard argc argv */
extern int gnat_argc;
-extern const char **gnat_argv;
+extern char **gnat_argv;
static void internal_error_function PARAMS ((const char *, va_list *));
static void gnat_adjust_rli PARAMS ((record_layout_info));
@@ -269,7 +269,7 @@ gnat_handle_option (size_t scode, const char *arg, int value ATTRIBUTE_UNUSED)
if (save_argv[++i][0] != '-')
{
/* Preserve output filename as GCC doesn't save it for GNAT. */
- gnat_argv[gnat_argc] = save_argv[i];
+ gnat_argv[gnat_argc] = xstrdup (save_argv[i]);
gnat_argc++;
break;
}
@@ -286,7 +286,7 @@ gnat_init_options (unsigned int argc, const char **argv)
{
/* Initialize gnat_argv with save_argv size. */
gnat_argv = (char **) xmalloc ((argc + 1) * sizeof (argv[0]));
- gnat_argv[0] = argv[0]; /* name of the command */
+ gnat_argv[0] = xstrdup (argv[0]); /* name of the command */
gnat_argc = 1;
save_argc = argc;