]> gcc.gnu.org Git - gcc.git/commitdiff
re PR ada/33857 (Cannot bootstrap Ada with host gnatmake-4.2)
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Tue, 1 Apr 2008 22:23:04 +0000 (22:23 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Tue, 1 Apr 2008 22:23:04 +0000 (22:23 +0000)
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

gcc/ada/ChangeLog
gcc/ada/env.c

index 8fc1b0d205a1a4c0dce1c2c46c4a50e0864463b2..00ae0d60ee628d4bb29b566b31129305bdb8dbf8 100644 (file)
@@ -1,3 +1,9 @@
+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
index 01c25d6753fe0866992f6a11e8f587b9a10461e0..2b708c3179050bd131d82dc03b9b7f1d5f23e214 100644 (file)
 #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
This page took 0.101181 seconds and 5 git commands to generate.