aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/proj_math.h15
1 files changed, 15 insertions, 0 deletions
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) */