Merge config from Trunk - previous merge was incomplete.

[SVN r84505]
This commit is contained in:
John Maddock
2013-05-26 11:19:10 +00:00
parent d8973bac08
commit 1bc3e46574
19 changed files with 133 additions and 6 deletions

View File

@ -190,6 +190,7 @@
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#define BOOST_NO_CXX11_NOEXCEPT
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
#if __BORLANDC__ >= 0x590
# define BOOST_HAS_TR1_HASH

View File

@ -38,6 +38,16 @@
# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default")))
#endif
//
// The BOOST_FALLTHROUGH macro can be used to annotate implicit fall-through
// between switch labels.
//
#if __cplusplus >= 201103L && defined(__has_warning)
# if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough")
# define BOOST_FALLTHROUGH [[clang::fallthrough]]
# endif
#endif
#if !__has_feature(cxx_auto_type)
# define BOOST_NO_CXX11_AUTO_DECLARATIONS
# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
@ -132,6 +142,10 @@
# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#endif
#if !__has_feature(cxx_user_literals)
# define BOOST_NO_CXX11_USER_DEFINED_LITERALS
#endif
// Clang always supports variadic macros
// Clang always supports extern templates

View File

@ -110,6 +110,7 @@
#define BOOST_NO_CXX11_UNICODE_LITERALS
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
//
// TR1 macros:

View File

@ -95,6 +95,7 @@
#define BOOST_NO_CXX11_UNICODE_LITERALS
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
#ifdef c_plusplus
// EDG has "long long" in non-strict mode

View File

@ -51,6 +51,7 @@
#define BOOST_NO_CXX11_DECLTYPE_N3276
#define BOOST_NO_CXX11_DECLTYPE
#define BOOST_NO_CXX11_CONSTEXPR
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
#define BOOST_NO_CXX11_CHAR32_T
#define BOOST_NO_CXX11_CHAR16_T

View File

@ -86,6 +86,7 @@
#define BOOST_NO_CXX11_UNICODE_LITERALS
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
#if (__DMC__ < 0x812)
#define BOOST_NO_CXX11_VARIADIC_MACROS

View File

@ -236,12 +236,18 @@
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
#endif
// C++0x features in 4.7.n and later
//
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
# define BOOST_NO_CXX11_TEMPLATE_ALIASES
# define BOOST_NO_CXX11_USER_DEFINED_LITERALS
#endif
// C++0x features not supported at all yet
// C++0x features in 4.8.1 and later
//
#define BOOST_NO_CXX11_DECLTYPE_N3276
#if (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40801) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
# define BOOST_NO_CXX11_DECLTYPE_N3276
#endif
#ifndef BOOST_COMPILER
# define BOOST_COMPILER "GNU C++ version " __VERSION__

View File

@ -53,7 +53,8 @@
# define BOOST_NO_CXX11_RAW_LITERALS
# define BOOST_NO_CXX11_UNICODE_LITERALS
# define BOOST_NO_CXX11_NOEXCEPT
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
# define BOOST_NO_CXX11_USER_DEFINED_LITERALS
#define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__

View File

