--- src/CGarminImg.h.orig	2008-02-13 21:15:18
+++ src/CGarminImg.h	2023-12-07 01:09:00
@@ -207,5 +207,8 @@ class CGarminImg : public QObject
 };
 
 #define DEG(x) ((x) < 0x800000 ? (double)(x) * 360.0 / 16777216.0 : (double)((x) - 0x1000000) * 360.0 / 16777216.0)
+#ifndef TWOPI
+#define TWOPI M_TWOPI
+#endif
 #define RAD(x) ((x) < 0x800000 ? (double)(x) * TWOPI / 16777216.0 : (double)((x) - 0x1000000) * TWOPI / 16777216.0)
 #endif                           //CGARMINIMG_H
--- src/IProjection.h.orig	2008-02-13 21:15:18
+++ src/IProjection.h	2023-12-07 01:41:37
@@ -24,6 +24,13 @@ extern void setupProjection(quint32 key);
 #include <QPolygonF>
 #include <QString>
 
+#ifndef PI
+#define PI M_PI
+#endif
+#ifndef TWOPI
+#define TWOPI M_TWOPI
+#endif
+
 extern void setupProjection(quint32 key);
 
 class IProjection
--- src/GeoMath.h.orig	2008-06-05 04:36:19
+++ src/GeoMath.h	2023-12-07 01:45:17
@@ -22,6 +22,13 @@ extern void GPS_Math_Deg_To_Str(double lon, double lat
 #include <projects.h>
 #include <QVector>
 
+#ifndef PI
+#define PI M_PI
+#endif
+#ifndef TWOPI
+#define TWOPI M_TWOPI
+#endif
+
 extern void GPS_Math_Deg_To_Str(double lon, double lat, QString& str);
 extern void GPS_Math_Str_To_Deg(const QString& str, double& lon, double& lat);
 // extern bool GPS_Math_Deg_To_DegMin(double v, int32_t *d, double *m);