mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-02 07:50:31 +00:00
check for macros within __math/traits
This commit is contained in:
parent
22094ae9ca
commit
1a38b86901
3 changed files with 94 additions and 48 deletions
44
third_party/libcxx/__math/traits.h
vendored
44
third_party/libcxx/__math/traits.h
vendored
|
@ -22,6 +22,50 @@
|
|||
# pragma GCC system_header
|
||||
#endif
|
||||
|
||||
# ifdef signbit
|
||||
# undef signbit
|
||||
# endif
|
||||
|
||||
# ifdef isfinite
|
||||
# undef isfinite
|
||||
# endif
|
||||
|
||||
# ifdef isinf
|
||||
# undef isinf
|
||||
# endif
|
||||
|
||||
# ifdef isnan
|
||||
# undef isnan
|
||||
# endif
|
||||
|
||||
# ifdef isnormal
|
||||
# undef isnormal
|
||||
# endif
|
||||
|
||||
# ifdef isgreater
|
||||
# undef isgreater
|
||||
# endif
|
||||
|
||||
# ifdef isgreaterequal
|
||||
# undef isgreaterequal
|
||||
# endif
|
||||
|
||||
# ifdef isless
|
||||
# undef isless
|
||||
# endif
|
||||
|
||||
# ifdef islessequal
|
||||
# undef islessequal
|
||||
# endif
|
||||
|
||||
# ifdef islessgreater
|
||||
# undef islessgreater
|
||||
# endif
|
||||
|
||||
# ifdef isunordered
|
||||
# undef isunordered
|
||||
# endif
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
namespace __math {
|
||||
|
|
46
third_party/libcxx/cmath
vendored
46
third_party/libcxx/cmath
vendored
|
@ -341,6 +341,52 @@ constexpr long double lerp(long double a, long double b, long double t) noexcept
|
|||
_LIBCPP_PUSH_MACROS
|
||||
#include <__undef_macros>
|
||||
|
||||
# ifdef signbit
|
||||
# undef signbit
|
||||
# endif
|
||||
|
||||
# ifdef isfinite
|
||||
# undef isfinite
|
||||
# endif
|
||||
|
||||
# ifdef isinf
|
||||
# undef isinf
|
||||
# endif
|
||||
|
||||
# ifdef isnan
|
||||
# undef isnan
|
||||
# endif
|
||||
|
||||
# ifdef isnormal
|
||||
# undef isnormal
|
||||
# endif
|
||||
|
||||
# ifdef isgreater
|
||||
# undef isgreater
|
||||
# endif
|
||||
|
||||
# ifdef isgreaterequal
|
||||
# undef isgreaterequal
|
||||
# endif
|
||||
|
||||
# ifdef isless
|
||||
# undef isless
|
||||
# endif
|
||||
|
||||
# ifdef islessequal
|
||||
# undef islessequal
|
||||
# endif
|
||||
|
||||
# ifdef islessgreater
|
||||
# undef islessgreater
|
||||
# endif
|
||||
|
||||
# ifdef isunordered
|
||||
# undef isunordered
|
||||
# endif
|
||||
|
||||
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
using ::signbit _LIBCPP_USING_IF_EXISTS;
|
||||
|
|
52
third_party/libcxx/math.h
vendored
52
third_party/libcxx/math.h
vendored
|
@ -307,54 +307,6 @@ long double truncl(long double x);
|
|||
// back to C++ linkage before including these C++ headers.
|
||||
extern "C++" {
|
||||
|
||||
# ifdef fpclassify
|
||||
# undef fpclassify
|
||||
# endif
|
||||
|
||||
# ifdef signbit
|
||||
# undef signbit
|
||||
# endif
|
||||
|
||||
# ifdef isfinite
|
||||
# undef isfinite
|
||||
# endif
|
||||
|
||||
# ifdef isinf
|
||||
# undef isinf
|
||||
# endif
|
||||
|
||||
# ifdef isnan
|
||||
# undef isnan
|
||||
# endif
|
||||
|
||||
# ifdef isnormal
|
||||
# undef isnormal
|
||||
# endif
|
||||
|
||||
# ifdef isgreater
|
||||
# undef isgreater
|
||||
# endif
|
||||
|
||||
# ifdef isgreaterequal
|
||||
# undef isgreaterequal
|
||||
# endif
|
||||
|
||||
# ifdef isless
|
||||
# undef isless
|
||||
# endif
|
||||
|
||||
# ifdef islessequal
|
||||
# undef islessequal
|
||||
# endif
|
||||
|
||||
# ifdef islessgreater
|
||||
# undef islessgreater
|
||||
# endif
|
||||
|
||||
# ifdef isunordered
|
||||
# undef isunordered
|
||||
# endif
|
||||
|
||||
# include <__math/abs.h>
|
||||
# include <__math/copysign.h>
|
||||
# include <__math/error_functions.h>
|
||||
|
@ -379,6 +331,10 @@ extern "C++" {
|
|||
# include <__type_traits/is_integral.h>
|
||||
# include <stdlib.h>
|
||||
|
||||
# ifdef fpclassify
|
||||
# undef fpclassify
|
||||
# endif
|
||||
|
||||
// fpclassify relies on implementation-defined constants, so we can't move it to a detail header
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue