From: John David Anglin Date: Tue, 1 Apr 2008 22:23:04 +0000 (+0000) Subject: re PR ada/33857 (Cannot bootstrap Ada with host gnatmake-4.2) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a6a0635ec111936464b2529edf809b17fe29d4c3;p=gcc.git re PR ada/33857 (Cannot bootstrap Ada with host gnatmake-4.2) PR ada/33857 * env.c: Always include crt_externs.h if __APPLE__ is defined. (__gnat_setenv): Use setenv instead of putenv if __APPLE__ is defined. From-SVN: r133806 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 8fc1b0d205a..00ae0d60ee6 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2008-04-01 John David Anglin + + PR ada/33857 + * env.c: Always include crt_externs.h if __APPLE__ is defined. + (__gnat_setenv): Use setenv instead of putenv if __APPLE__ is defined. + 2008-04-01 Andreas Jaeger * g-soccon-linux-ppc.ads: Add new constants SO_REUSEPORT and diff --git a/gcc/ada/env.c b/gcc/ada/env.c index 01c25d6753f..2b708c31790 100644 --- a/gcc/ada/env.c +++ b/gcc/ada/env.c @@ -41,10 +41,6 @@ #include #endif -#if defined (__APPLE__) -#include -#endif - #if defined (__MINGW32__) #include #endif @@ -61,6 +57,10 @@ extern char** ppGlobalEnviron; #include "system.h" #endif /* IN_RTS */ +#if defined (__APPLE__) +#include +#endif + #include "env.h" void @@ -166,7 +166,7 @@ __gnat_setenv (char *name, char *value) LIB$SIGNAL (status); } -#elif defined (__vxworks) && defined (__RTP__) +#elif (defined (__vxworks) && defined (__RTP__)) || defined (__APPLE__) setenv (name, value, 1); #else @@ -178,7 +178,7 @@ __gnat_setenv (char *name, char *value) sprintf (expression, "%s=%s", name, value); putenv (expression); #if (defined (__FreeBSD__) && (__FreeBSD__ < 7)) \ - || defined (__APPLE__) || defined (__MINGW32__) \ + || defined (__MINGW32__) \ ||(defined (__vxworks) && ! defined (__RTP__)) /* On some systems like FreeBSD 6.x and earlier, MacOS X and Windows, putenv is making a copy of the expression string so we can free