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
This commit is contained in:
parent
867f133ec4
commit
353301145b
2 changed files with 9 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
|||
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);
|
||||
|
|
Loading…
Add table
Reference in a new issue