[glib] win32: define _WIN32_WINNT globally
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] win32: define _WIN32_WINNT globally
- Date: Thu, 15 Nov 2012 19:36:45 +0000 (UTC)
commit 731b46990896665a8107535080bb075a6e18b6f7
Author: Dan Winship <danw gnome org>
Date: Sat Nov 10 10:54:43 2012 -0500
win32: define _WIN32_WINNT globally
Rather than defining _WIN32_WINNT only in a handful of files, define
it in config.h, like we do with _GNU_SOURCE.
(Also remove a "#define WIN32_LEAN_AND_MEAN" that isn't really all
that useful.)
https://bugzilla.gnome.org/show_bug.cgi?id=688109
configure.ac | 2 ++
gio/glocalfile.c | 1 -
gio/gnetworkingprivate.h | 1 -
gio/gregistrysettingsbackend.c | 3 ---
gio/gtestdbus.c | 1 -
gio/gwin32volumemonitor.c | 1 -
gio/win32/gwin32directorymonitor.c | 2 --
gio/win32/gwinhttpvfs.h | 1 -
8 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 8badfe3..d7f4800 100644
--- a/configure.ac
+++ b/configure.ac
@@ -150,6 +150,8 @@ case "$host" in
LIB_EXE_MACHINE_FLAG=X64
;;
esac
+
+ AC_DEFINE([_WIN32_WINNT], [0x0501], [Target the Windows XP API])
;;
*)
glib_native_win32=no
diff --git a/gio/glocalfile.c b/gio/glocalfile.c
index 674497f..eca2a11 100644
--- a/gio/glocalfile.c
+++ b/gio/glocalfile.c
@@ -66,7 +66,6 @@
#include "glibintl.h"
#ifdef G_OS_WIN32
-#define _WIN32_WINNT 0x0500
#include <windows.h>
#include <io.h>
#include <direct.h>
diff --git a/gio/gnetworkingprivate.h b/gio/gnetworkingprivate.h
index 2be3688..97bc047 100644
--- a/gio/gnetworkingprivate.h
+++ b/gio/gnetworkingprivate.h
@@ -23,7 +23,6 @@
#ifdef G_OS_WIN32
-#define _WIN32_WINNT 0x0501
#include <winsock2.h>
#undef interface
#include <ws2tcpip.h>
diff --git a/gio/gregistrysettingsbackend.c b/gio/gregistrysettingsbackend.c
index c3e5b08..2b1d0d7 100644
--- a/gio/gregistrysettingsbackend.c
+++ b/gio/gregistrysettingsbackend.c
@@ -97,9 +97,6 @@
#include "gsettingsbackend.h"
#include "giomodule.h"
-
-#define _WIN32_WINNT 0x0500
-#define WIN32_LEAN_AND_MEAN
#include <windows.h>
//#define TRACE
diff --git a/gio/gtestdbus.c b/gio/gtestdbus.c
index 6bb98cf..2315451 100644
--- a/gio/gtestdbus.c
+++ b/gio/gtestdbus.c
@@ -45,7 +45,6 @@
#include "glibintl.h"
#ifdef G_OS_WIN32
-#define _WIN32_WINNT 0x0500
#include <windows.h>
#endif
diff --git a/gio/gwin32volumemonitor.c b/gio/gwin32volumemonitor.c
index 4b984ea..fb93540 100644
--- a/gio/gwin32volumemonitor.c
+++ b/gio/gwin32volumemonitor.c
@@ -35,7 +35,6 @@
#include "gmount.h"
#include "giomodule.h"
-#define _WIN32_WINNT 0x0500
#include <windows.h>
struct _GWin32VolumeMonitor {
diff --git a/gio/win32/gwin32directorymonitor.c b/gio/win32/gwin32directorymonitor.c
index 4b774ee..a786201 100644
--- a/gio/win32/gwin32directorymonitor.c
+++ b/gio/win32/gwin32directorymonitor.c
@@ -21,8 +21,6 @@
*
*/
-#define _WIN32_WINNT 0x0400
-
#include "config.h"
#include "gwin32directorymonitor.h"
#include <windows.h>
diff --git a/gio/win32/gwinhttpvfs.h b/gio/win32/gwinhttpvfs.h
index 655c223..f515168 100644
--- a/gio/win32/gwinhttpvfs.h
+++ b/gio/win32/gwinhttpvfs.h
@@ -28,7 +28,6 @@
#include <gio/giotypes.h>
#include <gio/gvfs.h>
-#define _WIN32_WINNT 0x0500
#include <windows.h>
#include "winhttp.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]