aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Alessandrelli2016-11-03 05:20:26 +0100
committerRémi Verschelde2017-01-12 19:15:30 +0100
commit9c8ecb45f8516a2d45c18c50093887448d8a64e8 (patch)
treefc173196b88a960343ee2c1109b3fedbaaebc22a
parent8a5596322d586007d66c90b25ef2dd09d196fdfa (diff)
downloadgodot-9c8ecb45f8516a2d45c18c50093887448d8a64e8.tar.gz
godot-9c8ecb45f8516a2d45c18c50093887448d8a64e8.tar.zst
godot-9c8ecb45f8516a2d45c18c50093887448d8a64e8.zip
-rw-r--r--drivers/unix/ip_unix.cpp4
-rw-r--r--drivers/unix/socket_helpers.h10
-rw-r--r--platform/windows/detect.py4
-rw-r--r--platform/winrt/detect.py4
4 files changed, 12 insertions, 10 deletions
diff --git a/drivers/unix/ip_unix.cpp b/drivers/unix/ip_unix.cpp
index 0e8e5f009..df2b024b4 100644
--- a/drivers/unix/ip_unix.cpp
+++ b/drivers/unix/ip_unix.cpp
@@ -33,10 +33,6 @@
#include <string.h>
#ifdef WINDOWS_ENABLED
- // Workaround mingw missing flags!
- #ifndef AI_ADDRCONFIG
- #define AI_ADDRCONFIG 0x00000400
- #endif
#include <ws2tcpip.h>
#include <winsock2.h>
#include <windows.h>
diff --git a/drivers/unix/socket_helpers.h b/drivers/unix/socket_helpers.h
index 373feb4b8..6d4f7e751 100644
--- a/drivers/unix/socket_helpers.h
+++ b/drivers/unix/socket_helpers.h
@@ -3,11 +3,11 @@
#include <string.h>
-#ifdef WINDOWS_ENABLED
- // Workaround mingw missing flags!
- #ifndef IPV6_V6ONLY
- #define IPV6_V6ONLY 27
- #endif
+#if defined(__MINGW32__ ) && (!defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 4)
+ // Workaround for mingw-w64 < 4.0
+ #ifndef IPV6_V6ONLY
+ #define IPV6_V6ONLY 27
+ #endif
#endif
// helpers for sockaddr -> IP_Address and back, should work for posix and winsock. All implementations should use this
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index 590f92a05..6972d1e9c 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -200,7 +200,7 @@ def configure(env):
env.Append(CPPPATH=['#platform/windows'])
# Targeted Windows version: Vista (and later)
- env.Append(CPPFLAGS=['-D_WIN32_WINNT=0x0600'])
+ winver = "0x0600" # Windows Vista is the minimum target for windows builds
env['is_mingw'] = False
if (os.name == "nt" and os.getenv("VSINSTALLDIR") != None):
@@ -208,6 +208,7 @@ def configure(env):
env['ENV']['TMP'] = os.environ['TMP']
env.Append(CPPPATH=['#platform/windows/include'])
env.Append(LIBPATH=['#platform/windows/lib'])
+ env.Append(CCFLAGS=['/DWINVER=%s' % winver, '/D_WIN32_WINNT=%s' % winver])
if (env["target"] == "release"):
@@ -298,6 +299,7 @@ def configure(env):
env.use_windows_spawn_fix()
# build using mingw
+ env.Append(CCFLAGS=['-DWINVER=%s' % winver, '-D_WIN32_WINNT=%s' % winver])
if (os.name == "nt"):
env['ENV']['TMP'] = os.environ['TMP'] # way to go scons, you can be so stupid sometimes
else:
diff --git a/platform/winrt/detect.py b/platform/winrt/detect.py
index 5002495c5..d063be465 100644
--- a/platform/winrt/detect.py
+++ b/platform/winrt/detect.py
@@ -136,8 +136,12 @@ def configure(env):
env.Append(CCFLAGS=['/DGLES2_ENABLED'])
# env.Append(CCFLAGS=['/DGLES1_ENABLED'])
+ winver = "0x0602" # Windows 8 is the minimum target for UWP build
+ env.Append(CCFLAGS=['/DWINVER=%s' % winver, '/D_WIN32_WINNT=%s' % winver])
+
LIBS = [
#'winmm',
+ 'ws2_32',
'libEGL',
'libGLESv2',
'libANGLE',