Ticket #2327: boost_config.patch

File boost_config.patch, 8.5 KB (added by Nicola Musatti, 14 years ago)
  • config/compiler/borland.hpp

     
    1919// last known and checked version is 0x600 (Builder X preview)
    2020// or 0x593 (CodeGear C++ Builder 2007 December 2007 update):
    2121#if (__BORLANDC__ > 0x593) && (__BORLANDC__ != 0x600)
    22 #  if defined(BOOST_ASSERT_CONFIG)
     22//#  if defined(BOOST_ASSERT_CONFIG)
    2323#     error "Unknown compiler version - please run the configure tests and report the results"
    24 #  else
    25 #     pragma message( "Unknown compiler version - please run the configure tests and report the results")
    26 #  endif
     24//#  else
     25//#     pragma message( "Unknown compiler version - please run the configure tests and report the results")
     26//#  endif
     27#elif (__BORLANDC__ == 0x600)
     28#  error "CBuilderX preview compiler is no longer supported"
    2729#endif
    2830
    2931//
     
    108110
    109111// Borland C++ Builder 2007 December 2007 Update and below:
    110112#if (__BORLANDC__ <= 0x593)
    111 #  define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
    112 #  define BOOST_NO_USING_TEMPLATE
    113 #  define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
    114 #  define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
    115113   // we shouldn't really need this - but too many things choke
    116114   // without it, this needs more investigation:
    117115#  define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
    118 #  define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
    119116#  define BOOST_NO_IS_ABSTRACT
    120117#  define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS
    121 #  define BOOST_NO_TWO_PHASE_NAME_LOOKUP
    122118
    123119// Temporary workaround
    124120#define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
     121#endif
    125122
     123// Borland C++ Builder 2008 and below:
     124#if (__BORLANDC__ <= 0x601)
     125#  define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
     126#  define BOOST_ILLEGAL_CV_REFERENCES
     127#  define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
     128#  define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
     129#  define BOOST_NO_TWO_PHASE_NAME_LOOKUP
     130#  define BOOST_NO_USING_TEMPLATE
     131#  define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
    126132#endif
    127133
     134//
     135//  Positive Feature detection
     136//
     137// Borland C++ Builder 2008 and below:
     138#if (__BORLANDC__ >= 0x599)
     139#  pragma defineonoption BOOST_CODEGEAR_0X_SUPPORT -Ax
     140#endif
     141
     142#if defined( BOOST_CODEGEAR_0X_SUPPORT )
     143#  #if __BORLANDC__ >= 0x610
     144#  define BOOST_HAS_ALIGNOF
     145#  define BOOST_HAS_CHAR16_T
     146#  define BOOST_HAS_CHAR32_T
     147#  define BOOST_HAS_DECLTYPE
     148//#  define BOOST_HAS_DEFAULTED_FN
     149//#  define BOOST_HAS_DELETED_FN
     150#  define BOOST_HAS_EXPLICIT_CONVERSION_OPS
     151//#  define BOOST_HAS_NULLPTR
     152//#  define BOOST_HAS_RAW_STRING
     153#  define BOOST_HAS_REF_QUALIFIER
     154#  define BOOST_HAS_RVALUE_REFS
     155//#  define BOOST_HAS_SCOPED_ENUM
     156#  define BOOST_HAS_STATIC_ASSERT
     157//#  define BOOST_HAS_VARIADIC_TMPL
     158#  #endif //__BORLANDC__ >= 0x610
     159#endif
     160
    128161#if __BORLANDC__ >= 0x590
    129162#  define BOOST_HAS_TR1_HASH
    130163
     
    207240#define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__)
    208241
    209242
     243
  • config/compiler/codegear.hpp

     
     1//  (C) Copyright John Maddock 2001 - 2003.
     2//  (C) Copyright David Abrahams 2002 - 2003.
     3//  (C) Copyright Aleksey Gurtovoy 2002.
     4//  Use, modification and distribution are subject to the
     5//  Boost Software License, Version 1.0. (See accompanying file
     6//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
     7
     8//  See http://www.boost.org for most recent version.
     9
     10//  CodeGear C++ compiler setup:
     11
     12#if !defined( BOOST_WITH_CODEGEAR_WARNINGS )
     13// these warnings occur frequently in optimized template code
     14# pragma warn -8004 // var assigned value, but never used
     15# pragma warn -8008 // condition always true/false
     16# pragma warn -8066 // dead code can never execute
     17# pragma warn -8104 // static members with ctors not threadsafe
     18# pragma warn -8105 // reference member in class without ctors
     19#endif
     20//
     21// versions check:
     22// last known and checked version is 0x610
     23#if (__CODEGEARC__ > 0x610)
     24#  if defined(BOOST_ASSERT_CONFIG)
     25#     error "Unknown compiler version - please run the configure tests and report the results"
     26#  else
     27#     pragma message( "Unknown compiler version - please run the configure tests and report the results")
     28#  endif
     29#endif
     30
     31// CodeGear C++ Builder 2009
     32#if (__CODEGEARC__ <= 0x610)
     33#  define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
     34#  define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
     35#  define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
     36#  define BOOST_NO_PRIVATE_IN_AGGREGATE
     37#  define BOOST_NO_TWO_PHASE_NAME_LOOKUP
     38#  define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
     39#  define BOOST_NO_USING_TEMPLATE
     40   // we shouldn't really need this - but too many things choke
     41   // without it, this needs more investigation:
     42#  define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
     43
     44//  Still need tests writing
     45#  define BOOST_NO_TYPENAME_WITH_CTOR    // Cannot use typename keyword when making temporaries of a dependant type
     46#  define BOOST_NO_NESTED_FRIENDSHIP     // TC1 gives nested classes access rights as any other member
     47
     48#  ifdef NDEBUG
     49      // fix broken <cstring> so that Boost.test works:
     50#     include <cstring>
     51#     undef strcmp
     52#  endif
     53   // fix broken errno declaration:
     54#  include <errno.h>
     55#  ifndef errno
     56#     define errno errno
     57#  endif
     58
     59#endif
     60
     61
     62#  define BOOST_HAS_CHAR16_T
     63#  define BOOST_HAS_CHAR32_T
     64#  define BOOST_HAS_LONG_LONG
     65
     66//#  define BOOST_HAS_ALIGNOF
     67#  define BOOST_HAS_DECLTYPE
     68#  define BOOST_HAS_EXPLICIT_CONVERSION_OPS
     69//#  define BOOST_HAS_RVALUE_REFS
     70#  define BOOST_HAS_SCOPED_ENUM
     71//#  define BOOST_HAS_STATIC_ASSERT
     72#  define BOOST_HAS_STD_TYPE_TRAITS
     73
     74#  define BOOST_HAS_TR1_HASH
     75#  define BOOST_HAS_TR1_TYPE_TRAITS
     76#  define BOOST_HAS_TR1_UNORDERED_MAP
     77#  define BOOST_HAS_TR1_UNORDERED_SET
     78
     79#  define BOOST_HAS_MACRO_USE_FACET
     80
     81
     82   // On non-Win32 platforms let the platform config figure this out:
     83# ifdef _WIN32
     84#    define BOOST_HAS_STDINT_H
     85# endif
     86
     87//
     88// __int64:
     89//
     90#if !defined(__STRICT_ANSI__)
     91#  define BOOST_HAS_MS_INT64
     92#endif
     93//
     94// check for exception handling support:
     95//
     96#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS)
     97#  define BOOST_NO_EXCEPTIONS
     98#endif
     99//
     100// all versions have a <dirent.h>:
     101//
     102#if !defined(__STRICT_ANSI__)
     103#  define BOOST_HAS_DIRENT_H
     104#endif
     105//
     106// all versions support __declspec:
     107//
     108#if !defined(__STRICT_ANSI__)
     109#  define BOOST_HAS_DECLSPEC
     110#endif
     111//
     112// ABI fixing headers:
     113//
     114#ifndef BOOST_ABI_PREFIX
     115#  define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp"
     116#endif
     117#ifndef BOOST_ABI_SUFFIX
     118#  define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp"
     119#endif
     120//
     121// Disable Win32 support in ANSI mode:
     122//
     123#  pragma defineonoption BOOST_DISABLE_WIN32 -A
     124//
     125// MSVC compatibility mode does some nasty things:
     126// TODO: look up if this doesn't apply to the whole 12xx range
     127//
     128#if defined(_MSC_VER) && (_MSC_VER <= 1200)
     129#  define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
     130#  define BOOST_NO_VOID_RETURNS
     131#endif
     132
     133#define BOOST_COMPILER "CodeGear C++ version " BOOST_STRINGIZE(__CODEGEARC__)
     134
  • config/select_compiler_config.hpp

    Property changes on: config\compiler\codegear.hpp
    ___________________________________________________________________
    Name: svn:mime-type
       + text/plain
    Name: svn:keywords
       + Id
    Name: svn:eol-style
       + native
    
     
    7272//  Greenhills C++
    7373#   define BOOST_COMPILER_CONFIG "boost/config/compiler/greenhills.hpp"
    7474
     75#elif defined __CODEGEARC__
     76//  CodeGear - must be checked for before Borland
     77#   define BOOST_COMPILER_CONFIG "boost/config/compiler/codegear.hpp"
     78
    7579#elif defined __BORLANDC__
    7680//  Borland
    7781#   define BOOST_COMPILER_CONFIG "boost/config/compiler/borland.hpp"
  • config/suffix.hpp

     
    442442#  define BOOST_DEDUCED_TYPENAME
    443443#endif
    444444
     445#ifndef BOOST_NO_TYPENAME_WITH_CTOR
     446#  define BOOST_CTOR_TYPENAME typename
     447#else
     448#  define BOOST_CTOR_TYPENAME
     449#endif
     450
    445451// long long workaround ------------------------------------------//
    446452// On gcc (and maybe other compilers?) long long is alway supported
    447453// but it's use may generate either warnings (with -ansi), or errors