summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2006-10-19 20:08:03 +0000
committerTom Lane2006-10-19 20:08:03 +0000
commit28997903a13c5ef2ac294398f047a8cbbc74d378 (patch)
tree4a6d8a4d550ccabd64eb374049871bb71d8b39f4
parentf6e00ae128ab9d92a71abd3fabb9360dc497bcfe (diff)
Handle missing M_PI the same way we've been doing in the core code,
instead of inserting an MSVC dependency.
-rw-r--r--contrib/earthdistance/earthdistance.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/earthdistance/earthdistance.c b/contrib/earthdistance/earthdistance.c
index b60370483b..ce1ca1665b 100644
--- a/contrib/earthdistance/earthdistance.c
+++ b/contrib/earthdistance/earthdistance.c
@@ -1,14 +1,15 @@
-/* $PostgreSQL: pgsql/contrib/earthdistance/earthdistance.c,v 1.12 2006/10/19 20:03:07 tgl Exp $ */
+/* $PostgreSQL: pgsql/contrib/earthdistance/earthdistance.c,v 1.13 2006/10/19 20:08:03 tgl Exp $ */
#include "postgres.h"
-#ifdef WIN32
-#define _USE_MATH_DEFINES
-#endif
#include <math.h>
#include "utils/geo_decls.h" /* for Pt */
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
PG_MODULE_MAGIC;