Add boost package.

This commit is contained in:
Alexpux
2013-11-26 17:10:36 +04:00
parent ca08405b22
commit d26fc9e951
22 changed files with 1736 additions and 0 deletions

176
mingw-w64-boost/PKGBUILD Normal file
View File

@@ -0,0 +1,176 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=boost
_mingw_suff=mingw-w64-${CARCH}
pkgname="${_mingw_suff}-${_realname}"
pkgver=1.55.0
_boostver=${pkgver//./_}
pkgrel=1
pkgdesc="Free peer-reviewed portable C++ source libraries (mingw-w64)"
arch=('any')
url="http://www.boost.org/"
license=('custom')
depends=("${_mingw_suff}-crt" "${_mingw_suff}-zlib" "${_mingw_suff}-bzip2" "${_mingw_suff}-icu")
makedepends=("${_mingw_suff}-gcc" "${_mingw_suff}-bzip2" "${_mingw_suff}-icu")
options=('!strip' '!buildflags' 'staticlibs')
source=(http://downloads.sourceforge.net/sourceforge/boost/boost_${_boostver}.tar.bz2
boost-1.48.0-add-bjam-man-page.patch
boost-1.50.0-fix-non-utf8-files.patch
boost-1.50.0-pool.patch
boost-1.54.0-bind-static_assert.patch
boost-1.54.0-bootstrap.patch
boost-1.54.0-concept-unused_typedef.patch
boost-1.54.0-date_time-unused_typedef-2.patch
boost-1.54.0-date_time-unused_typedef.patch
boost-1.54.0-locale-unused_typedef.patch
boost-1.54.0-math-unused_typedef-2.patch
boost-1.54.0-mpi-unused_typedef.patch
boost-1.54.0-mpl-print.patch
boost-1.54.0-numeric-unused_typedef.patch
boost-1.54.0-property_tree-unused_typedef.patch
boost-1.54.0-python-unused_typedef.patch
boost-1.54.0-random-unused_typedef.patch
boost-1.54.0-spirit-unused_typedef-2.patch
boost-1.54.0-spirit-unused_typedef.patch
boost-1.54.0-static_warning-unused_typedef.patch
boost-1.54.0-tuple-unused_typedef.patch
boost-mingw.patch)
md5sums=('d6eef4b4cacb2183f2bf265a5a03a354'
'dff8166486150121bf89d7050c7e5c49'
'ef427ef3a47f8fdeeb6b4ae3246aa84f'
'a69f826fd911dcf34189aaaacf16853f'
'8b6978fd4ea68bc80b59a96186c8dd4c'
'7a370bc224e59340b723e775d77b22bf'
'0ccf6fc4f24afa513063868c51bddd7e'
'3505488d2674588461fea2a2042de4a8'
'e322f437a7067b30dd13443a3a0fee4a'
'18963bb39f778b0f0ed7894a5b48845d'
'84aeb88d0428267ed9c1e3cf098b93a1'
'fe9a4ef96b48c56c2791598ae19e53cc'
'c3aabfe9baa6ca34187e03fd338366dc'
'dffcb97e434b7017eea1717c2aa8c3ad'
'867983ebe812a2858ed900cb407944b6'
'4e652869f58b4ce601715b9fb2c2b9ee'
'b466c41f2ae6f40da127c4a28f563cee'
'047b713a5cd5d0d2171b2cb7520c233a'
'69521d5d7382793e5ea1da17a6288ccd'
'dbf74ec90edac5439cc96b39b30ba98b'
'c29dbf9746fea0688f87c8668903e12a'
'c003363c91f6f16294a77c5562c80dbd')
prepare() {
cd "${srcdir}/boost_${_boostver}"
patch -p1 -i ${srcdir}/boost-1.50.0-fix-non-utf8-files.patch
patch -p1 -i ${srcdir}/boost-1.48.0-add-bjam-man-page.patch
patch -p1 -i ${srcdir}/boost-1.50.0-pool.patch
patch -p1 -i ${srcdir}/boost-1.54.0-bind-static_assert.patch
patch -p1 -i ${srcdir}/boost-1.54.0-concept-unused_typedef.patch
patch -p1 -i ${srcdir}/boost-1.54.0-mpl-print.patch
patch -p1 -i ${srcdir}/boost-1.54.0-static_warning-unused_typedef.patch
patch -p1 -i ${srcdir}/boost-1.54.0-math-unused_typedef-2.patch
patch -p1 -i ${srcdir}/boost-1.54.0-tuple-unused_typedef.patch
patch -p1 -i ${srcdir}/boost-1.54.0-random-unused_typedef.patch
patch -p1 -i ${srcdir}/boost-1.54.0-date_time-unused_typedef.patch
patch -p1 -i ${srcdir}/boost-1.54.0-date_time-unused_typedef-2.patch
patch -p1 -i ${srcdir}/boost-1.54.0-spirit-unused_typedef.patch
patch -p1 -i ${srcdir}/boost-1.54.0-spirit-unused_typedef-2.patch
patch -p1 -i ${srcdir}/boost-1.54.0-numeric-unused_typedef.patch
patch -p1 -i ${srcdir}/boost-1.54.0-property_tree-unused_typedef.patch
patch -p1 -i ${srcdir}/boost-1.54.0-mpi-unused_typedef.patch
patch -p1 -i ${srcdir}/boost-1.54.0-python-unused_typedef.patch
patch -p1 -i ${srcdir}/boost-mingw.patch
patch -p1 -i ${srcdir}/boost-1.54.0-bootstrap.patch
}
build() {
mkdir -p "${srcdir}/boost-${CARCH}"
lndir "${srcdir}/boost_${_boostver}" "${srcdir}/boost-${CARCH}"
cd "${srcdir}/boost-${CARCH}"
./bootstrap.sh --with-icu=${MINGW_PREFIX}
unset LDFLAGS CPPFLAGS
case ${CARCH} in
i686)
local _model=32
;;
x86_64)
local _model=64
;;
esac
local _bvar="variant=release threading=single,multi threadapi=win32 \
link=shared,static debug-symbols=on pch=off link=shared toolset=gcc"
local _bflag="-d2 --layout=tagged address-model=$( [[ ${CARCH} == i686 ]] && echo 32 || echo 64 ) \
${_bvar} --without-mpi --without-python "
./b2 \
toolset=gcc \
variant=release \
threading=multi \
threadapi=win32 \
link=shared,static \
runtime-link=shared \
--prefix=${pkgdir}${MINGW_PREFIX} \
-sHAVE_ICU=1 \
-sICU_PATH=${MINGW_PREFIX} \
-sICU_LINK="-L${MINGW_PREFIX}/lib -licuuc -licuin -licudt" \
-sICONV_PATH=${MINGW_PREFIX} \
-sICONV_LINK="-L${MINGW_PREFIX}/lib -liconv" \
-sNO_BZIP2 \
-sBZIP2_BINARY=bz2 \
-sBZIP2_INCLUDE=${MINGW_PREFIX}/include \
-sBZIP2_LIBPATH=${MINGW_PREFIX}/lib \
-sNO_ZLIB \
-sZLIB_BINARY=z \
-sZLIB_INCLUDE=${MINGW_PREFIX}/include \
-sZLIB_LIBPATH=${MINGW_PREFIX}/zlib \
pch=off \
-d2 \
--without-mpi \
--without-python \
address-model=${_model} \
--layout=tagged
}
package() {
cd "${srcdir}/boost-${CARCH}"
case ${CARCH} in
i686)
local _model=32
;;
x86_64)
local _model=64
;;
esac
./b2 \
toolset=gcc \
variant=release \
threading=multi \
threadapi=win32 \
link=shared,static \
runtime-link=shared \
--prefix=${pkgdir}${MINGW_PREFIX} \
-sHAVE_ICU=1 \
-sICU_PATH=${MINGW_PREFIX} \
-sICU_LINK="-L${MINGW_PREFIX}/lib -licuuc -licuin -licudt" \
-sICONV_PATH=${MINGW_PREFIX} \
-sICONV_LINK="-L${MINGW_PREFIX}/lib -liconv" \
-sNO_BZIP2 \
-sBZIP2_BINARY=bz2 \
-sBZIP2_INCLUDE=${MINGW_PREFIX}/include \
-sBZIP2_LIBPATH=${MINGW_PREFIX}/lib \
-sNO_ZLIB \
-sZLIB_BINARY=z \
-sZLIB_INCLUDE=${MINGW_PREFIX}/include \
-sZLIB_LIBPATH=${MINGW_PREFIX}/zlib \
--without-mpi \
--without-python \
address-model=${_model} \
--layout=tagged install
mkdir -p ${pkgdir}${MINGW_PREFIX}/bin
mv ${pkgdir}${MINGW_PREFIX}/lib/*.dll ${pkgdir}${MINGW_PREFIX}/bin
strip -x ${pkgdir}${MINGW_PREFIX}/bin/*.dll
strip -g ${pkgdir}${MINGW_PREFIX}/lib/*.a
}

View File

@@ -0,0 +1,150 @@
diff --git a/tools/build/v2/doc/bjam.1 b/tools/build/v2/doc/bjam.1
new file mode 100644
index 0000000..8a44af6
--- /dev/null
+++ b/tools/build/v2/doc/bjam.1
@@ -0,0 +1,144 @@
+.TH "bjam" 1 "Sat Nov 19 2011" "Doxygen" \" -*- nroff -*-
+.ad l
+.nh
+.SH NAME
+bjam \- Command-line utility to build Boost-related C++ projects with Boost\&.Build
+.SH "SYNOPSIS"
+.PP
+\fBbjam\fP \fC[-a] [-dx] [-fx] [-jx] [-lx] [-n] [-ox] [-px] [-q] [-sx=y] [-tx] [-v] [--x]\fP
+.PP
+\fIbjam\fP accepts the following options:
+.PP
+\fB-a\fP
+.br
+ Build all targets, even if they are current
+.PP
+\fB-dx\fP
+.br
+ Set the debug level to x (0-9)
+.PP
+\fB-fx\fP
+.br
+ Read x instead of Jambase
+.PP
+\fB-jx\fP
+.br
+ Run up to x shell commands concurrently
+.PP
+\fB-lx\fP
+.br
+ Limit actions to x number of seconds after which they are stopped
+.PP
+\fB-n\fP
+.br
+ Don't actually execute the updating actions
+.PP
+\fB-ox\fP
+.br
+ Write the updating actions to file x
+.PP
+\fB-px\fP
+.br
+ x=0, pipes action stdout and stderr merged into action output
+.PP
+\fB-q\fP
+.br
+ Quit quickly as soon as a target fails
+.PP
+\fB-sx=y\fP
+.br
+ Set variable x=y, overriding environment
+.PP
+\fB-tx\fP
+.br
+ Rebuild x, even if it is up-to-date
+.PP
+\fB-v\fP
+.br
+ Print the version of jam and exit
+.PP
+\fB--x\fP
+.br
+ Option is ignored
+.SH "DESCRIPTION"
+.PP
+This section provides the information necessary to create your own projects using \fIBoost\&.Build\fP The information provided here is relatively high-level, and Chapter 6, Reference as well as the on-line help system must be used to obtain low-level documentation (see --help)
+.PP
+\fIBoost\&.Build\fP actually consists of two parts - \fIBoost\&.Jam\fP, a build engine with its own interpreted language, and \fIBoost\&.Build\fP itself, implemented in \fIBoost\&.Jam's\fP language\&. The chain of events when you type bjam on the command line is as follows:
+.IP "\(bu" 2
+\fIBoost\&.Jam\fP tries to find \fIBoost\&.Build\fP and loads the top-level module\&. The exact process is described in the section called “Initialization”
+.PP
+.PP
+.IP "\(bu" 2
+The top-level module loads user-defined configuration files, \fIuser-config\&.jam\fP and \fIsite-config\&.jam\fP, which define available toolsets
+.PP
+.PP
+.IP "\(bu" 2
+The \fIJamfile\fP in the current directory is read That in turn might cause reading of further Jamfiles\&. As a result, a tree of projects is created, with targets inside projects
+.PP
+.PP
+.IP "\(bu" 2
+Finally, using the build request specified on the command line, \fIBoost\&.Build\fP decides which targets should be built and how\&. That information is passed back to \fIBoost\&.Jam\fP, which takes care of actually running the scheduled build action commands
+.PP
+.PP
+So, to be able to successfully use \fIBoost\&.Build\fP, you need to know only four things:
+.IP "\(bu" 2
+How to configure \fIBoost\&.Build\fP (http://www.boost.org/boost-build2/doc/html/bbv2/overview/configuration.html)
+.IP "\(bu" 2
+How to declare targets in Jamfiles (http://www.boost.org/boost-build2/doc/html/bbv2/overview/targets.html)
+.IP "\(bu" 2
+How the build process works (http://www.boost.org/boost-build2/doc/html/bbv2/overview/build_process.html)
+.PP
+.PP
+Some Basics about the \fIBoost\&.Jam\fP language\&. See the section called “Boost\&.Jam Language” (http://www.boost.org/boost-build2/doc/html/bbv2/overview/jam_language.html)
+.SH "CONCEPTS"
+.PP
+\fIBoost\&.Build\fP has a few unique concepts that are introduced in this section\&. The best way to explain the concepts is by comparison with more classical build tools
+.PP
+When using any flavour of make, you directly specify targets and commands that are used to create them from other target\&. The below example creates a\&.o from a\&.c using a hardcoded compiler invocation command
+.PP
+a\&.o: a\&.c
+.br
+ g++ -o a\&.o -g a\&.c
+.PP
+This is rather low-level description mechanism and it is hard to adjust commands, options, and sets of created targets depending on the used compiler and operating system\&.
+.PP
+To improve portability, most modern build system provide a set of higher-level functions that can be used in build description files\&. Consider this example:
+.PP
+add_program ('a', 'a\&.c')
+.br
+.PP
+This is a function call that creates targets necessary to create executable file from source file a\&.c\&. Depending on configured properties, different commands line may be used\&. However, \fIadd_program\fP is higher-level, but rather thin level All targets are created immediately when build description is parsed, which makes it impossible to perform multi-variant builds\&. Often, change in any build property requires complete reconfiguration of the build tree
+.PP
+In order to support true multivariant builds, Boost\&.Build introduces the concept of metatarget—object that is created when build description is parsed and can be later called with specific build properties to generate actual targets
+.PP
+Consider an example:
+.PP
+exe a : a\&.cpp ;
+.br
+.PP
+When this declaration is parsed, \fIBoost\&.Build\fP creates a metatarget, but does not yet decides what files must be created, or what commands must be used\&. After all build files are parsed, Boost\&.Build considers properties requested on the command line\&. Supposed you have invoked \fIBoost\&.Build\fP with:
+.PP
+\fIbjam\fP toolset=gcc toolset=msvc
+.br
+.PP
+In that case, the metatarget will be called twice, once with toolset=gcc and once with toolset=msvc\&. Both invocations will produce concrete targets, that will have different extensions and use different command lines\&. Another key concept is build property\&. Build property is a variable that affects the build process\&. It can be specified on the command line, and is passed when calling a metatarget
+.PP
+While all build tools have a similar mechanism, \fIBoost\&.Build\fP differs by requiring that all build properties are declared in advance, and providing a large set of properties with portable semantics
+.PP
+The final concept is property propagation\&. Boost\&.Build does not require that every metatarget is called with the same properties\&. Instead, the 'top-level' metatargets are called with the properties specified on the command line Each metatarget can elect to augment or override some properties (in particular, using the requirements mechanism, see the section called “Requirements”: http://www.boost.org/boost-build2/doc/html/bbv2/overview/targets.html#bbv2.overview.targets.requirements) Then, the dependency metatargets are called with modified properties and produce concrete targets that are then used in build process Of course, dependency metatargets maybe in turn modify build properties and have dependencies of their own\&.
+.PP
+For more in-depth treatment of the requirements and concepts, you may refer to SYRCoSE 2009 Boost\&.Build article (http://syrcose.ispras.ru/2009/files/04_paper.pdf)\&.
+.SH "SEE ALSO"
+.PP
+\fBboost-libraries\fP(3)
+.SH "SUPPORT"
+.PP
+Please report any bugs to https://svn.boost.org/trac/boost/
+.SH "COPYRIGHT"
+.PP
+Boost Software License - Version 1\&.0 - August 17th, 2003
+.PP
+See the LICENSE_1_0\&.txt file for more information on that license, or directly on Internet:
+.br
+ http://www.boost.org/LICENSE_1_0.txt

View File

@@ -0,0 +1,22 @@
diff --git a/libs/units/example/autoprefixes.cpp b/libs/units/example/autoprefixes.cpp
index 8b2bc43..d04f2fe 100644
--- a/libs/units/example/autoprefixes.cpp
+++ b/libs/units/example/autoprefixes.cpp
@@ -67,7 +67,7 @@ struct thing_base_unit : boost::units::base_unit<thing_base_unit, boost::units::
struct euro_base_unit : boost::units::base_unit<euro_base_unit, boost::units::dimensionless_type, 5>
{
static const char* name() { return("EUR"); }
- static const char* symbol() { return("€"); }
+ static const char* symbol() { return("€"); }
};
int main()
@@ -140,7 +140,7 @@ int main()
quantity<euro_base_unit::unit_type> ce = 2048. * euro_base_unit::unit_type();
cout << name_format << engineering_prefix << ce << endl; // 2.048 kiloEUR
- cout << symbol_format << engineering_prefix << ce << endl; // 2.048 k€
+ cout << symbol_format << engineering_prefix << ce << endl; // 2.048 kâ¬
return 0;

View File

@@ -0,0 +1,122 @@
Index: boost/pool/pool.hpp
===================================================================
--- a/boost/pool/pool.hpp (revision 78317)
+++ b/boost/pool/pool.hpp (revision 78326)
@@ -27,4 +27,6 @@
#include <boost/pool/poolfwd.hpp>
+// std::numeric_limits
+#include <boost/limits.hpp>
// boost::math::static_lcm
#include <boost/math/common_factor_ct.hpp>
@@ -358,4 +360,13 @@
}
+ size_type max_chunks() const
+ { //! Calculated maximum number of memory chunks that can be allocated in a single call by this Pool.
+ size_type partition_size = alloc_size();
+ size_type POD_size = math::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
+ size_type max_chunks = (std::numeric_limits<size_type>::max() - POD_size) / alloc_size();
+
+ return max_chunks;
+ }
+
static void * & nextof(void * const ptr)
{ //! \returns Pointer dereferenced.
@@ -377,5 +388,7 @@
//! the first time that object needs to allocate system memory.
//! The default is 32. This parameter may not be 0.
- //! \param nmax_size is the maximum number of chunks to allocate in one block.
+ //! \param nmax_size is the maximum number of chunks to allocate in one block.
+ set_next_size(nnext_size);
+ set_max_size(nmax_size);
}
@@ -400,7 +413,7 @@
}
void set_next_size(const size_type nnext_size)
- { //! Set number of chunks to request from the system the next time that object needs to allocate system memory. This value should never be set to 0.
- //! \returns nnext_size.
- next_size = start_size = nnext_size;
+ { //! Set number of chunks to request from the system the next time that object needs to allocate system memory. This value should never be set to 0.
+ BOOST_USING_STD_MIN();
+ next_size = start_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(nnext_size, max_chunks());
}
size_type get_max_size() const
@@ -410,5 +423,6 @@
void set_max_size(const size_type nmax_size)
{ //! Set max_size.
- max_size = nmax_size;
+ BOOST_USING_STD_MIN();
+ max_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(nmax_size, max_chunks());
}
size_type get_requested_size() const
@@ -713,7 +727,7 @@
BOOST_USING_STD_MIN();
if(!max_size)
- next_size <<= 1;
+ set_next_size(next_size << 1);
else if( next_size*partition_size/requested_size < max_size)
- next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size);
+ set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size));
// initialize it,
@@ -753,7 +767,7 @@
BOOST_USING_STD_MIN();
if(!max_size)
- next_size <<= 1;
+ set_next_size(next_size << 1);
else if( next_size*partition_size/requested_size < max_size)
- next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size);
+ set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size));
// initialize it,
@@ -797,4 +811,6 @@
//! \returns Address of chunk n if allocated ok.
//! \returns 0 if not enough memory for n chunks.
+ if (n > max_chunks())
+ return 0;
const size_type partition_size = alloc_size();
@@ -845,7 +861,7 @@
BOOST_USING_STD_MIN();
if(!max_size)
- next_size <<= 1;
+ set_next_size(next_size << 1);
else if( next_size*partition_size/requested_size < max_size)
- next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size);
+ set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size));
// insert it into the list,
Index: libs/pool/test/test_bug_6701.cpp
===================================================================
--- a/libs/pool/test/test_bug_6701.cpp (revision 78326)
+++ b/libs/pool/test/test_bug_6701.cpp (revision 78326)
@@ -0,0 +1,27 @@
+/* Copyright (C) 2012 Étienne Dupuis
+*
+* Use, modification and distribution is subject to the
+* Boost Software License, Version 1.0. (See accompanying
+* file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+*/
+
+// Test of bug #6701 (https://svn.boost.org/trac/boost/ticket/6701)
+
+#include <boost/pool/object_pool.hpp>
+#include <boost/limits.hpp>
+
+int main()
+{
+ boost::pool<> p(1024, std::numeric_limits<size_t>::max() / 768);
+
+ void *x = p.malloc();
+ BOOST_ASSERT(!x);
+
+ BOOST_ASSERT(std::numeric_limits<size_t>::max() / 1024 >= p.get_next_size());
+ BOOST_ASSERT(std::numeric_limits<size_t>::max() / 1024 >= p.get_max_size());
+
+ void *y = p.ordered_malloc(std::numeric_limits<size_t>::max() / 768);
+ BOOST_ASSERT(!y);
+
+ return 0;
+}

