[gimp] plug-ins: optionally define several float.h macros for MinGW64.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: optionally define several float.h macros for MinGW64.
- Date: Sat, 26 Jan 2019 15:42:46 +0000 (UTC)
commit 7a7ecda4f170b1fead91bcc53d014d47c563513e
Author: Jehan <jehan girinstud io>
Date: Sat Jan 26 14:47:56 2019 +0100
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.
plug-ins/file-exr/openexr-wrapper.cc | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/plug-ins/file-exr/openexr-wrapper.cc b/plug-ins/file-exr/openexr-wrapper.cc
index ef401f8daf..ff3e14d0c0 100644
--- a/plug-ins/file-exr/openexr-wrapper.cc
+++ b/plug-ins/file-exr/openexr-wrapper.cc
@@ -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>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]