>From 69eff5b3ff6c70aabcde0ed9038ab3504950de20 Mon Sep 17 00:00:00 2001
From: Stephen Kelly <stephen.kelly@kdab.com>
Date: Wed, 25 Sep 2013 15:00:22 +0200
Subject: [PATCH] Drop support for some ancient compilers.

The MPW one is replaced by Xcode:

 http://en.wikipedia.org/wiki/Macintosh_Programmer%27s_Workshop

SunPro prior to 0x530 does not support partial template
specializations.

It is not clear what compilers define __BORLANDC__. According to

 http://en.wikipedia.org/wiki/C%2B%2BBuilder#Version_history

0x6xx may have been released in 2002. Bump the requirement to 0x610,
as most of the ifdefs in boost are < 600. The strange part is that
boost config issues an unconditional error if > 0x613, and yet parts
of boost check for version 0x620 (boost::bind) and 0x630. This
compiler may be untested for a long time.

MetroWerks is probably obsolete. Change the requirement to the
latest known version.
---
 boost/config/compiler/borland.hpp       | 144 ++++++--------------------------
 boost/config/compiler/metrowerks.hpp    |  26 +-----
 boost/config/compiler/mpw.hpp           |  90 --------------------
 boost/config/compiler/sunpro_cc.hpp     |  45 ++--------
 boost/config/select_compiler_config.hpp |   2 +-
 5 files changed, 34 insertions(+), 273 deletions(-)
 delete mode 100644 boost/config/compiler/mpw.hpp

diff --git a/boost/config/compiler/borland.hpp b/boost/config/compiler/borland.hpp
index a8f5baa..81b1232 100644
--- a/boost/config/compiler/borland.hpp
+++ b/boost/config/compiler/borland.hpp
@@ -11,8 +11,8 @@
 
 //
 // versions check:
-// we don't support Borland prior to version 5.4:
-#if __BORLANDC__ < 0x540
+// we don't support Borland prior to version 6.1:
+#if __BORLANDC__ < 0x610
 #  error "Compiler not supported or configured - please reconfigure"
 #endif
 
@@ -29,102 +29,22 @@
 
 //
 // Support macros to help with standard library detection
-#if (__BORLANDC__ < 0x560) || defined(_USE_OLD_RW_STL)
+#if defined(_USE_OLD_RW_STL)
 #  define BOOST_BCB_WITH_ROGUE_WAVE
-#elif __BORLANDC__ < 0x570
-#  define BOOST_BCB_WITH_STLPORT
 #else
 #  define BOOST_BCB_WITH_DINKUMWARE
 #endif
 
-//
-// Version 5.0 and below:
-#   if __BORLANDC__ <= 0x0550
-// Borland C++Builder 4 and 5:
-#     define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
-#     if __BORLANDC__ == 0x0550
-// Borland C++Builder 5, command-line compiler 5.5:
-#       define BOOST_NO_OPERATORS_IN_NAMESPACE
-#     endif
-// Variadic macros do not exist for C++ Builder versions 5 and below
-#define BOOST_NO_CXX11_VARIADIC_MACROS
-#   endif
-
-// Version 5.51 and below:
-#if (__BORLANDC__ <= 0x551)
-#  define BOOST_NO_CV_SPECIALIZATIONS
-#  define BOOST_NO_CV_VOID_SPECIALIZATIONS
-#  define BOOST_NO_DEDUCED_TYPENAME
-// workaround for missing WCHAR_MAX/WCHAR_MIN:
-#ifdef __cplusplus
-#include <climits>
-#include <cwchar>
-#else
-#include <limits.h>
-#include <wchar.h>
-#endif // __cplusplus
-#ifndef WCHAR_MAX
-#  define WCHAR_MAX 0xffff
-#endif
-#ifndef WCHAR_MIN
-#  define WCHAR_MIN 0
-#endif
-#endif
-
-// Borland C++ Builder 6 and below:
-#if (__BORLANDC__ <= 0x564)
-
-#  if defined(NDEBUG) && defined(__cplusplus)
-      // fix broken <cstring> so that Boost.test works:
-#     include <cstring>
-#     undef strcmp
-#  endif
-   // fix broken errno declaration:
-#  include <errno.h>
-#  ifndef errno
-#     define errno errno
-#  endif
-
-#endif
-
-//
-// new bug in 5.61:
-#if (__BORLANDC__ >= 0x561) && (__BORLANDC__ <= 0x580)
-   // this seems to be needed by the command line compiler, but not the IDE:
-#  define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
-#endif
-
-// Borland C++ Builder 2006 Update 2 and below:
-#if (__BORLANDC__ <= 0x582)
-#  define BOOST_NO_SFINAE
-#  define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
-#  define BOOST_NO_TEMPLATE_TEMPLATES
-
-#  define BOOST_NO_PRIVATE_IN_AGGREGATE
-
-#  ifdef _WIN32
-#     define BOOST_NO_SWPRINTF
-#  elif defined(linux) || defined(__linux__) || defined(__linux)
-      // we should really be able to do without this
-      // but the wcs* functions aren't imported into std::
-#     define BOOST_NO_STDC_NAMESPACE
-      // _CPPUNWIND doesn't get automatically set for some reason:
-#     pragma defineonoption BOOST_CPPUNWIND -x
-#  endif
-#endif
-
-#if (__BORLANDC__ <= 0x613)  // Beman has asked Alisdair for more info
-   // we shouldn't really need this - but too many things choke
-   // without it, this needs more investigation:
-#  define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
-#  define BOOST_NO_IS_ABSTRACT
-#  define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS
-#  define BOOST_NO_USING_TEMPLATE
-#  define BOOST_SP_NO_SP_CONVERTIBLE
+// we shouldn't really need this - but too many things choke
+// without it, this needs more investigation:
+#define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+#define BOOST_NO_IS_ABSTRACT
+#define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS
+#define BOOST_NO_USING_TEMPLATE
+#define BOOST_SP_NO_SP_CONVERTIBLE
 
 // Temporary workaround
 #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
