patch-veusz_helpers_src_qtloops_isnan_h 1.1 KB

123456789101112131415161718192021222324252627
  1. $OpenBSD: patch-veusz_helpers_src_qtloops_isnan_h,v 1.1 2017/05/13 18:45:38 espie Exp $
  2. clang is better at encapsulating C files, so we don't have a macro for isfinite
  3. or isnan, hence the tests fail!
  4. Index: veusz/helpers/src/qtloops/isnan.h
  5. --- veusz/helpers/src/qtloops/isnan.h.orig
  6. +++ veusz/helpers/src/qtloops/isnan.h
  7. @@ -33,7 +33,7 @@
  8. # define isNaN(_a) (__isnan(_a)) /* MacOSX/Darwin definition < 10.4 */
  9. #elif defined(WIN32) || defined(_isnan) || defined(_MSC_VER)
  10. # define isNaN(_a) (_isnan(_a)) /* Win32 definition */
  11. -#elif defined(isnan) || defined(__FreeBSD__) || defined(__osf__)
  12. +#elif defined(isnan) || defined(__FreeBSD__) ||defined(__OpenBSD__) || defined(__osf__)
  13. # define isNaN(_a) (isnan(_a)) /* GNU definition */
  14. #else
  15. # define isNaN(_a) (std::isnan(_a))
  16. @@ -50,7 +50,7 @@
  17. # define isFinite(_a) (_finite(_a)) /* Win32 definition */
  18. #elif defined(__sgi)
  19. # define isFinite(_a) (_isfinite(_a))
  20. -#elif defined(isfinite)
  21. +#elif defined(isfinite) || defined(__OpenBSD__)
  22. # define isFinite(_a) (isfinite(_a))
  23. #elif defined(__osf__)
  24. # define isFinite(_a) (finite(_a) && !isNaN(_a))