• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 // We do have rtti support now through GAbi++
19 #undef _STLP_NO_RTTI
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) <usr/include/header>
58 #define _STLP_NATIVE_C_HEADER(header) <../include/header>
59 #define _STLP_NATIVE_CPP_C_HEADER(header) <../../gabi++/include/header>
60 #define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../../gabi++/include/header>
61 #define _STLP_NATIVE_OLD_STREAMS_HEADER(header) <usr/include/header>
62 
63 // Include most of the gcc settings.
64 #include <stl/config/_gcc.h>
65 
66 // Do not use glibc, Android is missing some things.
67 #undef _STLP_USE_GLIBC
68 
69 // No exceptions.
70 #define _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT 1
71 #define _STLP_NO_UNEXPECTED_EXCEPT_SUPPORT 1
72 
73 // Android does have include_next but it doesn't work well in our build system.
74 #undef _STLP_HAS_INCLUDE_NEXT
75 
76 #endif /* __stl_config__android_h */
77