diff options
Diffstat (limited to 'meta-pkgs')
-rw-r--r-- | meta-pkgs/boost/Makefile.common | 6 | ||||
-rw-r--r-- | meta-pkgs/boost/distinfo | 26 | ||||
-rw-r--r-- | meta-pkgs/boost/patches/patch-aa | 48 | ||||
-rw-r--r-- | meta-pkgs/boost/patches/patch-ab | 13 | ||||
-rw-r--r-- | meta-pkgs/boost/patches/patch-ad | 8 | ||||
-rw-r--r-- | meta-pkgs/boost/patches/patch-ae | 21 | ||||
-rw-r--r-- | meta-pkgs/boost/patches/patch-af | 23 | ||||
-rw-r--r-- | meta-pkgs/boost/patches/patch-ag | 12 | ||||
-rw-r--r-- | meta-pkgs/boost/patches/patch-ah | 10 | ||||
-rw-r--r-- | meta-pkgs/boost/patches/patch-ai | 15 | ||||
-rw-r--r-- | meta-pkgs/boost/patches/patch-aj | 21 | ||||
-rw-r--r-- | meta-pkgs/boost/patches/patch-ak | 8 | ||||
-rw-r--r-- | meta-pkgs/boost/patches/patch-al | 42 | ||||
-rw-r--r-- | meta-pkgs/boost/patches/patch-am | 12 | ||||
-rw-r--r-- | meta-pkgs/boost/patches/patch-an | 160 | ||||
-rw-r--r-- | meta-pkgs/boost/patches/patch-ao | 556 |
16 files changed, 804 insertions, 177 deletions
diff --git a/meta-pkgs/boost/Makefile.common b/meta-pkgs/boost/Makefile.common index f80c056bdb7..7e206ae9e33 100644 --- a/meta-pkgs/boost/Makefile.common +++ b/meta-pkgs/boost/Makefile.common @@ -1,10 +1,10 @@ -# $NetBSD: Makefile.common,v 1.10 2007/02/22 19:30:05 wiz Exp $ +# $NetBSD: Makefile.common,v 1.11 2008/01/04 19:58:41 jmmv Exp $ # BOOST_PACKAGE?= undefined BOOST_COMMENT?= undefined -BOOST_VERSION= 1.33.1 +BOOST_VERSION= 1.34.1 BOOST_SHORT_VERSION= ${BOOST_VERSION:S/./_/:C/\..*$//} DISTNAME= boost_${BOOST_VERSION:S/./_/g} @@ -25,7 +25,7 @@ MAINTAINER= jmmv@NetBSD.org HOMEPAGE= http://www.boost.org/ COMMENT= Free, peer-reviewed portable C++ source libraries ${BOOST_COMMENT} -CONFLICTS+= boost<1.32.0 +CONFLICTS+= boost<1.34.0 DISTINFO_FILE= ${.CURDIR}/../../meta-pkgs/boost/distinfo PATCHDIR= ${.CURDIR}/../../meta-pkgs/boost/patches diff --git a/meta-pkgs/boost/distinfo b/meta-pkgs/boost/distinfo index 818a141e3cb..5e09483305f 100644 --- a/meta-pkgs/boost/distinfo +++ b/meta-pkgs/boost/distinfo @@ -1,16 +1,14 @@ -$NetBSD: distinfo,v 1.10 2006/09/18 22:51:25 joerg Exp $ +$NetBSD: distinfo,v 1.11 2008/01/04 19:58:41 jmmv Exp $ -SHA1 (boost_1_33_1.tar.bz2) = 22682f75ff0d1ea548688e78c8cca83d599ca576 -RMD160 (boost_1_33_1.tar.bz2) = 3d5999d321b558f74d786bec52ee1b1fcd7e7152 -Size (boost_1_33_1.tar.bz2) = 11507161 bytes -SHA1 (patch-aa) = 957dad8d5993f0d28b399eedb2d0ae14ecfebc4c -SHA1 (patch-ab) = 197c51ac67d74923d02f8a9746b5d2e0f7b84736 +SHA1 (boost_1_34_1.tar.bz2) = b771271d5cbd3bdb0f119dd66dfd36bad7a66866 +RMD160 (boost_1_34_1.tar.bz2) = 303327ff852bc19dd7a94657fdef3c56f5882e06 +Size (boost_1_34_1.tar.bz2) = 12986931 bytes SHA1 (patch-ac) = 453d4107df03e96e66cbdbebceebdfcbed2710c1 -SHA1 (patch-ad) = 4d8bd0cea4b6758d52890cec420892f3ece4ea09 -SHA1 (patch-ae) = e557356101204290a70084eb284d90ce8f4cbd71 -SHA1 (patch-af) = 64a6fa2be7a526a0a3e6f47d5f703d7253a51615 -SHA1 (patch-ag) = 6c862a0f50590327344d6973617ccc56df67fa76 -SHA1 (patch-ah) = e16c08bb0f63e63ae082e9d83c588e3adcf9cb3b -SHA1 (patch-ai) = 1e2d946090093bb4b9ab8fa78ccfaa0189b1d145 -SHA1 (patch-aj) = 09d27fc296105d3a8141df26ce3e8942ca973746 -SHA1 (patch-ak) = 9eb5353855d2b9b0638c98ab3fce33ac19e0f29a +SHA1 (patch-ad) = 074db0bdee7ca145cda2c938626b7d5e3e1e7368 +SHA1 (patch-af) = f0a1fc4b9884663fbe5b9613bc61837b8e6e6af1 +SHA1 (patch-ah) = dc5d1d90998aad0f9689470166fd82f1eccdffe3 +SHA1 (patch-ak) = 32785c636ccc9be479db2d40d170f95e77d4e291 +SHA1 (patch-al) = 23756770d17d7958b0b9423e379fe0a1a2dd83f8 +SHA1 (patch-am) = 07f1e1e15d4129c7a8762ad2e81632fdd24e9515 +SHA1 (patch-an) = 91887a9a37e9d891252e0556ee40b58a1c6bc6cf +SHA1 (patch-ao) = a8499a326f72c9fbfd31f0b0f23014729a2a0dae diff --git a/meta-pkgs/boost/patches/patch-aa b/meta-pkgs/boost/patches/patch-aa deleted file mode 100644 index 39dfa037a6a..00000000000 --- a/meta-pkgs/boost/patches/patch-aa +++ /dev/null @@ -1,48 +0,0 @@ -$NetBSD: patch-aa,v 1.3 2006/01/20 20:40:19 jmmv Exp $ - ---- tools/build/v1/gcc-tools.jam.orig 2005-11-19 20:21:16.000000000 +0100 -+++ tools/build/v1/gcc-tools.jam -@@ -123,6 +123,12 @@ else if $(UNIX) - .GCC ?= cc ; - .GXX ?= c++ ; - } -+ case NetBSD : -+ { -+ flags gcc CFLAGS <threading>multi : -pthread ; -+ flags gcc LINKFLAGS <threading>multi : -lpthread ; -+ # there is no -lrt on NetBSD -+ } - case *BSD : - { - flags gcc CFLAGS <threading>multi : -pthread ; -@@ -179,7 +185,11 @@ if $(UNIX) - SONAME = -Wl,-soname, ; - flags gcc OBJCOPY_FLAGS <debug-symbols>on : "--set-section-flags .debug_str=contents,debug" ; - } -- case OpenBSD : -+ case *BSD : -+ { -+ SONAME = -Wl,-soname, ; -+ } -+ case DragonFly : - { - SONAME = -Wl,-soname, ; - } -@@ -420,7 +430,7 @@ rule Link-action - LNOPT on $(<) = "" ; - } - # do we use sonames or not? -- if $(DLLVERSION) && $(TARGET_TYPE) in $(SHARED_TYPES) && ( $(OS) = LINUX || $(OS) = OPENBSD || $(OS) = KFREEBSD ) && ! $(NO_GNU_LN) -+ if $(DLLVERSION) && $(TARGET_TYPE) in $(SHARED_TYPES) && ( $(OS) = DRAGONFLY || $(OS) = FREEBSD || $(OS) = LINUX || $(OS) = NETBSD || $(OS) = OPENBSD || $(OS) = KFREEBSD ) && ! $(NO_GNU_LN) - { - OUTTAG on $(<) = ".$(DLLVERSION)" ; - SOTAG on $(<) = ".$(DLLVERSION)" ; -@@ -466,7 +476,7 @@ rule Link-action - gcc-spawn $(<) ; - gcc-Link-action $(<) : $(>) ; - -- if $(DLLVERSION) && $(TARGET_TYPE) in $(SHARED_TYPES) && ( $(OS) = LINUX || $(OS) = OPENBSD || $(OS) = KFREEBSD ) && ! $(NO_GNU_LN) -+ if $(DLLVERSION) && $(TARGET_TYPE) in $(SHARED_TYPES) && ( $(OS) = DRAGONFLY || $(OS) = FREEBSD || $(OS) = LINUX || $(OS) = NETBSD || $(OS) = OPENBSD || $(OS) = KFREEBSD ) && ! $(NO_GNU_LN) - { - return "$(<[1]).$(DLLVERSION)" ; - } diff --git a/meta-pkgs/boost/patches/patch-ab b/meta-pkgs/boost/patches/patch-ab deleted file mode 100644 index 3d1929058e8..00000000000 --- a/meta-pkgs/boost/patches/patch-ab +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ab,v 1.1 2005/02/26 22:48:34 jmmv Exp $ - ---- libs/config/test/boost_no_cwchar.ipp.orig 2003-10-14 12:33:07.000000000 +0200 -+++ libs/config/test/boost_no_cwchar.ipp -@@ -18,7 +18,7 @@ int test() - { - wchar_t c1[2] = { 0 }; - wchar_t c2[2] = { 0 }; -- if(wcscmp(c1,c2) || wcslen(c1)) return -1; -+ if(std::wcscmp(c1,c2) || std::wcslen(c1)) return -1; - wcscpy(c1,c2); - wcsxfrm(c1,c2,0); - return 0; diff --git a/meta-pkgs/boost/patches/patch-ad b/meta-pkgs/boost/patches/patch-ad index ee5d77c5720..2ce7e848eca 100644 --- a/meta-pkgs/boost/patches/patch-ad +++ b/meta-pkgs/boost/patches/patch-ad @@ -1,13 +1,13 @@ -$NetBSD: patch-ad,v 1.4 2006/01/21 09:02:16 jmmv Exp $ +$NetBSD: patch-ad,v 1.5 2008/01/04 19:58:41 jmmv Exp $ ---- boost/config/suffix.hpp.orig 2006-01-20 21:59:33.000000000 +0100 +--- boost/config/suffix.hpp.orig 2007-10-13 15:10:16.000000000 +0200 +++ boost/config/suffix.hpp -@@ -213,7 +213,7 @@ +@@ -207,7 +207,7 @@ // from here then add to the appropriate compiler section): // #if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \ - || defined(_PTHREADS)) && !defined(BOOST_HAS_THREADS) -+ || defined(_PTHREADS) || defined(__DragonFly__) || defined(__APPLE__)) && !defined(BOOST_HAS_THREADS) ++ || defined(_PTHREADS) || defined(__APPLE__) || defined(__DragonFly__)) && !defined(BOOST_HAS_THREADS) # define BOOST_HAS_THREADS #endif diff --git a/meta-pkgs/boost/patches/patch-ae b/meta-pkgs/boost/patches/patch-ae deleted file mode 100644 index cb46b29391c..00000000000 --- a/meta-pkgs/boost/patches/patch-ae +++ /dev/null @@ -1,21 +0,0 @@ -$NetBSD: patch-ae,v 1.4 2006/01/21 10:12:40 jmmv Exp $ - ---- tools/build/v1/darwin-tools.jam.orig 2005-05-11 08:15:20.000000000 +0200 -+++ tools/build/v1/darwin-tools.jam -@@ -149,6 +149,7 @@ if -bind_at_load in $(.LINKFLAGS) - .LINKFLAGS = [ difference $(.LINKFLAGS) : -bind_at_load ] ; - } - flags darwin LINKFLAGS : $(.LINKFLAGS) ; -+flags darwin LINKFLAGS : -flat_namespace -undefined suppress ; - - - #### Link #### -@@ -187,7 +188,7 @@ actions darwin-Link-DyLib-action bind NE - && \ - $(.GCC_BIN_DIR)$(.GXX) $(LINKFLAGS) -o "$(<[1])" "$(<[1]:S=.lo)" \ - -F$(FRAMEWORKS:D) -framework$(_)$(FRAMEWORKS:D=) \ -- -L"$(LIBPATH:T)" -L"$(STDLIBPATH:T)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) -dynamiclib -install_name "$(<[1]:D=:S=.dylib)" \ -+ -L"$(LIBPATH:T)" -L"$(STDLIBPATH:T)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) -dynamiclib -install_name "$(TARGET_LIBDIR)/$(<[1]:D=:S=.dylib)" \ - && \ - rm -f "$(<[1]:S=.lo)" - } diff --git a/meta-pkgs/boost/patches/patch-af b/meta-pkgs/boost/patches/patch-af index 6c239de3058..288719240bd 100644 --- a/meta-pkgs/boost/patches/patch-af +++ b/meta-pkgs/boost/patches/patch-af @@ -1,24 +1,13 @@ -$NetBSD: patch-af,v 1.2 2006/01/20 20:40:19 jmmv Exp $ +$NetBSD: patch-af,v 1.3 2008/01/04 19:58:42 jmmv Exp $ ---- boost/config/platform/bsd.hpp.orig 2005-08-24 17:45:17.000000000 +0200 +--- boost/config/platform/bsd.hpp.orig 2006-02-16 12:05:44.000000000 +0100 +++ boost/config/platform/bsd.hpp -@@ -23,6 +23,10 @@ - #define BOOST_PLATFORM "DragonFly " BOOST_STRINGIZE(__DragonFly__) - #endif - -+#if defined(__DragonFly__) -+#define _REENTRANT 1 -+#endif -+ - // - // is this the correct version check? - // FreeBSD has <nl_types.h> but does not -@@ -36,20 +40,20 @@ +@@ -36,20 +36,20 @@ // FreeBSD 3.x has pthreads support, but defines _POSIX_THREADS in <pthread.h> // and not in <unistd.h> // --#if defined(__FreeBSD__) && (__FreeBSD__ <= 3) -+#if defined(__DragonFly__) || defined(__FreeBSD__) && (__FreeBSD__ <= 3) +-#if (defined(__FreeBSD__) && (__FreeBSD__ <= 3)) || defined(__OpenBSD__) ++#if (defined(__FreeBSD__) && (__FreeBSD__ <= 3)) || defined(__OpenBSD__) || defined(__DragonFly__) # define BOOST_HAS_PTHREADS #endif @@ -26,7 +15,7 @@ $NetBSD: patch-af,v 1.2 2006/01/20 20:40:19 jmmv Exp $ // No wide character support in the BSD header files: // -#if !(defined(__FreeBSD__) && (__FreeBSD__ >= 5)) -+#if !((defined(__FreeBSD__) && (__FreeBSD__ >= 5))) && !defined(__DragonFly__) ++#if !(defined(__FreeBSD__) && (__FreeBSD__ >= 5)) && !defined(__DragonFly__) # define BOOST_NO_CWCHAR #endif // diff --git a/meta-pkgs/boost/patches/patch-ag b/meta-pkgs/boost/patches/patch-ag deleted file mode 100644 index bf86a0a492e..00000000000 --- a/meta-pkgs/boost/patches/patch-ag +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-ag,v 1.3 2006/01/21 09:02:16 jmmv Exp $ - ---- tools/build/v1/boost-base.jam.orig 2006-01-21 00:28:08.000000000 +0100 -+++ tools/build/v1/boost-base.jam -@@ -2616,6 +2616,7 @@ rule common-variant-tag ( toolset varian - - local thread-tag = ; - if <threading>multi in $(properties) { thread-tag = mt ; } -+ if $(OS) = MACOSX { thread-tag = mt ; } - - local runtime-tag = ; - if <runtime-link>static in $(properties) { runtime-tag += s ; } diff --git a/meta-pkgs/boost/patches/patch-ah b/meta-pkgs/boost/patches/patch-ah index 8ad7606d91d..0ed927c7f67 100644 --- a/meta-pkgs/boost/patches/patch-ah +++ b/meta-pkgs/boost/patches/patch-ah @@ -1,7 +1,7 @@ -$NetBSD: patch-ah,v 1.1 2006/01/12 22:48:46 joerg Exp $ +$NetBSD: patch-ah,v 1.2 2008/01/04 19:58:42 jmmv Exp $ ---- tools/build/jam_src/jam.h.orig 2006-01-12 21:30:50.000000000 +0000 -+++ tools/build/jam_src/jam.h +--- tools/jam/src/jam.h.orig 2005-10-16 17:34:27.000000000 +0200 ++++ tools/jam/src/jam.h @@ -250,8 +250,8 @@ # define OS_FREEBSD # endif @@ -13,7 +13,7 @@ $NetBSD: patch-ah,v 1.1 2006/01/12 22:48:46 joerg Exp $ # endif # ifdef __DGUX__ # define OSMINOR "OS=DGUX" -@@ -415,7 +415,7 @@ +@@ -419,7 +419,7 @@ # if !defined(OS_BSDI) && \ !defined(OS_FREEBSD) && \ @@ -22,7 +22,7 @@ $NetBSD: patch-ah,v 1.1 2006/01/12 22:48:46 joerg Exp $ !defined(OS_NEXT) && \ !defined(OS_MACHTEN) && \ !defined(OS_MACOSX) && \ -@@ -448,7 +448,7 @@ +@@ -452,7 +452,7 @@ defined( __i386__ ) || \ defined( _M_IX86 ) # if !defined( OS_FREEBSD ) && \ diff --git a/meta-pkgs/boost/patches/patch-ai b/meta-pkgs/boost/patches/patch-ai deleted file mode 100644 index afa27ae3092..00000000000 --- a/meta-pkgs/boost/patches/patch-ai +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-ai,v 1.1 2006/08/24 08:45:35 jmmv Exp $ - ---- boost/python/converter/rvalue_from_python_data.hpp.orig 2006-08-23 23:48:06.000000000 +0200 -+++ boost/python/converter/rvalue_from_python_data.hpp -@@ -94,7 +94,9 @@ struct rvalue_from_python_data : rvalue_ - # if (!defined(__MWERKS__) || __MWERKS__ >= 0x3000) \ - && (!defined(__EDG_VERSION__) || __EDG_VERSION__ >= 245) \ - && (!defined(__DECCXX_VER) || __DECCXX_VER > 60590014) \ -- && !defined(BOOST_PYTHON_SYNOPSIS) /* Synopsis' OpenCXX has trouble parsing this */ -+ && !defined(BOOST_PYTHON_SYNOPSIS) /* Synopsis' OpenCXX has trouble parsing this */ \ -+ && !(BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, == 4)) \ -+ && !(BOOST_WORKAROUND(__GNUC__, == 4)) - // This must always be a POD struct with m_data its first member. - BOOST_STATIC_ASSERT(BOOST_PYTHON_OFFSETOF(rvalue_from_python_storage<T>,stage1) == 0); - # endif diff --git a/meta-pkgs/boost/patches/patch-aj b/meta-pkgs/boost/patches/patch-aj deleted file mode 100644 index 04fb3dab277..00000000000 --- a/meta-pkgs/boost/patches/patch-aj +++ /dev/null @@ -1,21 +0,0 @@ -$NetBSD: patch-aj,v 1.1 2006/08/24 08:45:35 jmmv Exp $ - ---- boost/python/object/instance.hpp.orig 2006-08-23 23:48:06.000000000 +0200 -+++ boost/python/object/instance.hpp -@@ -41,9 +41,16 @@ struct additional_instance_size - { - typedef instance<Data> instance_data; - typedef instance<char> instance_char; -+#if !(BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, == 4)) \ -+ && !(BOOST_WORKAROUND(__GNUC__, == 4)) - BOOST_STATIC_CONSTANT( - std::size_t, value = sizeof(instance_data) - - BOOST_PYTHON_OFFSETOF(instance_char,storage)); -+#else -+ BOOST_STATIC_CONSTANT( -+ std::size_t, value = sizeof(instance_data) -+ - (sizeof(PyVarObject) + sizeof(PyObject*) + sizeof(PyObject*) + sizeof(instance_holder*))); -+#endif - }; - - }}} // namespace boost::python::object diff --git a/meta-pkgs/boost/patches/patch-ak b/meta-pkgs/boost/patches/patch-ak index 37e4de4262c..046a7c96f48 100644 --- a/meta-pkgs/boost/patches/patch-ak +++ b/meta-pkgs/boost/patches/patch-ak @@ -1,13 +1,13 @@ -$NetBSD: patch-ak,v 1.1 2006/09/18 22:51:25 joerg Exp $ +$NetBSD: patch-ak,v 1.2 2008/01/04 19:58:42 jmmv Exp $ ---- boost/wave/token_ids.hpp.orig 2006-09-18 22:37:11.000000000 +0000 +--- boost/wave/token_ids.hpp.orig 2006-12-20 17:38:24.000000000 +0100 +++ boost/wave/token_ids.hpp -@@ -23,7 +23,7 @@ +@@ -27,7 +27,7 @@ #if !defined(BOOST_WAVE_TOKEN_IDS_DEFINED) #define BOOST_WAVE_TOKEN_IDS_DEFINED -#if defined (__FreeBSD__) && defined (T_DIVIDE) -+#if (defined (__FreeBSD__) || defined(__DragonFly__)) && defined (T_DIVIDE) ++#if (defined (__FreeBSD__) || defined (__DragonFly__)) && defined (T_DIVIDE) #undef T_DIVIDE #endif diff --git a/meta-pkgs/boost/patches/patch-al b/meta-pkgs/boost/patches/patch-al new file mode 100644 index 00000000000..38ec3782917 --- /dev/null +++ b/meta-pkgs/boost/patches/patch-al @@ -0,0 +1,42 @@ +$NetBSD: patch-al,v 1.1 2008/01/04 19:58:42 jmmv Exp $ + +--- Jamfile.v2.orig ++++ Jamfile.v2 +@@ -106,6 +106,9 @@ + + constant BOOST_VERSION_TAG : $(version-tag:J="_") ; + ++local PREFIX = [ os.environ PREFIX ] ; ++local COMPILER_RPATH_FLAG = [ os.environ COMPILER_RPATH_FLAG ] ; ++ + local default-build ; + if $(__file__:D) = "" + { +@@ -113,6 +116,7 @@ + debug release + <threading>single <threading>multi + <link>shared <link>static ++ <linkflags>$(COMPILER_RPATH_FLAG)$(PREFIX)/lib + ; + + if [ os.name ] = NT +@@ -215,7 +216,7 @@ + EXIT ; + } + local wrong = [ set.difference $(without-parameter) : $(existing-libraries) ] ; +- if $(wrong) ++ if $(without-parameter) != * && $(wrong) + { + ECHO "error: wrong library name '$(wrong[1])' in the --without-<library> option." ; + EXIT ; +@@ -225,6 +226,10 @@ + { + return [ set.intersection $(existing-libraries) : $(with-parameter) ] ; + } ++ else if $(without-parameter) = * ++ { ++ return [ set.difference "" : "" ] ; ++ } + else + { + return [ set.difference $(existing-libraries) : $(without-parameter) ] ; diff --git a/meta-pkgs/boost/patches/patch-am b/meta-pkgs/boost/patches/patch-am new file mode 100644 index 00000000000..33c01da41a6 --- /dev/null +++ b/meta-pkgs/boost/patches/patch-am @@ -0,0 +1,12 @@ +$NetBSD: patch-am,v 1.1 2008/01/04 19:58:43 jmmv Exp $ + +--- tools/build/v2/tools/python.jam.orig 2007-09-22 22:13:17.000000000 +0200 ++++ tools/build/v2/tools/python.jam +@@ -622,6 +622,7 @@ local rule system-library-dependencies ( + + case qnx* : return ; + case darwin : return ; ++ case netbsd : return ; + case windows : return ; + + case hpux : return <library>rt ; diff --git a/meta-pkgs/boost/patches/patch-an b/meta-pkgs/boost/patches/patch-an new file mode 100644 index 00000000000..f396ab73481 --- /dev/null +++ b/meta-pkgs/boost/patches/patch-an @@ -0,0 +1,160 @@ +$NetBSD: patch-an,v 1.1 2008/01/04 19:58:43 jmmv Exp $ + +Critical fix for Boost.Function, which addresses a problem in multi-threaded +applications. Generated from complete file posted at: + +http://boost.org/function-1-34-fix/function_base.hpp + +--- boost/function/function_base.hpp 2006-10-13 16:29:45.000000000 +0200 ++++ boost/function/function_base.hpp 2008-01-04 16:21:22.000000000 +0100 +@@ -15,6 +15,7 @@ + #include <memory> + #include <new> + #include <typeinfo> ++#include <functional> // unary_function, binary_function + #include <boost/config.hpp> + #include <boost/assert.hpp> + #include <boost/type_traits/is_integral.hpp> +@@ -30,6 +31,20 @@ + #endif + #include <boost/function_equal.hpp> + ++#if defined(BOOST_MSVC) ++# pragma warning( push ) ++# pragma warning( disable : 4793 ) // complaint about native code generation ++# pragma warning( disable : 4127 ) // "conditional expression is constant" ++#endif ++ ++// Define BOOST_FUNCTION_STD_NS to the namespace that contains type_info. ++#ifdef BOOST_NO_EXCEPTION_STD_NAMESPACE ++// Embedded VC++ does not have type_info in namespace std ++# define BOOST_FUNCTION_STD_NS ++#else ++# define BOOST_FUNCTION_STD_NS std ++#endif ++ + // Borrowed from Boost.Python library: determines the cases where we + // need to use std::type_info::name to compare instead of operator==. + # if (defined(__GNUC__) && __GNUC__ >= 3) \ +@@ -59,7 +74,7 @@ namespace boost { namespace python { nam + + #if defined (BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + || defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG) \ +- || !(BOOST_STRICT_CONFIG || !defined(__SUNPRO_CC) || __SUNPRO_CC > 0x540) ++ || !(defined(BOOST_STRICT_CONFIG) || !defined(__SUNPRO_CC) || __SUNPRO_CC > 0x540) + # define BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX + #endif + +@@ -198,8 +213,8 @@ namespace boost { + struct reference_manager + { + static inline void +- get(const function_buffer& in_buffer, function_buffer& out_buffer, +- functor_manager_operation_type op) ++ manage(const function_buffer& in_buffer, function_buffer& out_buffer, ++ functor_manager_operation_type op) + { + switch (op) { + case clone_functor_tag: +@@ -215,8 +230,8 @@ namespace boost { + // DPG TBD: Since we're only storing a pointer, it's + // possible that the user could ask for a base class or + // derived class. Is that okay? +- const std::type_info& check_type = +- *static_cast<const std::type_info*>(out_buffer.const_obj_ptr); ++ const BOOST_FUNCTION_STD_NS::type_info& check_type = ++ *static_cast<const BOOST_FUNCTION_STD_NS::type_info*>(out_buffer.const_obj_ptr); + if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, typeid(F))) + out_buffer.obj_ptr = in_buffer.obj_ptr; + else +@@ -265,8 +280,8 @@ namespace boost { + else if (op == destroy_functor_tag) + out_buffer.func_ptr = 0; + else /* op == check_functor_type_tag */ { +- const std::type_info& check_type = +- *static_cast<const std::type_info*>(out_buffer.const_obj_ptr); ++ const BOOST_FUNCTION_STD_NS::type_info& check_type = ++ *static_cast<const BOOST_FUNCTION_STD_NS::type_info*>(out_buffer.const_obj_ptr); + if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, typeid(Functor))) + out_buffer.obj_ptr = &in_buffer.func_ptr; + else +@@ -287,8 +302,8 @@ namespace boost { + // Some compilers (Borland, vc6, ...) are unhappy with ~functor_type. + reinterpret_cast<functor_type*>(&out_buffer.data)->~Functor(); + } else /* op == check_functor_type_tag */ { +- const std::type_info& check_type = +- *static_cast<const std::type_info*>(out_buffer.const_obj_ptr); ++ const BOOST_FUNCTION_STD_NS::type_info& check_type = ++ *static_cast<const BOOST_FUNCTION_STD_NS::type_info*>(out_buffer.const_obj_ptr); + if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, typeid(Functor))) + out_buffer.obj_ptr = &in_buffer.data; + else +@@ -348,8 +363,8 @@ namespace boost { + # endif // BOOST_NO_STD_ALLOCATOR + out_buffer.obj_ptr = 0; + } else /* op == check_functor_type_tag */ { +- const std::type_info& check_type = +- *static_cast<const std::type_info*>(out_buffer.const_obj_ptr); ++ const BOOST_FUNCTION_STD_NS::type_info& check_type = ++ *static_cast<const BOOST_FUNCTION_STD_NS::type_info*>(out_buffer.const_obj_ptr); + if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, typeid(Functor))) + out_buffer.obj_ptr = in_buffer.obj_ptr; + else +@@ -368,6 +383,15 @@ namespace boost { + mpl::bool_<(function_allows_small_object_optimization<functor_type>::value)>()); + } + ++ // For member pointers, we treat them as function objects with ++ // the small-object optimization always enabled. ++ static inline void ++ manager(const function_buffer& in_buffer, function_buffer& out_buffer, ++ functor_manager_operation_type op, member_ptr_tag) ++ { ++ manager(in_buffer, out_buffer, op, mpl::true_()); ++ } ++ + public: + /* Dispatch to an appropriate manager based on whether we have a + function pointer or a function object pointer. */ +@@ -456,7 +480,6 @@ namespace boost { + */ + struct vtable_base + { +- vtable_base() : manager(0) { } + void (*manager)(const function_buffer& in_buffer, + function_buffer& out_buffer, + functor_manager_operation_type op); +@@ -480,13 +503,13 @@ public: + + /** Retrieve the type of the stored function object, or typeid(void) + if this is empty. */ +- const std::type_info& target_type() const ++ const BOOST_FUNCTION_STD_NS::type_info& target_type() const + { + if (!vtable) return typeid(void); + + detail::function::function_buffer type; + vtable->manager(functor, type, detail::function::get_functor_type_tag); +- return *static_cast<const std::type_info*>(type.const_obj_ptr); ++ return *static_cast<const BOOST_FUNCTION_STD_NS::type_info*>(type.const_obj_ptr); + } + + template<typename Functor> +@@ -558,7 +581,7 @@ public: + #endif + + public: // should be protected, but GCC 2.95.3 will fail to allow access +- detail::function::vtable_base* vtable; ++ const detail::function::vtable_base* vtable; + mutable detail::function::function_buffer functor; + }; + +@@ -733,4 +756,8 @@ namespace detail { + #undef BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL + #undef BOOST_FUNCTION_COMPARE_TYPE_ID + ++#if defined(BOOST_MSVC) ++# pragma warning( pop ) ++#endif ++ + #endif // BOOST_FUNCTION_BASE_HEADER diff --git a/meta-pkgs/boost/patches/patch-ao b/meta-pkgs/boost/patches/patch-ao new file mode 100644 index 00000000000..7fdcf451aad --- /dev/null +++ b/meta-pkgs/boost/patches/patch-ao @@ -0,0 +1,556 @@ +$NetBSD: patch-ao,v 1.1 2008/01/04 19:58:43 jmmv Exp $ + +Critical fix for Boost.Function, which addresses a problem in multi-threaded +applications. Generated from complete file posted at: + +http://boost.org/function-1-34-fix/function_template.hpp + +--- boost/function/function_template.hpp 2006-09-29 19:23:28.000000000 +0200 ++++ boost/function/function_template.hpp 2008-01-04 16:21:27.000000000 +0100 +@@ -11,6 +11,11 @@ + // protection. + #include <boost/function/detail/prologue.hpp> + ++#if defined(BOOST_MSVC) ++# pragma warning( push ) ++# pragma warning( disable : 4127 ) // "conditional expression is constant" ++#endif ++ + #define BOOST_FUNCTION_TEMPLATE_PARMS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, typename T) + + #define BOOST_FUNCTION_TEMPLATE_ARGS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, T) +@@ -54,12 +59,20 @@ + BOOST_JOIN(function_ref_invoker,BOOST_FUNCTION_NUM_ARGS) + #define BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER \ + BOOST_JOIN(void_function_ref_invoker,BOOST_FUNCTION_NUM_ARGS) ++#define BOOST_FUNCTION_MEMBER_INVOKER \ ++ BOOST_JOIN(member_invoker,BOOST_FUNCTION_NUM_ARGS) ++#define BOOST_FUNCTION_VOID_MEMBER_INVOKER \ ++ BOOST_JOIN(void_member_invoker,BOOST_FUNCTION_NUM_ARGS) + #define BOOST_FUNCTION_GET_FUNCTION_INVOKER \ + BOOST_JOIN(get_function_invoker,BOOST_FUNCTION_NUM_ARGS) + #define BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER \ + BOOST_JOIN(get_function_obj_invoker,BOOST_FUNCTION_NUM_ARGS) + #define BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER \ + BOOST_JOIN(get_function_ref_invoker,BOOST_FUNCTION_NUM_ARGS) ++#define BOOST_FUNCTION_GET_MEMBER_INVOKER \ ++ BOOST_JOIN(get_member_invoker,BOOST_FUNCTION_NUM_ARGS) ++#define BOOST_FUNCTION_GET_INVOKER \ ++ BOOST_JOIN(get_invoker,BOOST_FUNCTION_NUM_ARGS) + #define BOOST_FUNCTION_VTABLE BOOST_JOIN(basic_vtable,BOOST_FUNCTION_NUM_ARGS) + + #ifndef BOOST_NO_VOID_RETURNS +@@ -70,16 +83,6 @@ + # define BOOST_FUNCTION_RETURN(X) X; return BOOST_FUNCTION_VOID_RETURN_TYPE () + #endif + +-#ifdef BOOST_MSVC +-# pragma warning(push) +-# pragma warning(disable: 4127) // conditional expression is constant. +-#endif +- +-#ifdef BOOST_MSVC +-# pragma warning(push) +-# pragma warning(disable: 4127) // conditional expression is constant. +-#endif +- + namespace boost { + namespace detail { + namespace function { +@@ -191,6 +194,44 @@ namespace boost { + } + }; + ++#if BOOST_FUNCTION_NUM_ARGS > 0 ++ /* Handle invocation of member pointers. */ ++ template< ++ typename MemberPtr, ++ typename R BOOST_FUNCTION_COMMA ++ BOOST_FUNCTION_TEMPLATE_PARMS ++ > ++ struct BOOST_FUNCTION_MEMBER_INVOKER ++ { ++ static R invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA ++ BOOST_FUNCTION_PARMS) ++ ++ { ++ MemberPtr* f = ++ reinterpret_cast<MemberPtr*>(&function_obj_ptr.data); ++ return boost::mem_fn(*f)(BOOST_FUNCTION_ARGS); ++ } ++ }; ++ ++ template< ++ typename MemberPtr, ++ typename R BOOST_FUNCTION_COMMA ++ BOOST_FUNCTION_TEMPLATE_PARMS ++ > ++ struct BOOST_FUNCTION_VOID_MEMBER_INVOKER ++ { ++ static BOOST_FUNCTION_VOID_RETURN_TYPE ++ invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA ++ BOOST_FUNCTION_PARMS) ++ ++ { ++ MemberPtr* f = ++ reinterpret_cast<MemberPtr*>(&function_obj_ptr.data); ++ BOOST_FUNCTION_RETURN(boost::mem_fn(*f)(BOOST_FUNCTION_ARGS)); ++ } ++ }; ++#endif ++ + template< + typename FunctionPtr, + typename R BOOST_FUNCTION_COMMA +@@ -254,12 +295,130 @@ namespace boost { + >::type type; + }; + ++#if BOOST_FUNCTION_NUM_ARGS > 0 ++ /* Retrieve the appropriate invoker for a member pointer. */ ++ template< ++ typename MemberPtr, ++ typename R BOOST_FUNCTION_COMMA ++ BOOST_FUNCTION_TEMPLATE_PARMS ++ > ++ struct BOOST_FUNCTION_GET_MEMBER_INVOKER ++ { ++ typedef typename mpl::if_c<(is_void<R>::value), ++ BOOST_FUNCTION_VOID_MEMBER_INVOKER< ++ MemberPtr, ++ R BOOST_FUNCTION_COMMA ++ BOOST_FUNCTION_TEMPLATE_ARGS ++ >, ++ BOOST_FUNCTION_MEMBER_INVOKER< ++ MemberPtr, ++ R BOOST_FUNCTION_COMMA ++ BOOST_FUNCTION_TEMPLATE_ARGS ++ > ++ >::type type; ++ }; ++#endif ++ ++ /* Given the tag returned by get_function_tag, retrieve the ++ actual invoker that will be used for the given function ++ object. ++ ++ Each specialization contains an "apply" nested class template ++ that accepts the function object, return type, function ++ argument types, and allocator. The resulting "apply" class ++ contains two typedefs, "invoker_type" and "manager_type", ++ which correspond to the invoker and manager types. */ ++ template<typename Tag> ++ struct BOOST_FUNCTION_GET_INVOKER { }; ++ ++ /* Retrieve the invoker for a function pointer. */ ++ template<> ++ struct BOOST_FUNCTION_GET_INVOKER<function_ptr_tag> ++ { ++ template<typename FunctionPtr, ++ typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS, ++ typename Allocator> ++ struct apply ++ { ++ typedef typename BOOST_FUNCTION_GET_FUNCTION_INVOKER< ++ FunctionPtr, ++ R BOOST_FUNCTION_COMMA ++ BOOST_FUNCTION_TEMPLATE_ARGS ++ >::type ++ invoker_type; ++ ++ typedef functor_manager<FunctionPtr, Allocator> manager_type; ++ }; ++ }; ++ ++#if BOOST_FUNCTION_NUM_ARGS > 0 ++ /* Retrieve the invoker for a member pointer. */ ++ template<> ++ struct BOOST_FUNCTION_GET_INVOKER<member_ptr_tag> ++ { ++ template<typename MemberPtr, ++ typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS, ++ typename Allocator> ++ struct apply ++ { ++ typedef typename BOOST_FUNCTION_GET_MEMBER_INVOKER< ++ MemberPtr, ++ R BOOST_FUNCTION_COMMA ++ BOOST_FUNCTION_TEMPLATE_ARGS ++ >::type ++ invoker_type; ++ ++ typedef functor_manager<MemberPtr, Allocator> manager_type; ++ }; ++ }; ++#endif ++ ++ /* Retrieve the invoker for a function object. */ ++ template<> ++ struct BOOST_FUNCTION_GET_INVOKER<function_obj_tag> ++ { ++ template<typename FunctionObj, ++ typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS, ++ typename Allocator> ++ struct apply ++ { ++ typedef typename BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER< ++ FunctionObj, ++ R BOOST_FUNCTION_COMMA ++ BOOST_FUNCTION_TEMPLATE_ARGS ++ >::type ++ invoker_type; ++ ++ typedef functor_manager<FunctionObj, Allocator> manager_type; ++ }; ++ }; ++ ++ /* Retrieve the invoker for a reference to a function object. */ ++ template<> ++ struct BOOST_FUNCTION_GET_INVOKER<function_obj_ref_tag> ++ { ++ template<typename RefWrapper, ++ typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS, ++ typename Allocator> ++ struct apply ++ { ++ typedef typename BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER< ++ typename RefWrapper::type, ++ R BOOST_FUNCTION_COMMA ++ BOOST_FUNCTION_TEMPLATE_ARGS ++ >::type ++ invoker_type; ++ ++ typedef reference_manager<typename RefWrapper::type> manager_type; ++ }; ++ }; ++ + /** + * vtable for a specific boost::function instance. + */ + template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS, + typename Allocator> +- struct BOOST_FUNCTION_VTABLE : vtable_base ++ struct BOOST_FUNCTION_VTABLE + { + #ifndef BOOST_NO_VOID_RETURNS + typedef R result_type; +@@ -272,50 +431,25 @@ namespace boost { + BOOST_FUNCTION_TEMPLATE_ARGS); + + template<typename F> +- BOOST_FUNCTION_VTABLE(F f) : vtable_base(), invoker(0) +- { +- init(f); +- } +- +- template<typename F> +- bool assign_to(F f, function_buffer& functor) ++ bool assign_to(const F& f, function_buffer& functor) const + { + typedef typename get_function_tag<F>::type tag; + return assign_to(f, functor, tag()); + } + +- void clear(function_buffer& functor) ++ void clear(function_buffer& functor) const + { +- if (manager) +- manager(functor, functor, destroy_functor_tag); ++ if (base.manager) ++ base.manager(functor, functor, destroy_functor_tag); + } +- ++#ifndef BOOST_NO_PRIVATE_IN_AGGREGATE + private: +- template<typename F> +- void init(F f) +- { +- typedef typename get_function_tag<F>::type tag; +- init(f, tag()); +- } +- ++#endif + // Function pointers + template<typename FunctionPtr> +- void init(FunctionPtr /*f*/, function_ptr_tag) +- { +- typedef typename BOOST_FUNCTION_GET_FUNCTION_INVOKER< +- FunctionPtr, +- R BOOST_FUNCTION_COMMA +- BOOST_FUNCTION_TEMPLATE_ARGS +- >::type +- actual_invoker_type; +- +- invoker = &actual_invoker_type::invoke; +- manager = &functor_manager<FunctionPtr, Allocator>::manage; +- } +- +- template<typename FunctionPtr> + bool +- assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag) ++ assign_to(FunctionPtr f, function_buffer& functor, ++ function_ptr_tag) const + { + this->clear(functor); + if (f) { +@@ -331,22 +465,13 @@ namespace boost { + // Member pointers + #if BOOST_FUNCTION_NUM_ARGS > 0 + template<typename MemberPtr> +- void init(MemberPtr f, member_ptr_tag) +- { +- // DPG TBD: Add explicit support for member function +- // objects, so we invoke through mem_fn() but we retain the +- // right target_type() values. +- this->init(mem_fn(f)); +- } +- +- template<typename MemberPtr> +- bool assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag) ++ bool ++ assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag) const + { +- // DPG TBD: Add explicit support for member function +- // objects, so we invoke through mem_fn() but we retain the +- // right target_type() values. + if (f) { +- this->assign_to(mem_fn(f), functor); ++ // Always use the small-object optimization for member ++ // pointers. ++ assign_functor(f, functor, mpl::true_()); + return true; + } else { + return false; +@@ -355,24 +480,11 @@ namespace boost { + #endif // BOOST_FUNCTION_NUM_ARGS > 0 + + // Function objects +- template<typename FunctionObj> +- void init(FunctionObj /*f*/, function_obj_tag) +- { +- typedef typename BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER< +- FunctionObj, +- R BOOST_FUNCTION_COMMA +- BOOST_FUNCTION_TEMPLATE_ARGS +- >::type +- actual_invoker_type; +- +- invoker = &actual_invoker_type::invoke; +- manager = &functor_manager<FunctionObj, Allocator>::manage; +- } +- + // Assign to a function object using the small object optimization + template<typename FunctionObj> + void +- assign_functor(FunctionObj f, function_buffer& functor, mpl::true_) ++ assign_functor(const FunctionObj& f, function_buffer& functor, ++ mpl::true_) const + { + new ((void*)&functor.data) FunctionObj(f); + } +@@ -380,7 +492,8 @@ namespace boost { + // Assign to a function object allocated on the heap. + template<typename FunctionObj> + void +- assign_functor(FunctionObj f, function_buffer& functor, mpl::false_) ++ assign_functor(const FunctionObj& f, function_buffer& functor, ++ mpl::false_) const + { + #ifndef BOOST_NO_STD_ALLOCATOR + typedef typename Allocator::template rebind<FunctionObj>::other +@@ -400,7 +513,8 @@ namespace boost { + + template<typename FunctionObj> + bool +- assign_to(FunctionObj f, function_buffer& functor, function_obj_tag) ++ assign_to(const FunctionObj& f, function_buffer& functor, ++ function_obj_tag) const + { + if (!boost::detail::function::has_empty_target(boost::addressof(f))) { + assign_functor(f, functor, +@@ -413,24 +527,9 @@ namespace boost { + + // Reference to a function object + template<typename FunctionObj> +- void +- init(const reference_wrapper<FunctionObj>& /*f*/, function_obj_ref_tag) +- { +- typedef typename BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER< +- FunctionObj, +- R BOOST_FUNCTION_COMMA +- BOOST_FUNCTION_TEMPLATE_ARGS +- >::type +- actual_invoker_type; +- +- invoker = &actual_invoker_type::invoke; +- manager = &reference_manager<FunctionObj>::get; +- } +- +- template<typename FunctionObj> + bool + assign_to(const reference_wrapper<FunctionObj>& f, +- function_buffer& functor, function_obj_ref_tag) ++ function_buffer& functor, function_obj_ref_tag) const + { + if (!boost::detail::function::has_empty_target(f.get_pointer())) { + // DPG TBD: We might need to detect constness of +@@ -445,6 +544,7 @@ namespace boost { + } + + public: ++ vtable_base base; + invoker_type invoker; + }; + } // end namespace function +@@ -456,6 +556,17 @@ namespace boost { + typename Allocator = BOOST_FUNCTION_DEFAULT_ALLOCATOR + > + class BOOST_FUNCTION_FUNCTION : public function_base ++ ++#if BOOST_FUNCTION_NUM_ARGS == 1 ++ ++ , public std::unary_function<T0,R> ++ ++#elif BOOST_FUNCTION_NUM_ARGS == 2 ++ ++ , public std::binary_function<T0,T1,R> ++ ++#endif ++ + { + public: + #ifndef BOOST_NO_VOID_RETURNS +@@ -537,7 +648,7 @@ namespace boost { + if (this->empty()) + boost::throw_exception(bad_function_call()); + +- return static_cast<vtable_type*>(vtable)->invoker ++ return reinterpret_cast<const vtable_type*>(vtable)->invoker + (this->functor BOOST_FUNCTION_COMMA BOOST_FUNCTION_ARGS); + } + #else +@@ -561,12 +672,16 @@ namespace boost { + operator=(Functor BOOST_FUNCTION_TARGET_FIX(const &) f) + { + this->clear(); ++#ifndef BOOST_NO_EXCEPTIONS + try { + this->assign_to(f); + } catch (...) { + vtable = 0; + throw; + } ++#else ++ this->assign_to(f); ++#endif + return *this; + } + +@@ -592,12 +707,16 @@ namespace boost { + return *this; + + this->clear(); ++#ifndef BOOST_NO_EXCEPTIONS + try { + this->assign_to_own(f); + } catch (...) { + vtable = 0; + throw; + } ++#else ++ this->assign_to_own(f); ++#endif + return *this; + } + +@@ -615,7 +734,7 @@ namespace boost { + void clear() + { + if (vtable) { +- static_cast<vtable_type*>(vtable)->clear(this->functor); ++ reinterpret_cast<const vtable_type*>(vtable)->clear(this->functor); + vtable = 0; + } + } +@@ -650,10 +769,24 @@ namespace boost { + } + + template<typename Functor> +- void assign_to(Functor f) ++ void assign_to(const Functor& f) + { +- static vtable_type stored_vtable(f); +- if (stored_vtable.assign_to(f, functor)) vtable = &stored_vtable; ++ using detail::function::vtable_base; ++ ++ typedef typename detail::function::get_function_tag<Functor>::type tag; ++ typedef detail::function::BOOST_FUNCTION_GET_INVOKER<tag> get_invoker; ++ typedef typename get_invoker:: ++ template apply<Functor, R BOOST_FUNCTION_COMMA ++ BOOST_FUNCTION_TEMPLATE_ARGS, Allocator> ++ handler_type; ++ ++ typedef typename handler_type::invoker_type invoker_type; ++ typedef typename handler_type::manager_type manager_type; ++ ++ static const vtable_type stored_vtable = ++ { { &manager_type::manage }, &invoker_type::invoke }; ++ ++ if (stored_vtable.assign_to(f, functor)) vtable = &stored_vtable.base; + else vtable = 0; + } + }; +@@ -688,7 +821,7 @@ namespace boost { + if (this->empty()) + boost::throw_exception(bad_function_call()); + +- return static_cast<vtable_type*>(vtable)->invoker ++ return reinterpret_cast<const vtable_type*>(vtable)->invoker + (this->functor BOOST_FUNCTION_COMMA BOOST_FUNCTION_ARGS); + } + #endif +@@ -798,21 +931,14 @@ public: + } + }; + +-#ifdef BOOST_MSVC +-# pragma warning(pop) +-#endif +- + #undef BOOST_FUNCTION_PARTIAL_SPEC + #endif // have partial specialization + + } // end namespace boost + +-#ifdef BOOST_MSVC +-# pragma warning(pop) +-#endif +- + // Cleanup after ourselves... + #undef BOOST_FUNCTION_VTABLE ++#undef BOOST_FUNCTION_GET_INVOKER + #undef BOOST_FUNCTION_DEFAULT_ALLOCATOR + #undef BOOST_FUNCTION_COMMA + #undef BOOST_FUNCTION_FUNCTION +@@ -822,10 +948,12 @@ public: + #undef BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER + #undef BOOST_FUNCTION_FUNCTION_REF_INVOKER + #undef BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER ++#undef BOOST_FUNCTION_MEMBER_INVOKER ++#undef BOOST_FUNCTION_VOID_MEMBER_INVOKER + #undef BOOST_FUNCTION_GET_FUNCTION_INVOKER + #undef BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER + #undef BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER +-#undef BOOST_FUNCTION_GET_MEM_FUNCTION_INVOKER ++#undef BOOST_FUNCTION_GET_MEMBER_INVOKER + #undef BOOST_FUNCTION_TEMPLATE_PARMS + #undef BOOST_FUNCTION_TEMPLATE_ARGS + #undef BOOST_FUNCTION_PARMS +@@ -835,3 +963,7 @@ public: + #undef BOOST_FUNCTION_ARG_TYPES + #undef BOOST_FUNCTION_VOID_RETURN_TYPE + #undef BOOST_FUNCTION_RETURN ++ ++#if defined(BOOST_MSVC) ++# pragma warning( pop ) ++#endif |