comparison DEPENDENCIES/generic/include/boost/detail/fenv.hpp @ 101:c530137014c0

Update Boost headers (1.58.0)
author Chris Cannam
date Mon, 07 Sep 2015 11:12:49 +0100
parents 2665513ce2d3
children
comparison
equal deleted inserted replaced
100:793467b5e61c 101:c530137014c0
12 #endif 12 #endif
13 13
14 #if !defined(BOOST_DETAIL_FENV_HPP) 14 #if !defined(BOOST_DETAIL_FENV_HPP)
15 #define BOOST_DETAIL_FENV_HPP 15 #define BOOST_DETAIL_FENV_HPP
16 16
17 /* If we're using clang + glibc, we have to get hacky. 17 /* If we're using clang + glibc, we have to get hacky.
18 * See http://llvm.org/bugs/show_bug.cgi?id=6907 */ 18 * See http://llvm.org/bugs/show_bug.cgi?id=6907 */
19 #if defined(__clang__) && (__clang_major__ < 3) && \ 19 #if defined(__clang__) && (__clang_major__ < 3) && \
20 defined(__GNU_LIBRARY__) && /* up to version 5 */ \ 20 defined(__GNU_LIBRARY__) && /* up to version 5 */ \
21 defined(__GLIBC__) && /* version 6 + */ \ 21 defined(__GLIBC__) && /* version 6 + */ \
22 !defined(_FENV_H) 22 !defined(_FENV_H)
59 using ::fesetenv; 59 using ::fesetenv;
60 using ::feupdateenv; 60 using ::feupdateenv;
61 using ::feholdexcept; 61 using ::feholdexcept;
62 } } 62 } }
63 63
64 #elif defined(__MINGW32__) && defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 408
65
66 // MinGW (32-bit) has a bug in mingw32/bits/c++config.h, it does not define _GLIBCXX_HAVE_FENV_H,
67 // which prevents the C fenv.h header contents to be included in the C++ wrapper header fenv.h. This is at least
68 // the case with gcc 4.8.1 packages tested so far, up to 4.8.1-4. Note that there is no issue with
69 // MinGW-w64.
70 // To work around the bug we avoid including the C++ wrapper header and include the C header directly
71 // and import all relevant symbols into std:: ourselves.
72
73 #include <../include/fenv.h>
74
75 namespace std {
76 using ::fenv_t;
77 using ::fexcept_t;
78 using ::fegetexceptflag;
79 using ::fesetexceptflag;
80 using ::feclearexcept;
81 using ::feraiseexcept;
82 using ::fetestexcept;
83 using ::fegetround;
84 using ::fesetround;
85 using ::fegetenv;
86 using ::fesetenv;
87 using ::feupdateenv;
88 using ::feholdexcept;
89 }
90
64 #else /* if we're not using GNU's C stdlib, fenv.h should work with clang */ 91 #else /* if we're not using GNU's C stdlib, fenv.h should work with clang */
92
65 #if defined(__SUNPRO_CC) /* lol suncc */ 93 #if defined(__SUNPRO_CC) /* lol suncc */
66 #include <stdio.h> 94 #include <stdio.h>
67 #endif 95 #endif
68 96
69 #include <fenv.h> 97 #include <fenv.h>
70 98
71 #endif 99 #endif
72 100
73 #endif /* BOOST_DETAIL_FENV_HPP */ 101 #endif /* BOOST_DETAIL_FENV_HPP */
74