View File

@@ -0,0 +1,21 @@
diff -up a/boost/bind/arg.hpp b/boost/bind/arg.hpp
--- a/boost/bind/arg.hpp 2007-11-25 10:07:19.000000000 -0800
+++ b/boost/bind/arg.hpp 2013-07-18 00:41:41.667412595 -0700
@@ -21,6 +21,7 @@
#include <boost/config.hpp>
#include <boost/is_placeholder.hpp>
+#include <boost/static_assert.hpp>
namespace boost
{
@@ -33,8 +34,7 @@ template< int I > struct arg
template< class T > arg( T const & /* t */ )
{
- // static assert I == is_placeholder<T>::value
- typedef char T_must_be_placeholder[ I == is_placeholder<T>::value? 1: -1 ];
+ BOOST_STATIC_ASSERT(I == is_placeholder<T>::value);
}
};

View File

@@ -0,0 +1,12 @@
diff -aurN boost_1_54_0/bootstrap.sh boost_1_54_0-fixed/bootstrap.sh
--- boost_1_54_0/bootstrap.sh 2013-03-09 14:55:05 -0800
+++ boost_1_54_0-fixed/bootstrap.sh 2013-07-18 00:12:38 -0700
@@ -215,7 +215,7 @@
if test "x$BJAM" = x; then
echo -n "Building Boost.Build engine with toolset $TOOLSET... "
pwd=`pwd`
- (cd "$my_dir/tools/build/v2/engine" && ./build.sh "$TOOLSET") > bootstrap.log 2>&1
+ (cd "$my_dir/tools/build/v2/engine" && ./build.sh mingw) > bootstrap.log 2>&1
if [ $? -ne 0 ]; then
echo
echo "Failed to build Boost.Build build engine"

