27 Feb
2015
27 Feb
'15
1:52 a.m.
On Thu, Feb 26, 2015 at 5:13 PM, Ryan Smith-Roberts <rmsr@lab.net> wrote:
I'm not an official cpython developer but ifdef __ANDROID__ is quite in line with other per-platform support (__FreeBSD__, __linux__, etc), as well as already being in use in Modules/_posixsubprocess.c. Is __ANDROID__ not being defined when it should be?
Might as well spend the time to answer my own question: Some Googling indicates that __ANDROID__ is baked into the NDK toolchain, so it's definitely what one would use to wrap Android-specific code. "__ANDROID__ shall always be defined by the toolchain, without a need for special flags though, so please rely on that instead in your code." - David Turner, Android NDK Lead, 2010.