-#endif
 
 // Borland C++ Builder 2008 and below:
 #  define BOOST_NO_INTEGRAL_INT64_T
@@ -135,21 +55,16 @@
 #  define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
 #  define BOOST_NO_NESTED_FRIENDSHIP
 #  define BOOST_NO_TYPENAME_WITH_CTOR
-#if (__BORLANDC__ < 0x600)
-#  define BOOST_ILLEGAL_CV_REFERENCES
-#endif
 
 //
 //  Positive Feature detection
 //
 // Borland C++ Builder 2008 and below:
-#if (__BORLANDC__ >= 0x599)
-#  pragma defineonoption BOOST_CODEGEAR_0X_SUPPORT -Ax
-#endif
+#pragma defineonoption BOOST_CODEGEAR_0X_SUPPORT -Ax
 //
 // C++0x Macros:
 //
-#if !defined( BOOST_CODEGEAR_0X_SUPPORT ) || (__BORLANDC__ < 0x610)
+#if !defined( BOOST_CODEGEAR_0X_SUPPORT )
 #  define BOOST_NO_CXX11_CHAR16_T
 #  define BOOST_NO_CXX11_CHAR32_T
 #  define BOOST_NO_CXX11_DECLTYPE
@@ -195,24 +110,18 @@
 #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
 #define BOOST_NO_CXX11_INLINE_NAMESPACES
 
-#if __BORLANDC__ >= 0x590
-#  define BOOST_HAS_TR1_HASH
+#define BOOST_HAS_TR1_HASH
 
-#  define BOOST_HAS_MACRO_USE_FACET
-#endif
+#define BOOST_HAS_MACRO_USE_FACET
 
-//
-// Post 0x561 we have long long and stdint.h:
-#if __BORLANDC__ >= 0x561
-#  ifndef __NO_LONG_LONG
-#     define BOOST_HAS_LONG_LONG
-#  else
-#     define BOOST_NO_LONG_LONG
-#  endif
-   // On non-Win32 platforms let the platform config figure this out:
-#  ifdef _WIN32
-#      define BOOST_HAS_STDINT_H
-#  endif
+#ifndef __NO_LONG_LONG
+#   define BOOST_HAS_LONG_LONG
+#else
+#   define BOOST_NO_LONG_LONG
+#endif
+ // On non-Win32 platforms let the platform config figure this out:
+#ifdef _WIN32
+#    define BOOST_HAS_STDINT_H
 #endif
 
 // Borland C++Builder 6 defaults to using STLPort.  If _USE_OLD_RW_STL is
@@ -227,7 +136,7 @@
 //
 // __int64:
 //
-#if (__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)
+#if !defined(__STRICT_ANSI__)
 #  define BOOST_HAS_MS_INT64
 #endif
 //
@@ -252,20 +161,17 @@
 //
 // ABI fixing headers:
 //
-#if __BORLANDC__ != 0x600 // not implemented for version 6 compiler yet
 #ifndef BOOST_ABI_PREFIX
 #  define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp"
 #endif
 #ifndef BOOST_ABI_SUFFIX
 #  define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp"
 #endif
-#endif
 //
 // Disable Win32 support in ANSI mode:
 //
