Merge Boost.Config changes from Trunk.

[SVN r67522]
This commit is contained in:
John Maddock
2010-12-31 17:08:07 +00:00
parent bb3e68b516
commit 3ce24d6389
35 changed files with 624 additions and 78 deletions
+78
View File
@@ -0,0 +1,78 @@
// (C) Copyright John Maddock 2001.
// (C) Copyright Bryce Lelbach 2010.
// 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/libs/config for most recent version.
// MACRO: BOOST_NO_FENV_H
// TITLE: fenv.h
// DESCRIPTION: There is no POSIX <fenv.h> available. If <fenv.h> is
// available, <boost/detail/fenv.hpp> should be included
// instead of directly including <fenv.h>.
#include <boost/detail/fenv.hpp>
namespace boost_no_fenv_h {
int test()
{
/// POSIX required typedefs
typedef ::fenv_t has_fenv_t;
typedef ::fexcept_t has_fexcept_t;
/// POSIX required macros
#if !defined(FE_DIVBYZERO)
#error platform does not define FE_DIVBYZERO
#endif
#if !defined(FE_INEXACT)
#error platform does not define FE_INEXACT
#endif
#if !defined(FE_INVALID)
#error platform does not define FE_INVALID
#endif
#if !defined(FE_OVERFLOW)
#error platform does not define FE_OVERFLOW
#endif
#if !defined(FE_UNDERFLOW)
#error platform does not define FE_UNDERFLOW
#endif
#if !defined(FE_DOWNWARD)
#error platform does not define FE_DOWNWARD
#endif
#if !defined(FE_TONEAREST)
#error platform does not define FE_TONEAREST
#endif
#if !defined(FE_UPWARD)
#error platform does not define FE_UPWARD
#endif
#if !defined(FE_DFL_ENV)
#error platform does not define FE_DFL_ENV
#endif
int (*has_feclearexcept)(int) = ::feclearexcept;
int (*has_fegetenv)(fenv_t*) = ::fegetenv;
int (*has_fegetexcept)(fexcept_t*, int) = ::fegetexcept;
int (*has_fegetround)(void) = ::fegetround;
int (*has_feholdexcept)(fenv_t*) = ::feholdexcept;
int (*has_feraiseexcept)(int) = ::feraiseexcept;
int (*has_fesetenv)(const fenv_t*) = ::fesetenv;
int (*has_fesetexceptflag)(const fexcept_t*, int) = ::fesetexceptflag;
int (*has_fesetround)(int) = ::fesetround;
int (*has_fetestexcept)(int) = ::fetestexcept;
int (*has_feupdateenv)(const fenv_t*) = ::feupdateenv;
return 0;
}
}
+10 -18
View File
@@ -27,6 +27,10 @@
#include <unistd.h>
#endif
#if defined(__MINGW32__)
# include <_mingw.h>
#endif
static unsigned int indent = 4;
static unsigned int width = 40;
@@ -794,6 +798,8 @@ void print_platform_macros()
PRINT_MACRO(_THREAD_SAFE);
PRINT_MACRO(_XOPEN_SOURCE_EXTENDED);
PRINT_MACRO(XPG);
PRINT_MACRO(__MINGW32_MAJOR_VERSION);
PRINT_MACRO(__MINGW32_MINOR_VERSION);
// POSIX:
PRINT_MACRO(_POSIX_ADVISORY_INFO);
PRINT_MACRO(_POSIX_ASYNCHRONOUS_IO);
@@ -900,6 +906,7 @@ void print_boost_macros()
PRINT_MACRO(BOOST_DISABLE_THREADS);
PRINT_MACRO(BOOST_DISABLE_WIN32);
PRINT_MACRO(BOOST_HAS_THREADS);
PRINT_MACRO(BOOST_WINDOWS);
// BEGIN GENERATED BLOCK DO NOT EDIT THIS!!!!!!
PRINT_MACRO(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG);
@@ -1071,30 +1078,15 @@ void print_boost_macros()
PRINT_MACRO(BOOST_NO_VARIADIC_TEMPLATES);
PRINT_MACRO(BOOST_NO_VOID_RETURNS);
// END GENERATED BLOCK
PRINT_MACRO(BOOST_INTEL);
PRINT_MACRO(BOOST_MSVC);
PRINT_MACRO(BOOST_STD_EXTENSION_NAMESPACE);
PRINT_MACRO(BOOST_UNREACHABLE_RETURN(0));
PRINT_MACRO(BOOST_CONSTEXPR);
PRINT_MACRO(BOOST_CONSTEXPR_OR_CONST);
PRINT_MACRO(BOOST_STATIC_CONSTEXPR);
}
void print_separator()
+33
View File
@@ -0,0 +1,33 @@
// Copyright Bryce Lelbach 2010.
// Copyright John Maddock 2002-4.
// 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/libs/config for the most recent version.
// Test file for macro BOOST_NO_FENV_H
// This file should not compile, if it does then
// BOOST_NO_FENV_H should not be defined.
// See file boost_no_fenv_h.ipp for details
// Must not have BOOST_ASSERT_CONFIG set; it defeats
// the objective of this file:
#ifdef BOOST_ASSERT_CONFIG
# undef BOOST_ASSERT_CONFIG
#endif
#include <boost/config.hpp>
#include "test.hpp"
#ifdef BOOST_NO_FENV_H
#include "boost_no_fenv_h.ipp"
#else
#error "this file should not compile"
#endif
int main( int, char *[] )
{
return boost_no_fenv_h::test();
}
+33
View File
@@ -0,0 +1,33 @@
// Copyright Bryce Lelbach 2010.
// Copyright John Maddock 2002-4.
// 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/libs/config for the most recent version.
// Test file for macro BOOST_NO_FENV_H
// This file should compile, if it does not then
// BOOST_NO_FENV_H should be defined.
// See file boost_no_fenv_h.ipp for details
// Must not have BOOST_ASSERT_CONFIG set; it defeats
// the objective of this file:
#ifdef BOOST_ASSERT_CONFIG
# undef BOOST_ASSERT_CONFIG
#endif
#include <boost/config.hpp>
#include "test.hpp"
#ifndef BOOST_NO_FENV_H
#include "boost_no_fenv_h.ipp"
#else
namespace boost_no_fenv_h = empty_boost;
#endif
int main( int, char *[] )
{
return boost_no_fenv_h::test();
}