Skip to content

Commit

Permalink
Avoid stray pyconfig.h definition of 'copysign' causing problems (#2800)
Browse files Browse the repository at this point in the history
Caused build errors on Windows due to conflicting definitions of copysign (one of which was a macro).
  • Loading branch information
lgritz committed Dec 31, 2020
1 parent 0f8a453 commit 9d8cda7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/python/py_oiio.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <OpenImageIO/deepdata.h>
#include <OpenImageIO/imagebuf.h>
#include <OpenImageIO/imagecache.h>
Expand Down

0 comments on commit 9d8cda7

Please sign in to comment.