Index: gpgme/gpgme/w32-qt-io.cpp
===================================================================
--- gpgme/gpgme/w32-qt-io.cpp	(revision 1282)
+++ gpgme/gpgme/w32-qt-io.cpp	(working copy)
@@ -29,8 +29,6 @@
 #include <errno.h>
 #include <signal.h>
 #include <fcntl.h>
-#include <unistd.h>
-#include <sys/time.h>
 #include <sys/types.h>
 #include <windows.h>
 #include <io.h>
@@ -409,7 +407,7 @@
       0,         /* returns pid */
       0         /* returns tid */
     };
-  STARTUPINFO si;
+  STARTUPINFOA si;
   char *envblock = NULL;
   int cr_flags = CREATE_DEFAULT_ERROR_MODE
     | GetPriorityClass (GetCurrentProcess ());
@@ -476,7 +474,7 @@
       memset (&sa, 0, sizeof sa);
       sa.nLength = sizeof sa;
       sa.bInheritHandle = TRUE;
-      hnul = CreateFile ("nul",
+      hnul = CreateFile (TEXT("nul"),
 			 GENERIC_READ|GENERIC_WRITE,
 			 FILE_SHARE_READ|FILE_SHARE_WRITE,
 			 &sa,
Index: gpgme/gpgme/debug.h
===================================================================
--- gpgme/gpgme/debug.h	(revision 1282)
+++ gpgme/gpgme/debug.h	(working copy)
@@ -22,6 +22,7 @@
 #define DEBUG_H
 
 #include <string.h>
+#include "config.h"
 
 /* Indirect stringification, requires __STDC__ to work.  */
 #define STRINGIFY(v) #v
@@ -40,10 +41,10 @@
 
 /* Remove path components from filenames (i.e. __FILE__) for cleaner
    logs. */
-static inline const char *_gpgme_debug_srcname (const char *file)
+static const char *_gpgme_debug_srcname (const char *file)
                                                 GPGME_GCC_A_PURE;
 
-static inline const char *
+static const char *
 _gpgme_debug_srcname (const char *file)
 {
   const char *s = strrchr (file, '/');
Index: gpgme/gpgme/gpgme.h
===================================================================
--- gpgme/gpgme/gpgme.h	(revision 1282)
+++ gpgme/gpgme/gpgme.h	(working copy)
@@ -34,7 +34,10 @@
 
 #ifdef _MSC_VER
   typedef long off_t;
-  typedef long ssize_t;
+  #ifndef _SSIZE_T_DEFINED
+  #define _SSIZE_T_DEFINED
+    typedef long ssize_t;
+  #endif
 #else
 # include <sys/types.h>
 #endif
