Merge "Use __ANDROID__ to test for Android platform"
diff --git a/src/num_get_float.cpp b/src/num_get_float.cpp
index 63e9fed..0407604 100644
--- a/src/num_get_float.cpp
+++ b/src/num_get_float.cpp
@@ -50,7 +50,7 @@
   } i32;
 };
 
-#  if defined (__linux__) && !defined (ANDROID)
+#  if defined (__linux__) && !defined (__ANDROID__)
 #    include <ieee754.h>
 #  else
 union ieee854_long_double {
@@ -105,7 +105,7 @@
 #  define ULL(x) x##Ui64
 #elif defined (__unix) || defined (__MINGW32__) || \
       (defined (__DMC__) && (__LONGLONG)) || defined (__WATCOMC__) || \
-      defined (ANDROID)
+      defined (__ANDROID__)
 typedef uint32_t uint32;
 typedef uint64_t uint64;
 #  define ULL(x) x##ULL
@@ -136,7 +136,7 @@
   high = u1 * v1 + w2 + (x >> 32);
 }
 
-#if !defined (__linux__) || defined (ANDROID)
+#if !defined (__linux__) || defined (__ANDROID__)
 
 #  define bit11 ULL(0x7ff)
 #  define exponent_mask (bit11 << 52)
@@ -324,7 +324,7 @@
 // Third argument is base-10 exponent.
 
 /* IEEE representation */
-#if !defined (__linux__) || defined (ANDROID)
+#if !defined (__linux__) || defined (__ANDROID__)
 
 union _Double_rep {
   uint64 ival;
@@ -641,7 +641,7 @@
 }
 #endif // __linux__
 
-#if !defined (__linux__) || defined (ANDROID)
+#if !defined (__linux__) || defined (__ANDROID__)
 static double _Stl_string_to_double(const char *s) {
   typedef numeric_limits<double> limits;
   const int max_digits = limits::digits10 + 2;
@@ -845,7 +845,7 @@
 void _STLP_CALL
 __string_to_float(const __iostring& v, float& val)
 {
-#if !defined (__linux__) || defined (ANDROID)
+#if !defined (__linux__) || defined (__ANDROID__)
   val = (float)_Stl_string_to_double(v.c_str());
 #else
   val = (float)_Stl_string_to_doubleT<double,ieee754_double,12,IEEE754_DOUBLE_BIAS>(v.c_str());
@@ -855,7 +855,7 @@
 void _STLP_CALL
 __string_to_float(const __iostring& v, double& val)
 {
-#if !defined (__linux__) || defined (ANDROID)
+#if !defined (__linux__) || defined (__ANDROID__)
   val = _Stl_string_to_double(v.c_str());
 #else
   val = _Stl_string_to_doubleT<double,ieee754_double,12,IEEE754_DOUBLE_BIAS>(v.c_str());
diff --git a/stlport/stl/_cmath.h b/stlport/stl/_cmath.h
index 2867c23..5cb0cd5 100644
--- a/stlport/stl/_cmath.h
+++ b/stlport/stl/_cmath.h
@@ -531,7 +531,7 @@
 #endif
 
 #if defined (_STLP_IMPORT_VENDOR_CSTD) && !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
-#if defined (ANDROID)
+#if defined (__ANDROID__)
 namespace __captured {
 template<typename _Tp> inline int __capture_isfinite(_Tp __f) { return isfinite(__f); }
 template<typename _Tp> inline int __capture_isinf(_Tp __f) { return isinf(__f); }
@@ -573,7 +573,7 @@
 #if !(defined(__HP_aCC) && defined(_STLP_DEBUG))
 using ::hypot;
 #endif
-#if defined (ANDROID)
+#if defined (__ANDROID__)
 using __captured::isfinite;
 using __captured::isinf;
 using __captured::isnan;
@@ -583,7 +583,7 @@
 using ::log10;
 using ::modf;
 using ::pow;
-#if defined (ANDROID)
+#if defined (__ANDROID__)
 using __captured::signbit;
 #endif
 using ::sin;
diff --git a/stlport/stl/_mbstate_t.h b/stlport/stl/_mbstate_t.h
index 53566a7..83f085e 100644
--- a/stlport/stl/_mbstate_t.h
+++ b/stlport/stl/_mbstate_t.h
@@ -27,7 +27,7 @@
 
 #if defined (_STLP_USE_OWN_MBSTATE_T)
 #  if !defined (_STLP_CPP_MBSTATE_T) || !defined (__cplusplus) || !defined (_STLP_USE_NEW_C_HEADERS)
-#    if !defined (ANDROID) /* mbstate_t conflicts with Android's definition */
+#    if !defined (__ANDROID__) /* mbstate_t conflicts with Android's definition */
 typedef int mbstate_t;
 #    endif
 #  endif
diff --git a/stlport/stl/_pair.h b/stlport/stl/_pair.h
index de0b08e..7da76a9 100644
--- a/stlport/stl/_pair.h
+++ b/stlport/stl/_pair.h
@@ -43,7 +43,7 @@
 
 _STLP_BEGIN_NAMESPACE
 
-#if defined (ANDROID)
+#if defined (__ANDROID__)
 /* Android has stl_pair.h, prevent using it by defining the header guard. */
 #  define __SGI_STL_INTERNAL_PAIR_H
 #endif
diff --git a/stlport/stl/config/_system.h b/stlport/stl/config/_system.h
index c0b4add..1e82095 100644
--- a/stlport/stl/config/_system.h
+++ b/stlport/stl/config/_system.h
@@ -59,7 +59,7 @@
 #  elif defined (__HP_aCC)
 #    include <stl/config/_hpacc.h>
 #  endif
-#elif defined (ANDROID)
+#elif defined (__ANDROID__)
 /* Android mobile phone platform. Somewhat but not entirely GNU/Linux-like */
 #  include <stl/config/_android.h>
 #elif defined (linux) || defined (__linux__)