From 3da1eb108d36da35333b2d655202791af854996b Mon Sep 17 00:00:00 2001 From: Przemyslaw Szczepaniak Date: Tue, 6 Nov 2012 14:40:33 +0000 Subject: Switch to gnustl with rtti Required for compiling with greco3 code. Added -gnustl-rtti suffix to distinguish from stlport libs Reverted changes added for stlport. Bug: 7484202 Change-Id: Ib69db7117821f97133cadaae0f45b4e8ed2fda01 --- Android.mk | 6 ++++-- README.android | 2 +- src/include/fst/accumulator.h | 2 +- src/include/fst/arc-map.h | 2 +- src/include/fst/config.h | 2 +- src/include/fst/determinize.h | 2 +- src/include/fst/encode.h | 2 +- src/include/fst/epsnormalize.h | 2 +- src/include/fst/equivalent.h | 2 +- src/include/fst/extensions/pdt/collection.h | 4 ++-- src/include/fst/extensions/pdt/info.h | 4 ++-- src/include/fst/extensions/pdt/paren.h | 4 ++-- src/include/fst/extensions/pdt/pdt.h | 2 +- src/include/fst/extensions/pdt/reverse.h | 2 +- src/include/fst/extensions/pdt/shortest-path.h | 4 ++-- src/include/fst/factor-weight.h | 2 +- src/include/fst/label-reachable.h | 2 +- src/include/fst/relabel.h | 2 +- src/include/fst/replace-util.h | 4 ++-- src/include/fst/replace.h | 2 +- src/include/fst/rmepsilon.h | 2 +- src/include/fst/rmfinalepsilon.h | 2 +- src/include/fst/script/compile-impl.h | 2 +- src/include/fst/slist.h | 4 ++-- src/include/fst/sparse-tuple-weight.h | 4 ++-- src/include/fst/state-map.h | 2 +- src/include/fst/symbol-table-ops.h | 2 +- src/include/fst/synchronize.h | 4 ++-- src/include/fst/test-properties.h | 2 +- src/include/fst/util.h | 4 ++-- 30 files changed, 42 insertions(+), 40 deletions(-) diff --git a/Android.mk b/Android.mk index 51989dc..0c48290 100644 --- a/Android.mk +++ b/Android.mk @@ -17,8 +17,10 @@ LOCAL_C_INCLUDES += \ $(OPENFST_DIR)/src/include/ LOCAL_LDLIBS += -lpthread +LOCAL_NDK_STL_VARIANT := gnustl_static +LOCAL_SDK_VERSION := 14 LOCAL_SRC_FILES := $(call private-function-all-cpp-files-under, src/lib) -LOCAL_MODULE := libopenfst -include external/stlport/libstlport.mk +LOCAL_MODULE := libopenfst-gnustl-rtti + include $(BUILD_STATIC_LIBRARY) diff --git a/README.android b/README.android index 1e90058..14f41f7 100644 --- a/README.android +++ b/README.android @@ -1,3 +1,3 @@ Copy of openfst-1.3.2-CL32004048 from Greco3. -Modified to use stlport, Android.mk file added. +Android.mk file added. diff --git a/src/include/fst/accumulator.h b/src/include/fst/accumulator.h index 9801b93..81d1847 100644 --- a/src/include/fst/accumulator.h +++ b/src/include/fst/accumulator.h @@ -23,7 +23,7 @@ #include #include -#include +#include using std::tr1::unordered_map; using std::tr1::unordered_multimap; #include diff --git a/src/include/fst/arc-map.h b/src/include/fst/arc-map.h index 3055f71..914f81c 100644 --- a/src/include/fst/arc-map.h +++ b/src/include/fst/arc-map.h @@ -23,7 +23,7 @@ #ifndef FST_LIB_ARC_MAP_H__ #define FST_LIB_ARC_MAP_H__ -#include +#include using std::tr1::unordered_map; using std::tr1::unordered_multimap; #include diff --git a/src/include/fst/config.h b/src/include/fst/config.h index 47e472e..046b49c 100644 --- a/src/include/fst/config.h +++ b/src/include/fst/config.h @@ -4,7 +4,7 @@ /* Define to 1 if you have the ICU library. */ /* #undef HAVE_ICU */ -/* Define to 1 if the system has the type `std::hash'. */ #define HAVE_STD__TR1__HASH_LONG_LONG_UNSIGNED_ 1 diff --git a/src/include/fst/determinize.h b/src/include/fst/determinize.h index 417142f..a145e4a 100644 --- a/src/include/fst/determinize.h +++ b/src/include/fst/determinize.h @@ -24,7 +24,7 @@ #include #include -#include +#include using std::tr1::unordered_map; using std::tr1::unordered_multimap; #include diff --git a/src/include/fst/encode.h b/src/include/fst/encode.h index 7245b45..08b84cb 100644 --- a/src/include/fst/encode.h +++ b/src/include/fst/encode.h @@ -22,7 +22,7 @@ #define FST_LIB_ENCODE_H__ #include -#include +#include using std::tr1::unordered_map; using std::tr1::unordered_multimap; #include diff --git a/src/include/fst/epsnormalize.h b/src/include/fst/epsnormalize.h index 696242b..8187737 100644 --- a/src/include/fst/epsnormalize.h +++ b/src/include/fst/epsnormalize.h @@ -21,7 +21,7 @@ #ifndef FST_LIB_EPSNORMALIZE_H__ #define FST_LIB_EPSNORMALIZE_H__ -#include +#include using std::tr1::unordered_map; using std::tr1::unordered_multimap; #include diff --git a/src/include/fst/equivalent.h b/src/include/fst/equivalent.h index f05ff87..7f8708a 100644 --- a/src/include/fst/equivalent.h +++ b/src/include/fst/equivalent.h @@ -23,7 +23,7 @@ #include #include -#include +#include using std::tr1::unordered_map; using std::tr1::unordered_multimap; #include diff --git a/src/include/fst/extensions/pdt/collection.h b/src/include/fst/extensions/pdt/collection.h index 24a443f..7cc6dd8 100644 --- a/src/include/fst/extensions/pdt/collection.h +++ b/src/include/fst/extensions/pdt/collection.h @@ -107,7 +107,7 @@ class Collection { private: static const I kNoNodeId; static const size_t kPrime; - static std::hash hash_; + static std::tr1::hash hash_; NodeTable node_table_; @@ -118,7 +118,7 @@ template const I Collection::kNoNodeId = -1; template const size_t Collection::kPrime = 7853; -template std::hash Collection::hash_; +template std::tr1::hash Collection::hash_; } // namespace fst diff --git a/src/include/fst/extensions/pdt/info.h b/src/include/fst/extensions/pdt/info.h index 55e76c4..bcadcac 100644 --- a/src/include/fst/extensions/pdt/info.h +++ b/src/include/fst/extensions/pdt/info.h @@ -21,10 +21,10 @@ #ifndef FST_EXTENSIONS_PDT_INFO_H__ #define FST_EXTENSIONS_PDT_INFO_H__ -#include +#include using std::tr1::unordered_map; using std::tr1::unordered_multimap; -#include +#include using std::tr1::unordered_set; using std::tr1::unordered_multiset; #include diff --git a/src/include/fst/extensions/pdt/paren.h b/src/include/fst/extensions/pdt/paren.h index a9d30c5..d8cc037 100644 --- a/src/include/fst/extensions/pdt/paren.h +++ b/src/include/fst/extensions/pdt/paren.h @@ -23,10 +23,10 @@ #define FST_EXTENSIONS_PDT_PAREN_H_ #include -#include +#include using std::tr1::unordered_map; using std::tr1::unordered_multimap; -#include +#include using std::tr1::unordered_set; using std::tr1::unordered_multiset; #include diff --git a/src/include/fst/extensions/pdt/pdt.h b/src/include/fst/extensions/pdt/pdt.h index 171541f..6649f55 100644 --- a/src/include/fst/extensions/pdt/pdt.h +++ b/src/include/fst/extensions/pdt/pdt.h @@ -21,7 +21,7 @@ #ifndef FST_EXTENSIONS_PDT_PDT_H__ #define FST_EXTENSIONS_PDT_PDT_H__ -#include +#include using std::tr1::unordered_map; using std::tr1::unordered_multimap; #include diff --git a/src/include/fst/extensions/pdt/reverse.h b/src/include/fst/extensions/pdt/reverse.h index b20e1c5..de67b4e 100644 --- a/src/include/fst/extensions/pdt/reverse.h +++ b/src/include/fst/extensions/pdt/reverse.h @@ -21,7 +21,7 @@ #ifndef FST_EXTENSIONS_PDT_REVERSE_H__ #define FST_EXTENSIONS_PDT_REVERSE_H__ -#include +#include using std::tr1::unordered_map; using std::tr1::unordered_multimap; #include diff --git a/src/include/fst/extensions/pdt/shortest-path.h b/src/include/fst/extensions/pdt/shortest-path.h index 85f94b8..82fb13a 100644 --- a/src/include/fst/extensions/pdt/shortest-path.h +++ b/src/include/fst/extensions/pdt/shortest-path.h @@ -25,10 +25,10 @@ #include #include -#include +#include using std::tr1::unordered_map; using std::tr1::unordered_multimap; -#include +#include using std::tr1::unordered_set; using std::tr1::unordered_multiset; #include diff --git a/src/include/fst/factor-weight.h b/src/include/fst/factor-weight.h index ce0d58d..97440e1 100644 --- a/src/include/fst/factor-weight.h +++ b/src/include/fst/factor-weight.h @@ -22,7 +22,7 @@ #define FST_LIB_FACTOR_WEIGHT_H__ #include -#include +#include using std::tr1::unordered_map; using std::tr1::unordered_multimap; #include diff --git a/src/include/fst/label-reachable.h b/src/include/fst/label-reachable.h index 8f9aca8..af06eef 100644 --- a/src/include/fst/label-reachable.h +++ b/src/include/fst/label-reachable.h @@ -23,7 +23,7 @@ #ifndef FST_LIB_LABEL_REACHABLE_H__ #define FST_LIB_LABEL_REACHABLE_H__ -#include +#include using std::tr1::unordered_map; using std::tr1::unordered_multimap; #include diff --git a/src/include/fst/relabel.h b/src/include/fst/relabel.h index fbb8942..685d42a 100644 --- a/src/include/fst/relabel.h +++ b/src/include/fst/relabel.h @@ -21,7 +21,7 @@ #ifndef FST_LIB_RELABEL_H__ #define FST_LIB_RELABEL_H__ -#include +#include using std::tr1::unordered_map; using std::tr1::unordered_multimap; #include diff --git a/src/include/fst/replace-util.h b/src/include/fst/replace-util.h index f4a9c05..d58cb15 100644 --- a/src/include/fst/replace-util.h +++ b/src/include/fst/replace-util.h @@ -25,10 +25,10 @@ #include using std::vector; -#include +#include using std::tr1::unordered_map; using std::tr1::unordered_multimap; -#include +#include using std::tr1::unordered_set; using std::tr1::unordered_multiset; #include diff --git a/src/include/fst/replace.h b/src/include/fst/replace.h index d08c0ea..ef5f6cc 100644 --- a/src/include/fst/replace.h +++ b/src/include/fst/replace.h @@ -22,7 +22,7 @@ #ifndef FST_LIB_REPLACE_H__ #define FST_LIB_REPLACE_H__ -#include +#include using std::tr1::unordered_map; using std::tr1::unordered_multimap; #include diff --git a/src/include/fst/rmepsilon.h b/src/include/fst/rmepsilon.h index 32e64de..89b8178 100644 --- a/src/include/fst/rmepsilon.h +++ b/src/include/fst/rmepsilon.h @@ -21,7 +21,7 @@ #ifndef FST_LIB_RMEPSILON_H__ #define FST_LIB_RMEPSILON_H__ -#include +#include using std::tr1::unordered_map; using std::tr1::unordered_multimap; #include diff --git a/src/include/fst/rmfinalepsilon.h b/src/include/fst/rmfinalepsilon.h index 236d1a7..eb0f937 100644 --- a/src/include/fst/rmfinalepsilon.h +++ b/src/include/fst/rmfinalepsilon.h @@ -21,7 +21,7 @@ #ifndef FST_LIB_RMFINALEPSILON_H__ #define FST_LIB_RMFINALEPSILON_H__ -#include +#include using std::tr1::unordered_set; using std::tr1::unordered_multiset; #include diff --git a/src/include/fst/script/compile-impl.h b/src/include/fst/script/compile-impl.h index 1743452..68f37c3 100644 --- a/src/include/fst/script/compile-impl.h +++ b/src/include/fst/script/compile-impl.h @@ -21,7 +21,7 @@ #ifndef FST_SCRIPT_COMPILE_IMPL_H_ #define FST_SCRIPT_COMPILE_IMPL_H_ -#include +#include using std::tr1::unordered_map; using std::tr1::unordered_multimap; #include diff --git a/src/include/fst/slist.h b/src/include/fst/slist.h index d061ebe..b800522 100644 --- a/src/include/fst/slist.h +++ b/src/include/fst/slist.h @@ -22,9 +22,9 @@ #include -#if !defined(__ANDROID__) && HAVE___GNU_CXX__SLIST_INT_ +#ifdef HAVE___GNU_CXX__SLIST_INT_ -#include +#include namespace fst { diff --git a/src/include/fst/sparse-tuple-weight.h b/src/include/fst/sparse-tuple-weight.h index d316b17..c12ef4f 100644 --- a/src/include/fst/sparse-tuple-weight.h +++ b/src/include/fst/sparse-tuple-weight.h @@ -33,7 +33,7 @@ #include #include #include -#include +#include using std::tr1::unordered_map; using std::tr1::unordered_multimap; @@ -140,7 +140,7 @@ class SparseTupleWeight { // Assumes H() function exists for the hash of the key value size_t Hash() const { uint64 h = 0; - std::hash H; + std::tr1::hash H; for (SparseTupleWeightIterator it(*this); !it.Done(); it.Next()) { h = 5 * h + H(it.Value().first); h = 13 * h + it.Value().second.Hash(); diff --git a/src/include/fst/state-map.h b/src/include/fst/state-map.h index 454db24..2c59e1d 100644 --- a/src/include/fst/state-map.h +++ b/src/include/fst/state-map.h @@ -23,7 +23,7 @@ #define FST_LIB_STATE_MAP_H__ #include -#include +#include using std::tr1::unordered_map; using std::tr1::unordered_multimap; #include diff --git a/src/include/fst/symbol-table-ops.h b/src/include/fst/symbol-table-ops.h index e46c4c2..1f327da 100644 --- a/src/include/fst/symbol-table-ops.h +++ b/src/include/fst/symbol-table-ops.h @@ -20,7 +20,7 @@ #include using std::vector; #include -#include +#include using std::tr1::unordered_set; using std::tr1::unordered_multiset; diff --git a/src/include/fst/synchronize.h b/src/include/fst/synchronize.h index 28d1262..9582926 100644 --- a/src/include/fst/synchronize.h +++ b/src/include/fst/synchronize.h @@ -22,10 +22,10 @@ #define FST_LIB_SYNCHRONIZE_H__ #include -#include +#include using std::tr1::unordered_map; using std::tr1::unordered_multimap; -#include +#include using std::tr1::unordered_set; using std::tr1::unordered_multiset; #include diff --git a/src/include/fst/test-properties.h b/src/include/fst/test-properties.h index 12bcba7..80af593 100644 --- a/src/include/fst/test-properties.h +++ b/src/include/fst/test-properties.h @@ -21,7 +21,7 @@ #ifndef FST_LIB_TEST_PROPERTIES_H__ #define FST_LIB_TEST_PROPERTIES_H__ -#include +#include using std::tr1::unordered_set; using std::tr1::unordered_multiset; diff --git a/src/include/fst/util.h b/src/include/fst/util.h index a325beb..1f6046b 100644 --- a/src/include/fst/util.h +++ b/src/include/fst/util.h @@ -21,10 +21,10 @@ #ifndef FST_LIB_UTIL_H__ #define FST_LIB_UTIL_H__ -#include +#include using std::tr1::unordered_map; using std::tr1::unordered_multimap; -#include +#include using std::tr1::unordered_set; using std::tr1::unordered_multiset; #include -- cgit v1.2.3