Commit 39b76371 by Jerome Lambourg Committed by Pierre-Marie de Rodat

[Ada] Do not include crt_externs.h on iOS

2018-11-14  Jerome Lambourg  <lambourg@adacore.com>

gcc/ada/

	* env.c: Do not include crt_externs.h on iOS, as it does not
	exist there. This is also true for the iPhone Simulator SDK.

From-SVN: r266118
parent 302319e0
2018-11-14 Jerome Lambourg <lambourg@adacore.com>
* env.c: Do not include crt_externs.h on iOS, as it does not
exist there. This is also true for the iPhone Simulator SDK.
2018-11-14 Ed Schonberg <schonberg@adacore.com> 2018-11-14 Ed Schonberg <schonberg@adacore.com>
* exp_ch7.adb (Check_Unnesting_In_Declarations): New procedure * exp_ch7.adb (Check_Unnesting_In_Declarations): New procedure
......
...@@ -50,9 +50,12 @@ ...@@ -50,9 +50,12 @@
#include <stdlib.h> #include <stdlib.h>
#endif #endif
#if defined (__APPLE__) && !(defined (__arm__) || defined (__arm64__)) #if defined (__APPLE__) \
&& !(defined (__arm__) \
|| defined (__arm64__) \
|| defined (__IOS_SIMULATOR__))
/* On Darwin, _NSGetEnviron must be used for shared libraries; but it is not /* On Darwin, _NSGetEnviron must be used for shared libraries; but it is not
available on iOS. */ available on iOS (on device or on simulator). */
#include <crt_externs.h> #include <crt_externs.h>
#endif #endif
...@@ -211,7 +214,10 @@ __gnat_environ (void) ...@@ -211,7 +214,10 @@ __gnat_environ (void)
#elif defined (__sun__) #elif defined (__sun__)
extern char **_environ; extern char **_environ;
return _environ; return _environ;
#elif defined (__APPLE__) && !(defined (__arm__) || defined (__arm64__)) #elif defined (__APPLE__) \
&& !(defined (__arm__) \
|| defined (__arm64__) \
|| defined (__IOS_SIMULATOR__))
return *_NSGetEnviron (); return *_NSGetEnviron ();
#elif ! (defined (__vxworks)) #elif ! (defined (__vxworks))
extern char **environ; extern char **environ;
......
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