View File

@@ -0,0 +1,21 @@
diff -up a/boost/concept/detail/general.hpp b/boost/concept/detail/general.hpp
--- a/boost/concept/detail/general.hpp 2010-06-08 12:31:13.000000000 -0700
+++ b/boost/concept/detail/general.hpp 2013-07-18 06:01:05.967747186 -0700
@@ -6,6 +6,7 @@
# include <boost/preprocessor/cat.hpp>
# include <boost/concept/detail/backward_compatibility.hpp>
+# include <boost/static_assert.hpp>
# ifdef BOOST_OLD_CONCEPT_SUPPORT
# include <boost/concept/detail/has_constraints.hpp>
@@ -68,7 +69,8 @@ struct requirement_<void(*)(Model)>
# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
typedef ::boost::concepts::detail::instantiate< \
&::boost::concepts::requirement_<ModelFnPtr>::failed> \
- BOOST_PP_CAT(boost_concept_check,__LINE__)
+ BOOST_PP_CAT(boost_concept_check,__LINE__) \
+ BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE
}}

View File

@@ -0,0 +1,13 @@
diff -up boost_1_54_0/boost/date_time/gregorian/greg_facet.hpp\~ boost_1_54_0/boost/date_time/gregorian/greg_facet.hpp
--- boost_1_54_0/boost/date_time/gregorian/greg_facet.hpp~ 2008-11-23 12:13:35.000000000 +0100
+++ boost_1_54_0/boost/date_time/gregorian/greg_facet.hpp 2013-07-22 23:44:42.834012788 +0200
@@ -215,7 +215,6 @@ namespace gregorian {
{
std::istream_iterator<std::basic_string<charT>, charT> beg(is), eos;
- typedef boost::date_time::all_date_names_put<greg_facet_config, charT> facet_def;
d = from_stream(beg, eos);
return is;
}
Diff finished. Mon Jul 22 23:44:50 2013

View File

@@ -0,0 +1,100 @@
Index: boost/date_time/date_parsing.hpp
===================================================================
--- a/boost/date_time/date_parsing.hpp (revision 85073)
+++ b/boost/date_time/date_parsing.hpp (working copy)
@@ -113,7 +113,6 @@
spec_str = "mdy";
}
- typedef typename date_type::year_type year_type;
typedef typename date_type::month_type month_type;
unsigned pos = 0;
unsigned short year(0), month(0), day(0);
@@ -160,7 +159,6 @@
parse_undelimited_date(const std::string& s) {
int offsets[] = {4,2,2};
int pos = 0;
- typedef typename date_type::year_type year_type;
//typename date_type::ymd_type ymd((year_type::min)(),1,1);
unsigned short y = 0, m = 0, d = 0;
Index: boost/date_time/local_time/local_time_io.hpp
===================================================================
--- a/boost/date_time/local_time/local_time_io.hpp (revision 85073)
+++ b/boost/date_time/local_time/local_time_io.hpp (working copy)
@@ -36,7 +36,6 @@
boost::io::ios_flags_saver iflags(os);
typedef local_date_time time_type;//::utc_time_type typename
typedef date_time::time_facet<time_type, CharT> custom_time_facet;
- typedef std::time_put<CharT> std_time_facet;
std::ostreambuf_iterator<CharT> oitr(os);
if(std::has_facet<custom_time_facet>(os.getloc())) {
@@ -123,7 +122,6 @@
const boost::local_time::local_time_period& p) {
boost::io::ios_flags_saver iflags(os);
typedef boost::date_time::time_facet<local_date_time, CharT> custom_facet;
- typedef std::time_put<CharT> std_time_facet;
std::ostreambuf_iterator<CharT> oitr(os);
if (std::has_facet<custom_facet>(os.getloc())) {
std::use_facet<custom_facet>(os.getloc()).put(oitr, os, os.fill(), p);
Index: boost/date_time/posix_time/posix_time_io.hpp
===================================================================
--- a/boost/date_time/posix_time/posix_time_io.hpp (revision 85073)
+++ b/boost/date_time/posix_time/posix_time_io.hpp (working copy)
@@ -47,7 +47,6 @@
const ptime& p) {
boost::io::ios_flags_saver iflags(os);
typedef boost::date_time::time_facet<ptime, CharT> custom_ptime_facet;
- typedef std::time_put<CharT> std_ptime_facet;
std::ostreambuf_iterator<CharT> oitr(os);
if (std::has_facet<custom_ptime_facet>(os.getloc()))
std::use_facet<custom_ptime_facet>(os.getloc()).put(oitr, os, os.fill(), p);
@@ -114,7 +113,6 @@
const boost::posix_time::time_period& p) {
boost::io::ios_flags_saver iflags(os);
typedef boost::date_time::time_facet<ptime, CharT> custom_ptime_facet;
- typedef std::time_put<CharT> std_time_facet;
std::ostreambuf_iterator<CharT> oitr(os);
if (std::has_facet<custom_ptime_facet>(os.getloc())) {
std::use_facet<custom_ptime_facet>(os.getloc()).put(oitr, os, os.fill(), p);
@@ -180,7 +178,6 @@
{
boost::io::ios_flags_saver iflags(os);
typedef boost::date_time::time_facet<ptime, CharT> custom_ptime_facet;
- typedef std::time_put<CharT> std_ptime_facet;
std::ostreambuf_iterator<CharT> oitr(os);
if (std::has_facet<custom_ptime_facet>(os.getloc()))
std::use_facet<custom_ptime_facet>(os.getloc()).put(oitr, os, os.fill(), td);
Index: boost/date_time/string_convert.hpp
===================================================================
--- a/boost/date_time/string_convert.hpp (revision 85073)
+++ b/boost/date_time/string_convert.hpp (working copy)
@@ -21,7 +21,6 @@
inline
std::basic_string<OutputT> convert_string_type(const std::basic_string<InputT>& inp_str)
{
- typedef std::basic_string<InputT> input_type;
typedef std::basic_string<OutputT> output_type;
output_type result;
result.insert(result.begin(), inp_str.begin(), inp_str.end());
Index: boost/date_time/strings_from_facet.hpp
===================================================================
--- a/boost/date_time/strings_from_facet.hpp (revision 85073)
+++ b/boost/date_time/strings_from_facet.hpp (working copy)
@@ -35,7 +35,6 @@
{
typedef std::basic_string<charT> string_type;
typedef std::vector<string_type> collection_type;
- typedef std::basic_ostringstream<charT> ostream_type;
typedef std::ostreambuf_iterator<charT> ostream_iter_type;
typedef std::basic_ostringstream<charT> stringstream_type;
typedef std::time_put<charT> time_put_facet_type;
@@ -86,7 +85,6 @@
{
typedef std::basic_string<charT> string_type;
typedef std::vector<string_type> collection_type;
- typedef std::basic_ostringstream<charT> ostream_type;
typedef std::ostreambuf_iterator<charT> ostream_iter_type;
typedef std::basic_ostringstream<charT> stringstream_type;
typedef std::time_put<charT> time_put_facet_type;

View File

@@ -0,0 +1,11 @@
diff -urp boost_1_54_0-orig/boost/locale/boundary/segment.hpp boost_1_54_0/boost/locale/boundary/segment.hpp
--- boost_1_54_0-orig/boost/locale/boundary/segment.hpp 2013-07-23 00:47:27.020787174 +0200
+++ boost_1_54_0/boost/locale/boundary/segment.hpp 2013-07-23 00:50:40.382959016 +0200
@@ -27,7 +27,6 @@ namespace boundary {
int compare_text(LeftIterator l_begin,LeftIterator l_end,RightIterator r_begin,RightIterator r_end)
{
typedef LeftIterator left_iterator;
- typedef RightIterator right_iterator;
typedef typename std::iterator_traits<left_iterator>::value_type char_type;
typedef std::char_traits<char_type> traits;
while(l_begin!=l_end && r_begin!=r_end) {

View File

@@ -0,0 +1,32 @@
Index: boost/math/special_functions/airy.hpp
===================================================================
--- a/boost/math/special_functions/airy.hpp (revision 85073)
+++ b/boost/math/special_functions/airy.hpp (working copy)
@@ -340,13 +340,6 @@
inline T airy_ai_zero(unsigned m, const Policy& pol)
{
BOOST_FPU_EXCEPTION_GUARD
- typedef typename policies::evaluation<T, Policy>::type value_type;
- typedef typename policies::normalise<
- Policy,
- policies::promote_float<false>,
- policies::promote_double<false>,
- policies::discrete_quantile<>,
- policies::assert_undefined<> >::type forwarding_policy;
BOOST_STATIC_ASSERT_MSG(false == std::numeric_limits<T>::is_integer, "Airy return type must be a floating-point type.");
return policies::checked_narrowing_cast<T, Policy>(detail::airy_ai_zero_imp<T>(m, pol), "boost::math::airy_ai_zero<%1%>(unsigned)");
}
@@ -388,13 +381,6 @@
inline T airy_bi_zero(unsigned m, const Policy& pol)
{
BOOST_FPU_EXCEPTION_GUARD
- typedef typename policies::evaluation<T, Policy>::type value_type;
- typedef typename policies::normalise<
- Policy,
- policies::promote_float<false>,
- policies::promote_double<false>,
- policies::discrete_quantile<>,
- policies::assert_undefined<> >::type forwarding_policy;
BOOST_STATIC_ASSERT_MSG(false == std::numeric_limits<T>::is_integer, "Airy return type must be a floating-point type.");
return policies::checked_narrowing_cast<T, Policy>(detail::airy_bi_zero_imp<T>(m, pol), "boost::math::airy_bi_zero<%1%>(unsigned)");
}

View File

@@ -0,0 +1,11 @@
diff -urp boost_1_54_0-orig/libs/mpi/src/communicator.cpp boost_1_54_0/libs/mpi/src/communicator.cpp
--- boost_1_54_0-orig/libs/mpi/src/communicator.cpp 2013-07-23 00:48:17.317091987 +0200
+++ boost_1_54_0/libs/mpi/src/communicator.cpp 2013-07-23 00:50:40.722961078 +0200
@@ -118,7 +118,6 @@ optional<status> communicator::iprobe(in
status communicator::probe(int source, int tag) const
{
- typedef optional<status> result_type;
status stat;
BOOST_MPI_CHECK_RESULT(MPI_Probe,

View File

@@ -0,0 +1,37 @@
Index: boost/mpl/print.hpp
===================================================================
--- a/boost/mpl/print.hpp (revision 83411)
+++ b/boost/mpl/print.hpp (working copy)
@@ -45,22 +45,21 @@
: mpl::identity<T>
#if defined(__MWERKS__)
, aux::print_base
-#endif
+#endif
{
#if defined(BOOST_MSVC)
enum { n = sizeof(T) + -1 };
#elif defined(__MWERKS__)
void f(int);
-#else
- enum {
- n =
-# if defined(__EDG_VERSION__)
- aux::dependent_unsigned<T>::value > -1
-# else
- sizeof(T) > -1
-# endif
- };
-#endif
+#elif defined(__EDG_VERSION__)
+ enum { n = aux::dependent_unsigned<T>::value > -1 };
+#elif defined(BOOST_GCC)
+ enum { n1 };
+ enum { n2 };
+ enum { n = n1 != n2 };
+#else
+ enum { n = sizeof(T) > -1 };
+#endif
};
#if defined(BOOST_MSVC)

View File

@@ -0,0 +1,250 @@
diff -up boost_1_54_0/boost/numeric/ublas/detail/matrix_assign.hpp~ boost_1_54_0/boost/numeric/ublas/detail/matrix_assign.hpp
--- boost_1_54_0/boost/numeric/ublas/detail/matrix_assign.hpp~ 2010-10-19 00:01:35.000000000 -0700
+++ boost_1_54_0/boost/numeric/ublas/detail/matrix_assign.hpp 2013-07-22 04:33:26.399038120 -0700
@@ -1303,7 +1303,6 @@ namespace detail {
void matrix_swap (M &m, matrix_expression<E> &e, packed_proxy_tag, row_major_tag) {
typedef F<typename M::iterator2::reference, typename E::reference> functor_type;
// R unnecessary, make_conformant not required
- typedef typename M::size_type size_type;
typedef typename M::difference_type difference_type;
typename M::iterator1 it1 (m.begin1 ());
typename E::iterator1 it1e (e ().begin1 ());
@@ -1329,7 +1328,6 @@ namespace detail {
void matrix_swap (M &m, matrix_expression<E> &e, packed_proxy_tag, column_major_tag) {
typedef F<typename M::iterator1::reference, typename E::reference> functor_type;
// R unnecessary, make_conformant not required
- typedef typename M::size_type size_type;
typedef typename M::difference_type difference_type;
typename M::iterator2 it2 (m.begin2 ());
typename E::iterator2 it2e (e ().begin2 ());
@@ -1357,7 +1355,6 @@ namespace detail {
typedef R conformant_restrict_type;
typedef typename M::size_type size_type;
typedef typename M::difference_type difference_type;
- typedef typename M::value_type value_type;
BOOST_UBLAS_CHECK (m.size1 () == e ().size1 (), bad_size ());
BOOST_UBLAS_CHECK (m.size2 () == e ().size2 (), bad_size ());
@@ -1482,7 +1479,6 @@ namespace detail {
typedef R conformant_restrict_type;
typedef typename M::size_type size_type;
typedef typename M::difference_type difference_type;
- typedef typename M::value_type value_type;
BOOST_UBLAS_CHECK (m.size1 () == e ().size1 (), bad_size ());
BOOST_UBLAS_CHECK (m.size2 () == e ().size2 (), bad_size ());
diff -up boost_1_54_0/boost/numeric/ublas/detail/vector_assign.hpp~ boost_1_54_0/boost/numeric/ublas/detail/vector_assign.hpp
--- boost_1_54_0/boost/numeric/ublas/detail/vector_assign.hpp~ 2007-11-25 10:07:19.000000000 -0800
+++ boost_1_54_0/boost/numeric/ublas/detail/vector_assign.hpp 2013-07-22 04:32:21.774650296 -0700
@@ -379,7 +379,6 @@ namespace detail {
typedef typename V::size_type size_type;
typedef typename V::difference_type difference_type;
typedef typename V::value_type value_type;
- typedef typename V::reference reference;
#if BOOST_UBLAS_TYPE_CHECK
vector<value_type> cv (v.size ());
indexing_vector_assign<scalar_assign> (cv, v);
@@ -513,7 +512,6 @@ namespace detail {
typedef F<typename V::iterator::reference, typename E::iterator::reference> functor_type;
typedef typename V::size_type size_type;
typedef typename V::difference_type difference_type;
- typedef typename V::value_type value_type;
detail::make_conformant (v, e);
// FIXME should be a seperate restriction for E
diff -up boost_1_54_0/boost/numeric/ublas/lu.hpp~ boost_1_54_0/boost/numeric/ublas/lu.hpp
--- boost_1_54_0/boost/numeric/ublas/lu.hpp~ 2010-07-04 23:06:24.000000000 -0700
+++ boost_1_54_0/boost/numeric/ublas/lu.hpp 2013-07-22 04:40:06.634440205 -0700
@@ -63,7 +63,6 @@ namespace boost { namespace numeric { na
BOOST_UBLAS_INLINE
void swap_rows (const PM &pm, MV &mv, vector_tag) {
typedef typename PM::size_type size_type;
- typedef typename MV::value_type value_type;
size_type size = pm.size ();
for (size_type i = 0; i < size; ++ i) {
@@ -75,7 +74,6 @@ namespace boost { namespace numeric { na
BOOST_UBLAS_INLINE
void swap_rows (const PM &pm, MV &mv, matrix_tag) {
typedef typename PM::size_type size_type;
- typedef typename MV::value_type value_type;
size_type size = pm.size ();
for (size_type i = 0; i < size; ++ i) {
diff -up boost_1_54_0/boost/numeric/ublas/operation.hpp~ boost_1_54_0/boost/numeric/ublas/operation.hpp
--- boost_1_54_0/boost/numeric/ublas/operation.hpp~ 2007-11-25 10:07:19.000000000 -0800
+++ boost_1_54_0/boost/numeric/ublas/operation.hpp 2013-07-22 04:42:19.436046788 -0700
@@ -129,7 +129,6 @@ namespace boost { namespace numeric { na
const vector_expression<E2> &e2,
V &v, packed_random_access_iterator_tag, row_major_tag) {
typedef const E1 expression1_type;
- typedef const E2 expression2_type;
typedef typename V::size_type size_type;
typename expression1_type::const_iterator1 it1 (e1 ().begin1 ());
@@ -159,7 +158,6 @@ namespace boost { namespace numeric { na
const vector_expression<E2> &e2,
V &v, packed_random_access_iterator_tag, column_major_tag) {
typedef const E1 expression1_type;
- typedef const E2 expression2_type;
typedef typename V::size_type size_type;
typename expression1_type::const_iterator2 it2 (e1 ().begin2 ());
@@ -188,9 +186,7 @@ namespace boost { namespace numeric { na
axpy_prod (const matrix_expression<E1> &e1,
const vector_expression<E2> &e2,
V &v, sparse_bidirectional_iterator_tag) {
- typedef const E1 expression1_type;
typedef const E2 expression2_type;
- typedef typename V::size_type size_type;
typename expression2_type::const_iterator it (e2 ().begin ());
typename expression2_type::const_iterator it_end (e2 ().end ());
@@ -350,7 +346,6 @@ namespace boost { namespace numeric { na
axpy_prod (const vector_expression<E1> &e1,
const matrix_expression<E2> &e2,
V &v, packed_random_access_iterator_tag, column_major_tag) {
- typedef const E1 expression1_type;
typedef const E2 expression2_type;
typedef typename V::size_type size_type;
@@ -380,7 +375,6 @@ namespace boost { namespace numeric { na
axpy_prod (const vector_expression<E1> &e1,
const matrix_expression<E2> &e2,
V &v, packed_random_access_iterator_tag, row_major_tag) {
- typedef const E1 expression1_type;
typedef const E2 expression2_type;
typedef typename V::size_type size_type;
@@ -411,8 +405,6 @@ namespace boost { namespace numeric { na
const matrix_expression<E2> &e2,
V &v, sparse_bidirectional_iterator_tag) {
typedef const E1 expression1_type;
- typedef const E2 expression2_type;
- typedef typename V::size_type size_type;
typename expression1_type::const_iterator it (e1 ().begin ());
typename expression1_type::const_iterator it_end (e1 ().end ());
@@ -501,9 +493,6 @@ namespace boost { namespace numeric { na
const matrix_expression<E2> &e2,
M &m, TRI,
dense_proxy_tag, row_major_tag) {
- typedef M matrix_type;
- typedef const E1 expression1_type;
- typedef const E2 expression2_type;
typedef typename M::size_type size_type;
typedef typename M::value_type value_type;
@@ -530,11 +519,9 @@ namespace boost { namespace numeric { na
const matrix_expression<E2> &e2,
M &m, TRI,
sparse_proxy_tag, row_major_tag) {
- typedef M matrix_type;
typedef TRI triangular_restriction;
typedef const E1 expression1_type;
typedef const E2 expression2_type;
- typedef typename M::size_type size_type;
typedef typename M::value_type value_type;
#if BOOST_UBLAS_TYPE_CHECK
@@ -580,9 +567,6 @@ namespace boost { namespace numeric { na
const matrix_expression<E2> &e2,
M &m, TRI,
dense_proxy_tag, column_major_tag) {
- typedef M matrix_type;
- typedef const E1 expression1_type;
- typedef const E2 expression2_type;
typedef typename M::size_type size_type;
typedef typename M::value_type value_type;
@@ -609,11 +593,9 @@ namespace boost { namespace numeric { na
const matrix_expression<E2> &e2,
M &m, TRI,
sparse_proxy_tag, column_major_tag) {
- typedef M matrix_type;
typedef TRI triangular_restriction;
typedef const E1 expression1_type;
typedef const E2 expression2_type;
- typedef typename M::size_type size_type;
typedef typename M::value_type value_type;
#if BOOST_UBLAS_TYPE_CHECK
@@ -738,9 +720,6 @@ namespace boost { namespace numeric { na
const matrix_expression<E2> &e2,
M &m,
dense_proxy_tag, row_major_tag) {
- typedef M matrix_type;
- typedef const E1 expression1_type;
- typedef const E2 expression2_type;
typedef typename M::size_type size_type;
typedef typename M::value_type value_type;
@@ -769,9 +748,6 @@ namespace boost { namespace numeric { na
const matrix_expression<E2> &e2,
M &m,
dense_proxy_tag, column_major_tag) {
- typedef M matrix_type;
- typedef const E1 expression1_type;
- typedef const E2 expression2_type;
typedef typename M::size_type size_type;
typedef typename M::value_type value_type;
diff -up boost_1_54_0/boost/numeric/ublas/triangular.hpp~ boost_1_54_0/boost/numeric/ublas/triangular.hpp
--- boost_1_54_0/boost/numeric/ublas/triangular.hpp~ 2012-09-18 14:07:07.000000000 -0700
+++ boost_1_54_0/boost/numeric/ublas/triangular.hpp 2013-07-22 04:39:31.667230329 -0700
@@ -1859,7 +1859,6 @@ namespace boost { namespace numeric { na
void inplace_solve (const matrix_expression<E1> &e1, vector_expression<E2> &e2,
lower_tag, column_major_tag, dense_proxy_tag) {
typedef typename E2::size_type size_type;
- typedef typename E2::difference_type difference_type;
typedef typename E2::value_type value_type;
BOOST_UBLAS_CHECK (e1 ().size1 () == e1 ().size2 (), bad_size ());
@@ -1914,7 +1913,6 @@ namespace boost { namespace numeric { na
void inplace_solve (const matrix_expression<E1> &e1, vector_expression<E2> &e2,
lower_tag, column_major_tag, unknown_storage_tag) {
typedef typename E2::size_type size_type;
- typedef typename E2::difference_type difference_type;
typedef typename E2::value_type value_type;
BOOST_UBLAS_CHECK (e1 ().size1 () == e1 ().size2 (), bad_size ());
@@ -1943,7 +1941,6 @@ namespace boost { namespace numeric { na
void inplace_solve (const matrix_expression<E1> &e1, vector_expression<E2> &e2,
lower_tag, row_major_tag, dense_proxy_tag) {
typedef typename E2::size_type size_type;
- typedef typename E2::difference_type difference_type;
typedef typename E2::value_type value_type;
BOOST_UBLAS_CHECK (e1 ().size1 () == e1 ().size2 (), bad_size ());
@@ -1969,7 +1966,6 @@ namespace boost { namespace numeric { na
void inplace_solve (const matrix_expression<E1> &e1, vector_expression<E2> &e2,
lower_tag, row_major_tag, packed_proxy_tag) {
typedef typename E2::size_type size_type;
- typedef typename E2::difference_type difference_type;
typedef typename E2::value_type value_type;
BOOST_UBLAS_CHECK (e1 ().size1 () == e1 ().size2 (), bad_size ());
@@ -1998,7 +1994,6 @@ namespace boost { namespace numeric { na
void inplace_solve (const matrix_expression<E1> &e1, vector_expression<E2> &e2,
lower_tag, row_major_tag, unknown_storage_tag) {
typedef typename E2::size_type size_type;
- typedef typename E2::difference_type difference_type;
typedef typename E2::value_type value_type;
BOOST_UBLAS_CHECK (e1 ().size1 () == e1 ().size2 (), bad_size ());
@@ -2374,7 +2369,6 @@ namespace boost { namespace numeric { na
void inplace_solve (const matrix_expression<E1> &e1, matrix_expression<E2> &e2,
lower_tag, dense_proxy_tag) {
typedef typename E2::size_type size_type;
- typedef typename E2::difference_type difference_type;
typedef typename E2::value_type value_type;
BOOST_UBLAS_CHECK (e1 ().size1 () == e1 ().size2 (), bad_size ());
@@ -2435,7 +2429,6 @@ namespace boost { namespace numeric { na
void inplace_solve (const matrix_expression<E1> &e1, matrix_expression<E2> &e2,
lower_tag, unknown_storage_tag) {
typedef typename E2::size_type size_type;
- typedef typename E2::difference_type difference_type;
typedef typename E2::value_type value_type;
BOOST_UBLAS_CHECK (e1 ().size1 () == e1 ().size2 (), bad_size ());

View File

@@ -0,0 +1,19 @@
diff -urp boost_1_54_0-orig/boost/property_tree/detail/xml_parser_write.hpp boost_1_54_0/boost/property_tree/detail/xml_parser_write.hpp
--- boost_1_54_0-orig/boost/property_tree/detail/xml_parser_write.hpp 2013-07-23 00:47:43.731888449 +0200
+++ boost_1_54_0/boost/property_tree/detail/xml_parser_write.hpp 2013-07-23 00:50:40.597960319 +0200
@@ -35,7 +35,6 @@ namespace boost { namespace property_tre
const xml_writer_settings<Ch> & settings
)
{
- typedef typename std::basic_string<Ch> Str;
if (separate_line)
write_xml_indent(stream,indent,settings);
stream << Ch('<') << Ch('!') << Ch('-') << Ch('-');
@@ -69,7 +68,6 @@ namespace boost { namespace property_tre
{
typedef typename Ptree::key_type::value_type Ch;
- typedef typename std::basic_string<Ch> Str;
typedef typename Ptree::const_iterator It;
bool want_pretty = settings.indent_count > 0;

View File

@@ -0,0 +1,15 @@
diff -up boost_1_53_0/boost/python/to_python_value.hpp\~ boost_1_53_0/boost/python/to_python_value.hpp
--- boost_1_53_0/boost/python/to_python_value.hpp~ 2007-12-16 11:12:07.000000000 +0100
+++ boost_1_53_0/boost/python/to_python_value.hpp 2013-07-23 16:19:02.518904596 +0200
@@ -147,8 +147,8 @@ namespace detail
template <class T>
inline PyObject* registry_to_python_value<T>::operator()(argument_type x) const
{
- typedef converter::registered<argument_type> r;
# if BOOST_WORKAROUND(__GNUC__, < 3)
+ typedef converter::registered<argument_type> r;
// suppresses an ICE, somehow
(void)r::converters;
# endif
Diff finished. Tue Jul 23 16:19:05 2013

View File

@@ -0,0 +1,24 @@
Index: boost/random/generate_canonical.hpp
===================================================================
--- a/boost/random/generate_canonical.hpp (revision 85073)
+++ b/boost/random/generate_canonical.hpp (working copy)
@@ -54,7 +54,6 @@
using std::floor;
BOOST_ASSERT((g.min)() == 0);
BOOST_ASSERT((g.max)() == 1);
- typedef typename URNG::result_type base_result;
std::size_t digits = std::numeric_limits<RealType>::digits;
std::size_t engine_bits = detail::generator_bits<URNG>::value();
std::size_t b = (std::min)(bits, digits);
Index: boost/random/uniform_real_distribution.hpp
===================================================================
--- a/boost/random/uniform_real_distribution.hpp (revision 85073)
+++ b/boost/random/uniform_real_distribution.hpp (working copy)
@@ -36,7 +36,6 @@
{
for(;;) {
typedef T result_type;
- typedef typename Engine::result_type base_result;
result_type numerator = static_cast<T>(eng() - (eng.min)());
result_type divisor = static_cast<T>((eng.max)() - (eng.min)());
BOOST_ASSERT(divisor > 0);

View File

@@ -0,0 +1,22 @@
diff -urp boost_1_54_0-orig/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp boost_1_54_0/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp
--- boost_1_54_0-orig/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp 2013-07-23 00:47:37.497850668 +0200
+++ boost_1_54_0/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp 2013-07-23 00:50:40.662960713 +0200
@@ -307,7 +307,6 @@ struct grammar_definition
#if !defined(BOOST_SPIRIT_SINGLE_GRAMMAR_INSTANCE)
typedef impl::grammar_helper_base<GrammarT> helper_base_t;
typedef grammar_helper_list<GrammarT> helper_list_t;
- typedef typename helper_list_t::vector_t::reverse_iterator iterator_t;
helper_list_t& helpers =
# if !defined(__GNUC__) || (__GNUC__ > 2)
diff -urp boost_1_54_0-orig/boost/spirit/home/classic/tree/parse_tree.hpp boost_1_54_0/boost/spirit/home/classic/tree/parse_tree.hpp
--- boost_1_54_0-orig/boost/spirit/home/classic/tree/parse_tree.hpp 2013-07-23 00:47:37.407850122 +0200
+++ boost_1_54_0/boost/spirit/home/classic/tree/parse_tree.hpp 2013-07-23 00:50:40.674960786 +0200
@@ -76,7 +76,6 @@ struct pt_tree_policy :
template<typename MatchAT, typename MatchBT>
static void concat(MatchAT& a, MatchBT const& b)
{
- typedef typename match_t::attr_t attr_t;
BOOST_SPIRIT_ASSERT(a && b);
std::copy(b.trees.begin(), b.trees.end(),

View File

@@ -0,0 +1,11 @@
diff -up boost_1_54_0/boost/spirit/home/classic/core/primitives/primitives.hpp~ boost_1_54_0/boost/spirit/home/classic/core/primitives/primitives.hpp
--- boost_1_54_0/boost/spirit/home/classic/core/primitives/primitives.hpp~ 2008-06-22 08:05:38.000000000 -0700
+++ boost_1_54_0/boost/spirit/home/classic/core/primitives/primitives.hpp 2013-07-22 06:35:38.417914083 -0700
@@ -47,7 +47,6 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
typename parser_result<self_t, ScannerT>::type
parse(ScannerT const& scan) const
{
- typedef typename parser_result<self_t, ScannerT>::type result_t;
typedef typename ScannerT::value_t value_t;
typedef typename ScannerT::iterator_t iterator_t;

View File

@@ -0,0 +1,23 @@
diff -up boost_1_54_0/boost/serialization/static_warning.hpp\~ boost_1_54_0/boost/serialization/static_warning.hpp
--- boost_1_54_0/boost/serialization/static_warning.hpp~ 2013-07-15 23:36:08.224983552 +0200
+++ boost_1_54_0/boost/serialization/static_warning.hpp 2013-07-18 19:33:36.163463409 +0200
@@ -72,6 +72,7 @@
#include <boost/mpl/bool.hpp>
#include <boost/mpl/print.hpp>
#include <boost/mpl/eval_if.hpp>
+#include <boost/static_assert.hpp>
namespace boost {
namespace serialization {
@@ -101,7 +102,8 @@ struct BOOST_SERIALIZATION_SS {};
#define BOOST_SERIALIZATION_BSW(B, L) \
typedef boost::serialization::BOOST_SERIALIZATION_SS< \
sizeof( boost::serialization::static_warning_test< B, L > ) \
- > BOOST_JOIN(STATIC_WARNING_LINE, L);
+ > BOOST_JOIN(STATIC_WARNING_LINE, L) \
+ BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE;
#define BOOST_STATIC_WARNING(B) BOOST_SERIALIZATION_BSW(B, __LINE__)
Diff finished. Fri Jul 19 01:38:59 2013

View File

@@ -0,0 +1,12 @@
Index: boost/tuple/detail/tuple_basic.hpp
===================================================================
--- a/boost/tuple/detail/tuple_basic.hpp (revision 85075)
+++ b/boost/tuple/detail/tuple_basic.hpp (working copy)
@@ -225,7 +225,6 @@
get(const cons<HT, TT>& c BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(int, N)) {
typedef BOOST_DEDUCED_TYPENAME detail::drop_front<N>::BOOST_NESTED_TEMPLATE
apply<cons<HT, TT> > impl;
- typedef BOOST_DEDUCED_TYPENAME impl::type cons_element;
return impl::call(c).head;
}

View File

@@ -0,0 +1,632 @@
--- a/libs/thread/build/Jamfile.v2 2012-12-04 15:05:00.027057650 +0100
+++ b/libs/thread/build/Jamfile.v2 2012-12-04 15:05:22.488292220 +0100
@@ -101,7 +101,8 @@
local rule default_threadapi ( )
{
local api = pthread ;
- if [ os.name ] = "NT" { api = win32 ; }
+ #if [ os.name ] = "NT" { api = win32 ; }
+ api = win32 ;
return $(api) ;
}
--- a/libs/context/build/Jamfile.v2 2013-03-03 13:39:59.684868916 +0100
+++ b/libs/context/build/Jamfile.v2 2013-03-03 15:09:09.893232829 +0100
@@ -26,8 +26,9 @@
local rule default_binary_format ( )
{
local tmp = elf ;
- if [ os.name ] = "MACOSX" { tmp = mach-o ; }
- if [ os.name ] = "NT" { tmp = pe ; }
+# if [ os.name ] = "MACOSX" { tmp = mach-o ; }
+# if [ os.name ] = "NT" { tmp = pe ; }
+ tmp = pe ;
return $(tmp) ;
}
@@ -43,9 +44,10 @@
local rule default_abi ( )
{
local tmp = sysv ;
- if [ os.name ] = "NT" { tmp = ms ; }
- else if [ os.platform ] = "ARM" { tmp = aapcs ; }
- else if [ os.platform ] = "MIPS" { tmp = o32 ; }
+# if [ os.name ] = "NT" { tmp = ms ; }
+# else if [ os.platform ] = "ARM" { tmp = aapcs ; }
+# else if [ os.platform ] = "MIPS" { tmp = o32 ; }
+ tmp = ms ;
return $(tmp) ;
}
@@ -282,6 +284,17 @@
;
alias asm_context_sources
+ : asm/make_i386_ms_pe_gas.S
+ asm/jump_i386_ms_pe_gas.S
+ dummy.cpp
+ : <address-model>32
+ <architecture>x86
+ <binary-format>pe
+ <target-os>windows
+ <toolset>gcc
+ ;
+
+alias asm_context_sources
: asm/make_i386_ms_pe_masm.asm
asm/jump_i386_ms_pe_masm.asm
dummy.cpp
@@ -379,6 +392,17 @@
;
alias asm_context_sources
+ : asm/make_x86_64_ms_pe_gas.S
+ asm/jump_x86_64_ms_pe_gas.S
+ dummy.cpp
+ : <address-model>64
+ <architecture>x86
+ <binary-format>pe
+ <target-os>windows
+ <toolset>gcc
+ ;
+
+alias asm_context_sources
: asm/make_x86_64_ms_pe_masm.asm
asm/jump_x86_64_ms_pe_masm.asm
dummy.cpp
--- a/libs/context/src/asm/make_i386_ms_pe_gas.S 2013-03-03 13:41:28.645502113 +0100
+++ b/libs/context/src/asm/make_i386_ms_pe_gas.S 2013-03-03 14:39:27.590477410 +0100
@@ -0,0 +1,115 @@
+/*
+ Copyright Oliver Kowalke 2009.
+ Copyright Thomas Sailer 2013.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+*/
+
+/********************************************************************
+ * *
+ * -------------------------------------------------------------- *
+ * | 0 | 1 | 2 | 3 | 4 | 5 | *
+ * -------------------------------------------------------------- *
+ * | 0h | 04h | 08h | 0ch | 010h | 014h | *
+ * -------------------------------------------------------------- *
+ * | EDI | ESI | EBX | EBP | ESP | EIP | *
+ * -------------------------------------------------------------- *
+ * -------------------------------------------------------------- *
+ * | 6 | 7 | 8 | | *
+ * -------------------------------------------------------------- *
+ * | 018h | 01ch | 020h | | *
+ * -------------------------------------------------------------- *
+ * | sp | size | limit | | *
+ * -------------------------------------------------------------- *
+ * -------------------------------------------------------------- *
+ * | 9 | | *
+ * -------------------------------------------------------------- *
+ * | 024h | | *
+ * -------------------------------------------------------------- *
+ * |fc_execpt| | *
+ * -------------------------------------------------------------- *
+ * -------------------------------------------------------------- *
+ * | 10 | | *
+ * -------------------------------------------------------------- *
+ * | 028h | | *
+ * -------------------------------------------------------------- *
+ * |fc_strage| | *
+ * -------------------------------------------------------------- *
+ * -------------------------------------------------------------- *
+ * | 11 | 12 | | *
+ * -------------------------------------------------------------- *
+ * | 02ch | 030h | | *
+ * -------------------------------------------------------------- *
+ * | fc_mxcsr|fc_x87_cw| | *
+ * -------------------------------------------------------------- *
+ * *
+ * *****************************************************************/
+
+.file "make_i386_ms_pe_gas.S"
+.text
+.p2align 4,,15
+.globl _make_fcontext
+.def _make_fcontext; .scl 2; .type 32; .endef
+_make_fcontext:
+ movl 0x04(%esp), %eax /* load 1. arg of make_fcontext, pointer to context stack (base) */
+ leal -0x34(%eax),%eax /* reserve space for fcontext_t at top of context stack */
+
+ /* shift address in EAX to lower 16 byte boundary */
+ /* == pointer to fcontext_t and address of context stack */
+ andl $-16, %eax
+
+ movl 0x04(%esp), %ecx /* load 1. arg of make_fcontext, pointer to context stack (base) */
+ movl %ecx, 0x18(%eax) /* save address of context stack (base) in fcontext_t */
+ movl 0x08(%esp), %edx /* load 2. arg of make_fcontext, context stack size */
+ movl %edx, 0x1c(%eax) /* save context stack size in fcontext_t */
+ negl %edx /* negate stack size for LEA instruction (== substraction) */
+ leal (%ecx,%edx),%ecx /* compute bottom address of context stack (limit) */
+ movl %ecx, 0x20(%eax) /* save address of context stack (limit) in fcontext_t */
+ movl 0x0c(%esp), %ecx /* load 3. arg of make_fcontext, pointer to context function */
+ movl %ecx, 0x14(%eax) /* save address of context function in fcontext_t */
+
+ stmxcsr 0x02c(%eax) /* save MMX control word */
+ fnstcw 0x030(%eax) /* save x87 control word */
+
+ leal -0x1c(%eax),%edx /* reserve space for last frame and seh on context stack, (ESP - 0x4) % 16 == 0 */
+ movl %edx, 0x10(%eax) /* save address in EDX as stack pointer for context function */
+
+ movl $finish, %ecx /* abs address of finish */
+ movl %ecx, (%edx) /* save address of finish as return address for context function */
+ /* entered after context function returns */
+
+ /* traverse current seh chain to get the last exception handler installed by Windows */
+ /* note that on Windows Server 2008 and 2008 R2, SEHOP is activated by default */
+ /* the exception handler chain is tested for the presence of ntdll.dll!FinalExceptionHandler */
+ /* at its end by RaiseException all seh andlers are disregarded if not present and the */
+ /* program is aborted */
+ movl %fs:(0x18), %ecx /* load NT_TIB into ECX */
+
+walk:
+ movl (%ecx), %edx /* load 'next' member of current SEH into EDX */
+ incl %edx /* test if 'next' of current SEH is last (== 0xffffffff) */
+ jz found
+ decl %edx
+ xchgl %ecx, %edx /* exchange content; ECX contains address of next SEH */
+ jmp walk /* inspect next SEH */
+
+found:
+ movl 0x04(%ecx), %ecx /* load 'handler' member of SEH == address of last SEH handler installed by Windows */
+ movl 0x10(%eax), %edx /* load address of stack pointer for context function */
+ movl %ecx, 0x18(%edx) /* save address in ECX as SEH handler for context */
+ movl $0xffffffff,%ecx /* set ECX to -1 */
+ movl %ecx, 0x14(%edx) /* save ECX as next SEH item */
+ leal 0x14(%edx), %ecx /* load address of next SEH item */
+ movl %ecx, 0x24(%eax) /* save next SEH */
+
+ ret
+
+finish:
+ /* ESP points to same address as ESP on entry of context function + 0x4 */
+ xorl %eax, %eax
+ movl %eax, (%esp) /* exit code is zero */
+ call __exit /* exit application */
+ hlt
+
+.def __exit; .scl 2; .type 32; .endef /* standard C library function */
--- a/libs/context/src/asm/jump_i386_ms_pe_gas.S 2013-03-03 13:41:34.332670479 +0100
+++ b/libs/context/src/asm/jump_i386_ms_pe_gas.S 2013-03-03 14:35:35.634611625 +0100
@@ -0,0 +1,108 @@
+/*
+ Copyright Oliver Kowalke 2009.
+ Copyright Thomas Sailer 2013.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+*/
+
+/********************************************************************
+ * *
+ * -------------------------------------------------------------- *
+ * | 0 | 1 | 2 | 3 | 4 | 5 | *
+ * -------------------------------------------------------------- *
+ * | 0h | 04h | 08h | 0ch | 010h | 014h | *
+ * -------------------------------------------------------------- *
+ * | EDI | ESI | EBX | EBP | ESP | EIP | *
+ * -------------------------------------------------------------- *
+ * -------------------------------------------------------------- *
+ * | 6 | 7 | 8 | | *
+ * -------------------------------------------------------------- *
+ * | 018h | 01ch | 020h | | *
+ * -------------------------------------------------------------- *
+ * | sp | size | limit | | *
+ * -------------------------------------------------------------- *
+ * -------------------------------------------------------------- *
+ * | 9 | | *
+ * -------------------------------------------------------------- *
+ * | 024h | | *
+ * -------------------------------------------------------------- *
+ * |fc_execpt| | *
+ * -------------------------------------------------------------- *
+ * -------------------------------------------------------------- *
+ * | 10 | | *
+ * -------------------------------------------------------------- *
+ * | 028h | | *
+ * -------------------------------------------------------------- *
+ * |fc_strage| | *
+ * -------------------------------------------------------------- *
+ * -------------------------------------------------------------- *
+ * | 11 | 12 | | *
+ * -------------------------------------------------------------- *
+ * | 02ch | 030h | | *
+ * -------------------------------------------------------------- *
+ * | fc_mxcsr|fc_x87_cw| | *
+ * -------------------------------------------------------------- *
+ * *
+ * *****************************************************************/
+
+.file "jump_i386_ms_pe_gas.S"
+.text
+.p2align 4,,15
+.globl _jump_fcontext
+.def _jump_fcontext; .scl 2; .type 32; .endef
+_jump_fcontext:
+ movl 0x04(%esp), %ecx /* load address of the first fcontext_t arg */
+ movl %edi, (%ecx) /* save EDI */
+ movl %esi, 0x04(%ecx) /* save ESI */
+ movl %ebx, 0x08(%ecx) /* save EBX */
+ movl %ebp, 0x0c(%ecx) /* save EBP */
+
+ movl %fs:(0x18), %edx /* load NT_TIB */
+ movl (%edx), %eax /* load current SEH exception list */
+ movl %eax, 0x24(%ecx) /* save current exception list */
+ movl 0x04(%edx), %eax /* load current stack base */
+ movl %eax, 0x18(%ecx) /* save current stack base */
+ movl 0x08(%edx), %eax /* load current stack limit */
+ movl %eax, 0x20(%ecx) /* save current stack limit */
+ movl 0x10(%edx), %eax /* load fiber local storage */
+ movl %eax, 0x28(%ecx) /* save fiber local storage */
+
+ leal 0x04(%esp), %eax /* exclude the return address */
+ movl %eax, 0x10(%ecx) /* save as stack pointer */
+ movl (%esp), %eax /* load return address */
+ movl %eax, 0x14(%ecx) /* save return address */
+
+ movl 0x08(%esp), %edx /* load address of the second fcontext_t arg */
+ movl (%edx), %edi /* restore EDI */
+ movl 0x04(%edx), %esi /* restore ESI */
+ movl 0x08(%edx), %ebx /* restore EBX */
+ movl 0x0c(%edx), %ebp /* restore EBP */
+
+ movl 0x10(%esp), %eax /* check if fpu enve preserving was requested */
+ testl %eax, %eax
+ je 1f
+
+ stmxcsr 0x2c(%ecx) /* save MMX control word */
+ fnstcw 0x30(%ecx) /* save x87 control word */
+ ldmxcsr 0x2c(%edx) /* restore MMX control word */
+ fldcw 0x30(%edx) /* restore x87 control word */
+1:
+ movl %edx, %ecx
+ movl %fs:(0x18), %edx /* load NT_TIB */
+ movl 0x24(%ecx), %eax /* load SEH exception list */
+ movl %eax, (%edx) /* restore next SEH item */
+ movl 0x18(%ecx), %eax /* load stack base */
+ movl %eax, 0x04(%edx) /* restore stack base */
+ movl 0x20(%ecx), %eax /* load stack limit */
+ movl %eax, 0x08(%edx) /* restore stack limit */
+ movl 0x28(%ecx), %eax /* load fiber local storage */
+ movl %eax, 0x10(%edx) /* restore fiber local storage */
+
+ movl 0x0c(%esp), %eax /* use third arg as return value after jump */
+
+ movl 0x10(%ecx), %esp /* restore ESP */
+ movl %eax, 0x04(%esp) /* use third arg as first arg in context function */
+ movl 0x14(%ecx), %ecx /* fetch the address to return to */
+
+ jmp *%ecx /* indirect jump to context */
--- a/libs/context/src/asm/make_x86_64_ms_pe_gas.S 2013-03-03 13:43:03.137299031 +0100
+++ b/libs/context/src/asm/make_x86_64_ms_pe_gas.S 2013-03-03 14:54:16.036775106 +0100
@@ -0,0 +1,132 @@
+/*
+ Copyright Oliver Kowalke 2009.
+ Copyright Thomas Sailer 2013.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+*/
+
+/****************************************************************************************
+ * *
+ * ---------------------------------------------------------------------------------- *
+ * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | *
+ * ---------------------------------------------------------------------------------- *
+ * | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | *
+ * ---------------------------------------------------------------------------------- *
+ * | R12 | R13 | R14 | R15 | *
+ * ---------------------------------------------------------------------------------- *
+ * ---------------------------------------------------------------------------------- *
+ * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | *
+ * ---------------------------------------------------------------------------------- *
+ * | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | *
+ * ---------------------------------------------------------------------------------- *
+ * | RDI | RSI | RBX | RBP | *
+ * ---------------------------------------------------------------------------------- *
+ * ---------------------------------------------------------------------------------- *
+ * | 16 | 17 | 18 | 19 | | *
+ * ---------------------------------------------------------------------------------- *
+ * | 0x40 | 0x44 | 0x48 | 0x4c | | *
+ * ---------------------------------------------------------------------------------- *
+ * | RSP | RIP | | *
+ * ---------------------------------------------------------------------------------- *
+ * ---------------------------------------------------------------------------------- *
+ * | 20 | 21 | 22 | 23 | 24 | 25 | | *
+ * ---------------------------------------------------------------------------------- *
+ * | 0x50 | 0x54 | 0x58 | 0x5c | 0x60 | 0x64 | | *
+ * ---------------------------------------------------------------------------------- *
+ * | sp | size | limit | | *
+ * ---------------------------------------------------------------------------------- *
+ * ---------------------------------------------------------------------------------- *
+ * | 26 | 27 | | *
+ * ---------------------------------------------------------------------------------- *
+ * | 0x68 | 0x6c | | *
+ * ---------------------------------------------------------------------------------- *
+ * | fbr_strg | | *
+ * ---------------------------------------------------------------------------------- *
+ * ---------------------------------------------------------------------------------- *
+ * | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | *
+ * ---------------------------------------------------------------------------------- *
+ * | 0x70 | 0x74 | 0x78 | 0x7c | 0x80 | 0x84 | 0x88 | 0x8c | *
+ * ---------------------------------------------------------------------------------- *
+ * | fc_mxcsr|fc_x87_cw| fc_xmm | SEE registers (XMM6-XMM15) | *
+ * ---------------------------------------------------------------------------------- *
+ * ---------------------------------------------------------------------------------- *
+ * | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | *
+ * ---------------------------------------------------------------------------------- *
+ * | 0x90 | 0x94 | 0x98 | 0x9c | 0xa0 | 0xa4 | 0xa8 | 0xac | *
+ * ---------------------------------------------------------------------------------- *
+ * | SEE registers (XMM6-XMM15) | *
+ * ---------------------------------------------------------------------------------- *
+ * ---------------------------------------------------------------------------------- *
+ * | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | *
+ * ---------------------------------------------------------------------------------- *
+ * | 0xb0 | 0xb4 | 0xb8 | 0xbc | 0xc0 | 0xc4 | 0xc8 | 0xcc | *
+ * ---------------------------------------------------------------------------------- *
+ * | SEE registers (XMM6-XMM15) | *
+ * ---------------------------------------------------------------------------------- *
+ * ---------------------------------------------------------------------------------- *
+ * | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | *
+ * ---------------------------------------------------------------------------------- *
+ * | 0xd0 | 0xd4 | 0xd8 | 0xdc | 0xe0 | 0xe4 | 0xe8 | 0xec | *
+ * ---------------------------------------------------------------------------------- *
+ * | SEE registers (XMM6-XMM15) | *
+ * ---------------------------------------------------------------------------------- *
+ * ---------------------------------------------------------------------------------- *
+ * | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | *
+ * ---------------------------------------------------------------------------------- *
+ * | 0xf0 | 0xf4 | 0xf8 | 0xfc | 0x100 | 0x104 | 0x108 | 0x10c | *
+ * ---------------------------------------------------------------------------------- *
+ * | SEE registers (XMM6-XMM15) | *
+ * ---------------------------------------------------------------------------------- *
+ * ---------------------------------------------------------------------------------- *
+ * | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | *
+ * ---------------------------------------------------------------------------------- *
+ * | 0x110 | 0x114 | 0x118 | 0x11c | 0x120 | 0x124 | 0x128 | 0x12c | *
+ * ---------------------------------------------------------------------------------- *
+ * | SEE registers (XMM6-XMM15) | *
+ * ---------------------------------------------------------------------------------- *
+ * *
+ * *************************************************************************************/
+
+.file "make_x86_64_ms_pe_gas.S"
+.text
+.p2align 4,,15
+.globl make_fcontext
+.def make_fcontext; .scl 2; .type 32; .endef
+.seh_proc make_fcontext
+make_fcontext:
+.seh_endprologue
+ leaq -0x130(%rcx),%rax /* reserve space for fcontext_t at top of context stack */
+
+ /* shift address in RAX to lower 16 byte boundary */
+ /* == pointer to fcontext_t and address of context stack */
+ andq $-16, %rax
+
+ movq %r8, 0x48(%rax) /* save address of context function in fcontext_t */
+ movq %rdx, 0x58(%rax) /* save context stack size in fcontext_t */
+ movq %rcx, 0x50(%rax) /* save address of context stack pointer (base) in fcontext_t */
+
+ negq %rdx /* negate stack size for LEA instruction (== substraction) */
+ leaq (%rcx,%rdx),%rcx /* compute bottom address of context stack (limit) */
+ movq %rcx, 0x60(%rax) /* save bottom address of context stack (limit) in fcontext_t */
+
+ stmxcsr 0x70(%rax) /* save MMX control and status word */
+ fnstcw 0x74(%rax) /* save x87 control word */
+
+ leaq -0x28(%rax),%rdx /* reserve 32byte shadow space + return address on stack, (RSP - 0x8) % 16 == 0 */
+ movq %rdx, 0x40(%rax) /* save address in RDX as stack pointer for context function */
+
+ leaq finish(%rip),%rcx /* compute abs address of label finish */
+ movq %rcx,(%rdx) /* save address of finish as return address for context function */
+ /* entered after context function returns */
+
+ ret
+
+finish:
+ /* RSP points to same address as RSP on entry of context function + 0x8 */
+ xorq %rcx, %rcx /* exit code is zero */
+ call _exit /* exit application */
+ hlt
+.seh_endproc
+
+.def _exit; .scl 2; .type 32; .endef /* standard C library function */
--- a/libs/context/src/asm/jump_x86_64_ms_pe_gas.S 2013-03-03 13:42:57.753139784 +0100
+++ b/libs/context/src/asm/jump_x86_64_ms_pe_gas.S 2013-03-03 15:06:08.269856857 +0100
@@ -0,0 +1,189 @@
+/*
+ Copyright Oliver Kowalke 2009.
+ Copyright Thomas Sailer 2013.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+*/
+
+/****************************************************************************************
+ * *
+ * ---------------------------------------------------------------------------------- *
+ * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | *
+ * ---------------------------------------------------------------------------------- *
+ * | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | *
+ * ---------------------------------------------------------------------------------- *
+ * | R12 | R13 | R14 | R15 | *
+ * ---------------------------------------------------------------------------------- *
+ * ---------------------------------------------------------------------------------- *
+ * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | *
+ * ---------------------------------------------------------------------------------- *
+ * | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | *
+ * ---------------------------------------------------------------------------------- *
+ * | RDI | RSI | RBX | RBP | *
+ * ---------------------------------------------------------------------------------- *
+ * ---------------------------------------------------------------------------------- *
+ * | 16 | 17 | 18 | 19 | | *
+ * ---------------------------------------------------------------------------------- *
+ * | 0x40 | 0x44 | 0x48 | 0x4c | | *
+ * ---------------------------------------------------------------------------------- *
+ * | RSP | RIP | | *
+ * ---------------------------------------------------------------------------------- *
+ * ---------------------------------------------------------------------------------- *
+ * | 20 | 21 | 22 | 23 | 24 | 25 | | *
+ * ---------------------------------------------------------------------------------- *
+ * | 0x50 | 0x54 | 0x58 | 0x5c | 0x60 | 0x64 | | *
+ * ---------------------------------------------------------------------------------- *
+ * | sp | size | limit | | *
+ * ---------------------------------------------------------------------------------- *
+ * ---------------------------------------------------------------------------------- *
+ * | 26 | 27 | | *
+ * ---------------------------------------------------------------------------------- *
+ * | 0x68 | 0x6c | | *
+ * ---------------------------------------------------------------------------------- *
+ * | fbr_strg | | *
+ * ---------------------------------------------------------------------------------- *
+ * ---------------------------------------------------------------------------------- *
+ * | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | *
+ * ---------------------------------------------------------------------------------- *
+ * | 0x70 | 0x74 | 0x78 | 0x7c | 0x80 | 0x84 | 0x88 | 0x8c | *
+ * ---------------------------------------------------------------------------------- *
+ * | fc_mxcsr|fc_x87_cw| fc_xmm | SEE registers (XMM6-XMM15) | *
+ * ---------------------------------------------------------------------------------- *
+ * ---------------------------------------------------------------------------------- *
+ * | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | *
+ * ---------------------------------------------------------------------------------- *
+ * | 0x90 | 0x94 | 0x98 | 0x9c | 0xa0 | 0xa4 | 0xa8 | 0xac | *
+ * ---------------------------------------------------------------------------------- *
+ * | SEE registers (XMM6-XMM15) | *
+ * ---------------------------------------------------------------------------------- *
+ * ---------------------------------------------------------------------------------- *
+ * | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | *
+ * ---------------------------------------------------------------------------------- *
+ * | 0xb0 | 0xb4 | 0xb8 | 0xbc | 0xc0 | 0xc4 | 0xc8 | 0xcc | *
+ * ---------------------------------------------------------------------------------- *
+ * | SEE registers (XMM6-XMM15) | *
+ * ---------------------------------------------------------------------------------- *
+ * ---------------------------------------------------------------------------------- *
+ * | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | *
+ * ---------------------------------------------------------------------------------- *
+ * | 0xd0 | 0xd4 | 0xd8 | 0xdc | 0xe0 | 0xe4 | 0xe8 | 0xec | *
+ * ---------------------------------------------------------------------------------- *
+ * | SEE registers (XMM6-XMM15) | *
+ * ---------------------------------------------------------------------------------- *
+ * ---------------------------------------------------------------------------------- *
+ * | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | *
+ * ---------------------------------------------------------------------------------- *
+ * | 0xf0 | 0xf4 | 0xf8 | 0xfc | 0x100 | 0x104 | 0x108 | 0x10c | *
+ * ---------------------------------------------------------------------------------- *
+ * | SEE registers (XMM6-XMM15) | *
+ * ---------------------------------------------------------------------------------- *
+ * ---------------------------------------------------------------------------------- *
+ * | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | *
+ * ---------------------------------------------------------------------------------- *
+ * | 0x110 | 0x114 | 0x118 | 0x11c | 0x120 | 0x124 | 0x128 | 0x12c | *
+ * ---------------------------------------------------------------------------------- *
+ * | SEE registers (XMM6-XMM15) | *
+ * ---------------------------------------------------------------------------------- *
+ * *
+ * *************************************************************************************/
+
+.file "jump_x86_64_ms_pe_gas.S"
+.text
+.p2align 4,,15
+.globl jump_fcontext
+.def jump_fcontext; .scl 2; .type 32; .endef
+.seh_proc jump_fcontext
+jump_fcontext:
+.seh_endprologue
+ movq %r12, (%rcx) /* save R12 */
+ movq %r13, 0x08(%rcx) /* save R13 */
+ movq %r14, 0x10(%rcx) /* save R14 */
+ movq %r15, 0x18(%rcx) /* save R15 */
+ movq %rdi, 0x20(%rcx) /* save RDI */
+ movq %rsi, 0x28(%rcx) /* save RSI */
+ movq %rbx, 0x30(%rcx) /* save RBX */
+ movq %rbp, 0x38(%rcx) /* save RBP */
+
+ movq %gs:(0x30), %r10 /* load NT_TIB */
+ movq 0x08(%r10), %rax /* load current stack base */
+ movq %rax, 0x50(%rcx) /* save current stack base */
+ movq 0x10(%r10), %rax /* load current stack limit */
+ movq %rax, 0x60(%rcx) /* save current stack limit */
+ movq 0x18(%r10), %rax /* load fiber local storage */
+ movq %rax, 0x68(%rcx) /* save fiber local storage */
+
+ testq %r9, %r9
+ je 1f
+
+ stmxcsr 0x70(%rcx) /* save MMX control and status word */
+ fnstcw 0x74(%rcx) /* save x87 control word */
+ /* save XMM storage */
+ /* save start address of SSE register block in R10 */
+ leaq 0x90(%rcx), %r10
+ /* shift address in R10 to lower 16 byte boundary */
+ /* == pointer to SEE register block */
+ andq $-16, %r10
+
+ movaps %xmm6, (%r10)
+ movaps %xmm7, 0x10(%r10)
+ movaps %xmm8, 0x20(%r10)
+ movaps %xmm9, 0x30(%r10)
+ movaps %xmm10, 0x40(%r10)
+ movaps %xmm11, 0x50(%r10)
+ movaps %xmm12, 0x60(%r10)
+ movaps %xmm13, 0x70(%r10)
+ movaps %xmm14, 0x80(%r10)
+ movaps %xmm15, 0x90(%r10)
+
+ ldmxcsr 0x70(%rdx) /* restore MMX control and status word */
+ fldcw 0x74(%rdx) /* restore x87 control word */
+ /* restore XMM storage */
+ /* save start address of SSE register block in R10 */
+ leaq 0x90(%rdx), %r10
+ /* shift address in R10 to lower 16 byte boundary */
+ /* == pointer to SEE register block */
+ andq $-16, %r10
+
+ movaps (%r10), %xmm6
+ movaps 0x10(%r10), %xmm7
+ movaps 0x20(%r10), %xmm8
+ movaps 0x30(%r10), %xmm9
+ movaps 0x40(%r10), %xmm10
+ movaps 0x50(%r10), %xmm11
+ movaps 0x60(%r10), %xmm12
+ movaps 0x70(%r10), %xmm13
+ movaps 0x80(%r10), %xmm14
+ movaps 0x90(%r10), %xmm15
+
+1:
+ leaq 0x08(%rsp), %rax /* exclude the return address */
+ movq %rax, 0x40(%rcx) /* save as stack pointer */
+ movq (%rsp), %rax /* load return address */
+ movq %rax, 0x48(%rcx) /* save return address */
+
+ movq (%rdx), %r12 /* restore R12 */
+ movq 0x08(%rdx), %r13 /* restore R13 */
+ movq 0x10(%rdx), %r14 /* restore R14 */
+ movq 0x18(%rdx), %r15 /* restore R15 */
+ movq 0x20(%rdx), %rdi /* restore RDI */
+ movq 0x28(%rdx), %rsi /* restore RSI */
+ movq 0x30(%rdx), %rbx /* restore RBX */
+ movq 0x38(%rdx), %rbp /* restore RBP */
+
+ movq %gs:(0x30), %r10 /* load NT_TIB */
+ movq 0x50(%rdx), %rax /* load stack base */
+ movq %rax, 0x08(%r10) /* restore stack base */
+ movq 0x60(%rdx), %rax /* load stack limit */
+ movq %rax, 0x10(%r10) /* restore stack limit */
+ movq 0x68(%rdx), %rax /* load fiber local storage */
+ movq %rax, 0x18(%r10) /* restore fiber local storage */
+
+ movq 0x40(%rdx), %rsp /* restore RSP */
+ movq 0x48(%rdx), %r10 /* fetch the address to returned to */
+
+ movq %r8, %rax /* use third arg as return value after jump */
+ movq %r8, %rcx /* use third arg as first arg in context function */
+
+ jmp *%r10 /* indirect jump to caller */
+.seh_endproc