diff options
author | Joe George <joe@zeroc.com> | 2017-09-21 17:33:37 -0400 |
---|---|---|
committer | Joe George <joe@zeroc.com> | 2017-09-22 10:19:00 -0400 |
commit | 75bf30ef78ea57ecca3916c870edd06bd3dc3545 (patch) | |
tree | 269c6f5c476636475ad107ec6976ef8b3d3c2114 /ruby/src | |
parent | Fix UWP networkProxy project to not rebuild all the time (diff) | |
download | ice-75bf30ef78ea57ecca3916c870edd06bd3dc3545.tar.bz2 ice-75bf30ef78ea57ecca3916c870edd06bd3dc3545.tar.xz ice-75bf30ef78ea57ecca3916c870edd06bd3dc3545.zip |
Fix ICE-8523
Fix Ice for Ruby to build against C++ libraries which undefine the isfinite
macro and have also deprecated finite
Diffstat (limited to 'ruby/src')
-rw-r--r-- | ruby/src/IceRuby/Config.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ruby/src/IceRuby/Config.h b/ruby/src/IceRuby/Config.h index 16d0d820cb4..99960fed1f5 100644 --- a/ruby/src/IceRuby/Config.h +++ b/ruby/src/IceRuby/Config.h @@ -42,6 +42,16 @@ # include <wincrypt.h> #endif +// The ruby.h check for the isfinite macro fails with some C++ standard libraries +// (libc++ > 4000) because the isfinite macro included from the C library's +// math.h is undefined and replaced with a function. As a result, Ruby defines isfinite +// as the finite macro which is deprecated on some platforms (macOS >= 10.9). +// The warning ends up causing a build failure. We define the HAVE_ISFINITE macro here to +// ensure ruby.h doesn't redefine it. +#if defined(__clang__) && defined(_LIBCPP_VERSION) && (_LIBCPP_VERSION >= 4000) +#define HAVE_ISFINITE 1 +#endif + #include <ruby.h> // |