diff -urN origsrc/boost_1_55_0/libs/context/build/Jamfile.v2 src/boost_1_55_0/libs/context/build/Jamfile.v2
--- origsrc/boost_1_55_0/libs/context/build/Jamfile.v2	2013-07-27 00:24:15.000000000 +0900
+++ src/boost_1_55_0/libs/context/build/Jamfile.v2	2014-04-16 23:55:03.659425600 +0900
@@ -29,6 +29,7 @@
     local tmp = elf ;
     if [ os.name ] = "MACOSX" { tmp = mach-o ; }
     if [ os.name ] = "NT" { tmp = pe ; }
+    if [ os.name ] = "CYGWIN" { tmp = pe ; }
     return $(tmp) ;
 }
 
@@ -45,6 +46,7 @@
 {
     local tmp = sysv ;
     if [ os.name ] = "NT" { tmp = ms ; }
+    else if [ os.name ] = "CYGWIN" { tmp = cyg ; }
     else if [ os.platform ] = "ARM" { tmp = aapcs ; }
     else if [ os.platform ] = "MIPS" { tmp = o32 ; }
     return $(tmp) ;
@@ -54,6 +56,7 @@
    : aapcs
      eabi
      ms
+     cyg
      n32
      n64
      o32
@@ -341,6 +344,28 @@
    ;
 
 alias asm_context_sources
+   : [ make asm/make_i386_ms_pe_gas.o : asm/make_i386_ms_pe_gas.S : @gas ]
+     [ make asm/jump_i386_ms_pe_gas.o : asm/jump_i386_ms_pe_gas.S : @gas ]
+   : <abi>ms
+     <address-model>32
+     <architecture>x86
+     <binary-format>pe
+     <target-os>windows
+     <toolset>gcc
+   ;
+
+alias asm_context_sources
+   : [ make asm/make_i386_cyg_pe_gas.o : asm/make_i386_cyg_pe_gas.S : @gas ]
+     [ make asm/jump_i386_cyg_pe_gas.o : asm/jump_i386_cyg_pe_gas.S : @gas ]
+   : <abi>cyg
+     <address-model>32
+     <architecture>x86
+     <binary-format>pe
+     <target-os>cygwin
+     <toolset>gcc
+   ;
+
+alias asm_context_sources
    : [ make asm/make_i386_ms_pe_masm.o : asm/make_i386_ms_pe_masm.asm : @masm ]
      [ make asm/jump_i386_ms_pe_masm.o : asm/jump_i386_ms_pe_masm.asm : @masm ]
      dummy.cpp
diff -urN origsrc/boost_1_55_0/libs/context/src/asm/jump_i386_cyg_pe_gas.S src/boost_1_55_0/libs/context/src/asm/jump_i386_cyg_pe_gas.S
--- origsrc/boost_1_55_0/libs/context/src/asm/jump_i386_cyg_pe_gas.S	1970-01-01 09:00:00.000000000 +0900
+++ src/boost_1_55_0/libs/context/src/asm/jump_i386_cyg_pe_gas.S	2014-04-16 23:14:13.573652400 +0900
@@ -0,0 +1,127 @@
+/*
+            Copyright Oliver Kowalke 2009.
+   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|                                        |  *
+ *  --------------------------------------------------------------  *
+ *  --------------------------------------------------------------  *
+ *  |   13    |                                                  |  *
+ *  --------------------------------------------------------------  *
+ *  |  034h   |                                                  |  *
+ *  --------------------------------------------------------------  *
+ *  |fc_deallo|                                                  |  *
+ *  --------------------------------------------------------------  *
+ *                                                                  *
+ * *****************************************************************/
+
+/* Based on jump_i386_ms_pe_masm.asm and jump_i386_sysv_elf_gas.S */
+
+.text
+.globl _jump_fcontext
+.align 2
+.def _jump_fcontext; .scl 2; .type 32; .endef
+_jump_fcontext:
+    movl    0x4(%esp), %ecx         /* load address of the first fcontext_t arg */
+    movl    %edi,       (%ecx)      /* save EDI */
+    movl    %esi,       0x4(%ecx)   /* save ESI */
+    movl    %ebx,       0x8(%ecx)   /* save EBX */
+    movl    %ebp,       0xc(%ecx)   /* save EBP */
+
+    movl    %fs:0x18(,1), %edx      /* load NT_TIB */
+    movl    (%edx),     %eax        /* load current SEH exception list */
+    movl    %eax,       0x24(%ecx)  /* save current exception list */
+
+/* Do not touch NT_TIB stack base to keep cygtls */
+/*  movl    0x4(%edx),  %eax      *//* load current stack base */
+/*  movl    %eax,       0x18(%ecx)*//* save current stack base */
+/*  movl    0x8(%edx),  %eax      *//* load current stack limit */
+/*  movl    %eax,       0x20(%ecx)*//* save current stack limit */
+/*  movl    0xe0c(%edx),%eax      *//* load current deallocation stack */
+/*  movl    %eax,       0x34(%ecx)*//* save current deallocation stack */
+/* Do not touch NT_TIB stack base to keep cygtls */
+
+    movl    0x10(%edx), %eax        /* load fiber local storage */
+    movl    %eax,       0x28(%ecx)  /* save fiber local storage */
+
+    leal    0x4(%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    0x8(%esp),   %edx       /* load address of the second fcontext_t arg */
+    movl    (%edx),      %edi       /* restore EDI */
+    movl    0x4(%edx),   %esi       /* restore ESI */
+    movl    0x8(%edx),   %ebx       /* restore EBX */
+    movl    0xc(%edx),   %ebp       /* restore EBP */
+
+    movl    0x10(%esp),  %eax       /* check if fpu enve preserving was requested */
+    test    %eax,        %eax
+    je      nxt
+
+    stmxcsr  0x2c(%ecx)             /* save MMX control and status word */
+    fnstcw   0x30(%ecx)             /* save x87 control word */
+    ldmxcsr  0x2c(%edx)             /* restore MMX control and status word */
+    fldcw    0x30(%edx)             /* restore x87 control word */
+nxt:
+    movl    %edx,       %ecx
+    movl    %fs:0x18(,1), %edx      /* load NT_TIB */
+    movl    0x24(%ecx), %eax        /* load SEH exception list */
+    movl    %eax,       (%edx)      /* restore next SEH item */
+
+/* Do not touch NT_TIB stack base to keep cygtls */
+/*  movl    0x18(%ecx), %eax      *//* load stack base */
+/*  movl    %eax,       0x4(%edx) *//* restore stack base */
+/*  movl    0x20(%ecx), %eax      *//* load stack limit */
+/*  movl    %eax,       0x8(%edx) *//* restore stack limit */
+/*  movl    0x34(%ecx), %eax      *//* load deallocation stack */
+/*  movl    %eax,       0xe0c(%edx)*//* save deallocation stack */
+/* Do not touch NT_TIB stack base to keep cygtls */
+
+    movl    0x28(%ecx), %eax        /* load fiber local storage */
+    movl    %eax,       0x10(%edx)  /* restore fiber local storage */
+
+    movl    0xc(%esp),   %eax       /* use third arg as return value after jump */
+
+    movl    0x10(%ecx),  %esp       /* restore ESP */
+    movl    %eax,        0x4(%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 */
diff -urN origsrc/boost_1_55_0/libs/context/src/asm/jump_i386_ms_pe_gas.S src/boost_1_55_0/libs/context/src/asm/jump_i386_ms_pe_gas.S
--- origsrc/boost_1_55_0/libs/context/src/asm/jump_i386_ms_pe_gas.S	1970-01-01 09:00:00.000000000 +0900
+++ src/boost_1_55_0/libs/context/src/asm/jump_i386_ms_pe_gas.S	2014-04-16 23:13:57.305279400 +0900
@@ -0,0 +1,119 @@
+/*
+            Copyright Oliver Kowalke 2009.
+   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|                                        |  *
+ *  --------------------------------------------------------------  *
+ *  --------------------------------------------------------------  *
+ *  |   13    |                                                  |  *
+ *  --------------------------------------------------------------  *
+ *  |  034h   |                                                  |  *
+ *  --------------------------------------------------------------  *
+ *  |fc_deallo|                                                  |  *
+ *  --------------------------------------------------------------  *
+ *                                                                  *
+ * *****************************************************************/
+
+/* Based on jump_i386_ms_pe_masm.asm and jump_i386_sysv_elf_gas.S */
+
+.text
+.globl _jump_fcontext
+.align 2
+.def _jump_fcontext; .scl 2; .type 32; .endef
+_jump_fcontext:
+    movl    0x4(%esp), %ecx         /* load address of the first fcontext_t arg */
+    movl    %edi,       (%ecx)      /* save EDI */
+    movl    %esi,       0x4(%ecx)   /* save ESI */
+    movl    %ebx,       0x8(%ecx)   /* save EBX */
+    movl    %ebp,       0xc(%ecx)   /* save EBP */
+
+    movl    %fs:0x18(,1), %edx      /* load NT_TIB */
+    movl    (%edx),     %eax        /* load current SEH exception list */
+    movl    %eax,       0x24(%ecx)  /* save current exception list */
+    movl    0x4(%edx),  %eax        /* load current stack base */
+    movl    %eax,       0x18(%ecx)  /* save current stack base */
+    movl    0x8(%edx),  %eax        /* load current stack limit */
+    movl    %eax,       0x20(%ecx)  /* save current stack limit */
+    movl    0xe0c(%edx),%eax        /* load current deallocation stack */
+    movl    %eax,       0x34(%ecx)  /* save current deallocation stack */
+    movl    0x10(%edx), %eax        /* load fiber local storage */
+    movl    %eax,       0x28(%ecx)  /* save fiber local storage */
+
+    leal    0x4(%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    0x8(%esp),   %edx       /* load address of the second fcontext_t arg */
+    movl    (%edx),      %edi       /* restore EDI */
+    movl    0x4(%edx),   %esi       /* restore ESI */
+    movl    0x8(%edx),   %ebx       /* restore EBX */
+    movl    0xc(%edx),   %ebp       /* restore EBP */
+
+    movl    0x10(%esp),  %eax       /* check if fpu enve preserving was requested */
+    test    %eax,        %eax
+    je      nxt
+
+    stmxcsr  0x2c(%ecx)             /* save MMX control and status word */
+    fnstcw   0x30(%ecx)             /* save x87 control word */
+    ldmxcsr  0x2c(%edx)             /* restore MMX control and status word */
+    fldcw    0x30(%edx)             /* restore x87 control word */
+nxt:
+    movl    %edx,       %ecx
+    movl    %fs:0x18(,1), %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,       0x4(%edx)   /* restore stack base */
+    movl    0x20(%ecx), %eax        /* load stack limit */
+    movl    %eax,       0x8(%edx)   /* restore stack limit */
+    movl    0x34(%ecx), %eax        /* load deallocation stack */
+    movl    %eax,       0xe0c(%edx) /* save deallocation stack */
+    movl    0x28(%ecx), %eax        /* load fiber local storage */
+    movl    %eax,       0x10(%edx)  /* restore fiber local storage */
+
+    movl    0xc(%esp),   %eax       /* use third arg as return value after jump */
+
+    movl    0x10(%ecx),  %esp       /* restore ESP */
+    movl    %eax,        0x4(%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 */
diff -urN origsrc/boost_1_55_0/libs/context/src/asm/make_i386_cyg_pe_gas.S src/boost_1_55_0/libs/context/src/asm/make_i386_cyg_pe_gas.S
--- origsrc/boost_1_55_0/libs/context/src/asm/make_i386_cyg_pe_gas.S	1970-01-01 09:00:00.000000000 +0900
+++ src/boost_1_55_0/libs/context/src/asm/make_i386_cyg_pe_gas.S	2014-04-16 23:39:12.700339200 +0900
@@ -0,0 +1,124 @@
+/*
+            Copyright Oliver Kowalke 2009.
+   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|                                        |  *
+ *  --------------------------------------------------------------  *
+ *  --------------------------------------------------------------  *
+ *  |   13    |                                                  |  *
+ *  --------------------------------------------------------------  *
+ *  |  034h   |                                                  |  *
+ *  --------------------------------------------------------------  *
+ *  |fc_deallo|                                                  |  *
+ *  --------------------------------------------------------------  *
+ *                                                                  *
+ * *****************************************************************/
+
+/* Based on make_i386_ms_pe_masm.asm and make_i386_sysv_elf_gas.S */
+
+.text
+.globl _make_fcontext
+.align 2
+.def _make_fcontext; .scl 2; .type 32; .endef
+_make_fcontext:
+    movl   0x4(%esp),      %eax         /* load 1. arg of make_fcontext, pointer to context stack (base) */
+    leal   -0x38(%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   0x4(%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   0x8(%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   %ecx,           0x34(%eax)   /* save address of context stack limit as 'deallocation stack' */
+    movl   0xc(%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  0x2c(%eax)                 /* save MMX control and status word */
+    fnstcw   0x30(%eax)                 /* save x87 control word */
+
+    leal   -0x24(%eax),    %edx         /* reserve space for the last frame 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(,1),   %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
+
+found:
+    movl   0x4(%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 _align_stack; .scl 2; .type 32; .endef
+.def _seh_fcontext; .scl 2; .type 32; .endef
+.def _exit; .scl 2; .type 32; .endef
diff -urN origsrc/boost_1_55_0/libs/context/src/asm/make_i386_ms_pe_gas.S src/boost_1_55_0/libs/context/src/asm/make_i386_ms_pe_gas.S
--- origsrc/boost_1_55_0/libs/context/src/asm/make_i386_ms_pe_gas.S	1970-01-01 09:00:00.000000000 +0900
+++ src/boost_1_55_0/libs/context/src/asm/make_i386_ms_pe_gas.S	2014-04-16 23:39:28.996968700 +0900
@@ -0,0 +1,124 @@
+/*
+            Copyright Oliver Kowalke 2009.
+   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|                                        |  *
+ *  --------------------------------------------------------------  *
+ *  --------------------------------------------------------------  *
+ *  |   13    |                                                  |  *
+ *  --------------------------------------------------------------  *
+ *  |  034h   |                                                  |  *
+ *  --------------------------------------------------------------  *
+ *  |fc_deallo|                                                  |  *
+ *  --------------------------------------------------------------  *
+ *                                                                  *
+ * *****************************************************************/
+
+/* Based on make_i386_ms_pe_masm.asm and make_i386_sysv_elf_gas.S */
+
+.text
+.globl _make_fcontext
+.align 2
+.def _make_fcontext; .scl 2; .type 32; .endef
+_make_fcontext:
+    movl   0x4(%esp),      %eax         /* load 1. arg of make_fcontext, pointer to context stack (base) */
+    leal   -0x38(%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   0x4(%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   0x8(%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   %ecx,           0x34(%eax)   /* save address of context stack limit as 'deallocation stack' */
+    movl   0xc(%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  0x2c(%eax)                 /* save MMX control and status word */
+    fnstcw   0x30(%eax)                 /* save x87 control word */
+
+    leal   -0x24(%eax),    %edx         /* reserve space for the last frame 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(,1),   %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
+
+found:
+    movl   0x4(%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 _align_stack; .scl 2; .type 32; .endef
+.def _seh_fcontext; .scl 2; .type 32; .endef
+.def _exit; .scl 2; .type 32; .endef
diff -urN origsrc/boost_1_55_0/boost/context/fcontext.hpp src/boost_1_55_0/boost/context/fcontext.hpp
--- origsrc/boost_1_55_0/boost/context/fcontext.hpp	2013-02-12 21:55:22.000000000 +0900
+++ src/boost_1_55_0/boost/context/fcontext.hpp	2014-04-20 15:08:39.246111200 +0900
@@ -30,7 +30,7 @@
 #if defined(__x86_64__) || defined(__x86_64) \
     || defined(__amd64__) || defined(__amd64) \
     || defined(_M_X64) || defined(_M_AMD64)
-# if defined(BOOST_WINDOWS)
+# if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
 #  include <boost/context/detail/fcontext_x86_64_win.hpp>
 # else
 #  include <boost/context/detail/fcontext_x86_64.hpp>
@@ -41,7 +41,7 @@
     || defined(__X86__) || defined(_X86_) || defined(__THW_INTEL__) \
     || defined(__I86__) || defined(__INTEL__) || defined(__IA32__) \
     || defined(_M_IX86) || defined(_I86_)
-# if defined(BOOST_WINDOWS)
+# if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
 #  include <boost/context/detail/fcontext_i386_win.hpp>
 # else
 #  include <boost/context/detail/fcontext_i386.hpp>
