Home | History | Annotate | Download | only in config
      1 #ifndef __stl_config__android_h
      2 #define __stl_config__android_h
      3 
      4 #define _STLP_PLATFORM "Android"
      5 
      6 // Mostly Unix-like.
      7 #define _STLP_UNIX 1
      8 
      9 // Have pthreads support.
     10 #define _PTHREADS
     11 
     12 // Don't have native <cplusplus> headers
     13 #define _STLP_HAS_NO_NEW_C_HEADERS 1
     14 
     15 // Use unix for streams
     16 #define _STLP_USE_UNIX_IO 1
     17 
     18 // No rtti support
     19 #define _STLP_NO_RTTI 1
     20 
     21 // C library is in the global namespace.
     22 #define _STLP_VENDOR_GLOBAL_CSTD 1
     23 
     24 // Don't have underlying local support.
     25 #undef _STLP_REAL_LOCALE_IMPLEMENTED
     26 
     27 // No pthread_spinlock_t in Android
     28 #define _STLP_DONT_USE_PTHREAD_SPINLOCK 1
     29 
     30 // Enable thread support
     31 #undef _NOTHREADS
     32 
     33 // Little endian platform.
     34 #define _STLP_LITTLE_ENDIAN 1
     35 
     36 // No <exception> headers
     37 #define _STLP_NO_EXCEPTION_HEADER 1
     38 
     39 // No throwing exceptions
     40 #define _STLP_NO_EXCEPTIONS 1
     41 
     42 // No need to define our own namespace
     43 #define _STLP_NO_OWN_NAMESPACE 1
     44 
     45 // Use __new_alloc instead of __node_alloc, so we don't need static functions.
     46 #define _STLP_USE_SIMPLE_NODE_ALLOC 1
     47 
     48 // Don't use extern versions of range errors, so we don't need to
     49 // compile as a library.
     50 #define _STLP_USE_NO_EXTERN_RANGE_ERRORS 1
     51 
     52 // The system math library doesn't have long double variants, e.g
     53 // sinl, cosl, etc
     54 #define _STLP_NO_VENDOR_MATH_L 1
     55 
     56 // Define how to include our native headers.
     57 #define _STLP_NATIVE_HEADER(header) <libstdc++/include/header>
     58 #define _STLP_NATIVE_C_HEADER(header) <../include/header>
     59 #define _STLP_NATIVE_CPP_C_HEADER(header) <libstdc++/include/header>
     60 #define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <libstdc++/include/header>
     61 #define _STLP_NATIVE_OLD_STREAMS_HEADER(header) <libstdc++/include/header>
     62 #define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <libstdc++/include/header>
     63 
     64 // Include most of the gcc settings.
     65 #include <stl/config/_gcc.h>
     66 
     67 // Do not use glibc, Android is missing some things.
     68 #undef _STLP_USE_GLIBC
     69 
     70 // No exceptions.
     71 #define _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT 1
     72 #define _STLP_NO_UNEXPECTED_EXCEPT_SUPPORT 1
     73 
     74 // Android does have include_next but it doesn't work well in our build system.
     75 #undef _STLP_HAS_INCLUDE_NEXT
     76 
     77 #if !defined(__BUILDING_STLPORT)
     78 // Turn off container extension which fails correct, standard-compliant code.
     79 // Note: Container extension uses template member function to implement
     80 // insert, find, ... member functions of the containers.
     81 #define _STLP_NO_CONTAINERS_EXTENSION 1
     82 #endif
     83 
     84 #endif /* __stl_config__android_h */
     85