aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/argv.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/argv.c')
-rw-r--r--gcc/ada/argv.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ada/argv.c b/gcc/ada/argv.c
index c9c2216..d0ba12d 100644
--- a/gcc/ada/argv.c
+++ b/gcc/ada/argv.c
@@ -6,8 +6,7 @@
* *
* C Implementation File *
* *
- * *
- * Copyright (C) 1992-2001 Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2002 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- *
@@ -62,6 +61,15 @@ int gnat_argc = 0;
const char **gnat_argv = (const char **) 0;
const char **gnat_envp = (const char **) 0;
+#ifdef _WIN32
+/* 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 <stdlib.h>
+/* for the environ variable definition */
+#define gnat_envp (environ)
+#endif
+
int
__gnat_arg_count ()
{