From: Lars Gullik Bjønnes Date: Mon, 10 Jun 2002 17:57:29 +0000 (+0000) Subject: make boost compile without exceptions X-Git-Tag: 1.6.10~19118 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=3dbc80c145f2e95326be0086f9492a09d0563a45;p=lyx.git make boost compile without exceptions git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4356 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/boost/boost/any.hpp b/boost/boost/any.hpp index 5587aa6e41..bda7f2efb1 100644 --- a/boost/boost/any.hpp +++ b/boost/boost/any.hpp @@ -82,7 +82,7 @@ namespace boost class placeholder { public: // structors - + virtual ~placeholder() { } @@ -92,7 +92,7 @@ namespace boost virtual const std::type_info & type() const = 0; virtual placeholder * clone() const = 0; - + }; template diff --git a/boost/boost/config/user.hpp b/boost/boost/config/user.hpp index 98adbac909..507117f783 100644 --- a/boost/boost/config/user.hpp +++ b/boost/boost/config/user.hpp @@ -66,3 +66,29 @@ // #define BOOST_DISABLE_WIN32 +#define BOOST_NO_EXCEPTIONS 1 +#define BOOST_NO_WREGEX 1 +#define BOOST_NO_WSTRING 1 + +#ifdef BOOST_NO_EXCEPTIONS +// +// If there are no exceptions then we must report critical-errors +// the only way we know how; by terminating. +// +#ifdef __BORLANDC__ +// seems not to make stderr usable with Borland: +#include +#endif +# define BOOST_NOEH_ASSERT(x)\ +if(0 == (x))\ +{\ + std::fprintf(stderr, "Error: critical boost failure in \"%s\"", #x);\ + std::abort();\ +} +#else +// +// With exceptions then error handling is taken care of and +// there is no need for these checks: +// +# define BOOST_NOEH_ASSERT(x) +#endif diff --git a/boost/boost/detail/shared_count.hpp b/boost/boost/detail/shared_count.hpp index 63316f41c4..b937ce0e11 100644 --- a/boost/boost/detail/shared_count.hpp +++ b/boost/boost/detail/shared_count.hpp @@ -83,7 +83,10 @@ public: #ifdef BOOST_HAS_THREADS mutex_type::scoped_lock lock(mtx_); #endif +#ifndef BOOST_NO_EXCEPTIONS if(use_count_ == 0 && weak_count_ != 0) throw use_count_is_zero(); +#endif + BOOST_NOEH_ASSERT(!(use_count_ == 0 && weak_count_ != 0)); ++use_count_; ++weak_count_; } @@ -237,7 +240,10 @@ public: catch(...) { d(p); // delete p +#ifndef BOOST_NO_EXCEPTIONS throw; +#endif + BOOST_NOEH_ASSERT(false); } } @@ -256,7 +262,7 @@ public: r.release(); } -#endif +#endif ~shared_count() // nothrow { diff --git a/boost/libs/regex/src/Makefile.am b/boost/libs/regex/src/Makefile.am index 423f2fee30..417d8a7abc 100644 --- a/boost/libs/regex/src/Makefile.am +++ b/boost/libs/regex/src/Makefile.am @@ -12,7 +12,6 @@ libboostregex_la_SOURCES = \ primary_transform.hpp \ regex.cpp \ w32_regex_traits.cpp \ - winstances.cpp \ regex_synch.cpp # cregex.cpp \ @@ -20,3 +19,4 @@ libboostregex_la_SOURCES = \ # posix_api.cpp \ # wide_posix_api.cpp \ # regex_debug.cpp +# winstances.cpp \