mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 01:13:05 +00:00
cygwin: add needed patches for boost 1.57.0 to build
This commit is contained in:
parent
fdc1887a6e
commit
8908471ecc
@ -1,4 +1,4 @@
|
||||
{ callPackage, fetchurl, ... } @ args:
|
||||
{ stdenv, callPackage, fetchurl, ... } @ args:
|
||||
|
||||
callPackage ./generic.nix (args // rec {
|
||||
version = "1.57.0";
|
||||
@ -7,4 +7,34 @@ callPackage ./generic.nix (args // rec {
|
||||
url = "mirror://sourceforge/boost/boost_1_57_0.tar.bz2";
|
||||
sha256 = "0rs94vdmg34bwwj23fllva6mhrml2i7mvmlb11zyrk1k5818q34i";
|
||||
};
|
||||
|
||||
patches = if stdenv.isCygwin then [
|
||||
./cygwin-fedora-boost-1.50.0-fix-non-utf8-files.patch
|
||||
./cygwin-fedora-boost-1.50.0-pool.patch
|
||||
./cygwin-fedora-boost-1.57.0-mpl-print.patch
|
||||
./cygwin-fedora-boost-1.57.0-spirit-unused_typedef.patch
|
||||
./cygwin-fedora-boost-1.54.0-locale-unused_typedef.patch
|
||||
./cygwin-fedora-boost-1.54.0-python-unused_typedef.patch
|
||||
./cygwin-fedora-boost-1.57.0-pool-test_linking.patch
|
||||
./cygwin-fedora-boost-1.54.0-pool-max_chunks_shadow.patch
|
||||
./cygwin-fedora-boost-1.57.0-signals2-weak_ptr.patch
|
||||
./cygwin-fedora-boost-1.57.0-uuid-comparison.patch
|
||||
./cygwin-fedora-boost-1.57.0-move-is_class.patch
|
||||
./cygwin-1.40.0-cstdint-cygwin.patch
|
||||
./cygwin-1.57.0-asio-cygwin.patch
|
||||
./cygwin-1.55.0-asio-MSG_EOR.patch
|
||||
./cygwin-1.57.0-config-cygwin.patch
|
||||
./cygwin-1.57.0-context-cygwin.patch
|
||||
./cygwin-1.57.0-filesystem-cygwin.patch
|
||||
./cygwin-1.55.0-interlocked-cygwin.patch
|
||||
./cygwin-1.40.0-iostreams-cygwin.patch
|
||||
./cygwin-1.57.0-locale-cygwin.patch
|
||||
./cygwin-1.57.0-log-cygwin.patch
|
||||
./cygwin-1.40.0-python-cygwin.patch
|
||||
./cygwin-1.40.0-regex-cygwin.patch
|
||||
./cygwin-1.57.0-smart_ptr-cygwin.patch
|
||||
./cygwin-1.57.0-system-cygwin.patch
|
||||
./cygwin-1.45.0-jam-cygwin.patch
|
||||
./cygwin-1.50.0-jam-pep3149.patch
|
||||
] else null;
|
||||
})
|
||||
|
@ -0,0 +1,20 @@
|
||||
These were fixed in ~1.7.0-46
|
||||
|
||||
--- boost_1_40_0/boost/cstdint.hpp 2009-01-14 04:18:19.000000000 -0600
|
||||
+++ boost_1_40_0/boost/cstdint.hpp 2009-08-27 23:41:34.063543700 -0500
|
||||
@@ -40,15 +40,6 @@
|
||||
# include <inttypes.h>
|
||||
# else
|
||||
# include <stdint.h>
|
||||
-
|
||||
-// There is a bug in Cygwin two _C macros
|
||||
-# if defined(__STDC_CONSTANT_MACROS) && defined(__CYGWIN__)
|
||||
-# undef INTMAX_C
|
||||
-# undef UINTMAX_C
|
||||
-# define INTMAX_C(c) c##LL
|
||||
-# define UINTMAX_C(c) c##ULL
|
||||
-# endif
|
||||
-
|
||||
# endif
|
||||
|
||||
#ifdef __QNX__
|
@ -0,0 +1,24 @@
|
||||
--- boost_1_40_0/boost/iostreams/detail/config/wide_streams.hpp 2008-03-22 16:45:55.000000000 -0500
|
||||
+++ boost_1_40_0/boost/iostreams/detail/config/wide_streams.hpp 2009-08-27 23:41:34.082544800 -0500
|
||||
@@ -44,8 +44,7 @@
|
||||
//------------------Locale support--------------------------------------------//
|
||||
|
||||
#ifndef BOOST_IOSTREAMS_NO_LOCALE
|
||||
-# if defined(BOOST_NO_STD_LOCALE) || \
|
||||
- defined(__CYGWIN__) && \
|
||||
+# if defined(BOOST_NO_STD_LOCALE) && \
|
||||
( !defined(__MSL_CPP__) || defined(_MSL_NO_WCHART_CPP_SUPPORT) ) \
|
||||
/**/
|
||||
# define BOOST_IOSTREAMS_NO_LOCALE
|
||||
--- boost_1_40_0/boost/iostreams/detail/config/windows_posix.hpp 2008-03-22 16:45:55.000000000 -0500
|
||||
+++ boost_1_40_0/boost/iostreams/detail/config/windows_posix.hpp 2009-08-27 23:41:34.087545100 -0500
|
||||
@@ -13,8 +13,7 @@
|
||||
|
||||
// BOOST_IOSTREAMS_POSIX or BOOST_IOSTREAMS_WINDOWS specify which API to use.
|
||||
#if !defined( BOOST_IOSTREAMS_WINDOWS ) && !defined( BOOST_IOSTREAMS_POSIX )
|
||||
-# if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && \
|
||||
- !defined(__CYGWIN__) \
|
||||
+# if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32))
|
||||
/**/
|
||||
# define BOOST_IOSTREAMS_WINDOWS
|
||||
# else
|
@ -0,0 +1,35 @@
|
||||
--- boost_1_40_0/boost/python/detail/config.hpp 2007-11-25 12:07:19.000000000 -0600
|
||||
+++ boost_1_40_0/boost/python/detail/config.hpp 2009-08-27 23:41:34.092545400 -0500
|
||||
@@ -83,7 +83,7 @@
|
||||
# endif
|
||||
# define BOOST_PYTHON_DECL_FORWARD
|
||||
# define BOOST_PYTHON_DECL_EXCEPTION __attribute__ ((__visibility__("default")))
|
||||
-# elif (defined(_WIN32) || defined(__CYGWIN__))
|
||||
+# elif defined(_WIN32)
|
||||
# if defined(BOOST_PYTHON_SOURCE)
|
||||
# define BOOST_PYTHON_DECL __declspec(dllexport)
|
||||
# define BOOST_PYTHON_BUILD_DLL
|
||||
--- boost_1_40_0/boost/python/detail/wrap_python.hpp 2007-04-27 17:16:47.000000000 -0500
|
||||
+++ boost_1_40_0/boost/python/detail/wrap_python.hpp 2009-08-27 23:41:34.096545600 -0500
|
||||
@@ -82,8 +82,8 @@
|
||||
// Some things we need in order to get Python.h to work with compilers other
|
||||
// than MSVC on Win32
|
||||
//
|
||||
-#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
-# if defined(__GNUC__) && defined(__CYGWIN__)
|
||||
+#if defined(_WIN32)
|
||||
+# if defined(__GNUC__)
|
||||
|
||||
# define SIZEOF_LONG 4
|
||||
|
||||
--- boost_1_40_0/boost/python/module_init.hpp 2007-06-07 13:08:54.000000000 -0500
|
||||
+++ boost_1_40_0/boost/python/module_init.hpp 2009-08-27 23:41:34.101545900 -0500
|
||||
@@ -15,7 +15,7 @@ BOOST_PYTHON_DECL void init_module(char
|
||||
|
||||
}}}
|
||||
|
||||
-# if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(BOOST_PYTHON_STATIC_MODULE)
|
||||
+# if defined(_WIN32) && !defined(BOOST_PYTHON_STATIC_MODULE)
|
||||
|
||||
# define BOOST_PYTHON_MODULE_INIT(name) \
|
||||
void init_module_##name(); \
|
@ -0,0 +1,15 @@
|
||||
--- boost_1_40_0/boost/regex/v4/fileiter.hpp 2007-11-25 12:07:19.000000000 -0600
|
||||
+++ boost_1_40_0/boost/regex/v4/fileiter.hpp 2009-08-27 23:41:34.106546200 -0500
|
||||
@@ -28,11 +28,7 @@
|
||||
|
||||
#ifndef BOOST_REGEX_NO_FILEITER
|
||||
|
||||
-#if (defined(__CYGWIN__) || defined(__CYGWIN32__)) && !defined(BOOST_REGEX_NO_W32)
|
||||
-#error "Sorry, can't mix <windows.h> with STL code and gcc compiler: if you ran configure, try again with configure --disable-ms-windows"
|
||||
-#define BOOST_REGEX_FI_WIN32_MAP
|
||||
-#define BOOST_REGEX_FI_POSIX_DIR
|
||||
-#elif (defined(__WIN32__) || defined(_WIN32) || defined(WIN32)) && !defined(BOOST_REGEX_NO_W32)
|
||||
+#if (defined(__WIN32__) || defined(_WIN32) || defined(WIN32)) && !defined(BOOST_REGEX_NO_W32)
|
||||
#define BOOST_REGEX_FI_WIN32_MAP
|
||||
#define BOOST_REGEX_FI_WIN32_DIR
|
||||
#else
|
@ -0,0 +1,12 @@
|
||||
OS_CYGWIN is used to assume cygpath, Win32-isms
|
||||
|
||||
--- boost_1_48_0/tools/build/src/engine/jam.h
|
||||
+++ boost_1_48_0/tools/build/src/engine/jam.h
|
||||
@@ -245,7 +245,6 @@
|
||||
#endif
|
||||
#if defined(__cygwin__) || defined(__CYGWIN__)
|
||||
#define OSMINOR "OS=CYGWIN"
|
||||
- #define OS_CYGWIN
|
||||
#endif
|
||||
#if defined(__FreeBSD__) && !defined(__DragonFly__)
|
||||
#define OSMINOR "OS=FREEBSD"
|
@ -0,0 +1,11 @@
|
||||
--- a/tools/build/src/tools/python.jam 2012-04-25 22:35:55.000000000 -0500
|
||||
+++ b/tools/build/src/tools/python.jam 2013-01-21 07:22:30.814373200 -0600
|
||||
@@ -376,7 +376,7 @@ local rule path-to-native ( paths * )
|
||||
#
|
||||
local rule split-version ( version )
|
||||
{
|
||||
- local major-minor = [ MATCH ^([0-9]+)\.([0-9]+)(.*)$ : $(version) : 1 2 3 ] ;
|
||||
+ local major-minor = [ MATCH ^([0-9]+)\.([0-9]+[dmu]*)(.*)$ : $(version) : 1 2 3 ] ;
|
||||
if ! $(major-minor[2]) || $(major-minor[3])
|
||||
{
|
||||
ECHO "Warning: \"using python\" expects a two part (major, minor) version number; got" $(version) instead ;
|
@ -0,0 +1,14 @@
|
||||
--- boost_1_55_0/boost/asio/detail/socket_types.hpp 2014-08-31 12:43:54.186255800 -0500
|
||||
+++ boost_1_55_0/boost/asio/detail/socket_types.hpp 2014-08-31 12:43:03.887868700 -0500
|
||||
@@ -332,7 +332,11 @@ typedef int signed_size_type;
|
||||
# define BOOST_ASIO_OS_DEF_MSG_OOB MSG_OOB
|
||||
# define BOOST_ASIO_OS_DEF_MSG_PEEK MSG_PEEK
|
||||
# define BOOST_ASIO_OS_DEF_MSG_DONTROUTE MSG_DONTROUTE
|
||||
+#ifdef MSG_EOR
|
||||
# define BOOST_ASIO_OS_DEF_MSG_EOR MSG_EOR
|
||||
+#else
|
||||
+# define BOOST_ASIO_OS_DEF_MSG_EOR 0
|
||||
+#endif
|
||||
# define BOOST_ASIO_OS_DEF_SHUT_RD SHUT_RD
|
||||
# define BOOST_ASIO_OS_DEF_SHUT_WR SHUT_WR
|
||||
# define BOOST_ASIO_OS_DEF_SHUT_RDWR SHUT_RDWR
|
@ -0,0 +1,11 @@
|
||||
--- boost_1_55_0/boost/detail/interlocked.hpp 2013-10-24 09:01:53.000000000 -0500
|
||||
+++ boost_1_55_0/boost/detail/interlocked.hpp 2014-08-31 13:01:33.830313500 -0500
|
||||
@@ -160,7 +160,7 @@ extern "C" void* __cdecl _InterlockedExc
|
||||
((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange)))
|
||||
# endif
|
||||
|
||||
-#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ )
|
||||
+#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
|
||||
|
||||
#define BOOST_INTERLOCKED_IMPORT __declspec(dllimport)
|
||||
|
1835
pkgs/development/libraries/boost/cygwin-1.57.0-asio-cygwin.patch
Normal file
1835
pkgs/development/libraries/boost/cygwin-1.57.0-asio-cygwin.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,76 @@
|
||||
--- boost_1_57_0/boost/config/platform/cygwin.hpp 2015-05-04 18:02:21.742811600 -0500
|
||||
+++ boost_1_57_0/boost/config/platform/cygwin.hpp 2015-05-04 17:16:30.183407900 -0500
|
||||
@@ -39,18 +39,8 @@
|
||||
#define BOOST_HAS_STDINT_H
|
||||
#endif
|
||||
|
||||
-/// Cygwin has no fenv.h
|
||||
-#define BOOST_NO_FENV_H
|
||||
-
|
||||
// boilerplate code:
|
||||
#include <boost/config/posix_features.hpp>
|
||||
-
|
||||
-//
|
||||
-// Cygwin lies about XSI conformance, there is no nl_types.h:
|
||||
-//
|
||||
-#ifdef BOOST_HAS_NL_TYPES_H
|
||||
-# undef BOOST_HAS_NL_TYPES_H
|
||||
-#endif
|
||||
|
||||
|
||||
|
||||
--- boost_1_57_0/boost/config/stdlib/libstdcpp3.hpp 2014-10-26 07:36:42.000000000 -0500
|
||||
+++ boost_1_57_0/boost/config/stdlib/libstdcpp3.hpp 2015-05-04 17:54:44.835791700 -0500
|
||||
@@ -68,7 +68,7 @@
|
||||
#endif
|
||||
|
||||
// Apple doesn't seem to reliably defined a *unix* macro
|
||||
-#if !defined(CYGWIN) && ( defined(__unix__) \
|
||||
+#if ( defined(__unix__) \
|
||||
|| defined(__unix) \
|
||||
|| defined(unix) \
|
||||
|| defined(__APPLE__) \
|
||||
--- boost_1_57_0/boost/config/stdlib/sgi.hpp 2014-10-26 07:36:42.000000000 -0500
|
||||
+++ boost_1_57_0/boost/config/stdlib/sgi.hpp 2015-05-04 17:54:52.911817300 -0500
|
||||
@@ -41,7 +41,7 @@
|
||||
#endif
|
||||
|
||||
// Apple doesn't seem to reliably defined a *unix* macro
|
||||
-#if !defined(CYGWIN) && ( defined(__unix__) \
|
||||
+#if ( defined(__unix__) \
|
||||
|| defined(__unix) \
|
||||
|| defined(unix) \
|
||||
|| defined(__APPLE__) \
|
||||
--- boost_1_57_0/boost/config/stdlib/stlport.hpp 2014-10-26 07:36:42.000000000 -0500
|
||||
+++ boost_1_57_0/boost/config/stdlib/stlport.hpp 2015-05-04 17:55:00.621796300 -0500
|
||||
@@ -17,7 +17,7 @@
|
||||
#endif
|
||||
|
||||
// Apple doesn't seem to reliably defined a *unix* macro
|
||||
-#if !defined(CYGWIN) && ( defined(__unix__) \
|
||||
+#if ( defined(__unix__) \
|
||||
|| defined(__unix) \
|
||||
|| defined(unix) \
|
||||
|| defined(__APPLE__) \
|
||||
--- boost_1_57_0/boost/config/stdlib/vacpp.hpp 2014-10-26 07:36:42.000000000 -0500
|
||||
+++ boost_1_57_0/boost/config/stdlib/vacpp.hpp 2015-05-04 17:55:07.424660200 -0500
|
||||
@@ -13,7 +13,7 @@
|
||||
#define BOOST_NO_STD_MESSAGES
|
||||
|
||||
// Apple doesn't seem to reliably defined a *unix* macro
|
||||
-#if !defined(CYGWIN) && ( defined(__unix__) \
|
||||
+#if ( defined(__unix__) \
|
||||
|| defined(__unix) \
|
||||
|| defined(unix) \
|
||||
|| defined(__APPLE__) \
|
||||
--- boost_1_57_0/boost/predef/os/cygwin.h 2014-07-10 08:53:53.000000000 -0500
|
||||
+++ boost_1_57_0/boost/predef/os/cygwin.h 2015-05-04 17:57:31.634472500 -0500
|
||||
@@ -29,7 +29,7 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
defined(__CYGWIN__) \
|
||||
)
|
||||
# undef BOOST_OS_CYGWIN
|
||||
-# define BOOST_OS_CGYWIN BOOST_VERSION_NUMBER_AVAILABLE
|
||||
+# define BOOST_OS_CYGWIN BOOST_VERSION_NUMBER_AVAILABLE
|
||||
#endif
|
||||
|
||||
#if BOOST_OS_CYGWIN
|
@ -0,0 +1,600 @@
|
||||
--- boost_1_57_0/libs/context/build/Jamfile.v2 2014-10-20 01:26:00.000000000 -0500
|
||||
+++ boost_1_57_0/libs/context/build/Jamfile.v2 2015-05-04 17:43:10.812161900 -0500
|
||||
@@ -29,6 +29,7 @@ local rule default_binary_format ( )
|
||||
local tmp = elf ;
|
||||
if [ os.name ] = "MACOSX" { tmp = mach-o ; }
|
||||
if [ os.name ] = "NT" { tmp = pe ; }
|
||||
+ if [ os.name ] = "CYGWIN" { tmp = pe ; }
|
||||
if [ os.name ] = "AIX" { tmp = xcoff ; }
|
||||
return $(tmp) ;
|
||||
}
|
||||
@@ -581,6 +582,16 @@ alias asm_context_sources
|
||||
;
|
||||
|
||||
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
|
||||
+ <toolset>gcc
|
||||
+ ;
|
||||
+
|
||||
+alias asm_context_sources
|
||||
: asm/make_i386_ms_pe_masm.asm
|
||||
asm/jump_i386_ms_pe_masm.asm
|
||||
dummy.cpp
|
||||
@@ -715,6 +726,16 @@ alias asm_context_sources
|
||||
;
|
||||
|
||||
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
|
||||
+ <toolset>gcc
|
||||
+ ;
|
||||
+
|
||||
+alias asm_context_sources
|
||||
: asm/make_x86_64_ms_pe_masm.asm
|
||||
asm/jump_x86_64_ms_pe_masm.asm
|
||||
dummy.cpp
|
||||
--- boost_1_57_0/libs/context/src/asm/jump_i386_ms_pe_gas.S 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ boost_1_57_0/libs/context/src/asm/jump_i386_ms_pe_gas.S 2015-05-04 17:43:10.821663100 -0500
|
||||
@@ -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 */
|
||||
--- boost_1_57_0/libs/context/src/asm/jump_x86_64_ms_pe_gas.S 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ boost_1_57_0/libs/context/src/asm/jump_x86_64_ms_pe_gas.S 2015-05-04 17:43:10.829664200 -0500
|
||||
@@ -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
|
||||
--- boost_1_57_0/libs/context/src/asm/make_i386_ms_pe_gas.S 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ boost_1_57_0/libs/context/src/asm/make_i386_ms_pe_gas.S 2015-05-04 17:43:10.836165000 -0500
|
||||
@@ -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 */
|
||||
--- boost_1_57_0/libs/context/src/asm/make_x86_64_ms_pe_gas.S 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ boost_1_57_0/libs/context/src/asm/make_x86_64_ms_pe_gas.S 2015-05-04 17:43:10.843165900 -0500
|
||||
@@ -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 */
|
@ -0,0 +1,32 @@
|
||||
--- boost_1_57_0/libs/filesystem/src/operations.cpp 2014-10-29 10:34:00.000000000 -0500
|
||||
+++ boost_1_57_0/libs/filesystem/src/operations.cpp 2015-05-04 23:30:34.278446000 -0500
|
||||
@@ -1966,8 +1966,7 @@ namespace
|
||||
{
|
||||
errno = 0;
|
||||
|
||||
-# if !defined(__CYGWIN__)\
|
||||
- && defined(_POSIX_THREAD_SAFE_FUNCTIONS)\
|
||||
+# if defined(_POSIX_THREAD_SAFE_FUNCTIONS)\
|
||||
&& defined(_SC_THREAD_SAFE_FUNCTIONS)\
|
||||
&& (_POSIX_THREAD_SAFE_FUNCTIONS+0 >= 0)\
|
||||
&& (!defined(__hpux) || defined(_REENTRANT)) \
|
||||
--- boost_1_57_0/libs/filesystem/src/path.cpp 2014-10-29 10:34:00.000000000 -0500
|
||||
+++ boost_1_57_0/libs/filesystem/src/path.cpp 2015-05-04 17:45:45.582315200 -0500
|
||||
@@ -36,7 +36,7 @@
|
||||
# include "windows_file_codecvt.hpp"
|
||||
# include <windows.h>
|
||||
#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) \
|
||||
- || defined(__FreeBSD__) || defined(__OPEN_BSD__)
|
||||
+ || defined(__FreeBSD__) || defined(__OPEN_BSD__) || defined(__CYGWIN__)
|
||||
# include <boost/filesystem/detail/utf8_codecvt_facet.hpp>
|
||||
#endif
|
||||
|
||||
@@ -831,7 +831,7 @@ namespace
|
||||
std::locale global_loc = std::locale();
|
||||
return std::locale(global_loc, new windows_file_codecvt);
|
||||
# elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) \
|
||||
- || defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
+ || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__CYGWIN__)
|
||||
// "All BSD system functions expect their string parameters to be in UTF-8 encoding
|
||||
// and nothing else." See
|
||||
// http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPInternational/Articles/FileEncodings.html
|
@ -0,0 +1,81 @@
|
||||
--- boost_1_57_0/libs/locale/build/Jamfile.v2 2014-04-06 08:11:49.000000000 -0500
|
||||
+++ boost_1_57_0/libs/locale/build/Jamfile.v2 2015-05-04 18:11:52.956846500 -0500
|
||||
@@ -261,7 +261,7 @@ rule configure-full ( properties * : fla
|
||||
|
||||
}
|
||||
|
||||
- if ! $(found-iconv) && ! $(found-icu) && ! <target-os>windows in $(properties) && ! <target-os>cygwin in $(properties)
|
||||
+ if ! $(found-iconv) && ! $(found-icu) && ! <target-os>windows in $(properties)
|
||||
{
|
||||
ECHO "- Boost.Locale needs either iconv or ICU library to be built." ;
|
||||
result += <build>no ;
|
||||
@@ -298,7 +298,6 @@ rule configure-full ( properties * : fla
|
||||
if ! <boost.locale.winapi> in $(properties:G)
|
||||
{
|
||||
if <target-os>windows in $(properties)
|
||||
- || <target-os>cygwin in $(properties)
|
||||
{
|
||||
properties += <boost.locale.winapi>on ;
|
||||
}
|
||||
@@ -335,7 +334,7 @@ rule configure-full ( properties * : fla
|
||||
}
|
||||
|
||||
if ( ! <boost.locale.winapi>off in $(properties) || ! <boost.locale.std>off in $(properties) )
|
||||
- && ( <target-os>windows in $(properties) || <target-os>cygwin in $(properties) )
|
||||
+ && <target-os>windows in $(properties)
|
||||
{
|
||||
result += <source>win32/lcid.cpp ;
|
||||
}
|
||||
--- boost_1_57_0/libs/locale/src/encoding/codepage.cpp 2014-04-06 08:11:49.000000000 -0500
|
||||
+++ boost_1_57_0/libs/locale/src/encoding/codepage.cpp 2015-05-04 23:16:01.778652600 -0500
|
||||
@@ -8,7 +8,7 @@
|
||||
#define BOOST_LOCALE_SOURCE
|
||||
#include <boost/config.hpp>
|
||||
|
||||
-#if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
|
||||
+#if defined(BOOST_WINDOWS)
|
||||
#define BOOST_LOCALE_WITH_WCONV
|
||||
#endif
|
||||
|
||||
--- boost_1_57_0/libs/locale/src/encoding/conv.hpp 2014-04-06 08:11:49.000000000 -0500
|
||||
+++ boost_1_57_0/libs/locale/src/encoding/conv.hpp 2015-05-04 23:16:08.454000300 -0500
|
||||
@@ -59,7 +59,7 @@ namespace boost {
|
||||
return normalize_encoding(l).compare(normalize_encoding(r));
|
||||
}
|
||||
|
||||
- #if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
|
||||
+ #if defined(BOOST_WINDOWS)
|
||||
int encoding_to_windows_codepage(char const *ccharset);
|
||||
#endif
|
||||
|
||||
--- boost_1_57_0/libs/locale/src/util/default_locale.cpp 2014-04-06 08:11:49.000000000 -0500
|
||||
+++ boost_1_57_0/libs/locale/src/util/default_locale.cpp 2015-05-04 23:16:16.311998100 -0500
|
||||
@@ -15,7 +15,7 @@
|
||||
# pragma warning(disable : 4996)
|
||||
#endif
|
||||
|
||||
-#if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
|
||||
+#if defined(BOOST_WINDOWS)
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
--- boost_1_57_0/libs/locale/test/test_codepage.cpp 2014-04-06 08:11:49.000000000 -0500
|
||||
+++ boost_1_57_0/libs/locale/test/test_codepage.cpp 2015-05-04 23:16:40.883618300 -0500
|
||||
@@ -23,7 +23,7 @@
|
||||
# include <locale.h>
|
||||
#endif
|
||||
|
||||
-#if !defined(BOOST_LOCALE_WITH_ICU) && !defined(BOOST_LOCALE_WITH_ICONV) && (defined(BOOST_WINDOWS) || defined(__CYGWIN__))
|
||||
+#if !defined(BOOST_LOCALE_WITH_ICU) && !defined(BOOST_LOCALE_WITH_ICONV) && defined(BOOST_WINDOWS)
|
||||
#ifndef NOMINMAX
|
||||
# define NOMINMAX
|
||||
#endif
|
||||
@@ -395,7 +395,7 @@ int main()
|
||||
def.push_back("posix");
|
||||
#endif
|
||||
|
||||
- #if !defined(BOOST_LOCALE_WITH_ICU) && !defined(BOOST_LOCALE_WITH_ICONV) && (defined(BOOST_WINDOWS) || defined(__CYGWIN__))
|
||||
+ #if !defined(BOOST_LOCALE_WITH_ICU) && !defined(BOOST_LOCALE_WITH_ICONV) && defined(BOOST_WINDOWS)
|
||||
test_iso_8859_8 = IsValidCodePage(28598)!=0;
|
||||
#endif
|
||||
|
@ -0,0 +1,46 @@
|
||||
--- boost_1_57_0/boost/log/detail/config.hpp 2014-10-29 19:19:00.000000000 -0500
|
||||
+++ boost_1_57_0/boost/log/detail/config.hpp 2015-05-04 17:56:38.663746100 -0500
|
||||
@@ -96,11 +96,6 @@
|
||||
# define BOOST_LOG_BROKEN_CONSTANT_EXPRESSIONS
|
||||
#endif
|
||||
|
||||
-#if defined(__CYGWIN__)
|
||||
- // Boost.ASIO is broken on Cygwin
|
||||
-# define BOOST_LOG_NO_ASIO
|
||||
-#endif
|
||||
-
|
||||
#if !defined(BOOST_LOG_USE_NATIVE_SYSLOG) && defined(BOOST_LOG_NO_ASIO)
|
||||
# ifndef BOOST_LOG_WITHOUT_SYSLOG
|
||||
# define BOOST_LOG_WITHOUT_SYSLOG
|
||||
--- boost_1_57_0/libs/log/build/Jamfile.v2 2014-10-29 19:19:00.000000000 -0500
|
||||
+++ boost_1_57_0/libs/log/build/Jamfile.v2 2015-05-04 22:16:49.242537800 -0500
|
||||
@@ -170,10 +170,6 @@ project boost/log
|
||||
<target-os>windows:<library>ws2_32
|
||||
<target-os>windows:<library>mswsock
|
||||
|
||||
- <target-os>cygwin:<define>__USE_W32_SOCKETS
|
||||
- <target-os>cygwin:<library>ws2_32
|
||||
- <target-os>cygwin:<library>mswsock
|
||||
-
|
||||
<target-os>linux:<library>rt
|
||||
<target-os>linux:<define>_XOPEN_SOURCE=600
|
||||
<target-os>linux:<define>_GNU_SOURCE=1
|
||||
--- boost_1_57_0/libs/log/src/windows_version.hpp 2014-10-29 19:19:00.000000000 -0500
|
||||
+++ boost_1_57_0/libs/log/src/windows_version.hpp 2015-05-04 23:17:08.281597400 -0500
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#include <boost/log/detail/config.hpp>
|
||||
|
||||
-#if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
|
||||
+#if defined(BOOST_WINDOWS)
|
||||
|
||||
#if defined(BOOST_LOG_USE_WINNT6_API)
|
||||
|
||||
@@ -50,6 +50,6 @@
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
|
||||
-#endif // defined(BOOST_WINDOWS) || defined(__CYGWIN__)
|
||||
+#endif // defined(BOOST_WINDOWS)
|
||||
|
||||
#endif // BOOST_LOG_WINDOWS_VERSION_HPP_INCLUDED_
|
@ -0,0 +1,77 @@
|
||||
--- boost_1_57_0/boost/smart_ptr/detail/atomic_count.hpp 2014-08-21 15:48:32.000000000 -0500
|
||||
+++ boost_1_57_0/boost/smart_ptr/detail/atomic_count.hpp 2015-05-04 17:47:15.556740500 -0500
|
||||
@@ -79,7 +79,7 @@
|
||||
#elif defined( BOOST_SP_HAS_SYNC )
|
||||
# include <boost/smart_ptr/detail/atomic_count_sync.hpp>
|
||||
|
||||
-#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
||||
+#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
|
||||
# include <boost/smart_ptr/detail/atomic_count_win32.hpp>
|
||||
|
||||
#elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
|
||||
--- boost_1_57_0/boost/smart_ptr/detail/lightweight_mutex.hpp 2014-08-21 15:48:32.000000000 -0500
|
||||
+++ boost_1_57_0/boost/smart_ptr/detail/lightweight_mutex.hpp 2015-05-04 17:47:45.234509100 -0500
|
||||
@@ -32,7 +32,7 @@
|
||||
# include <boost/smart_ptr/detail/lwm_nop.hpp>
|
||||
#elif defined(BOOST_HAS_PTHREADS)
|
||||
# include <boost/smart_ptr/detail/lwm_pthreads.hpp>
|
||||
-#elif defined(BOOST_HAS_WINTHREADS) || defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
||||
+#elif defined(BOOST_HAS_WINTHREADS) || defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
|
||||
# include <boost/smart_ptr/detail/lwm_win32_cs.hpp>
|
||||
#else
|
||||
// Use #define BOOST_DISABLE_THREADS to avoid the error
|
||||
--- boost_1_57_0/boost/smart_ptr/detail/sp_counted_base.hpp 2014-08-21 15:48:32.000000000 -0500
|
||||
+++ boost_1_57_0/boost/smart_ptr/detail/sp_counted_base.hpp 2015-05-04 17:47:45.240009800 -0500
|
||||
@@ -65,7 +65,7 @@
|
||||
#elif defined(__GNUC__) && ( defined( __sparcv9 ) || ( defined( __sparcv8 ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 402 ) ) )
|
||||
# include <boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp>
|
||||
|
||||
-#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined(__CYGWIN__)
|
||||
+#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
|
||||
# include <boost/smart_ptr/detail/sp_counted_base_w32.hpp>
|
||||
|
||||
#elif defined( _AIX )
|
||||
--- boost_1_57_0/boost/smart_ptr/detail/sp_interlocked.hpp 2014-08-21 15:48:32.000000000 -0500
|
||||
+++ boost_1_57_0/boost/smart_ptr/detail/sp_interlocked.hpp 2015-05-04 17:48:39.316376700 -0500
|
||||
@@ -119,7 +119,7 @@ extern "C" long __cdecl _InterlockedExch
|
||||
# define BOOST_SP_INTERLOCKED_EXCHANGE _InterlockedExchange
|
||||
# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd
|
||||
|
||||
-#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ )
|
||||
+#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
|
||||
|
||||
namespace boost
|
||||
{
|
||||
--- boost_1_57_0/boost/smart_ptr/detail/spinlock.hpp 2014-08-21 15:48:32.000000000 -0500
|
||||
+++ boost_1_57_0/boost/smart_ptr/detail/spinlock.hpp 2015-05-04 17:47:45.247510800 -0500
|
||||
@@ -49,7 +49,7 @@
|
||||
#elif defined( BOOST_SP_HAS_SYNC )
|
||||
# include <boost/smart_ptr/detail/spinlock_sync.hpp>
|
||||
|
||||
-#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
||||
+#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
|
||||
# include <boost/smart_ptr/detail/spinlock_w32.hpp>
|
||||
|
||||
#elif defined(BOOST_HAS_PTHREADS)
|
||||
--- boost_1_57_0/boost/smart_ptr/detail/yield_k.hpp 2014-08-21 15:48:32.000000000 -0500
|
||||
+++ boost_1_57_0/boost/smart_ptr/detail/yield_k.hpp 2015-05-04 17:47:45.253511600 -0500
|
||||
@@ -47,7 +47,7 @@ extern "C" void _mm_pause();
|
||||
|
||||
//
|
||||
|
||||
-#if defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ )
|
||||
+#if defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
|
||||
|
||||
#if defined( BOOST_USE_WINDOWS_H )
|
||||
# include <windows.h>
|
||||
--- boost_1_57_0/libs/smart_ptr/test/sp_interlocked_test.cpp 2014-08-21 15:48:32.000000000 -0500
|
||||
+++ boost_1_57_0/libs/smart_ptr/test/sp_interlocked_test.cpp 2015-05-04 23:18:21.717422600 -0500
|
||||
@@ -8,7 +8,7 @@
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
//
|
||||
|
||||
-#if defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ )
|
||||
+#if defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
|
||||
|
||||
#include <boost/smart_ptr/detail/sp_interlocked.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
@ -0,0 +1,22 @@
|
||||
--- boost_1_57_0/boost/system/api_config.hpp 2014-08-03 15:44:11.000000000 -0500
|
||||
+++ boost_1_57_0/boost/system/api_config.hpp 2015-05-04 17:51:31.189701800 -0500
|
||||
@@ -33,7 +33,7 @@
|
||||
// Standalone MinGW and all other known Windows compilers do predefine _WIN32
|
||||
// Compilers that predefine _WIN32 or __MINGW32__ do so for Windows 64-bit builds too.
|
||||
|
||||
-# if defined(_WIN32) || defined(__CYGWIN__) // Windows default, including MinGW and Cygwin
|
||||
+# if defined(_WIN32) // Windows default, including MinGW and Cygwin
|
||||
# define BOOST_WINDOWS_API
|
||||
# else
|
||||
# define BOOST_POSIX_API
|
||||
--- boost_1_57_0/boost/system/detail/error_code.ipp 2014-08-03 15:44:11.000000000 -0500
|
||||
+++ boost_1_57_0/boost/system/detail/error_code.ipp 2015-05-04 17:51:02.925112700 -0500
|
||||
@@ -97,7 +97,7 @@ namespace
|
||||
char buf[64];
|
||||
char * bp = buf;
|
||||
std::size_t sz = sizeof(buf);
|
||||
- # if defined(__CYGWIN__) || defined(__USE_GNU)
|
||||
+ # if defined(__GNU_VISIBLE) || defined(__USE_GNU)
|
||||
// Oddball version of strerror_r
|
||||
const char * c_str = strerror_r( ev, bp, sz );
|
||||
return c_str
|
@ -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;
|
@ -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;
|
||||
+}
|
@ -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) {
|
@ -0,0 +1,14 @@
|
||||
diff -up ./boost/pool/pool.hpp~ ./boost/pool/pool.hpp
|
||||
--- a/boost/pool/pool.hpp~ 2013-08-21 17:49:56.023296922 +0200
|
||||
+++ b/boost/pool/pool.hpp 2013-08-22 11:38:01.133912638 +0200
|
||||
@@ -361,9 +361,7 @@ class pool: protected simple_segregated_
|
||||
{ //! 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;
|
||||
+ return (std::numeric_limits<size_type>::max() - POD_size) / alloc_size();
|
||||
}
|
||||
|
||||
static void * & nextof(void * const ptr)
|
@ -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
|
@ -0,0 +1,20 @@
|
||||
diff -up ./move/core.hpp~ ./move/core.hpp
|
||||
--- a/boost/move/core.hpp~ 2015-02-09 17:33:35.000000000 +0100
|
||||
+++ b/boost/move/core.hpp 2015-02-13 13:54:52.012130813 +0100
|
||||
@@ -43,6 +43,7 @@
|
||||
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
|
||||
|
||||
#include <boost/move/detail/meta_utils.hpp>
|
||||
+ #include <boost/type_traits/is_class.hpp>
|
||||
|
||||
//Move emulation rv breaks standard aliasing rules so add workarounds for some compilers
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 4) && \
|
||||
@@ -65,7 +66,7 @@
|
||||
template <class T>
|
||||
class rv
|
||||
: public ::boost::move_detail::if_c
|
||||
- < ::boost::move_detail::is_class_or_union<T>::value
|
||||
+ < ::boost::is_class<T>::value
|
||||
, T
|
||||
, ::boost::move_detail::nat
|
||||
>::type
|
@ -0,0 +1,31 @@
|
||||
diff -up boost_1_57_0/boost/mpl/print.hpp\~ boost_1_57_0/boost/mpl/print.hpp
|
||||
--- boost_1_57_0/boost/mpl/print.hpp~ 2014-07-09 23:12:31.000000000 +0200
|
||||
+++ boost_1_57_0/boost/mpl/print.hpp 2015-01-20 12:44:59.621400948 +0100
|
||||
@@ -52,16 +52,15 @@ struct print
|
||||
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)
|
||||
|
||||
Diff finished. Tue Jan 20 12:45:03 2015
|
@ -0,0 +1,33 @@
|
||||
diff -up boost_1_57_0/libs/pool/test/Jamfile.v2\~ boost_1_57_0/libs/pool/test/Jamfile.v2
|
||||
--- boost_1_57_0/libs/pool/test/Jamfile.v2~ 2014-07-10 06:36:10.000000000 +0200
|
||||
+++ boost_1_57_0/libs/pool/test/Jamfile.v2 2015-01-20 13:59:10.818700586 +0100
|
||||
@@ -28,17 +28,17 @@ explicit valgrind_config_check ;
|
||||
local use-valgrind = [ check-target-builds valgrind_config_check "valgrind" : <testing.launcher>"valgrind --error-exitcode=1" : <build>no ] ;
|
||||
|
||||
test-suite pool :
|
||||
- [ run test_simple_seg_storage.cpp ]
|
||||
- [ run test_pool_alloc.cpp ]
|
||||
- [ run pool_msvc_compiler_bug_test.cpp ]
|
||||
- [ run test_msvc_mem_leak_detect.cpp ]
|
||||
- [ run test_bug_3349.cpp ]
|
||||
- [ run test_bug_4960.cpp ]
|
||||
- [ run test_bug_1252.cpp ]
|
||||
- [ run test_bug_2696.cpp ]
|
||||
- [ run test_bug_5526.cpp ]
|
||||
+ [ run test_simple_seg_storage.cpp : : : <library>/boost/system//boost_system ]
|
||||
+ [ run test_pool_alloc.cpp : : : <library>/boost/system//boost_system ]
|
||||
+ [ run pool_msvc_compiler_bug_test.cpp : : : <library>/boost/system//boost_system ]
|
||||
+ [ run test_msvc_mem_leak_detect.cpp : : : <library>/boost/system//boost_system ]
|
||||
+ [ run test_bug_3349.cpp : : : <library>/boost/system//boost_system ]
|
||||
+ [ run test_bug_4960.cpp : : : <library>/boost/system//boost_system ]
|
||||
+ [ run test_bug_1252.cpp : : : <library>/boost/system//boost_system ]
|
||||
+ [ run test_bug_2696.cpp : : : <library>/boost/system//boost_system ]
|
||||
+ [ run test_bug_5526.cpp : : : <library>/boost/system//boost_system ]
|
||||
[ run test_threading.cpp : : : <threading>multi <library>/boost/thread//boost_thread <toolset>gcc:<cxxflags>-Wno-attributes <toolset>gcc:<cxxflags>-Wno-missing-field-initializers ]
|
||||
- [ run ../example/time_pool_alloc.cpp ]
|
||||
+ [ run ../example/time_pool_alloc.cpp : : : <library>/boost/system//boost_system ]
|
||||
[ compile test_poisoned_macros.cpp ]
|
||||
|
||||
#
|
||||
|
||||
Diff finished. Tue Jan 20 13:59:16 2015
|
@ -0,0 +1,10 @@
|
||||
--- a/boost/signals2/trackable.hpp
|
||||
+++ b/boost/signals2/trackable.hpp
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
+#include <boost/weak_ptr.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace signals2 {
|
@ -0,0 +1,19 @@
|
||||
diff -up boost_1_57_0/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp\~ boost_1_57_0/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp
|
||||
--- boost_1_57_0/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp~ 2014-10-13 12:21:40.000000000 +0200
|
||||
+++ boost_1_57_0/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp 2015-01-20 13:25:50.069710766 +0100
|
||||
@@ -282,12 +282,12 @@ 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 =
|
||||
grammartract_helper_list::do_(self);
|
||||
|
||||
# if defined(BOOST_INTEL_CXX_VERSION)
|
||||
+ typedef typename helper_list_t::vector_t::reverse_iterator iterator_t;
|
||||
for (iterator_t i = helpers.rbegin(); i != helpers.rend(); ++i)
|
||||
(*i)->undefine(self);
|
||||
# else
|
||||
|
||||
Diff finished. Tue Jan 20 13:25:53 2015
|
@ -0,0 +1,11 @@
|
||||
--- a/boost/uuid/detail/uuid_x86.hpp
|
||||
+++ b/boost/uuid/detail/uuid_x86.hpp
|
||||
@@ -100,7 +100,7 @@ inline bool operator< (uuid const& lhs, uuid const& rhs) BOOST_NOEXCEPT
|
||||
cmp = (cmp - 1u) ^ cmp;
|
||||
rcmp = (rcmp - 1u) ^ rcmp;
|
||||
|
||||
- return static_cast< uint16_t >(cmp) < static_cast< uint16_t >(rcmp);
|
||||
+ return cmp < rcmp;
|
||||
}
|
||||
|
||||
} // namespace uuids
|
Loading…
Reference in New Issue
Block a user