From 78f6a82a2ed9a3ad98f49e73c85a2d14aa9ee93c Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Mon, 7 May 2018 22:29:53 +0200 Subject: Add NAN definition to proj_math.h --- src/proj_math.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/proj_math.h') diff --git a/src/proj_math.h b/src/proj_math.h index 1bb0a94f..1e0c6217 100644 --- a/src/proj_math.h +++ b/src/proj_math.h @@ -36,15 +36,30 @@ extern "C" { #if !(defined(HAVE_C99_MATH) && HAVE_C99_MATH) +#ifndef NAN +#ifdef _WIN32 +#define NAN sqrt(-1.0) +#else +#define NAN 0.0/0.0 +#endif +#endif + double pj_hypot(double x, double y); double pj_log1p(double x); double pj_asinh(double x); +double pj_round(double x); +long pj_lround(double x); int pj_isnan(double x); #define hypot pj_hypot #define log1p pj_log1p #define asinh pj_asinh +#define round pj_round +#define lround pj_lround + +#ifndef isnan #define isnan pj_isnan +#endif #endif /* !(defined(HAVE_C99_MATH) && HAVE_C99_MATH) */ -- cgit v1.2.3