diff options
author | Kostik Belousov <kostikbel@ukr.net> | 2007-12-01 11:52:42 +0000 |
---|---|---|
committer | Samuel Tardieu <sam@gcc.gnu.org> | 2007-12-01 11:52:42 +0000 |
commit | 353301145bc799346eb4349c68c3e043b08c28cc (patch) | |
tree | 7a99b33d85d7efbb2889fd2d6eaa8531ece9ce96 /gcc/ada/env.c | |
parent | 867f133ec412ca7592f16b804b34aac9b82703f2 (diff) | |
download | gcc-353301145bc799346eb4349c68c3e043b08c28cc.zip gcc-353301145bc799346eb4349c68c3e043b08c28cc.tar.gz gcc-353301145bc799346eb4349c68c3e043b08c28cc.tar.bz2 |
re PR ada/33722 (putenv() is made posix-conformant on FreeBSD 7.x)
2007-12-01 Kostik Belousov <kostikbel@ukr.net>
gcc/ada/
PR ada/33722
* env.c (__gnat_setenv): FreeBSD 7 has a POSIX conformant putenv()
and its argument must not be free()ed.
From-SVN: r130555
Diffstat (limited to 'gcc/ada/env.c')
-rw-r--r-- | gcc/ada/env.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ada/env.c b/gcc/ada/env.c index 808f10b..4d36109 100644 --- a/gcc/ada/env.c +++ b/gcc/ada/env.c @@ -177,9 +177,9 @@ __gnat_setenv (char *name, char *value) sprintf (expression, "%s=%s", name, value); putenv (expression); -#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__MINGW32__) \ - ||(defined (__vxworks) && ! defined (__RTP__)) - /* On some systems like FreeBSD, MacOS X and Windows, putenv is making +#if (defined (__FreeBSD__) && (__FreeBSD__ < 7)) || defined (__APPLE__) \ + || defined (__MINGW32__) ||(defined (__vxworks) && ! defined (__RTP__)) + /* On some systems like pre-7 FreeBSD, MacOS X and Windows, putenv is making a copy of the expression string so we can free it after the call to putenv */ free (expression); |