summaryrefslogtreecommitdiff
path: root/boost/config
diff options
context:
space:
mode:
Diffstat (limited to 'boost/config')
-rw-r--r--boost/config/compiler/borland.hpp1
-rw-r--r--boost/config/compiler/clang.hpp8
-rw-r--r--boost/config/compiler/diab.hpp9
-rw-r--r--boost/config/compiler/gcc.hpp7
-rw-r--r--boost/config/compiler/intel.hpp1
-rw-r--r--boost/config/compiler/visualc.hpp26
-rw-r--r--boost/config/detail/suffix.hpp24
-rw-r--r--boost/config/header_deprecated.hpp26
-rw-r--r--boost/config/helper_macros.hpp37
-rw-r--r--boost/config/platform/cygwin.hpp11
-rw-r--r--boost/config/platform/vxworks.hpp233
-rw-r--r--boost/config/pragma_message.hpp31
-rw-r--r--boost/config/stdlib/dinkumware.hpp10
-rw-r--r--boost/config/stdlib/libcpp.hpp7
-rw-r--r--boost/config/stdlib/libstdcpp3.hpp2
-rw-r--r--boost/config/workaround.hpp2
16 files changed, 310 insertions, 125 deletions
diff --git a/boost/config/compiler/borland.hpp b/boost/config/compiler/borland.hpp
index fa891def41..6190e390e6 100644
--- a/boost/config/compiler/borland.hpp
+++ b/boost/config/compiler/borland.hpp
@@ -174,6 +174,7 @@
#define BOOST_NO_CXX11_CONSTEXPR
#define BOOST_NO_CXX11_DECLTYPE_N3276
#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DEFAULTED_MOVES
#define BOOST_NO_CXX11_DELETED_FUNCTIONS
#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
diff --git a/boost/config/compiler/clang.hpp b/boost/config/compiler/clang.hpp
index 0fdf331f0e..da736bc4b4 100644
--- a/boost/config/compiler/clang.hpp
+++ b/boost/config/compiler/clang.hpp
@@ -98,11 +98,15 @@
//
// Dynamic shared object (DSO) and dynamic-link library (DLL) support
//
-#if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32)
+#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__)
+# define BOOST_HAS_DECLSPEC
+# define BOOST_SYMBOL_EXPORT __attribute__((__dllexport__))
+# define BOOST_SYMBOL_IMPORT __attribute__((__dllimport__))
+#else
# define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default")))
# define BOOST_SYMBOL_IMPORT
-# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default")))
#endif
+#define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default")))
//
// The BOOST_FALLTHROUGH macro can be used to annotate implicit fall-through
diff --git a/boost/config/compiler/diab.hpp b/boost/config/compiler/diab.hpp
index 0de72d06aa..943db83fd6 100644
--- a/boost/config/compiler/diab.hpp
+++ b/boost/config/compiler/diab.hpp
@@ -12,8 +12,15 @@
#include "boost/config/compiler/common_edg.hpp"
-#define BOOST_HAS_LONG_LONG
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
+#define BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS
+
+#define BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE
+#define BOOST_LOG_NO_MEMBER_TEMPLATE_FRIENDS
+#define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
+
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
#define BOOST_NO_CXX11_HDR_CODECVT
+#define BOOST_NO_CXX11_NUMERIC_LIMITS
+
#define BOOST_COMPILER "Wind River Diab " BOOST_STRINGIZE(__VERSION_NUMBER__)
diff --git a/boost/config/compiler/gcc.hpp b/boost/config/compiler/gcc.hpp
index c67ab81861..4fe968a03c 100644
--- a/boost/config/compiler/gcc.hpp
+++ b/boost/config/compiler/gcc.hpp
@@ -99,10 +99,10 @@
// Dynamic shared object (DSO) and dynamic-link library (DLL) support
//
#if __GNUC__ >= 4
-# if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && !defined(__CYGWIN__)
+# if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__)
// All Win32 development environments, including 64-bit Windows and MinGW, define
// _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment,
- // so does not define _WIN32 or its variants.
+ // so does not define _WIN32 or its variants, but still supports dllexport/dllimport.
# define BOOST_HAS_DECLSPEC
# define BOOST_SYMBOL_EXPORT __attribute__((__dllexport__))
# define BOOST_SYMBOL_IMPORT __attribute__((__dllimport__))
@@ -233,6 +233,7 @@
//
#if (BOOST_GCC_VERSION < 40600) || !defined(BOOST_GCC_CXX11)
#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_DEFAULTED_MOVES
#define BOOST_NO_CXX11_NOEXCEPT
#define BOOST_NO_CXX11_NULLPTR
#define BOOST_NO_CXX11_RANGE_BASED_FOR
@@ -284,7 +285,7 @@
#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
# define BOOST_NO_CXX14_CONSTEXPR
#endif
-#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
+#if (BOOST_GCC_VERSION < 50200) || !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif
diff --git a/boost/config/compiler/intel.hpp b/boost/config/compiler/intel.hpp
index 00396b03de..0eea05b916 100644
--- a/boost/config/compiler/intel.hpp
+++ b/boost/config/compiler/intel.hpp
@@ -45,6 +45,7 @@
#undef BOOST_GCC_VERSION
#undef BOOST_GCC_CXX11
+#undef BOOST_GCC
// Broken in all versions up to 17 (newer versions not tested)
#if (__INTEL_COMPILER <= 1700) && !defined(BOOST_NO_CXX14_CONSTEXPR)
diff --git a/boost/config/compiler/visualc.hpp b/boost/config/compiler/visualc.hpp
index d946561376..c533c50dfc 100644
--- a/boost/config/compiler/visualc.hpp
+++ b/boost/config/compiler/visualc.hpp
@@ -167,6 +167,7 @@
//
#if (_MSC_FULL_VER < 190023026)
# define BOOST_NO_CXX11_NOEXCEPT
+# define BOOST_NO_CXX11_DEFAULTED_MOVES
# define BOOST_NO_CXX11_REF_QUALIFIERS
# define BOOST_NO_CXX11_USER_DEFINED_LITERALS
# define BOOST_NO_CXX11_ALIGNAS
@@ -217,17 +218,29 @@
// https://connect.microsoft.com/VisualStudio/feedback/details/1582233/c-subobjects-still-not-value-initialized-correctly
// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
// (Niels Dekker, LKEB, May 2010)
+// Still present in VC15.5, Dec 2017.
#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
//
// C++ 11:
//
-#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
+// This is supported with /permissive- for 15.5 onwards, unfortunately we appear to have no way to tell
+// if this is in effect or not, in any case nothing in Boost is currently using this, so we'll just go
+// on defining it for now:
+//
+# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
+
+#if (_MSC_VER < 1912) || (_MSVC_LANG < 201402)
+// Supported from msvc-15.5 onwards:
#define BOOST_NO_CXX11_SFINAE_EXPR
+#endif
// C++ 14:
+// Still gives internal compiler error for msvc-15.5:
# define BOOST_NO_CXX14_CONSTEXPR
// C++ 17:
+#if (_MSC_VER < 1912) || (_MSVC_LANG < 201703)
#define BOOST_NO_CXX17_INLINE_VARIABLES
#define BOOST_NO_CXX17_FOLD_EXPRESSIONS
+#endif
//
// Things that don't work in clr mode:
@@ -325,12 +338,17 @@
# define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
#endif
+#include <boost/config/pragma_message.hpp>
+
//
-// last known and checked version is 19.11.25547 (VC++ 2017.4):
-#if (_MSC_VER > 1911)
+// last known and checked version is 19.12.25830.2 (VC++ 2017.3):
+#if (_MSC_VER > 1912)
# if defined(BOOST_ASSERT_CONFIG)
# error "Boost.Config is older than your current compiler version."
# elif !defined(BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE)
-# pragma message("Info: Boost.Config is older than your compiler version - probably nothing bad will happen - but you may wish to look for an update Boost version. Define BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE to suppress this message.")
+ //
+ // Disabled as of March 2018 - the pace of VS releases is hard to keep up with
+ // and in any case, we have relatively few defect macros defined now.
+ // BOOST_PRAGMA_MESSAGE("Info: Boost.Config is older than your compiler version - probably nothing bad will happen - but you may wish to look for an updated Boost version. Define BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE to suppress this message.")
# endif
#endif
diff --git a/boost/config/detail/suffix.hpp b/boost/config/detail/suffix.hpp
index caa0b22969..22d31f68db 100644
--- a/boost/config/detail/suffix.hpp
+++ b/boost/config/detail/suffix.hpp
@@ -537,25 +537,10 @@ namespace std{ using ::type_info; }
// ---------------------------------------------------------------------------//
-//
// Helper macro BOOST_STRINGIZE:
-// Converts the parameter X to a string after macro replacement
-// on X has been performed.
-//
-#define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
-#define BOOST_DO_STRINGIZE(X) #X
-
-//
// Helper macro BOOST_JOIN:
-// The following piece of macro magic joins the two
-// arguments together, even when one of the arguments is
-// itself a macro (see 16.3.1 in C++ standard). The key
-// is that macro expansion of macro arguments does not
-// occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN.
-//
-#define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y )
-#define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y)
-#define BOOST_DO_JOIN2( X, Y ) X##Y
+
+#include <boost/config/helper_macros.hpp>
//
// Set some default values for compiler/library/platform names.
@@ -702,6 +687,11 @@ namespace std{ using ::type_info; }
# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS
#endif
+// Lack of defaulted moves is implied by the lack of either rvalue references or any defaulted functions
+#if !defined(BOOST_NO_CXX11_DEFAULTED_MOVES) && (defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || defined(BOOST_NO_CXX11_RVALUE_REFERENCES))
+# define BOOST_NO_CXX11_DEFAULTED_MOVES
+#endif
+
// Defaulted and deleted function declaration helpers
// These macros are intended to be inside a class definition.
// BOOST_DEFAULTED_FUNCTION accepts the function declaration and its
diff --git a/boost/config/header_deprecated.hpp b/boost/config/header_deprecated.hpp
new file mode 100644
index 0000000000..864554f2a2
--- /dev/null
+++ b/boost/config/header_deprecated.hpp
@@ -0,0 +1,26 @@
+#ifndef BOOST_CONFIG_HEADER_DEPRECATED_HPP_INCLUDED
+#define BOOST_CONFIG_HEADER_DEPRECATED_HPP_INCLUDED
+
+// Copyright 2017 Peter Dimov.
+//
+// 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
+//
+// BOOST_HEADER_DEPRECATED("<alternative>")
+//
+// Expands to the equivalent of
+// BOOST_PRAGMA_MESSAGE("This header is deprecated. Use <alternative> instead.")
+//
+// Note that this header is C compatible.
+
+#include <boost/config/pragma_message.hpp>
+
+#if defined(BOOST_ALLOW_DEPRECATED_HEADERS)
+# define BOOST_HEADER_DEPRECATED(a)
+#else
+# define BOOST_HEADER_DEPRECATED(a) BOOST_PRAGMA_MESSAGE("This header is deprecated. Use " a " instead.")
+#endif
+
+#endif // BOOST_CONFIG_HEADER_DEPRECATED_HPP_INCLUDED
diff --git a/boost/config/helper_macros.hpp b/boost/config/helper_macros.hpp
new file mode 100644
index 0000000000..3e79526df6
--- /dev/null
+++ b/boost/config/helper_macros.hpp
@@ -0,0 +1,37 @@
+#ifndef BOOST_CONFIG_HELPER_MACROS_HPP_INCLUDED
+#define BOOST_CONFIG_HELPER_MACROS_HPP_INCLUDED
+
+// Copyright 2001 John Maddock.
+// Copyright 2017 Peter Dimov.
+//
+// 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
+//
+// BOOST_STRINGIZE(X)
+// BOOST_JOIN(X, Y)
+//
+// Note that this header is C compatible.
+
+//
+// Helper macro BOOST_STRINGIZE:
+// Converts the parameter X to a string after macro replacement
+// on X has been performed.
+//
+#define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
+#define BOOST_DO_STRINGIZE(X) #X
+
+//
+// Helper macro BOOST_JOIN:
+// The following piece of macro magic joins the two
+// arguments together, even when one of the arguments is
+// itself a macro (see 16.3.1 in C++ standard). The key
+// is that macro expansion of macro arguments does not
+// occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN.
+//
+#define BOOST_JOIN(X, Y) BOOST_DO_JOIN(X, Y)
+#define BOOST_DO_JOIN(X, Y) BOOST_DO_JOIN2(X,Y)
+#define BOOST_DO_JOIN2(X, Y) X##Y
+
+#endif // BOOST_CONFIG_HELPER_MACROS_HPP_INCLUDED
diff --git a/boost/config/platform/cygwin.hpp b/boost/config/platform/cygwin.hpp
index 8ecc4a4af5..6dd7e57cfd 100644
--- a/boost/config/platform/cygwin.hpp
+++ b/boost/config/platform/cygwin.hpp
@@ -38,10 +38,21 @@
#ifdef _STDINT_H
#define BOOST_HAS_STDINT_H
#endif
+#if __GNUC__ > 5 && !defined(BOOST_HAS_STDINT_H)
+# define BOOST_HAS_STDINT_H
+#endif
/// Cygwin has no fenv.h
#define BOOST_NO_FENV_H
+// Cygwin has it's own <pthread.h> which breaks <shared_mutex> unless the correct compiler flags are used:
+#ifndef BOOST_NO_CXX14_HDR_SHARED_MUTEX
+#include <pthread.h>
+#if !(__XSI_VISIBLE >= 500 || __POSIX_VISIBLE >= 200112)
+# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
+#endif
+#endif
+
// boilerplate code:
#include <boost/config/detail/posix_features.hpp>
diff --git a/boost/config/platform/vxworks.hpp b/boost/config/platform/vxworks.hpp
index a7f571c499..a91e4ab439 100644
--- a/boost/config/platform/vxworks.hpp
+++ b/boost/config/platform/vxworks.hpp
@@ -1,30 +1,50 @@
// (C) Copyright Dustin Spicuzza 2009.
// Adapted to vxWorks 6.9 by Peter Brockamp 2012.
+// Updated for VxWorks 7 by Brian Kuhl 2016
// Use, modification and distribution are subject to 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)
// See http://www.boost.org for most recent version.
-// Since WRS does not yet properly support boost under vxWorks
-// and this file was badly outdated, but I was keen on using it,
-// I patched boost myself to make things work. This has been tested
-// and adapted by me for vxWorks 6.9 *only*, as I'm lacking access
-// to earlier 6.X versions! The only thing I know for sure is that
-// very old versions of vxWorks (namely everything below 6.x) are
-// absolutely unable to use boost. This is mainly due to the completely
-// outdated libraries and ancient compiler (GCC 2.96 or worse). Do
-// not even think of getting this to work, a miserable failure will
-// be guaranteed!
+// Old versions of vxWorks (namely everything below 6.x) are
+// absolutely unable to use boost. Old STLs and compilers
+// like (GCC 2.96) . Do not even think of getting this to work,
+// a miserable failure will be guaranteed!
+//
// Equally, this file has been tested for RTPs (Real Time Processes)
// only, not for DKMs (Downloadable Kernel Modules). These two types
// 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
-// 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!
-
+// the C-library, STL, and so on. A DKM uses a C89 library with no
+// wide character support and no guarantee of ANSI C. The same Dinkum
+// STL library is used in both contexts.
+//
+// Similarly the Dinkum abridged STL that supports the loosely specified
+// embedded C++ standard has not been tested and is unlikely to work
+// on anything but the simplest library.
+// ====================================================================
+//
+// Additional Configuration
+// -------------------------------------------------------------------
+//
+// Because of the ordering of include files and other issues the following
+// additional definitions worked better outside this file.
+//
+// When building the log library add the following to the b2 invocation
+// define=BOOST_LOG_WITHOUT_IPC
+// and
+// -DBOOST_LOG_WITHOUT_DEFAULT_FACTORIES
+// to your compile options.
+//
+// When building the test library add
+// -DBOOST_TEST_LIMITED_SIGNAL_DETAILS
+// to your compile options
+//
+// When building containers library add
+// -DHAVE_MORECORE=0
+// to your c compile options so dlmalloc heap library is compiled
+// without brk() calls
+//
// ====================================================================
//
// Some important information regarding the usage of POSIX semaphores:
@@ -38,29 +58,14 @@
// 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!
+// which could easily pose a serious problem for a real time process.
//
-// 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.
+// To change the default properties for POSIX-semaphores in VxWorks 7
+// enable core > CORE_USER Menu > DEFAULT_PTHREAD_PRIO_INHERIT
+//
+// In VxWorks 6.x so as to integrate with boost.
+// - Edit the file
+// installDir/vxworks-6.x/target/usr/src/posix/pthreadLib.c
// - Around line 917 there should be the definition of the default
// mutex attributes:
//
@@ -81,30 +86,11 @@
// 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
+// - Finally, rebuild your VSB. This will rebuild the libraries
// 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
@@ -158,11 +144,6 @@
#define BOOST_HAS_CLOCK_GETTIME
#define BOOST_HAS_MACRO_USE_FACET
-// Generally unavailable functionality, delivered by boost's test function:
-//#define BOOST_NO_DEDUCED_TYPENAME // Commented this out, boost's test gives an errorneous result!
-#define BOOST_NO_CXX11_EXTERN_TEMPLATE
-#define BOOST_NO_CXX11_VARIADIC_MACROS
-
// Generally available threading API's:
#define BOOST_HAS_PTHREADS
#define BOOST_HAS_SCHED_YIELD
@@ -191,14 +172,7 @@
# endif
#endif
-// vxWorks doesn't work with asio serial ports:
-#define BOOST_ASIO_DISABLE_SERIAL_PORT
-// TODO: The problem here seems to bee that vxWorks uses its own, very specific
-// ways to handle serial ports, incompatible with POSIX or anything...
-// Maybe a specific implementation would be possible, but until the
-// straight need arises... This implementation would presumably consist
-// of some vxWorks specific ioctl-calls, etc. Any voluteers?
-
+#if (_WRS_VXWORKS_MAJOR < 7)
// vxWorks-around: <time.h> #defines CLOCKS_PER_SEC as sysClkRateGet() but
// miserably fails to #include the required <sysLib.h> to make
// sysClkRateGet() available! So we manually include it here.
@@ -208,11 +182,12 @@
#endif
// vxWorks-around: In <stdint.h> the macros INT32_C(), UINT32_C(), INT64_C() and
-// UINT64_C() are defined errorneously, yielding not a signed/
+// UINT64_C() are defined erroneously, yielding not a signed/
// unsigned long/long long type, but a signed/unsigned int/long
// type. Eventually this leads to compile errors in ratio_fwd.hpp,
// when trying to define several constants which do not fit into a
// long type! We correct them here by redefining.
+
#include <cstdint>
// Some macro-magic to do the job
@@ -231,12 +206,16 @@
#define UINT64_C(x) VX_JOIN(x, ULL)
// #include Libraries required for the following function adaption
+#include <sys/time.h>
+#endif // _WRS_VXWORKS_MAJOR < 7
+
#include <ioLib.h>
#include <tickLib.h>
-#include <sys/time.h>
// Use C-linkage for the following helper functions
+#ifdef __cplusplus
extern "C" {
+#endif
// vxWorks-around: The required functions getrlimit() and getrlimit() are missing.
// But we have the similar functions getprlimit() and setprlimit(),
@@ -248,7 +227,7 @@ extern "C" {
// TODO: getprlimit() and setprlimit() do exist for RTPs only, for whatever reason.
// Thus for DKMs there would have to be another implementation.
-#ifdef __RTP__
+#if defined ( __RTP__) && (_WRS_VXWORKS_MAJOR < 7)
inline int getrlimit(int resource, struct rlimit *rlp){
return getprlimit(0, 0, resource, rlp);
}
@@ -273,14 +252,20 @@ inline int truncate(const char *p, off_t l){
return close(fd);
}
+#ifdef __GNUC__
+#define ___unused __attribute__((unused))
+#else
+#define ___unused
+#endif
+
// Fake symlink handling by dummy functions:
-inline int symlink(const char*, const char*){
+inline int symlink(const char* path1 ___unused, const char* path2 ___unused){
// vxWorks has no symlinks -> always return an error!
errno = EACCES;
return -1;
}
-inline ssize_t readlink(const char*, char*, size_t){
+inline ssize_t readlink(const char* path1 ___unused, char* path2 ___unused, size_t size ___unused){
// vxWorks has no symlinks -> always return an error!
errno = EACCES;
return -1;
@@ -297,8 +282,18 @@ inline int gettimeofday(struct timeval *tv, void * /*tzv*/) {
}
#endif
+#ifdef __cplusplus
+} // extern "C"
+#endif
-// vxWorks does provide neither struct tms nor function times()!
+/*
+ * moved to os/utils/unix/freind_h/times.h in VxWorks 7
+ * to avoid conflict with MPL operator times
+ */
+#if (_WRS_VXWORKS_MAJOR < 7)
+#ifdef __cplusplus
+
+// vxWorks provides neither struct tms nor function times()!
// We implement an empty dummy-function, simply setting the user
// and system time to the half of thew actual system ticks-value
// and the child user and system time to 0.
@@ -315,7 +310,8 @@ struct tms{
clock_t tms_cstime; // System CPU time of terminated child processes
};
-inline clock_t times(struct tms *t){
+
+ inline clock_t times(struct tms *t){
struct timespec ts;
clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts);
clock_t ticks(static_cast<clock_t>(static_cast<double>(ts.tv_sec) * CLOCKS_PER_SEC +
@@ -327,8 +323,16 @@ inline clock_t times(struct tms *t){
return ticks;
}
-extern void bzero (void *, size_t); // FD_ZERO uses bzero() but doesn't include strings.h
-} // extern "C"
+
+namespace std {
+ using ::times;
+}
+#endif // __cplusplus
+#endif // _WRS_VXWORKS_MAJOR < 7
+
+
+#ifdef __cplusplus
+extern "C" void bzero (void *, size_t); // FD_ZERO uses bzero() but doesn't include strings.h
// Put the selfmade functions into the std-namespace, just in case
namespace std {
@@ -339,9 +343,11 @@ namespace std {
using ::truncate;
using ::symlink;
using ::readlink;
- using ::times;
- using ::gettimeofday;
+#if (_WRS_VXWORKS_MAJOR < 7)
+ using ::gettimeofday;
+#endif
}
+#endif // __cplusplus
// Some more macro-magic:
// vxWorks-around: Some functions are not present or broken in vxWorks
@@ -349,12 +355,13 @@ namespace std {
// Include signal.h which might contain a typo to be corrected here
#include <signal.h>
-
-inline int getpagesize() { return sysconf(_SC_PAGESIZE); } // getpagesize is deprecated anyway!
+#if (_WRS_VXWORKS_MAJOR < 7)
+#define getpagesize() sysconf(_SC_PAGESIZE) // getpagesize is deprecated anyway!
+inline int lstat(p, b) { return stat(p, b); } // lstat() == stat(), as vxWorks has no symlinks!
+#endif
#ifndef S_ISSOCK
# define S_ISSOCK(mode) ((mode & S_IFMT) == S_IFSOCK) // Is file a socket?
#endif
-inline int lstat(p, b) { return stat(p, b); } // lstat() == stat(), as vxWorks has no symlinks!
#ifndef FPE_FLTINV
# define FPE_FLTINV (FPE_FLTSUB+1) // vxWorks has no FPE_FLTINV, so define one as a dummy
#endif
@@ -371,22 +378,56 @@ typedef int locale_t; // locale_t is a POSIX-ex
// vxWorks 7 adds C++11 support
// however it is optional, and does not match exactly the support determined
-// by examining Dinkum STL version and GCC version (or ICC and DCC)
-
+// by examining the Dinkum STL version and GCC version (or ICC and DCC)
#ifndef _WRS_CONFIG_LANG_LIB_CPLUS_CPLUS_USER_2011
-# define BOOST_NO_CXX11_HDR_ARRAY
-# define BOOST_NO_CXX11_HDR_TYPEINDEX
-# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
-# define BOOST_NO_CXX11_HDR_TUPLE
+# define BOOST_NO_CXX11_ADDRESSOF // C11 addressof operator on memory location
# define BOOST_NO_CXX11_ALLOCATOR
+# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
+# define BOOST_NO_CXX11_NUMERIC_LIMITS // max_digits10 in test/../print_helper.hpp
# define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_STD_ALIGN
-# define BOOST_NO_CXX11_HDR_UNORDERED_SET
+
+
+# define BOOST_NO_CXX11_HDR_ARRAY
+# define BOOST_NO_CXX11_HDR_ATOMIC
+# define BOOST_NO_CXX11_HDR_CHRONO
+# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+# define BOOST_NO_CXX11_HDR_FORWARD_LIST //serialization/test/test_list.cpp
+# define BOOST_NO_CXX11_HDR_FUNCTIONAL
+# define BOOST_NO_CXX11_HDR_FUTURE
+# define BOOST_NO_CXX11_HDR_MUTEX
+# define BOOST_NO_CXX11_HDR_RANDOM //math/../test_data.hpp
+# define BOOST_NO_CXX11_HDR_RATIO
+# define BOOST_NO_CXX11_HDR_REGEX
+# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
+# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
+# define BOOST_NO_CXX11_HDR_THREAD
+# define BOOST_NO_CXX11_HDR_TYPEINDEX
# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+# define BOOST_NO_CXX11_HDR_TUPLE
# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
-# define BOOST_NO_CXX11_HDR_FUNCTIONAL
-# define BOOST_NO_CXX11_HDR_ATOMIC
+# define BOOST_NO_CXX11_HDR_UNORDERED_SET
#else
-# define BOOST_NO_CXX11_NULLPTR
+#ifndef BOOST_SYSTEM_NO_DEPRECATED
+# define BOOST_SYSTEM_NO_DEPRECATED // workaround link error in spirit
#endif
+#endif
+
+
+// NONE is used in enums in lamda and other libraries
+#undef NONE
+// restrict is an iostreams class
+#undef restrict
+
+// use fake poll() from Unix layer in ASIO to get full functionality
+// most libraries will use select() but this define allows 'iostream' functionality
+// which is based on poll() only
+#if (_WRS_VXWORKS_MAJOR > 6)
+# ifndef BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR
+# define BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR
+# endif
+#else
+# define BOOST_ASIO_DISABLE_SERIAL_PORT
+#endif
+
diff --git a/boost/config/pragma_message.hpp b/boost/config/pragma_message.hpp
new file mode 100644
index 0000000000..b2c5ff2e86
--- /dev/null
+++ b/boost/config/pragma_message.hpp
@@ -0,0 +1,31 @@
+#ifndef BOOST_CONFIG_PRAGMA_MESSAGE_HPP_INCLUDED
+#define BOOST_CONFIG_PRAGMA_MESSAGE_HPP_INCLUDED
+
+// Copyright 2017 Peter Dimov.
+//
+// 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
+//
+// BOOST_PRAGMA_MESSAGE("message")
+//
+// Expands to the equivalent of #pragma message("message")
+//
+// Note that this header is C compatible.
+
+#include <boost/config/helper_macros.hpp>
+
+#if defined(BOOST_DISABLE_PRAGMA_MESSAGE)
+# define BOOST_PRAGMA_MESSAGE(x)
+#elif defined(__INTEL_COMPILER)
+# define BOOST_PRAGMA_MESSAGE(x) __pragma(message(__FILE__ "(" BOOST_STRINGIZE(__LINE__) "): note: " x))
+#elif defined(__GNUC__)
+# define BOOST_PRAGMA_MESSAGE(x) _Pragma(BOOST_STRINGIZE(message(x)))
+#elif defined(_MSC_VER)
+# define BOOST_PRAGMA_MESSAGE(x) __pragma(message(__FILE__ "(" BOOST_STRINGIZE(__LINE__) "): note: " x))
+#else
+# define BOOST_PRAGMA_MESSAGE(x)
+#endif
+
+#endif // BOOST_CONFIG_PRAGMA_MESSAGE_HPP_INCLUDED
diff --git a/boost/config/stdlib/dinkumware.hpp b/boost/config/stdlib/dinkumware.hpp
index 0af104d0d0..641c2ae2e8 100644
--- a/boost/config/stdlib/dinkumware.hpp
+++ b/boost/config/stdlib/dinkumware.hpp
@@ -96,7 +96,8 @@
#include <exception>
#endif
#include <typeinfo>
-#if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (!_HAS_NAMESPACE && defined(__ghs__)) ) && !defined(__TI_COMPILER_VERSION__) && !defined(__VISUALDSPVERSION__)
+#if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (!_HAS_NAMESPACE && defined(__ghs__)) ) && !defined(__TI_COMPILER_VERSION__) && !defined(__VISUALDSPVERSION__) \
+ && !defined(__VXWORKS__)
# define BOOST_NO_STD_TYPEINFO
#endif
@@ -172,10 +173,15 @@
// C++17 features
#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) || !defined(BOOST_MSVC) || (BOOST_MSVC < 1910) || !defined(_HAS_CXX17) || (_HAS_CXX17 == 0)
# define BOOST_NO_CXX17_STD_APPLY
+# define BOOST_NO_CXX17_ITERATOR_TRAITS
#endif
#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650)
# define BOOST_NO_CXX17_STD_INVOKE
-# define BOOST_NO_CXX17_ITERATOR_TRAITS
+#endif
+
+#if !(!defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) || !defined(BOOST_MSVC) || (BOOST_MSVC < 1912) || !defined(_HAS_CXX17) || (_HAS_CXX17 == 0))
+// Deprecated std::iterator:
+# define BOOST_NO_STD_ITERATOR
#endif
#if defined(BOOST_INTEL) && (BOOST_INTEL <= 1400)
diff --git a/boost/config/stdlib/libcpp.hpp b/boost/config/stdlib/libcpp.hpp
index 3d3f4ae494..1e77dca336 100644
--- a/boost/config/stdlib/libcpp.hpp
+++ b/boost/config/stdlib/libcpp.hpp
@@ -113,6 +113,13 @@
# define BOOST_NO_CXX11_THREAD_LOCAL
#endif
+#if defined(__linux__) && !defined(BOOST_NO_CXX11_THREAD_LOCAL)
+// After libc++-dev is installed on Trusty, clang++-libc++ almost works,
+// except uses of `thread_local` fail with undefined reference to
+// `__cxa_thread_atexit`.
+# define BOOST_NO_CXX11_THREAD_LOCAL
+#endif
+
#if defined(__has_include)
#if !__has_include(<shared_mutex>)
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
diff --git a/boost/config/stdlib/libstdcpp3.hpp b/boost/config/stdlib/libstdcpp3.hpp
index 6cd420a65c..e99fe316df 100644
--- a/boost/config/stdlib/libstdcpp3.hpp
+++ b/boost/config/stdlib/libstdcpp3.hpp
@@ -78,6 +78,7 @@
# include <unistd.h>
#endif
+#ifndef __VXWORKS__ // VxWorks uses Dinkum, not GNU STL with GCC
#if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0
# define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx
# define BOOST_HAS_SLIST
@@ -91,6 +92,7 @@
# define BOOST_HASH_MAP_HEADER <backward/hash_map>
# endif
#endif
+#endif
//
// Decide whether we have C++11 support turned on:
diff --git a/boost/config/workaround.hpp b/boost/config/workaround.hpp
index 0ce8108c2e..fca8f3ab7e 100644
--- a/boost/config/workaround.hpp
+++ b/boost/config/workaround.hpp
@@ -87,8 +87,10 @@
#endif
#ifndef BOOST_GCC
#define BOOST_GCC_WORKAROUND_GUARD 1
+#define BOOST_GCC_VERSION_WORKAROUND_GUARD 1
#else
#define BOOST_GCC_WORKAROUND_GUARD 0
+#define BOOST_GCC_VERSION_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_XLCPP_ZOS
#define BOOST_XLCPP_ZOS_WORKAROUND_GUARD 1