-#if __BORLANDC__ < 0x600
-#  pragma defineonoption BOOST_DISABLE_WIN32 -A
-#elif defined(__STRICT_ANSI__)
+#pragma defineonoption BOOST_DISABLE_WIN32 -A
+#if defined(__STRICT_ANSI__)
 #  define BOOST_DISABLE_WIN32
 #endif
 //
diff --git a/boost/config/compiler/metrowerks.hpp b/boost/config/compiler/metrowerks.hpp
index e172786..595d398 100644
--- a/boost/config/compiler/metrowerks.hpp
+++ b/boost/config/compiler/metrowerks.hpp
@@ -17,26 +17,6 @@
 #     define BOOST_NO_STD_LOCALE
 #   endif
 
-#   if __MWERKS__ <= 0x2301  // 5.3
-#     define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-#     define BOOST_NO_POINTER_TO_MEMBER_CONST
-#     define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
-#     define BOOST_NO_MEMBER_TEMPLATE_KEYWORD
-#   endif
-
-#   if __MWERKS__ <= 0x2401  // 6.2
-//#     define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-#   endif
-
-#   if(__MWERKS__ <= 0x2407)  // 7.x
-#     define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
-#     define BOOST_NO_UNREACHABLE_RETURN_DETECTION
-#   endif
-
-#   if(__MWERKS__ <= 0x3003)  // 8.x
-#     define BOOST_NO_SFINAE
-#    endif
-
 // the "|| !defined(BOOST_STRICT_CONFIG)" part should apply to the last
 // tested version *only*:
 #   if(__MWERKS__ <= 0x3207) || !defined(BOOST_STRICT_CONFIG) // 9.6
@@ -87,7 +67,7 @@
 //
 //   See boost\config\suffix.hpp for BOOST_NO_LONG_LONG
 //
-#if __MWERKS__ > 0x3206 && __option(rvalue_refs)
+#if __option(rvalue_refs)
 #  define BOOST_HAS_RVALUE_REFS
 #else
 #  define BOOST_NO_CXX11_RVALUE_REFERENCES
@@ -128,8 +108,8 @@
 
 //
 // versions check:
-// we don't support Metrowerks prior to version 5.3:
-#if __MWERKS__ < 0x2301
+// we don't support Metrowerks prior to version 9.6:
+#if __MWERKS__ < 0x3207
 #  error "Compiler not supported or configured - please reconfigure"
 #endif
 //
diff --git a/boost/config/compiler/mpw.hpp b/boost/config/compiler/mpw.hpp
deleted file mode 100644
index 6910467..0000000
--- a/boost/config/compiler/mpw.hpp
+++ /dev/null
@@ -1,90 +0,0 @@
-//  (C) Copyright John Maddock 2001 - 2002.
-//  (C) Copyright Aleksey Gurtovoy 2002.
-//  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.
-
-//  MPW C++ compilers setup:
-
-#   if    defined(__SC__)
-#     define BOOST_COMPILER "MPW SCpp version " BOOST_STRINGIZE(__SC__)
-#   elif defined(__MRC__)
-#     define BOOST_COMPILER "MPW MrCpp version " BOOST_STRINGIZE(__MRC__)
-#   else
-#     error "Using MPW compiler configuration by mistake.  Please update."
-#   endif
-
-//
-// MPW 8.90:
-//
-#if (MPW_CPLUS <= 0x890) || !defined(BOOST_STRICT_CONFIG)
-#  define BOOST_NO_CV_SPECIALIZATIONS
-#  define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
-#  define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
-#  define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
-#  define BOOST_NO_INTRINSIC_WCHAR_T
-#  define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-#  define BOOST_NO_USING_TEMPLATE
-
-#  define BOOST_NO_CWCHAR
-#  define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
-
-#  define BOOST_NO_STD_ALLOCATOR /* actually a bug with const reference overloading */
-
-#endif
-
-//
-// C++0x features
-//
-//   See boost\config\suffix.hpp for BOOST_NO_LONG_LONG
-//
-#define BOOST_NO_CXX11_AUTO_DECLARATIONS
-#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
-#define BOOST_NO_CXX11_CHAR16_T
-#define BOOST_NO_CXX11_CHAR32_T
-#define BOOST_NO_CXX11_CONSTEXPR
-#define BOOST_NO_CXX11_DECLTYPE
-#define BOOST_NO_CXX11_DECLTYPE_N3276
-#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
-#define BOOST_NO_CXX11_DELETED_FUNCTIONS
-#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
-#define BOOST_NO_CXX11_EXTERN_TEMPLATE
-#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
-#define BOOST_NO_CXX11_LAMBDAS
-#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
-#define BOOST_NO_CXX11_NOEXCEPT
-#define BOOST_NO_CXX11_NULLPTR
-#define BOOST_NO_CXX11_RANGE_BASED_FOR
-#define BOOST_NO_CXX11_RAW_LITERALS
-#define BOOST_NO_CXX11_RVALUE_REFERENCES
-#define BOOST_NO_CXX11_SCOPED_ENUMS
-#define BOOST_NO_SFINAE_EXPR
-#define BOOST_NO_CXX11_STATIC_ASSERT
-#define BOOST_NO_CXX11_TEMPLATE_ALIASES
-#define BOOST_NO_CXX11_UNICODE_LITERALS
-#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_NO_CXX11_ALIGNAS
-#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
-#define BOOST_NO_CXX11_INLINE_NAMESPACES
-
-//
-// versions check:
-// we don't support MPW prior to version 8.9:
-#if MPW_CPLUS < 0x890
-#  error "Compiler not supported or configured - please reconfigure"
-#endif
-//
-// last known and checked version is 0x890:
-#if (MPW_CPLUS > 0x890)
-#  if defined(BOOST_ASSERT_CONFIG)
-#     error "Unknown compiler version - please run the configure tests and report the results"
-#  endif
-#endif
-
-
diff --git a/boost/config/compiler/sunpro_cc.hpp b/boost/config/compiler/sunpro_cc.hpp
index 486d5c4..1374a0d 100644
--- a/boost/config/compiler/sunpro_cc.hpp
+++ b/boost/config/compiler/sunpro_cc.hpp
@@ -11,29 +11,6 @@
 
 //  Sun C++ compiler setup:
 
