+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
#include <unixio.h>
#endif
-#if defined (__APPLE__)
-#include <crt_externs.h>
-#endif
-
#if defined (__MINGW32__)
#include <stdlib.h>
#endif
#include "system.h"
#endif /* IN_RTS */
+#if defined (__APPLE__)
+#include <crt_externs.h>
+#endif
+
#include "env.h"
void
LIB$SIGNAL (status);
}
-#elif defined (__vxworks) && defined (__RTP__)
+#elif (defined (__vxworks) && defined (__RTP__)) || defined (__APPLE__)
setenv (name, value, 1);
#else
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