diff options
author | Daniel Eischen <deischen@FreeBSD.org> | 2008-04-08 00:33:20 +0000 |
---|---|---|
committer | Daniel Eischen <deischen@FreeBSD.org> | 2008-04-08 00:33:20 +0000 |
commit | 9e469cccef02f83f76883befc98d7e407c561320 (patch) | |
tree | 06f354188feb7522f0ac0b4d4836d7b4970232ec /lang/gnat | |
parent | Update to 0.2.0. (diff) |
Use setenv to add an environment variable instead of putenv. In 7.0,
putenv() does not copy the supplied environment stringi, but gcc/gnat
was free()ing the memory expecting that it would be copied.
Notes
Notes:
svn path=/head/; revision=210793
Diffstat (limited to 'lang/gnat')
-rw-r--r-- | lang/gnat/files/patch-ab | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lang/gnat/files/patch-ab b/lang/gnat/files/patch-ab new file mode 100644 index 000000000000..ebc55349289b --- /dev/null +++ b/lang/gnat/files/patch-ab @@ -0,0 +1,20 @@ +--- gcc/ada/env.c.orig 2006-05-22 02:05:53.000000000 -0400 ++++ gcc/ada/env.c 2008-04-07 19:56:12.000000000 -0400 +@@ -166,7 +166,7 @@ + LIB$SIGNAL (status); + } + +-#elif defined (__vxworks) && defined (__RTP__) ++#elif defined (__FreeBSD__) || (defined (__vxworks) && defined (__RTP__)) + setenv (name, value, 1); + + #else +@@ -177,7 +177,7 @@ + + sprintf (expression, "%s=%s", name, value); + putenv (expression); +-#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__MINGW32__) \ ++#if defined (__APPLE__) || defined (__MINGW32__) \ + ||(defined (__vxworks) && ! defined (__RTP__)) + /* On some systems like FreeBSD, MacOS X and Windows, putenv is making + a copy of the expression string so we can free it after the call to |