aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrzemyslaw Szczepaniak <pszczepaniak@google.com>2012-11-06 14:40:33 +0000
committerPrzemyslaw Szczepaniak <pszczepaniak@google.com>2012-11-06 14:40:33 +0000
commit3da1eb108d36da35333b2d655202791af854996b (patch)
tree500100881064a294f5a6e53025d44a461b3b15a3
parentdfd8b8327b93660601d016cdc6f29f433b45a8d8 (diff)
downloadopenfst-3da1eb108d36da35333b2d655202791af854996b.tar.gz
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
-rw-r--r--Android.mk6
-rw-r--r--README.android2
-rw-r--r--src/include/fst/accumulator.h2
-rw-r--r--src/include/fst/arc-map.h2
-rw-r--r--src/include/fst/config.h2
-rw-r--r--src/include/fst/determinize.h2
-rw-r--r--src/include/fst/encode.h2
-rw-r--r--src/include/fst/epsnormalize.h2
-rw-r--r--src/include/fst/equivalent.h2
-rw-r--r--src/include/fst/extensions/pdt/collection.h4
-rw-r--r--src/include/fst/extensions/pdt/info.h4
-rw-r--r--src/include/fst/extensions/pdt/paren.h4
-rw-r--r--src/include/fst/extensions/pdt/pdt.h2
-rw-r--r--src/include/fst/extensions/pdt/reverse.h2
-rw-r--r--src/include/fst/extensions/pdt/shortest-path.h4
-rw-r--r--src/include/fst/factor-weight.h2
-rw-r--r--src/include/fst/label-reachable.h2
-rw-r--r--src/include/fst/relabel.h2
-rw-r--r--src/include/fst/replace-util.h4
-rw-r--r--src/include/fst/replace.h2
-rw-r--r--src/include/fst/rmepsilon.h2
-rw-r--r--src/include/fst/rmfinalepsilon.h2
-rw-r--r--src/include/fst/script/compile-impl.h2
-rw-r--r--src/include/fst/slist.h4
-rw-r--r--src/include/fst/sparse-tuple-weight.h4
-rw-r--r--src/include/fst/state-map.h2
-rw-r--r--src/include/fst/symbol-table-ops.h2
-rw-r--r--src/include/fst/synchronize.h4
-rw-r--r--src/include/fst/test-properties.h2
-rw-r--r--src/include/fst/util.h4
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 <algorithm>
#include <functional>
-#include <unordered_map>
+#include <tr1/unordered_map>
using std::tr1::unordered_map;
using std::tr1::unordered_multimap;
#include <vector>
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 <unordered_map>
+#include <tr1/unordered_map>
using std::tr1::unordered_map;
using std::tr1::unordered_multimap;
#include <string>
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<long long
+/* Define to 1 if the system has the type `std::tr1::hash<long long
unsigned>'. */
#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 <algorithm>
#include <climits>
-#include <unordered_map>
+#include <tr1/unordered_map>
using std::tr1::unordered_map;
using std::tr1::unordered_multimap;
#include <map>
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 <climits>
-#include <unordered_map>
+#include <tr1/unordered_map>
using std::tr1::unordered_map;
using std::tr1::unordered_multimap;
#include <string>
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 <unordered_map>
+#include <tr1/unordered_map>
using std::tr1::unordered_map;
using std::tr1::unordered_multimap;
#include <fst/slist.h>
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 <algorithm>
#include <deque>
-#include <unordered_map>
+#include <tr1/unordered_map>
using std::tr1::unordered_map;
using std::tr1::unordered_multimap;
#include <utility>
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<T> hash_;
+ static std::tr1::hash<T> hash_;
NodeTable node_table_;
@@ -118,7 +118,7 @@ template<class I, class T> const I Collection<I, T>::kNoNodeId = -1;
template <class I, class T> const size_t Collection<I, T>::kPrime = 7853;
-template <class I, class T> std::hash<T> Collection<I, T>::hash_;
+template <class I, class T> std::tr1::hash<T> Collection<I, T>::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 <unordered_map>
+#include <tr1/unordered_map>
using std::tr1::unordered_map;
using std::tr1::unordered_multimap;
-#include <unordered_set>
+#include <tr1/unordered_set>
using std::tr1::unordered_set;
using std::tr1::unordered_multiset;
#include <vector>
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 <algorithm>
-#include <unordered_map>
+#include <tr1/unordered_map>
using std::tr1::unordered_map;
using std::tr1::unordered_multimap;
-#include <unordered_set>
+#include <tr1/unordered_set>
using std::tr1::unordered_set;
using std::tr1::unordered_multiset;
#include <set>
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 <unordered_map>
+#include <tr1/unordered_map>
using std::tr1::unordered_map;
using std::tr1::unordered_multimap;
#include <map>
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 <unordered_map>
+#include <tr1/unordered_map>
using std::tr1::unordered_map;
using std::tr1::unordered_multimap;
#include <vector>
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 <fst/extensions/pdt/paren.h>
#include <fst/extensions/pdt/pdt.h>
-#include <unordered_map>
+#include <tr1/unordered_map>
using std::tr1::unordered_map;
using std::tr1::unordered_multimap;
-#include <unordered_set>
+#include <tr1/unordered_set>
using std::tr1::unordered_set;
using std::tr1::unordered_multiset;
#include <stack>
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 <algorithm>
-#include <unordered_map>
+#include <tr1/unordered_map>
using std::tr1::unordered_map;
using std::tr1::unordered_multimap;
#include <fst/slist.h>
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 <unordered_map>
+#include <tr1/unordered_map>
using std::tr1::unordered_map;
using std::tr1::unordered_multimap;
#include <vector>
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 <unordered_map>
+#include <tr1/unordered_map>
using std::tr1::unordered_map;
using std::tr1::unordered_multimap;
#include <string>
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 <vector>
using std::vector;
-#include <unordered_map>
+#include <tr1/unordered_map>
using std::tr1::unordered_map;
using std::tr1::unordered_multimap;
-#include <unordered_set>
+#include <tr1/unordered_set>
using std::tr1::unordered_set;
using std::tr1::unordered_multiset;
#include <map>
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 <unordered_map>
+#include <tr1/unordered_map>
using std::tr1::unordered_map;
using std::tr1::unordered_multimap;
#include <set>
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 <unordered_map>
+#include <tr1/unordered_map>
using std::tr1::unordered_map;
using std::tr1::unordered_multimap;
#include <fst/slist.h>
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 <unordered_set>
+#include <tr1/unordered_set>
using std::tr1::unordered_set;
using std::tr1::unordered_multiset;
#include <vector>
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 <unordered_map>
+#include <tr1/unordered_map>
using std::tr1::unordered_map;
using std::tr1::unordered_multimap;
#include <sstream>
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 <fst/config.h>
-#if !defined(__ANDROID__) && HAVE___GNU_CXX__SLIST_INT_
+#ifdef HAVE___GNU_CXX__SLIST_INT_
-#include <slist>
+#include <ext/slist>
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<string>
#include<list>
#include<stack>
-#include<unordered_map>
+#include<tr1/unordered_map>
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<K> H;
+ std::tr1::hash<K> H;
for (SparseTupleWeightIterator<W, K> 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 <algorithm>
-#include <unordered_map>
+#include <tr1/unordered_map>
using std::tr1::unordered_map;
using std::tr1::unordered_multimap;
#include <string>
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 <vector>
using std::vector;
#include <string>
-#include <unordered_set>
+#include <tr1/unordered_set>
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 <algorithm>
-#include <unordered_map>
+#include <tr1/unordered_map>
using std::tr1::unordered_map;
using std::tr1::unordered_multimap;
-#include <unordered_set>
+#include <tr1/unordered_set>
using std::tr1::unordered_set;
using std::tr1::unordered_multiset;
#include <string>
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 <unordered_set>
+#include <tr1/unordered_set>
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 <unordered_map>
+#include <tr1/unordered_map>
using std::tr1::unordered_map;
using std::tr1::unordered_multimap;
-#include <unordered_set>
+#include <tr1/unordered_set>
using std::tr1::unordered_set;
using std::tr1::unordered_multiset;
#include <list>