atom feed17 messages in com.googlegroups.android-ndkRe: Platform define: ANDROID or __AND...
FromSent OnAttachments
PeterSep 2, 2010 5:37 am 
Damien LespiauSep 2, 2010 9:47 am 
Angus LeesSep 2, 2010 8:42 pm 
PeterSep 3, 2010 12:21 am 
David TurnerSep 3, 2010 9:35 am 
PeterSep 6, 2010 12:05 am 
David TurnerSep 6, 2010 1:08 am 
PeterSep 6, 2010 5:18 am 
alanSep 6, 2010 8:34 am 
Doug SchaeferSep 6, 2010 8:51 am 
Tim MenschSep 6, 2010 12:35 pm 
Angus LeesSep 6, 2010 1:52 pm 
Doug SchaeferSep 6, 2010 2:46 pm 
Tim in BoulderSep 6, 2010 3:14 pm 
David TurnerSep 7, 2010 5:29 am 
mani krishnanFeb 23, 2013 1:10 am 
Jeffrey WaltonFeb 23, 2013 3:58 am 
Subject:Re: Platform define: ANDROID or __ANDROID__?
From:Doug Schaefer ("cdt@gmail.com)
Date:Sep 6, 2010 2:46:03 pm
List:com.googlegroups.android-ndk

On Mon, Sep 6, 2010 at 4:52 PM, Angus Lees <g.@inodes.org> wrote:

On Tue, Sep 7, 2010 at 05:35, Tim Mensch <tim.@gmail.com> wrote:

 On 9/6/2010 6:18 AM, Peter wrote:

Well, I tested it and now I'm confused, because without any flags defined this _doesn't_ fail:

#if defined(__ANDROID__) bla i = 5; #endif

I can verify this; as a result of the earlier messages in this thread, I changed to __ANDROID__ for my #define flag, but I had to change my -DANDROID to -D__ANDROID__ to get it to work, as Peter described above.

To be fair, I'm using the Crystax build of the NDK, which may potentially be missing __ANDROID__ ?

Oh, sorry for the misinformation :( I've been using custom-built toolchains for so long I have very little idea of what the NDK gcc actually does...  I can confirm that the new gcc-4.5 "arm-none-linux-androideabi" target declares __ANDROID__ internally (see http://gcc.gnu.org/onlinedocs/gcc/GNU_002fLinux-Options.html for example).  - Gus

Wow, that's stunning news that Android support has reached the gcc mainline. That should mean Android support in the CodeSourcery toolchain can't be far behind.

Mind you, it's too bad that we're scrambling around trying to find alternative toolchains that support the features we really need.