plug-ins: optionally define several float.h macros for MinGW64.

This plug-in failed to cross-build because these macros were not defined
in the `float.h` of my MinGW64 environment (and they are used in some
ilmbase headers). Just define them ourselves if they are absent. I do
this only on MinGW environment because these should really be defined on
Linux (and other UNIX-like, I guess?) and if they are not, we may have a
bigger issue.
This commit is contained in:
Jehan
2019-01-26 14:47:56 +01:00
parent 586107ccbb
commit 7a7ecda4f1

View File

@ -11,6 +11,18 @@
#include "openexr-wrapper.h"
#if defined(__MINGW32__)
#ifndef FLT_EPSILON
#define FLT_EPSILON __FLT_EPSILON__
#endif
#ifndef DBL_EPSILON
#define DBL_EPSILON __DBL_EPSILON__
#endif
#ifndef LDBL_EPSILON
#define LDBL_EPSILON __LDBL_EPSILON__
#endif
#endif
#include <ImfInputFile.h>
#include <ImfChannelList.h>
#include <ImfRgbaFile.h>