-#    if __SUNPRO_CC <= 0x500
-#      define BOOST_NO_MEMBER_TEMPLATES
-#      define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-#    endif
-
-#    if (__SUNPRO_CC <= 0x520)
-       //
-       // Sunpro 5.2 and earler:
-       //
-       // although sunpro 5.2 supports the syntax for
-       // inline initialization it often gets the value
-       // wrong, especially where the value is computed
-       // from other constants (J Maddock 6th May 2001)
-#      define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
-
-       // Although sunpro 5.2 supports the syntax for
-       // partial specialization, it often seems to
-       // bind to the wrong specialization.  Better
-       // to disable it until suppport becomes more stable
-       // (J Maddock 6th May 2001).
-#      define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-#    endif
-
 #    if (__SUNPRO_CC <= 0x530)
        // Requesting debug info (-g) with Boost.Python results
        // in an internal compiler error for "static const"
@@ -43,16 +20,6 @@
        // (Jens Maurer according to Gottfried Ganssauge 04 Mar 2002)
 #      define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
 
-       // SunPro 5.3 has better support for partial specialization,
-       // but breaks when compiling std::less<shared_ptr<T> >
-       // (Jens Maurer 4 Nov 2001).
-
-       // std::less specialization fixed as reported by George
-       // Heintzelman; partial specialization re-enabled
-       // (Peter Dimov 17 Jan 2002)
-
-//#      define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
        // integral constant expressions with 64 bit numbers fail
 #      define BOOST_NO_INTEGRAL_INT64_T
 #    endif
@@ -80,11 +47,9 @@
 //
 // Dynamic shared object (DSO) and dynamic-link library (DLL) support
 //
-#if __SUNPRO_CC > 0x500
-#  define BOOST_SYMBOL_EXPORT __global
-#  define BOOST_SYMBOL_IMPORT __global
-#  define BOOST_SYMBOL_VISIBLE __global
-#endif
+#define BOOST_SYMBOL_EXPORT __global
+#define BOOST_SYMBOL_IMPORT __global
+#define BOOST_SYMBOL_VISIBLE __global
 
 
 
@@ -140,8 +105,8 @@
 
 //
 // versions check:
-// we don't support sunpro prior to version 4:
-#if __SUNPRO_CC < 0x400
+// we don't support sunpro prior to version 5.2:
+#if __SUNPRO_CC < 0x520
 #error "Compiler not supported or configured - please reconfigure"
 #endif
 //
diff --git a/boost/config/select_compiler_config.hpp b/boost/config/select_compiler_config.hpp
index 0eeb7ad..e1f87c7 100644
--- a/boost/config/select_compiler_config.hpp
+++ b/boost/config/select_compiler_config.hpp
@@ -89,7 +89,7 @@
 
 #elif defined(__MRC__) || defined(__SC__)
 //  MPW MrCpp or SCpp
-#   define BOOST_COMPILER_CONFIG "boost/config/compiler/mpw.hpp"
+#   error "This compiler is no longer supported."
 
 #elif defined(__IBMCPP__)
 //  IBM Visual Age
-- 
1.8.1.2

