[wing] build: require Windows 7+
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [wing] build: require Windows 7+
- Date: Thu, 26 Mar 2020 08:04:52 +0000 (UTC)
commit ac435e234154a5c06360a24d0d78ecfe0718648b
Author: Jakub Janků <jjanku redhat com>
Date: Wed Mar 25 20:22:20 2020 +0100
build: require Windows 7+
Explicitly set _WIN32_WINNT to 0x0601.
According to [0], MSVC compiler does this by default,
but MinGW uses 0x502 - aka Windows Server 2003.
This is necessary because wing uses functions
in threadpoolapiset.h which are first available in 0x0600.
[0] https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=vs-2019
Signed-off-by: Jakub Janků <jjanku redhat com>
meson.build | 1 +
tests/poll.c | 2 --
2 files changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/meson.build b/meson.build
index bafbdfb..3cdd1ad 100644
--- a/meson.build
+++ b/meson.build
@@ -55,6 +55,7 @@ conf.set('includedir', wing_includedir)
conf.set('VERSION', wing_version)
add_project_arguments('-DG_LOG_USE_STRUCTURED=1', language: 'c')
+add_project_arguments('-D_WIN32_WINNT=0x0601', language: 'c')
# Compiler flags
if cc.get_id() == 'msvc'
diff --git a/tests/poll.c b/tests/poll.c
index 2e372da..8ed1586 100644
--- a/tests/poll.c
+++ b/tests/poll.c
@@ -16,8 +16,6 @@
* along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#define _WIN32_WINNT 0x0600
-
#include <Winsock2.h>
#include <wing/wing.h>
#include <glib.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]