public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Fix bootstrapping on darwin9/10 (PR ada/64349).
@ 2015-01-07 10:15 Arnaud Charlet
  2015-01-08 12:49 ` Iain Sandoe
  0 siblings, 1 reply; 12+ messages in thread
From: Arnaud Charlet @ 2015-01-07 10:15 UTC (permalink / raw)
  To: gcc-patches; +Cc: Tristan Gingold

[-- Attachment #1: Type: text/plain, Size: 213 bytes --]

Use _NSGetEnviron to get environment.

Tested on x86_64-pc-linux-gnu, committed on trunk

2015-01-07  Tristan Gingold  <gingold@adacore.com>

	PR ada/64349
	* env.c (__gnat_environ): Adjust for darwin9/darwin10.


[-- Attachment #2: difs --]
[-- Type: text/plain, Size: 710 bytes --]

Index: env.c
===================================================================
--- env.c	(revision 219191)
+++ env.c	(working copy)
@@ -44,6 +44,12 @@
 #include <stdlib.h>
 #endif
 
+#if defined (__APPLE__) && !defined (__arm__)
+/* On Darwin, _NSGetEnviron must be used for shared libraries; but it is not
+   available on iOS.  */
+#include <crt_externs.h>
+#endif
+
 #if defined (__vxworks)
   #if defined (__RTP__)
     /* On VxWorks 6 Real-Time process mode, environ is defined in unistd.h.  */
@@ -212,6 +218,8 @@
 #elif ! (defined (__vxworks))
   extern char **environ;
   return environ;
+#elif defined (__APPLE__) && !defined (__arm__)
+  return *_NSGetEnviron ();
 #else
   return environ;
 #endif

^ permalink raw reply	[flat|nested] 12+ messages in thread
* [Ada] Fix bootstrapping on darwin9/10 (PR ada/64349)
@ 2015-01-30 16:35 Arnaud Charlet
  2015-01-30 18:13 ` Iain Sandoe
  0 siblings, 1 reply; 12+ messages in thread
From: Arnaud Charlet @ 2015-01-30 16:35 UTC (permalink / raw)
  To: gcc-patches; +Cc: Tristan Gingold

[-- Attachment #1: Type: text/plain, Size: 242 bytes --]

Avoid possible warning on darwin during compiler build.

Should hopefully close PR 64349, committed on trunk

2015-01-30  Tristan Gingold  <gingold@adacore.com>

	PR ada/64349
	* env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.


[-- Attachment #2: difs --]
[-- Type: text/plain, Size: 1664 bytes --]

Index: env.c
===================================================================
--- env.c	(revision 220273)
+++ env.c	(working copy)
@@ -6,7 +6,7 @@
  *                                                                          *
  *                          C Implementation File                           *
  *                                                                          *
- *            Copyright (C) 2005-2014, Free Software Foundation, Inc.       *
+ *            Copyright (C) 2005-2015, Free Software Foundation, Inc.       *
  *                                                                          *
  * GNAT is free software;  you can  redistribute it  and/or modify it under *
  * terms of the  GNU General Public License as published  by the Free Soft- *
@@ -30,15 +30,21 @@
  ****************************************************************************/
 
 #ifdef IN_RTS
-#include "tconfig.h"
-#include "tsystem.h"
+# include "tconfig.h"
+# include "tsystem.h"
 
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <time.h>
-#ifdef VMS
-#include <unixio.h>
-#endif
+# include <sys/stat.h>
+# include <fcntl.h>
+# include <time.h>
+# ifdef VMS
+#  include <unixio.h>
+# endif
+/* We don't have libiberty, so use malloc.  */
+# define xmalloc(S) malloc (S)
+#else /* IN_RTS */
+# include "config.h"
+# include "system.h"
+#endif /* IN_RTS */
 
 #if defined (__MINGW32__)
 #include <stdlib.h>
@@ -71,13 +77,6 @@
   #endif
 #endif
 
-/* We don't have libiberty, so use malloc.  */
-#define xmalloc(S) malloc (S)
-#else /* IN_RTS */
-#include "config.h"
-#include "system.h"
-#endif /* IN_RTS */
-
 #ifdef __cplusplus
 extern "C" {
 #endif

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-02-04  9:27 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-07 10:15 [Ada] Fix bootstrapping on darwin9/10 (PR ada/64349) Arnaud Charlet
2015-01-08 12:49 ` Iain Sandoe
2015-01-08 13:52   ` Tristan Gingold
2015-01-08 23:42     ` Iain Sandoe
2015-01-14  9:11       ` Tristan Gingold
2015-01-20 11:05         ` Iain Sandoe
2015-01-20 11:05           ` Arnaud Charlet
2015-01-20 11:30             ` Iain Sandoe
2015-01-20 13:14               ` Dominique d'Humières
2015-01-30 16:35 Arnaud Charlet
2015-01-30 18:13 ` Iain Sandoe
2015-02-04  9:27   ` Tristan Gingold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).