28 lines
1.1 KiB
Plaintext
28 lines
1.1 KiB
Plaintext
$OpenBSD: patch-boost_config_stdlib_libstdcpp3_hpp,v 1.5 2010/03/30 11:00:15 robert Exp $
|
|
--- boost/config/stdlib/libstdcpp3.hpp.orig Tue May 12 18:09:45 2009
|
|
+++ boost/config/stdlib/libstdcpp3.hpp Tue May 12 18:15:20 2009
|
|
@@ -29,6 +29,15 @@
|
|
# define _REENTRANT
|
|
#endif
|
|
|
|
+// This is hack for OpenBSD. Currently OpenBSD's gcc is compiled
|
|
+// with thread model = single. Many references on the net indicate
|
|
+// multithreaded c++ applications will have problems with c++
|
|
+// exceptions and the high-speed caching allocator. However in
|
|
+// practice we have many multithreaded c++ applications that haven't
|
|
+// seen these problems. We may be playing with fire but...
|
|
+#ifdef __OpenBSD__
|
|
+# define BOOST_HAS_THREADS
|
|
+#else
|
|
#ifdef __GLIBCXX__ // gcc 3.4 and greater:
|
|
# if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \
|
|
|| defined(_GLIBCXX__PTHREADS)
|
|
@@ -46,6 +55,7 @@
|
|
&& !defined(_GLIBCPP__PTHREADS)
|
|
// disable thread support if the std lib was built single threaded:
|
|
# define BOOST_DISABLE_THREADS
|
|
+#endif
|
|
#endif
|
|
|
|
#if (defined(linux) || defined(__linux) || defined(__linux__)) && defined(__arm__) && defined(_GLIBCPP_HAVE_GTHR_DEFAULT)
|