diff options
author | Elliott Hughes <enh@google.com> | 2012-11-27 22:34:12 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2012-11-28 12:35:28 -0800 |
commit | 239e8b5bc967189ecef58c2fc1340b98f1059098 (patch) | |
tree | af64bd6e8d1c546ec877906685c716a89dc4976b /i18n | |
parent | a65434f302345a071e89b03d03c9effd8ded7855 (diff) | |
download | icu4c-239e8b5bc967189ecef58c2fc1340b98f1059098.tar.gz |
Clean up some of the Android icu4c hacks.
We don't need the ustr_wcs.cpp hack: bionic's stdlib.h contains
the same #define.
We don't need the digitlst.cpp hack: we can just modify the makefile
so we can use stlport.
We don't need most of the putil.cpp hacks, and the two we do need can
be done in the makefile.
Change-Id: If67d307688347f9c04febed3ecfe6f36b7effc9d
Diffstat (limited to 'i18n')
-rw-r--r-- | i18n/Android.mk | 9 | ||||
-rw-r--r-- | i18n/digitlst.cpp | 13 |
2 files changed, 6 insertions, 16 deletions
diff --git a/i18n/Android.mk b/i18n/Android.mk index bc5c142d..22421872 100644 --- a/i18n/Android.mk +++ b/i18n/Android.mk @@ -96,11 +96,14 @@ local_ldlibs := -lpthread -lm include $(CLEAR_VARS) LOCAL_SRC_FILES := $(src_files) -LOCAL_C_INCLUDES := $(c_includes) \ - abi/cpp/include +LOCAL_C_INCLUDES += $(c_includes) \ + abi/cpp/include \ + bionic \ + bionic/libstdc++/include \ + external/stlport/stlport LOCAL_CFLAGS += $(local_cflags) -DPIC -fPIC LOCAL_RTTI_FLAG := -frtti -LOCAL_SHARED_LIBRARIES += libicuuc libgabi++ +LOCAL_SHARED_LIBRARIES += libicuuc libgabi++ libstlport LOCAL_LDLIBS += $(local_ldlibs) LOCAL_MODULE_TAGS := optional LOCAL_MODULE := libicui18n diff --git a/i18n/digitlst.cpp b/i18n/digitlst.cpp index 6ddd5dcf..e706ff01 100644 --- a/i18n/digitlst.cpp +++ b/i18n/digitlst.cpp @@ -38,11 +38,7 @@ #include <limits.h> #include <string.h> #include <stdio.h> -#ifdef ANDROID -#include <math.h> -#else #include <limits> -#endif // *************************************************************************** // class DigitList @@ -445,20 +441,11 @@ DigitList::getDouble() const tDouble /= -1; } } else if (isInfinite()) { - // BEGIN android-changed - // There is no numeric_limits template member in Android std nor - // INFINITY defined in math.h of ICU Linux build. -#ifdef INFINITY - tDouble = INFINITY; -#else if (std::numeric_limits<double>::has_infinity) { tDouble = std::numeric_limits<double>::infinity(); } else { tDouble = std::numeric_limits<double>::max(); } -#endif - // END android-changed - if (!isPositive()) { tDouble = -tDouble; //this was incorrectly "-fDouble" originally. } |