Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77247 - in trunk/libs/context: build src
From: oliver.kowalke_at_[hidden]
Date: 2012-03-06 11:07:37


Author: olli
Date: 2012-03-06 11:07:35 EST (Tue, 06 Mar 2012)
New Revision: 77247
URL: http://svn.boost.org/trac/boost/changeset/77247

Log:
context: compile asm file separate from C++ files
Text files modified:
   trunk/libs/context/build/Jamfile.v2 | 52 ++++++++++++++++++++++++++++++++++++---
   trunk/libs/context/src/seh.cpp | 10 +++++++
   2 files changed, 58 insertions(+), 4 deletions(-)

Modified: trunk/libs/context/build/Jamfile.v2
==============================================================================
--- trunk/libs/context/build/Jamfile.v2 (original)
+++ trunk/libs/context/build/Jamfile.v2 2012-03-06 11:07:35 EST (Tue, 06 Mar 2012)
@@ -60,6 +60,24 @@
 feature.set-default abi : [ default_abi ] ;
 
 
+
+actions masm
+{
+ ml /c /Fo"$(<)" "$(>)"
+}
+
+actions masm64
+{
+ ml64 /c /Fo"$(<)" "$(>)"
+}
+
+
+
+make asm/fcontext_i386_ms_pe_masm.o : asm/fcontext_i386_ms_pe_masm.asm : @masm ;
+make asm/fcontext_x86_64_ms_pe_masm.o : asm/fcontext_x86_64_ms_pe_masm.asm : @masm64 ;
+
+
+
 alias context_sources
    : asm/fcontext_arm_aapcs_elf_gas.S
      stack_allocator_posix.cpp
@@ -177,10 +195,23 @@
    ;
 
 alias context_sources
- : asm/fcontext_i386_ms_pe_masm.asm
- seh.cpp
+ : seh.cpp
+ stack_allocator_windows.cpp
+ stack_utils_windows.cpp
+ asm/fcontext_i386_ms_pe_masm.o
+ : <abi>ms
+ <address-model>32
+ <architecture>x86
+ <binary-format>pe
+ <toolset>gcc
+ <target-os>windows
+ ;
+
+alias context_sources
+ : seh.cpp
      stack_allocator_windows.cpp
      stack_utils_windows.cpp
+ asm/fcontext_i386_ms_pe_masm.o
    : <abi>ms
      <address-model>32
      <architecture>x86
@@ -189,10 +220,23 @@
    ;
 
 alias context_sources
- : asm/fcontext_x86_64_ms_pe_masm.asm
- seh.cpp
+ : seh.cpp
+ stack_allocator_windows.cpp
+ stack_utils_windows.cpp
+ asm/fcontext_x86_64_ms_pe_masm.o
+ : <abi>ms
+ <address-model>64
+ <architecture>x86
+ <binary-format>pe
+ <toolset>gcc
+ <target-os>windows
+ ;
+
+alias context_sources
+ : seh.cpp
      stack_allocator_windows.cpp
      stack_utils_windows.cpp
+ asm/fcontext_x86_64_ms_pe_masm.o
    : <abi>ms
      <address-model>64
      <architecture>x86

Modified: trunk/libs/context/src/seh.cpp
==============================================================================
--- trunk/libs/context/src/seh.cpp (original)
+++ trunk/libs/context/src/seh.cpp 2012-03-06 11:07:35 EST (Tue, 06 Mar 2012)
@@ -10,7 +10,9 @@
 
 #include <stddef.h>
 #include <stdio.h>
+#include <stdlib.h>
 
+#include <excpt.h>
 #include <windows.h>
 #include <winnt.h>
 
@@ -26,7 +28,11 @@
     {
         const char * accessType = ( info[0]) ? "writing" : "reading";
         const ULONG_PTR address = info[1];
+#if defined (__MINGW32__) || defined (__MINGW64__)
+ snprintf( description, len, "Access violation %s 0x%08X", accessType, address);
+#else
         _snprintf_s( description, len, _TRUNCATE, "Access violation %s 0x%08X", accessType, address);
+#endif
         return description;
     }
     case EXCEPTION_DATATYPE_MISALIGNMENT: return "Datatype misalignment";
@@ -52,7 +58,11 @@
     case EXCEPTION_INVALID_HANDLE: return "Invalid handle";
     }
 
+#if defined (__MINGW32__) || defined (__MINGW64__)
+ snprintf( description, len, "Unknown (0x%08X)", code);
+#else
     _snprintf_s( description, len, _TRUNCATE, "Unknown (0x%08X)", code);
+#endif
 
     return description;
 }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk