Added boost-coro patch 2 to the boost build

Wed, 19 Jan 2011 17:04:38 -0800

author
Mark Palange (Mani) <palange@lindenlab.com>
date
Wed, 19 Jan 2011 17:04:38 -0800
changeset 5
f21fef6f9d61
parent 4
5972e99cfce7
child 8
fb211c660c20

Added boost-coro patch 2 to the boost build

boost-coroutine-2009-04-30.tar.gz file | annotate | diff | revisions
boost-coroutine-linden-2.patch file | annotate | diff | revisions
boost-coroutine-linden.patch file | annotate | diff | revisions
build-cmd.sh file | annotate | diff | revisions
     1.1 Binary file boost-coroutine-2009-04-30.tar.gz has changed
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/boost-coroutine-linden-2.patch	Wed Jan 19 17:04:38 2011 -0800
     2.3 @@ -0,0 +1,31 @@
     2.4 +--- boost/coroutine/detail/context_windows.hpp.orig	2010-06-30 17:02:24.593750000 -0700
     2.5 ++++ boost/coroutine/detail/context_windows.hpp	2010-06-30 16:51:33.500000000 -0700
     2.6 +@@ -35,9 +35,11 @@
     2.7 + // And no, I have no idea why this symbol isn't being set appropriately by
     2.8 + // the build environment.
     2.9 + #define WIN32_LEAN_AND_MEAN
    2.10 ++#ifndef _WIN32_WINNT
    2.11 + #define _WIN32_WINNT 0x0600
    2.12 + // The above #define will only affect <windows.h> if it has not yet been
    2.13 + // #included by something else!
    2.14 ++#endif // _WIN32_WINNT
    2.15 + #if defined(WINBASEAPI)
    2.16 + #error You must #include coroutine headers before anything that #includes <windows.h>
    2.17 + #endif
    2.18 +@@ -63,12 +65,15 @@
    2.19 + 		
    2.20 +     /*
    2.21 +      * Return true if current thread is a fiber.
    2.22 +-     * FIXME: on longhorn shoud use IsThreadAFiber
    2.23 +      */
    2.24 +     inline
    2.25 +     bool is_fiber() {
    2.26 ++#if _WIN32_WINNT >= 0x0600
    2.27 ++      return bool(IsThreadAFiber());
    2.28 ++#else
    2.29 +       fiber_ptr current = GetCurrentFiber();
    2.30 +       return current != 0 && current != fiber_magic;
    2.31 ++#endif
    2.32 +     }
    2.33 + 
    2.34 +     /*
     3.1 --- a/boost-coroutine-linden.patch	Fri Jan 14 15:33:40 2011 -0800
     3.2 +++ b/boost-coroutine-linden.patch	Wed Jan 19 17:04:38 2011 -0800
     3.3 @@ -13,31 +13,6 @@
     3.4    // default_context_impl.hpp must be first for weird Apple bug
     3.5    #include <boost/coroutine/detail/default_context_impl.hpp>
     3.6    #include <cstddef>
     3.7 -diff -rc ../boost-coroutine/boost/coroutine/detail/self.hpp boost-coroutine/boost/coroutine/detail/self.hpp
     3.8 -*** ../boost-coroutine/boost/coroutine/detail/self.hpp	Sun Aug 20 13:11:09 2006
     3.9 ---- boost-coroutine/boost/coroutine/detail/self.hpp	Wed Jun  3 16:40:05 2009
    3.10 -***************
    3.11 -*** 217,222 ****
    3.12 ---- 217,235 ----
    3.13 -        BOOST_ASSERT(m_pimpl);
    3.14 -        return m_pimpl->pending();
    3.15 -      }
    3.16 -+ 
    3.17 -+     /// @c true only if this @c self object was created by the passed @a coroutine
    3.18 -+     template <typename SomeCoroutine>
    3.19 -+     bool is_from(const SomeCoroutine& coroutine) const
    3.20 -+     {
    3.21 -+       // get_impl() only accepts non-const ref... a mistake, IMO.
    3.22 -+       return static_cast<void*>(coroutine_accessor::get_impl(const_cast<SomeCoroutine&>(coroutine)).get()) ==
    3.23 -+              static_cast<void*>(m_pimpl);
    3.24 -+     }
    3.25 -+ 
    3.26 -+     /// opaque token used to correlate this 'self' with its corresponding coroutine
    3.27 -+     void* get_id() const { return m_pimpl; }
    3.28 -+ 
    3.29 -    private:
    3.30 -      coroutine_self(impl_type * pimpl, detail::init_from_impl_tag) :
    3.31 -        m_pimpl(pimpl) {}
    3.32  diff -rc ../boost-coroutine/boost/coroutine/future.hpp boost-coroutine/boost/coroutine/future.hpp
    3.33  *** ../boost-coroutine/boost/coroutine/future.hpp	Wed Apr 29 14:41:05 2009
    3.34  --- boost-coroutine/boost/coroutine/future.hpp	Wed Apr 22 09:35:26 2009
    3.35 @@ -53,3 +28,35 @@
    3.36    // default_context_impl.hpp must be first for weird Apple bug
    3.37    #include <boost/coroutine/detail/default_context_impl.hpp>
    3.38    #include <boost/none.hpp>
    3.39 +diff -u -r old/boost/coroutine/detail/coroutine_impl.hpp new/boost/coroutine/detail/coroutine_impl.hpp
    3.40 +--- old/boost/coroutine/detail/coroutine_impl.hpp	2009-10-20 17:10:02.000000000 +0100
    3.41 ++++ new/boost/coroutine/detail/coroutine_impl.hpp	2009-10-20 19:22:11.000000000 +0100
    3.42 +@@ -56,7 +56,7 @@
    3.43 +     typedef ContextImpl context_impl;
    3.44 +     typedef CoroutineType coroutine_type;
    3.45 +     typedef coroutine_impl<coroutine_type, context_impl> type;
    3.46 +-    typedef context_base<context_impl> context_base;
    3.47 ++    typedef context_base<context_impl> context_base_type;
    3.48 +     typedef typename coroutine_type::arg_slot_type arg_slot_type;
    3.49 +     typedef typename coroutine_type::result_type result_type;
    3.50 +     typedef typename coroutine_type::result_slot_type result_slot_type;
    3.51 +@@ -65,7 +65,7 @@
    3.52 +   
    3.53 +     template<typename DerivedType>
    3.54 + 	coroutine_impl(DerivedType * this_, std::ptrdiff_t stack_size) :
    3.55 +-      context_base(*this_, stack_size),
    3.56 ++      context_base_type(*this_, stack_size),
    3.57 + 	m_arg(0),
    3.58 + 	m_result(0){}
    3.59 +                 
    3.60 +diff -u -r old/boost/coroutine/detail/posix_utility.hpp new/boost/coroutine/detail/posix_utility.hpp
    3.61 +--- old/boost/coroutine/detail/posix_utility.hpp	2009-04-24 21:30:44.000000000 +0100
    3.62 ++++ new/boost/coroutine/detail/posix_utility.hpp	2009-10-20 19:21:27.000000000 +0100
    3.63 +@@ -39,6 +39,7 @@
    3.64 + #include <cstddef>
    3.65 + #include <cstdlib>
    3.66 + #include <iostream>
    3.67 ++#include <cstring>
    3.68 + #include <boost/type_traits.hpp>
    3.69 + #if defined(_POSIX_MAPPED_FILES) && _POSIX_MAPPED_FILES > 0
    3.70 + #include <sys/mman.h>
     4.1 --- a/build-cmd.sh	Fri Jan 14 15:33:40 2011 -0800
     4.2 +++ b/build-cmd.sh	Wed Jan 19 17:04:38 2011 -0800
     4.3 @@ -32,12 +32,13 @@
     4.4  #fi
     4.5  
     4.6  # Add boost coroutine to the linden lab boost build
     4.7 -COROUTINE_TAR=boost-coroutine-2009-12-01.tar.gz
     4.8 +COROUTINE_TAR=boost-coroutine-2009-04-30.tar.gz
     4.9  tar xzf "$COROUTINE_TAR"
    4.10  cd boost-coroutine 
    4.11 -# disabled patching - the patches are applied in the archive.
    4.12 -# patch -p1 < "../boost-coroutine-2009-12-01.patch"
    4.13 -# patch -p1 < "../boost-coroutine-linden.patch"
    4.14 +patch -p1 < "../boost-coroutine-linden.patch"
    4.15 +patch -p0 < "../boost-coroutine-linden-2.patch"
    4.16 +patch -p1 < "../boost-coroutine-2009-12-01.patch"
    4.17 +
    4.18  cp -rv boost/coroutine "../$BOOST_SOURCE_DIR/boost"
    4.19  cd ..
    4.20  

mercurial