[evolution] [win32] Test for eventsys.h and sensevts.h properly
- From: Fridrich Strba <strba src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] [win32] Test for eventsys.h and sensevts.h properly
- Date: Wed, 31 Mar 2010 16:37:55 +0000 (UTC)
commit 4f848ac25536eb1f3475b58e36faf42d0555192d
Author: Fridrich Å trba <fridrich strba bluewin ch>
Date: Wed Mar 31 18:19:44 2010 +0200
[win32] Test for eventsys.h and sensevts.h properly
configure.ac | 12 ++++++++
modules/windows-sens/evolution-windows-sens.c | 35 +++++++++++++++---------
2 files changed, 34 insertions(+), 13 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 0cb40c0..3a1cd0d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1160,6 +1160,18 @@ AC_MSG_CHECKING([if Windows SENS support is enabled])
AC_MSG_RESULT([$enable_sens])
if test "$enable_sens" = yes; then
SENS_LIBS="-lole32 -loleaut32 -luuid -lrpcrt4"
+ AC_CHECK_HEADER([eventsys.h],
+ [AC_DEFINE([HAVE_EVENTSYS_H], 1, [Have <eventsys.h>])],,
+ [[ #if HAVE_EVENTSYS_H
+ #include <eventsys.h>
+ #endif
+ ]])
+ AC_CHECK_HEADER([sensevts.h],
+ [AC_DEFINE([HAVE_SENSEVTS_H], 1, [Have <sensevts.h>])],,
+ [[ #if HAVE_SENSEVTS_H
+ #include <sensevts.h>
+ #endif
+ ]])
AC_SUBST(HAVE_SENS)
AC_SUBST(SENS_LIBS)
fi
diff --git a/modules/windows-sens/evolution-windows-sens.c b/modules/windows-sens/evolution-windows-sens.c
index 580bb1d..d228fc0 100644
--- a/modules/windows-sens/evolution-windows-sens.c
+++ b/modules/windows-sens/evolution-windows-sens.c
@@ -20,26 +20,20 @@
#error This file cannot be built with C++ compiler
#endif
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#define INITGUID
#include <windows.h>
#include <rpc.h>
-#if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR)
-
+#ifdef HAVE_EVENTSYS_H
#include <eventsys.h>
-#include <sensevts.h>
-
#else
/* Extract relevant typedefs from mingw-w64 headers */
-typedef struct {
- DWORD dwSize;
- DWORD dwFlags;
- DWORD dwOutSpeed;
- DWORD dwInSpeed;
-} *LPSENS_QOCINFO;
-
typedef struct IEnumEventObject IEnumEventObject;
const IID IID_IEnumEventObject;
@@ -159,6 +153,23 @@ struct IEventSubscription {
CONST_VTBL struct IEventSubscriptionVtbl *lpVtbl;
};
+#define PROGID_EventSubscription OLESTR("EventSystem.EventSubscription")
+
+#endif
+
+#ifdef HAVE_SENSEVTS_H
+#include <sensevts.h>
+#else
+
+/* Extract relevant typedefs from mingw-w64 headers */
+
+typedef struct {
+ DWORD dwSize;
+ DWORD dwFlags;
+ DWORD dwOutSpeed;
+ DWORD dwInSpeed;
+} *LPSENS_QOCINFO;
+
typedef struct ISensNetwork ISensNetwork;
const IID IID_ISensNetwork;
@@ -182,8 +193,6 @@ struct ISensNetwork {
CONST_VTBL struct ISensNetworkVtbl *lpVtbl;
};
-#define PROGID_EventSubscription OLESTR("EventSystem.EventSubscription")
-
#endif
#include <shell/e-shell.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]