From 4f848ac25536eb1f3475b58e36faf42d0555192d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fridrich=20=C5=A0trba?= Date: Wed, 31 Mar 2010 18:19:44 +0200 Subject: [win32] Test for eventsys.h and sensevts.h properly --- modules/windows-sens/evolution-windows-sens.c | 35 +++++++++++++++++---------- 1 file changed, 22 insertions(+), 13 deletions(-) (limited to 'modules/windows-sens/evolution-windows-sens.c') diff --git a/modules/windows-sens/evolution-windows-sens.c b/modules/windows-sens/evolution-windows-sens.c index 580bb1d9bd..d228fc02ac 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 +#endif + #define INITGUID #include #include -#if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR) - +#ifdef HAVE_EVENTSYS_H #include -#include - #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 +#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 -- cgit v1.2.3