Commit a6a0635e by John David Anglin Committed by John David Anglin

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
parent 10743280
2008-04-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
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 <aj@suse.de>
* g-soccon-linux-ppc.ads: Add new constants SO_REUSEPORT and
......@@ -41,10 +41,6 @@
#include <unixio.h>
#endif
#if defined (__APPLE__)
#include <crt_externs.h>
#endif
#if defined (__MINGW32__)
#include <stdlib.h>
#endif
......@@ -61,6 +57,10 @@ extern char** ppGlobalEnviron;
#include "system.h"
#endif /* IN_RTS */
#if defined (__APPLE__)
#include <crt_externs.h>
#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
......
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