openbsd-ports/devel/boost/patches/patch-boost_config_stdlib_libstdcpp3_hpp
wilfried 4aa36ec4b0 Import boost 1.33.1
Free peer-reviewed portable C++ source libraries

From Deanna Phillips <deanna@sdf.lonestar.org>
with work from me, robert@ and kurt@
2006-11-05 19:20:41 +00:00

29 lines
1.1 KiB
Plaintext

$OpenBSD: patch-boost_config_stdlib_libstdcpp3_hpp,v 1.1.1.1 2006/11/05 19:20:43 wilfried Exp $
--- boost/config/stdlib/libstdcpp3.hpp.orig Thu Dec 1 10:00:33 2005
+++ boost/config/stdlib/libstdcpp3.hpp Fri Nov 3 13:07:29 2006
@@ -29,6 +29,15 @@
# define _REENTRANT
#endif
+// This is a 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)