On 10/9/19 9:47 PM, enh wrote: > On Wed, Oct 9, 2019, 19:10 Rob Landley <[email protected] > > How about: > > > > #if defined(__BIONIC__) && !defined(__ANDROID_NDK__) && > > !defined(__NDK_MAJOR__) > > Yeah, that should work for everything.
It doesn't seem to, though. Possibly because __NDK_MAJOR__ is #defined in ndk-version.h which the headers only #include from two places: $ grep -r ndk-version sources/cxx-stl/llvm-libc++/include/support/android/locale_bionic.h:#include <android/ndk-version.h> toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/support/android/locale_bionic.h:#include <android/ndk-version.h> Neither of which is already included from portability.h, and I kinda doubt: #ifdef __BIONIC__ #include <android/ndk-version.h> #if !defined... is going to work well in the AOSP build which is _not_ an NDK. Also, this bit is now awkward: // Android NDKv18 has liblog.so but not liblog.c for static builds, // stub it out for now. #ifdef __ANDROID_NDK__ #define __android_log_write(a, b, c) (0) #define adjtime(x, y) (0) #endif Is that still needed, or...? Rob _______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
