mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
make boost compile without exceptions
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4356 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3005c47180
commit
3dbc80c145
@ -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<typename ValueType>
|
||||
|
@ -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__
|
||||
// <cstdio> seems not to make stderr usable with Borland:
|
||||
#include <stdio.h>
|
||||
#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
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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 \
|
||||
|
Loading…
Reference in New Issue
Block a user