patch-port_cpl_port_h 697 B

1234567891011121314151617
  1. $OpenBSD: patch-port_cpl_port_h,v 1.1 2017/05/19 09:19:48 landry Exp $
  2. Fix isnan() not being defined
  3. Index: port/cpl_port.h
  4. --- port/cpl_port.h.orig
  5. +++ port/cpl_port.h
  6. @@ -672,7 +672,7 @@ static inline int CPLIsFinite(double f) { return std::
  7. # define CPLIsFinite(x) __builtin_isfinite(x)
  8. #else
  9. /** Return whether a floating-pointer number is NaN */
  10. -#if defined(__cplusplus) && defined(__GNUC__) && defined(__linux) && !defined(__ANDROID__)
  11. +#if defined(__cplusplus) && defined(__GNUC__) && defined(__OpenBSD__) && !defined(__ANDROID__)
  12. /* so to not get warning about conversion from double to float with */
  13. /* gcc -Wfloat-conversion when using isnan()/isinf() macros */
  14. extern "C++" {