From 9d8cda7ccacd197fd1d69c605e1a92c3ccaa547f Mon Sep 17 00:00:00 2001 From: Larry Gritz Date: Wed, 30 Dec 2020 21:46:15 -0800 Subject: [PATCH] Avoid stray pyconfig.h definition of 'copysign' causing problems (#2800) Caused build errors on Windows due to conflicting definitions of copysign (one of which was a macro). --- src/python/py_oiio.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/python/py_oiio.h b/src/python/py_oiio.h index a2af73f2c8..75cd66ec13 100644 --- a/src/python/py_oiio.h +++ b/src/python/py_oiio.h @@ -24,6 +24,11 @@ // Avoid a compiler warning from a duplication in tiffconf.h/pyconfig.h #undef SIZEOF_LONG +// Avoid a problem with copysign defined in pyconfig.h on Windows. +#ifdef copysign +# undef copysign +#endif + #include #include #include