Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68554 - in trunk: boost/config/compiler boost/config/platform boost/config/stdlib boost/detail libs/config/doc libs/config/test
From: steven_at_[hidden]
Date: 2011-01-30 01:24:32


Author: steven_watanabe
Date: 2011-01-30 01:24:30 EST (Sun, 30 Jan 2011)
New Revision: 68554
URL: http://svn.boost.org/trac/boost/changeset/68554

Log:
Restore [66804], [66833], and [66834]. (fenv fixes.) I mistakenly reverted them in [68201] because [66804] was mislabeled.
Added:
   trunk/libs/config/test/boost_no_fenv_h.ipp
      - copied unchanged from r66804, /trunk/libs/config/test/boost_no_fenv_h.ipp
   trunk/libs/config/test/no_fenv_h_fail.cpp
      - copied unchanged from r66804, /trunk/libs/config/test/no_fenv_h_fail.cpp
   trunk/libs/config/test/no_fenv_h_pass.cpp
      - copied unchanged from r66804, /trunk/libs/config/test/no_fenv_h_pass.cpp
Text files modified:
   trunk/boost/config/compiler/visualc.hpp | 3 +++
   trunk/boost/config/platform/cygwin.hpp | 3 +++
   trunk/boost/config/platform/win32.hpp | 1 -
   trunk/boost/config/stdlib/libstdcpp3.hpp | 15 ++++++++++-----
   trunk/boost/config/stdlib/sgi.hpp | 11 +++++++----
   trunk/boost/config/stdlib/stlport.hpp | 11 +++++++----
   trunk/boost/config/stdlib/vacpp.hpp | 11 +++++++----
   trunk/boost/detail/fenv.hpp | 2 +-
   trunk/libs/config/doc/macro_reference.qbk | 10 +++++-----
   9 files changed, 43 insertions(+), 24 deletions(-)

Modified: trunk/boost/config/compiler/visualc.hpp
==============================================================================
--- trunk/boost/config/compiler/visualc.hpp (original)
+++ trunk/boost/config/compiler/visualc.hpp 2011-01-30 01:24:30 EST (Sun, 30 Jan 2011)
@@ -37,6 +37,9 @@
    //
 #endif
 
+/// Visual Studio has no fenv.h
+#define BOOST_NO_FENV_H
+
 #if (_MSC_VER <= 1300) // 1300 == VC++ 7.0
 
 # if !defined(_MSC_EXTENSIONS) && !defined(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS) // VC7 bug with /Za

Modified: trunk/boost/config/platform/cygwin.hpp
==============================================================================
--- trunk/boost/config/platform/cygwin.hpp (original)
+++ trunk/boost/config/platform/cygwin.hpp 2011-01-30 01:24:30 EST (Sun, 30 Jan 2011)
@@ -39,6 +39,9 @@
 #define BOOST_HAS_STDINT_H
 #endif
 
+/// Cygwin has no fenv.h
+#define BOOST_NO_FENV_H
+
 // boilerplate code:
 #include <boost/config/posix_features.hpp>
 

Modified: trunk/boost/config/platform/win32.hpp
==============================================================================
--- trunk/boost/config/platform/win32.hpp (original)
+++ trunk/boost/config/platform/win32.hpp 2011-01-30 01:24:30 EST (Sun, 30 Jan 2011)
@@ -31,7 +31,6 @@
 # define BOOST_SYMBOL_IMPORT __declspec(dllimport)
 #endif
 
-
 #if defined(__MINGW32__) && ((__MINGW32_MAJOR_VERSION > 2) || ((__MINGW32_MAJOR_VERSION == 2) && (__MINGW32_MINOR_VERSION >= 0)))
 # define BOOST_HAS_STDINT_H
 # define __STDC_LIMIT_MACROS

Modified: trunk/boost/config/stdlib/libstdcpp3.hpp
==============================================================================
--- trunk/boost/config/stdlib/libstdcpp3.hpp (original)
+++ trunk/boost/config/stdlib/libstdcpp3.hpp 2011-01-30 01:24:30 EST (Sun, 30 Jan 2011)
@@ -56,11 +56,6 @@
 # define BOOST_HAS_THREADS
 #endif
 
-#if !defined(CYGWIN)
-# include <unistd.h>
-# define BOOST_HAS_FENV_H
-#endif
-
 #if !defined(_GLIBCPP_USE_LONG_LONG) \
     && !defined(_GLIBCXX_USE_LONG_LONG)\
     && defined(BOOST_HAS_LONG_LONG)
@@ -69,6 +64,16 @@
 # undef BOOST_HAS_LONG_LONG
 #endif
 
+// Apple doesn't seem to reliably defined a *unix* macro
+#if !defined(CYGWIN) && ( defined(__unix__) \
+ || defined(__unix) \
+ || defined(unix) \
+ || defined(__APPLE__) \
+ || defined(__APPLE) \
+ || defined(APPLE))
+# include <unistd.h>
+#endif
+
 #if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0
 # define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx
 # define BOOST_HAS_SLIST

