From a8a167d6883e4acee42619e0bbfd811984f6e94d Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Wed, 28 May 2014 22:05:30 -0700 Subject: Revert "Fix the mac build." This reverts commit 560eaab489316778f491132c7b05a647b098d2a0. --- tools/grxmlcompile/Android.mk | 4 ---- tools/make_cfst/Android.mk | 4 ---- tools/thirdparty/OpenFst/fst/lib/Android.mk | 6 +----- tools/thirdparty/OpenFst/fst/lib/const-fst.h | 6 ++---- tools/thirdparty/OpenFst/fst/lib/encode.h | 12 ++++-------- tools/thirdparty/OpenFst/fst/lib/fst-decl.h | 4 ++-- tools/thirdparty/OpenFst/fst/lib/fst.cpp | 12 ++++-------- tools/thirdparty/OpenFst/fst/lib/symbol-table.cpp | 12 ++++-------- tools/thirdparty/OpenFst/fst/lib/vector-fst.h | 6 ++---- 9 files changed, 19 insertions(+), 47 deletions(-) (limited to 'tools') diff --git a/tools/grxmlcompile/Android.mk b/tools/grxmlcompile/Android.mk index 183e264..4c9fe44 100644 --- a/tools/grxmlcompile/Android.mk +++ b/tools/grxmlcompile/Android.mk @@ -63,8 +63,6 @@ LOCAL_CFLAGS += -DOPENFSTSDK LOCAL_SHARED_LIBRARIES += libfst endif -LOCAL_CLANG := true - LOCAL_CPPFLAGS += -std=c++11 LOCAL_STATIC_LIBRARIES := \ @@ -77,6 +75,4 @@ LOCAL_LDLIBS := \ LOCAL_MODULE:= grxmlcompile -include external/libcxx/libcxx.mk - include $(BUILD_HOST_EXECUTABLE) diff --git a/tools/make_cfst/Android.mk b/tools/make_cfst/Android.mk index 9c7cc5a..16470cd 100644 --- a/tools/make_cfst/Android.mk +++ b/tools/make_cfst/Android.mk @@ -24,8 +24,6 @@ LOCAL_CFLAGS += \ $(ASR_GLOBAL_DEFINES) \ $(ASR_GLOBAL_CPPFLAGS) \ -LOCAL_CLANG := true - LOCAL_CPPFLAGS += -std=c++11 LOCAL_SHARED_LIBRARIES := \ @@ -53,6 +51,4 @@ endif LOCAL_MODULE:= make_cfst -include external/libcxx/libcxx.mk - include $(BUILD_HOST_EXECUTABLE) diff --git a/tools/thirdparty/OpenFst/fst/lib/Android.mk b/tools/thirdparty/OpenFst/fst/lib/Android.mk index dfd3686..6e89e3c 100644 --- a/tools/thirdparty/OpenFst/fst/lib/Android.mk +++ b/tools/thirdparty/OpenFst/fst/lib/Android.mk @@ -16,9 +16,7 @@ LOCAL_C_INCLUDES := \ LOCAL_CFLAGS += \ -DFST_DL \ -LOCAL_CLANG := true - -LOCAL_CPPFLAGS += -std=c++11 +LOCAL_CPPFLAGS += -std=c++11 LOCAL_SHARED_LIBRARIES := \ @@ -26,6 +24,4 @@ LOCAL_LDLIBS += -lpthread LOCAL_MODULE := libfst -include external/libcxx/libcxx.mk - include $(BUILD_HOST_SHARED_LIBRARY) diff --git a/tools/thirdparty/OpenFst/fst/lib/const-fst.h b/tools/thirdparty/OpenFst/fst/lib/const-fst.h index 01196c9..ebeeb34 100644 --- a/tools/thirdparty/OpenFst/fst/lib/const-fst.h +++ b/tools/thirdparty/OpenFst/fst/lib/const-fst.h @@ -211,11 +211,9 @@ bool ConstFstImpl::Write(ostream &strm, strm.write("", 1); strm.write(reinterpret_cast(arcs_), narcs_ * sizeof(A)); strm.flush(); - if (!strm) { + if (!strm) LOG(ERROR) << "ConstFst::Write: Write failed: " << opts.source; - return false; - } - return true; + return strm; } // Simple concrete immutable FST. This class attaches interface to diff --git a/tools/thirdparty/OpenFst/fst/lib/encode.h b/tools/thirdparty/OpenFst/fst/lib/encode.h index e21ff20..b577d4a 100644 --- a/tools/thirdparty/OpenFst/fst/lib/encode.h +++ b/tools/thirdparty/OpenFst/fst/lib/encode.h @@ -137,11 +137,9 @@ template class EncodeTable { tuple->weight.Write(strm); } strm.flush(); - if (!strm) { + if (!strm) LOG(ERROR) << "EncodeTable::Write: write failed: " << source; - return false; - } - return true; + return strm; } bool Read(istream &strm, const string &source) { @@ -168,11 +166,9 @@ template class EncodeTable { encode_tuples_.push_back(tuple); encode_hash_[encode_tuples_.back()] = encode_tuples_.size(); } - if (!strm) { + if (!strm) LOG(ERROR) << "EncodeTable::Read: read failed: " << source; - return false; - } - return true; + return strm; } uint32 flags() const { return flags_; } diff --git a/tools/thirdparty/OpenFst/fst/lib/fst-decl.h b/tools/thirdparty/OpenFst/fst/lib/fst-decl.h index 0a18b38..a5cdc75 100644 --- a/tools/thirdparty/OpenFst/fst/lib/fst-decl.h +++ b/tools/thirdparty/OpenFst/fst/lib/fst-decl.h @@ -27,8 +27,8 @@ class SymbolTableIterator; class LogWeight; class TropicalWeight; -struct LogArc; -struct StdArc; +class LogArc; +class StdArc; template class ConstFst; template class ExpandedFst; diff --git a/tools/thirdparty/OpenFst/fst/lib/fst.cpp b/tools/thirdparty/OpenFst/fst/lib/fst.cpp index 6ec0884..3b8c9ef 100644 --- a/tools/thirdparty/OpenFst/fst/lib/fst.cpp +++ b/tools/thirdparty/OpenFst/fst/lib/fst.cpp @@ -65,11 +65,9 @@ bool FstHeader::Read(istream &strm, const string &source) { ReadType(strm, &start_); ReadType(strm, &numstates_); ReadType(strm, &numarcs_); - if (!strm) { + if (!strm) LOG(ERROR) << "FstHeader::Read: read failed: " << source; - return false; - } - return true; + return strm; } // Write Fst magic number and Fst header. @@ -83,11 +81,9 @@ bool FstHeader::Write(ostream &strm, const string &source) const { WriteType(strm, start_); WriteType(strm, numstates_); WriteType(strm, numarcs_); - if (!strm) { + if (!strm) LOG(ERROR) << "FstHeader::Write: write failed: " << source; - return false; - } - return true; + return strm; } } diff --git a/tools/thirdparty/OpenFst/fst/lib/symbol-table.cpp b/tools/thirdparty/OpenFst/fst/lib/symbol-table.cpp index a27d3cf..d4715da 100644 --- a/tools/thirdparty/OpenFst/fst/lib/symbol-table.cpp +++ b/tools/thirdparty/OpenFst/fst/lib/symbol-table.cpp @@ -138,11 +138,9 @@ bool SymbolTableImpl::Write(ostream &strm) const { WriteType(strm, it->second); } strm.flush(); - if (!strm) { + if (!strm) LOG(ERROR) << "SymbolTable::Write: write failed"; - return false; - } - return true; + return strm; } bool SymbolTableImpl::WriteText(ostream &strm) const { @@ -152,11 +150,9 @@ bool SymbolTableImpl::WriteText(ostream &strm) const { strm.write(line, strlen(line)); } strm.flush(); - if (!strm) { + if (!strm) LOG(ERROR) << "SymbolTable::WriteText: write failed"; - return false; - } - return true; + return strm; } } // namespace fst diff --git a/tools/thirdparty/OpenFst/fst/lib/vector-fst.h b/tools/thirdparty/OpenFst/fst/lib/vector-fst.h index b5603d6..fde934a 100644 --- a/tools/thirdparty/OpenFst/fst/lib/vector-fst.h +++ b/tools/thirdparty/OpenFst/fst/lib/vector-fst.h @@ -440,11 +440,9 @@ bool VectorFstImpl::Write(ostream &strm, } } strm.flush(); - if (!strm) { + if (!strm) LOG(ERROR) << "VectorFst::Write: write failed: " << opts.source; - return false; - } - return true; + return strm; } // Simple concrete, mutable FST. Supports additional operations: -- cgit v1.2.3