diff --git a/moses/TranslationModel/PhraseDictionaryTreeAdaptor.h b/moses/TranslationModel/PhraseDictionaryTreeAdaptor.h index 63d2887b3..6c17bfc85 100644 --- a/moses/TranslationModel/PhraseDictionaryTreeAdaptor.h +++ b/moses/TranslationModel/PhraseDictionaryTreeAdaptor.h @@ -7,10 +7,14 @@ #include "moses/TargetPhraseCollection.h" #include "moses/TranslationModel/PhraseDictionary.h" #include "util/check.hh" - -#include #include +#ifdef WITH_THREADS +#include +#else +#include +#endif + namespace Moses { @@ -26,7 +30,11 @@ class PhraseDictionaryTreeAdaptor : public PhraseDictionary { typedef PhraseDictionary MyBase; +#ifdef WITH_THREADS boost::thread_specific_ptr m_implementation; +#else + boost::scoped_ptr m_implementation; +#endif friend class PDTAimp; PhraseDictionaryTreeAdaptor(); diff --git a/moses/TranslationModel/RuleTable/PhraseDictionaryOnDisk.h b/moses/TranslationModel/RuleTable/PhraseDictionaryOnDisk.h index 3e0e99c28..e3eb52b48 100644 --- a/moses/TranslationModel/RuleTable/PhraseDictionaryOnDisk.h +++ b/moses/TranslationModel/RuleTable/PhraseDictionaryOnDisk.h @@ -32,6 +32,8 @@ #ifdef WITH_THREADS #include +#else +#include #endif namespace Moses @@ -47,7 +49,11 @@ class PhraseDictionaryOnDisk : public PhraseDictionary friend std::ostream& operator<<(std::ostream&, const PhraseDictionaryOnDisk&); protected: +#ifdef WITH_THREADS boost::thread_specific_ptr m_implementation; +#else + boost::scoped_ptr m_implementation; +#endif OnDiskPt::OnDiskWrapper &GetImplementation(); const OnDiskPt::OnDiskWrapper &GetImplementation() const; diff --git a/moses/TranslationOptionCollection.cpp b/moses/TranslationOptionCollection.cpp index bf464862b..443b2c8ab 100644 --- a/moses/TranslationOptionCollection.cpp +++ b/moses/TranslationOptionCollection.cpp @@ -21,6 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ***********************************************************************/ #include +#include #include "TranslationOptionCollection.h" #include "Sentence.h" #include "DecodeStep.h"