@ -118,6 +118,7 @@
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
#define BOOST_NO_CXX11_UNICODE_LITERALS
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
/*
See https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443331 and

View File

@ -119,6 +119,7 @@
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#define BOOST_NO_CXX11_VARIADIC_MACROS
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
#define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)

View File

@ -68,6 +68,7 @@
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#define BOOST_NO_CXX11_VARIADIC_MACROS
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
//
// versions check:

View File

@ -76,5 +76,6 @@
# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
# define BOOST_NO_CXX11_HDR_CODECVT
# define BOOST_NO_CXX11_HDR_CHRONO
# define BOOST_NO_CXX11_USER_DEFINED_LITERALS
#endif

View File

@ -111,6 +111,7 @@
#define BOOST_NO_CXX11_HDR_CODECVT
#define BOOST_NO_CXX11_HDR_CHRONO
#define BOOST_NO_CXX11_HDR_ARRAY
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
//
// version check:

View File

@ -127,6 +127,7 @@
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#define BOOST_NO_CXX11_VARIADIC_MACROS
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
//
// Version

View File

@ -106,6 +106,7 @@
#define BOOST_NO_CXX11_NULLPTR
#define BOOST_NO_CXX11_RANGE_BASED_FOR
#define BOOST_NO_CXX11_RAW_LITERALS
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
#if ! __IBMCPP_RVALUE_REFERENCES
# define BOOST_NO_CXX11_RVALUE_REFERENCES
#endif

View File

@ -241,6 +241,7 @@
#define BOOST_NO_CXX11_UNICODE_LITERALS
#define BOOST_NO_SFINAE_EXPR
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
//
// prefix and suffix headers:

View File

@ -21,10 +21,91 @@
// of executables differ largely in the available functionality of
// the C-library, STL, and so on. A DKM uses a library similar to those
// of vxWorks 5.X - with all its limitations and incompatibilities
// in respect to ANSI C++ and STL. So probably there might be problems
// with respect to ANSI C++ and STL. So probably there might be problems
// with the usage of boost from DKMs. WRS or any voluteers are free to
// prove the opposite!
// ====================================================================
//
// Some important information regarding the usage of POSIX semaphores:
// -------------------------------------------------------------------
//
// VxWorks as a real time operating system handles threads somewhat
// different from what "normal" OSes do, regarding their scheduling!
// This could lead to a scenario called "priority inversion" when using
// semaphores, see http://en.wikipedia.org/wiki/Priority_inversion.
//
// Now, VxWorks POSIX-semaphores for DKM's default to the usage of
// priority inverting semaphores, which is fine. On the other hand,
// for RTP's it defaults to using non priority inverting semaphores,
// which could easily pose a serious problem for a real time process,
// i.e. deadlocks! To overcome this two possibilities do exist:
//
// a) Patch every piece of boost that uses semaphores to instanciate
// the proper type of semaphores. This is non-intrusive with respect
// to the OS and could relatively easy been done by giving all
// semaphores attributes deviating from the default (for in-depth
// information see the POSIX functions pthread_mutexattr_init()
// and pthread_mutexattr_setprotocol()). However this breaks all
// too easily, as with every new version some boost library could
// all in a sudden start using semaphores, resurrecting the very
// same, hard to locate problem over and over again!
//
// b) We could change the default properties for POSIX-semaphores
// that VxWorks uses for RTP's and this is being suggested here,
// as it will more or less seamlessly integrate with boost. I got
// the following information from WRS how to do this, compare
// Wind River TSR# 1209768:
//
// Instructions for changing the default properties of POSIX-
// semaphores for RTP's in VxWorks 6.9:
// - Edit the file /vxworks-6.9/target/usr/src/posix/pthreadLib.c
// in the root of your Workbench-installation.
// - Around line 917 there should be the definition of the default
// mutex attributes:
//
// LOCAL pthread_mutexattr_t defaultMutexAttr =
// {
// PTHREAD_INITIALIZED_OBJ, PTHREAD_PRIO_NONE, 0,
// PTHREAD_MUTEX_DEFAULT
// };
//
// Here, replace PTHREAD_PRIO_NONE by PTHREAD_PRIO_INHERIT.
// - Around line 1236 there should be a definition for the function
// pthread_mutexattr_init(). A couple of lines below you should
// find a block of code like this:
//
// pAttr->mutexAttrStatus = PTHREAD_INITIALIZED_OBJ;
// pAttr->mutexAttrProtocol = PTHREAD_PRIO_NONE;
// pAttr->mutexAttrPrioceiling = 0;
// pAttr->mutexAttrType = PTHREAD_MUTEX_DEFAULT;
//
// Here again, replace PTHREAD_PRIO_NONE by PTHREAD_PRIO_INHERIT.
// - Finally, rebuild your VSB. This will create a new VxWorks kernel
// with the changed properties. That's it! Now, using boost should
// no longer cause any problems with task deadlocks!
//
// And here's another useful piece of information concerning VxWorks'
// POSIX-functionality in general:
// VxWorks is not a genuine POSIX-OS in itself, rather it is using a
// kind of compatibility layer (sort of a wrapper) to emulate the
// POSIX-functionality by using its own resources and functions.
// At the time a task (thread) calls it's first POSIX-function during
// runtime it is being transformed by the OS into a POSIX-thread.
// This transformation does include a call to malloc() to allocate the
// memory required for the housekeeping of POSIX-threads. In a high
// priority RTP this malloc() call may be highly undesirable, as its
// timing is more or less unpredictable (depending on what your actual
// heap looks like). You can circumvent this problem by calling the
// function thread_self() at a well defined point in the code of the
// task, e.g. shortly after the task spawns up. Thereby you are able
// to define the time when the task-transformation will take place and
// you could shift it to an uncritical point where a malloc() call is
// tolerable. So, if this could pose a problem for your code, remember
// to call thread_self() from the affected task at an early stage.
//
// ====================================================================
// Block out all versions before vxWorks 6.x, as these don't work:
// Include header with the vxWorks version information and query them
#include <version.h>

View File

@ -35,7 +35,8 @@
# if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \
|| defined(_GLIBCXX__PTHREADS) \
|| defined(_GLIBCXX_HAS_GTHREADS) \
|| defined(_WIN32)
|| defined(_WIN32) \
|| defined(_AIX)
//
// If the std lib has thread support turned on, then turn it on in Boost
// as well. We do this because some gcc-3.4 std lib headers define _REENTANT

View File

@ -641,7 +641,8 @@ namespace std{ using ::type_info; }
# if defined(_MSC_VER)
# define BOOST_FORCEINLINE __forceinline
# elif defined(__GNUC__) && __GNUC__ > 3
# define BOOST_FORCEINLINE inline __attribute__ ((always_inline))
// Clang also defines __GNUC__ (as 4)
# define BOOST_FORCEINLINE inline __attribute__ ((__always_inline__))
# else
# define BOOST_FORCEINLINE inline
# endif
@ -883,6 +884,16 @@ namespace std{ using ::type_info; }
# define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate))
# define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression))
#endif
//
// Helper macro BOOST_FALLTHROUGH
// Fallback definition of BOOST_FALLTHROUGH macro used to mark intended
// fall-through between case labels in a switch statement. We use a definition
// that requires a semicolon after it to avoid at least one type of misuse even
// on unsupported compilers.
//
#ifndef BOOST_FALLTHROUGH
# define BOOST_FALLTHROUGH ((void)0)
#endif
//
// constexpr workarounds