From b4e5d582cb656a590b256bcf4a8ffa7c8ce9ba19 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Fri, 13 Dec 2019 11:11:33 +0100 Subject: [PATCH] undo #define copysign in pyconfig.h --- include/pybind11/detail/common.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/pybind11/detail/common.h b/include/pybind11/detail/common.h index bb1affcea..e2330bbe6 100644 --- a/include/pybind11/detail/common.h +++ b/include/pybind11/detail/common.h @@ -113,6 +113,9 @@ #include #include +/* Python #defines overrides on all sorts of core functions, which + tends to weak havok in C++ codebases that expect these to work + like regular functions (potentially with several overloads) */ #if defined(isalnum) # undef isalnum # undef isalpha @@ -123,6 +126,10 @@ # undef toupper #endif +#if defined(copysign) +# undef copysign +#endif + #if defined(_MSC_VER) # if defined(PYBIND11_DEBUG_MARKER) # define _DEBUG