vcpkg/ports/gts/fix-M_PI-in-windows.patch
Jack·Boos·Yu 981daa4e98
[gts] Support for build with cmake in unix (#10055)
* [gts] Support for build with cmake in unix

* update baseline

* [gts] Apply patch

* [gts] Fix undefined M_PI in windows

* update baseline
2020-04-27 08:01:31 -07:00

29 lines
530 B
Diff

diff --git a/src/curvature.c b/src/curvature.c
index 70f6af2..a5c0187 100644
--- a/src/curvature.c
+++ b/src/curvature.c
@@ -17,6 +17,9 @@
* Boston, MA 02111-1307, USA.
*/
+#ifdef _WIN32
+#define _USE_MATH_DEFINES
+#endif
#include <math.h>
#include "gts.h"
diff --git a/src/triangle.c b/src/triangle.c
index 1d82869..47170c6 100644
--- a/src/triangle.c
+++ b/src/triangle.c
@@ -17,6 +17,9 @@
* Boston, MA 02111-1307, USA.
*/
+#ifdef _WIN32
+#define _USE_MATH_DEFINES
+#endif
#include <math.h>
#include "gts.h"