[Python-Dev] Working on issue 23496: should I use a macro test or an edit to configure.ac?

Ryan Smith-Roberts rmsr at lab.net
Fri Feb 27 02:52:35 CET 2015


On Thu, Feb 26, 2015 at 5:13 PM, Ryan Smith-Roberts <rmsr at 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.


More information about the Python-Dev mailing list