Thread: earthdistance update for msvc

earthdistance update for msvc

From
"Magnus Hagander"
Date:
A define is needed to expose the M_PI define from the system headers.

//Magnu <<earthdistance.diff>> s

Attachment

Re: earthdistance update for msvc

From
Tom Lane
Date:
"Magnus Hagander" <mha@sollentuna.net> writes:
> A define is needed to expose the M_PI define from the system headers.

It seems like the other places where we depend on M_PI, we instead have

#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif

Perhaps that's a better solution?

            regards, tom lane

Re: earthdistance update for msvc

From
"Magnus Hagander"
Date:
> > A define is needed to expose the M_PI define from the
> system headers.
>
> It seems like the other places where we depend on M_PI, we
> instead have
>
> #ifndef M_PI
> #define M_PI 3.14159265358979323846
> #endif
>
> Perhaps that's a better solution?

Oh. I actually did that for my quick-n-dirty fix and thought it would be
rejected so I researched the other one :-) either one is fine by me.

//Magnus