openbsd-ports/devel/boost/patches/patch-boost_config_stdlib_libstdcpp3_hpp
deanna 13ccbc190e Build libboost_python. Ports using it will need to satisfy any python
run depends on their own.  Patch from landry@, change requested by a
few.

And regen patches.

ok landry@
2008-01-06 00:01:15 +00:00

28 lines
1.1 KiB
Plaintext

$OpenBSD: patch-boost_config_stdlib_libstdcpp3_hpp,v 1.2 2008/01/06 00:01:15 deanna Exp $
--- boost/config/stdlib/libstdcpp3.hpp.orig Thu Dec 1 10:00:33 2005
+++ boost/config/stdlib/libstdcpp3.hpp Mon Dec 31 02:29:05 2007
@@ -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)