From: pmderodat Date: Wed, 14 Nov 2018 11:41:04 +0000 (+0000) Subject: [Ada] Do not include crt_externs.h on iOS X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7bf769dfb3f8bd480cff575bfc7bd20caab122c5;p=thirdparty%2Fgcc.git [Ada] Do not include crt_externs.h on iOS 2018-11-14 Jerome Lambourg 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266118 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index a0df31f6cce8..dbd7ee3a0c63 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2018-11-14 Jerome Lambourg + + * 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 * exp_ch7.adb (Check_Unnesting_In_Declarations): New procedure diff --git a/gcc/ada/env.c b/gcc/ada/env.c index b6ab097fcfb5..61193f439615 100644 --- a/gcc/ada/env.c +++ b/gcc/ada/env.c @@ -50,9 +50,12 @@ #include #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 - available on iOS. */ + available on iOS (on device or on simulator). */ #include #endif @@ -211,7 +214,10 @@ __gnat_environ (void) #elif defined (__sun__) extern char **_environ; return _environ; -#elif defined (__APPLE__) && !(defined (__arm__) || defined (__arm64__)) +#elif defined (__APPLE__) \ + && !(defined (__arm__) \ + || defined (__arm64__) \ + || defined (__IOS_SIMULATOR__)) return *_NSGetEnviron (); #elif ! (defined (__vxworks)) extern char **environ;