From: Mario Date: Sun, 4 Mar 2018 04:12:08 +0000 (+1000) Subject: Fix compile on MSYS2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=20dbf5c11d34df31622be29c3caeca77a8a89889;p=xonotic%2Fnetradiant.git Fix compile on MSYS2 --- diff --git a/libs/l_net/l_net_wins.c b/libs/l_net/l_net_wins.c index 937e7abb..a4a33786 100644 --- a/libs/l_net/l_net_wins.c +++ b/libs/l_net/l_net_wins.c @@ -46,7 +46,7 @@ typedef struct tag_error_struct LPSTR errstr; } ERROR_STRUCT; -const int NET_NAMELEN = 64; +#define NET_NAMELEN 64 char my_tcpip_address[NET_NAMELEN]; diff --git a/radiant/multimon.cpp b/radiant/multimon.cpp index 917821d2..99d63204 100644 --- a/radiant/multimon.cpp +++ b/radiant/multimon.cpp @@ -37,7 +37,7 @@ void MultiMonitor_constructPreferences(PreferencesPage &page) g_multimon_globals.m_bStartOnPrimMon); ui::CheckButton popup = page.appendCheckBox( "", "Disable system menu on popup windows", - mkImportExportCallback(g_Multimon_enableSysMenuPopups) + make_property(g_Multimon_enableSysMenuPopups) ); Widget_connectToggleDependency(popup, primary_monitor); } diff --git a/radiant/patch.cpp b/radiant/patch.cpp index c48cb44a..7a99fd2f 100644 --- a/radiant/patch.cpp +++ b/radiant/patch.cpp @@ -1311,9 +1311,9 @@ void Patch::ConstructPrefab(const AABB &aabb, EPatchPrefab eType, int axis, std: // vPos[1] = aabb.origin; // vPos[2] = vector3_added(aabb.origin, aabb.extents); - float f = 1 / cos(M_PI / n); + float f = 1 / cos(G_PI / n); for (std::size_t i = 0; i < width; ++i) { - float angle = (M_PI * i) / n; // 0 to 2pi + float angle = (G_PI * i) / n; // 0 to 2pi float x = vPos[1][0] + (vPos[2][0] - vPos[1][0]) * cos(angle) * ((i & 1) ? f : 1.0f); float y = vPos[1][1] + (vPos[2][1] - vPos[1][1]) * sin(angle) * ((i & 1) ? f : 1.0f); for (std::size_t j = 0; j < height; ++j) { @@ -1333,9 +1333,9 @@ void Patch::ConstructPrefab(const AABB &aabb, EPatchPrefab eType, int axis, std: // vPos[1] = aabb.origin; // vPos[2] = vector3_added(aabb.origin, aabb.extents); - float f = 1 / cos(M_PI / n); + float f = 1 / cos(G_PI / n); for (std::size_t i = 0; i < width; ++i) { - float angle = (M_PI * i) / n; + float angle = (G_PI * i) / n; for (std::size_t j = 0; j < height; ++j) { float x = vPos[1][0] + (1.0f - (j / (float) (height - 1))) * (vPos[2][0] - vPos[1][0]) * cos(angle) * ((i & 1) ? f : 1.0f); @@ -1358,12 +1358,12 @@ void Patch::ConstructPrefab(const AABB &aabb, EPatchPrefab eType, int axis, std: // vPos[1] = aabb.origin; // vPos[2] = vector3_added(aabb.origin, aabb.extents); - float f = 1 / cos(M_PI / n); - float g = 1 / cos(M_PI / (2 * m)); + float f = 1 / cos(G_PI / n); + float g = 1 / cos(G_PI / (2 * m)); for (std::size_t i = 0; i < width; ++i) { - float angle = (M_PI * i) / n; + float angle = (G_PI * i) / n; for (std::size_t j = 0; j < height; ++j) { - float angle2 = (M_PI * j) / (2 * m); + float angle2 = (G_PI * j) / (2 * m); float x = vPos[1][0] + (vPos[2][0] - vPos[1][0]) * sin(angle2) * ((j & 1) ? g : 1.0f) * cos(angle) * ((i & 1) ? f : 1.0f); float y = vPos[1][1] + (vPos[2][1] - vPos[1][1]) * sin(angle2) * ((j & 1) ? g : 1.0f) * sin(angle) *