Modified: trunk/boost/config/stdlib/sgi.hpp
==============================================================================
--- trunk/boost/config/stdlib/sgi.hpp (original)
+++ trunk/boost/config/stdlib/sgi.hpp 2011-01-30 01:24:30 EST (Sun, 30 Jan 2011)
@@ -40,11 +40,14 @@
 # define BOOST_NO_STRINGSTREAM
 #endif
 
-#if !defined(CYGWIN) && (defined(unix) || defined(__unix) || defined(__unix__))
+// Apple doesn't seem to reliably defined a *unix* macro
+#if !defined(CYGWIN) && ( defined(__unix__) \
+ || defined(__unix) \
+ || defined(unix) \
+ || defined(__APPLE__) \
+ || defined(__APPLE) \
+ || defined(APPLE))
 # include <unistd.h>
-# if defined(_POSIX_VERSION) || defined(_XOPEN_VERSION)
-# define BOOST_HAS_FENV_H
-# endif
 #endif
 
 

Modified: trunk/boost/config/stdlib/stlport.hpp
==============================================================================
--- trunk/boost/config/stdlib/stlport.hpp (original)
+++ trunk/boost/config/stdlib/stlport.hpp 2011-01-30 01:24:30 EST (Sun, 30 Jan 2011)
@@ -16,11 +16,14 @@
 # endif
 #endif
 
-#if !defined(CYGWIN) && (defined(unix) || defined(__unix) || defined(__unix__))
+// Apple doesn't seem to reliably defined a *unix* macro
+#if !defined(CYGWIN) && ( defined(__unix__) \
+ || defined(__unix) \
+ || defined(unix) \
+ || defined(__APPLE__) \
+ || defined(__APPLE) \
+ || defined(APPLE))
 # include <unistd.h>
-# if defined(_POSIX_VERSION) || defined(_XOPEN_VERSION)
-# define BOOST_HAS_FENV_H
-# endif
 #endif
 
 //

Modified: trunk/boost/config/stdlib/vacpp.hpp
==============================================================================
--- trunk/boost/config/stdlib/vacpp.hpp (original)
+++ trunk/boost/config/stdlib/vacpp.hpp 2011-01-30 01:24:30 EST (Sun, 30 Jan 2011)
@@ -12,11 +12,14 @@
 #define BOOST_HAS_MACRO_USE_FACET
 #define BOOST_NO_STD_MESSAGES
 
-#if !defined(CYGWIN) && (defined(unix) || defined(__unix) || defined(__unix__))
+// Apple doesn't seem to reliably defined a *unix* macro
+#if !defined(CYGWIN) && ( defined(__unix__) \
+ || defined(__unix) \
+ || defined(unix) \
+ || defined(__APPLE__) \
+ || defined(__APPLE) \
+ || defined(APPLE))
 # include <unistd.h>
-# if defined(_POSIX_VERSION) || defined(_XOPEN_VERSION)
-# define BOOST_HAS_FENV_H
-# endif
 #endif
 
 // C++0x headers not yet implemented

Modified: trunk/boost/detail/fenv.hpp
==============================================================================
--- trunk/boost/detail/fenv.hpp (original)
+++ trunk/boost/detail/fenv.hpp 2011-01-30 01:24:30 EST (Sun, 30 Jan 2011)
@@ -7,7 +7,7 @@
 
 #include <boost/config.hpp>
 
-#if !defined(BOOST_HAS_FENV_H)
+#if defined(BOOST_NO_FENV_H)
   #error This platform does not have a floating point environment
 #endif
 

Modified: trunk/libs/config/doc/macro_reference.qbk
==============================================================================
--- trunk/libs/config/doc/macro_reference.qbk (original)
+++ trunk/libs/config/doc/macro_reference.qbk 2011-01-30 01:24:30 EST (Sun, 30 Jan 2011)
@@ -71,6 +71,11 @@
 [[`BOOST_NO_CWCTYPE`][Platform][
 The Platform does not provide `<wctype.h>` and `<cwctype>`.
 ]]
+[[`BOOST_NO_FENV_H`][Platform, Standard library][
+The C standard library doesn't provide `<fenv.h>`. [@../../../../boost/detail/fenv.hpp
+`<boost/detail/fenv.hpp>`] should be included instead of `<fenv.h>` for maximum
+portability on platforms which do provide `<fenv.h>`.
+]]
 [[`BOOST_NO_DEPENDENT_NESTED_DERIVATIONS`][Compiler][
 The compiler fails to compile a nested class that has a dependent base class:
 ``
@@ -399,11 +404,6 @@
 [[`BOOST_HAS_SGI_TYPE_TRAITS`][Compiler, Standard library][
 The compiler has native support for SGI style type traits.
 ]]
-[[`BOOST_HAS_FENV_H`][Platform, Standard library][
-The platform has a `<fenv.h>`. [@../../../../boost/detail/fenv.hpp
-`<boost/detail/fenv.hpp>`] should be included instead of `<fenv.h>` for maximum
-portability.
-]]
 [[`BOOST_HAS_STDINT_H`][Platform][
 The platform has a `<stdint.h>`
 ]]


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk