aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2012-12-23 22:39:18 -0800
committerGerrit Code Review <noreply-gerritcodereview@google.com>2012-12-23 22:39:18 -0800
commit1a65be974ca1b908969c798923d3a19e7c8ce801 (patch)
tree32ad79e8a6ec0858b17badc9846b8e801511e469
parente5f45d3719275b0fd752b94c3de2e6ca8bb097bb (diff)
parent7924895a54b8f0b67514224a7ad9d67c79b3eeaf (diff)
downloadstlport-1a65be974ca1b908969c798923d3a19e7c8ce801.tar.gz
Merge "Use __ANDROID__ to test for Android platform"
-rw-r--r--src/num_get_float.cpp14
-rw-r--r--stlport/stl/_cmath.h6
-rw-r--r--stlport/stl/_mbstate_t.h2
-rw-r--r--stlport/stl/_pair.h2
-rw-r--r--stlport/stl/config/_system.h2
5 files changed, 13 insertions, 13 deletions
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 @@ union _ll {
} i32;
};
-# if defined (__linux__) && !defined (ANDROID)
+# if defined (__linux__) && !defined (__ANDROID__)
# include <ieee754.h>
# else
union ieee854_long_double {
@@ -105,7 +105,7 @@ typedef unsigned __int64 uint64;
# 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 @@ static void _Stl_mult64(const uint64 u, const uint64 v,
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 @@ static void _Stl_tenscale(uint64& p, int exp, int& bexp) {
// 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 @@ D _Stl_atodT(char *buffer, ptrdiff_t ndigit, int dexp)
}
#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 @@ D _Stl_string_to_doubleT(const char *s)
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 @@ __string_to_float(const __iostring& v, float& val)
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 @@ _STLP_DEF_MATH_INLINE2(hypot, _hypot)
#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 @@ using ::frexp;
#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 ::log;
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__)