Commit 35330114 by Kostik Belousov Committed by Samuel Tardieu

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
parent 867f133e
2007-12-01 Kostik Belousov <kostikbel@ukr.net>
PR ada/33722
* env.c (__gnat_setenv): FreeBSD 7 has a POSIX conformant putenv()
and its argument must not be free()ed.
2007-11-29 Eric Botcazou <ebotcazou@adacore.com>
* decl.c (make_packable_type): Retrieve the real name of the type.
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment